java 如何在weblogic上刷新jsp
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1476461/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I refresh jsp's on weblogic
提问by Pablojim
I'm running an exploded war on weblogic 10.0 in production mode.
我在生产模式下对 weblogic 10.0 进行了一场爆炸式的War。
I want to modify a jsp without having to fully redeploy the application. I can't seem to achieve this using the weblogic.Deployer with a partial redployment - see:
我想修改一个jsp而不必完全重新部署应用程序。我似乎无法使用带有部分重新部署的 weblogic.Deployer 来实现这一点 - 请参阅:
http://download-llnw.oracle.com/docs/cd/E13222_01/wls/docs100/deployment/redeploy.html#wp1025739
http://download-llnw.oracle.com/docs/cd/E13222_01/wls/docs100/deployment/redeploy.html#wp1025739
This must be a fairly standard problem - has anyone got a solution?
这一定是一个相当标准的问题——有人有解决方案吗?
回答by Pascal Thivent
According to the link you have provided, weblogic.Deployeris your friend:
根据您提供的链接,weblogic.Deployer是您的朋友:
Updating Static Files in a Deployed Application
In a production environment, you may occasionally need to refresh the static content of a Web application module—HTML files, image files, JSPs, and so forth—without redeploying the entire application. If you deployed a Web application or an Enterprise Application as an exploded archive directory, you can use the weblogic.Deployer utility to update one or more changed static files in-place. See
Avoiding Unnecessary JSP Compilationon dev2dev.comTuning Web Applications.To redeploy a single file associated within a deployment unit, specify the file name at the end of the redeploy command. For example:
java weblogic.Deployer -adminurl http://localhost:7001 -user weblogic -password weblogic -name myApp -redeploy myApp/copyright.htmlAlways specify the pathname to updated files relative to the root directory of the exploded archive directory. In the above example, the Web application is deployed as part of an Enterprise Application, so the module directory is specified (
myApp/copyright.html).If the Web application module had been deployed as a stand-alone module, rather than as part of an Enterprise Application, the file would have been specified alone (
copyright.html).You can also redeploy an entire directory of files by specifying a directory name instead of a single file. For example:
java weblogic.Deployer -adminurl http://localhost:7001 -user weblogic -password weblogic -name myApp -redeploy myApp/myjspsIn the above example, all files and subdirectories located in the myjsps subdirectory of the Enterprise Application are redeployed in-place.
更新已部署应用程序中的静态文件
在生产环境中,您可能偶尔需要刷新 Web 应用程序模块的静态内容(HTML 文件、图像文件、JSP 等),而无需重新部署整个应用程序。如果您将 Web 应用程序或企业应用程序部署为展开的归档目录,则可以使用 weblogic.Deployer 实用程序就地更新一个或多个更改的静态文件。请参阅
dev2dev.comTuning Web Applications上的避免不必要的 JSP 编译。要重新部署在部署单元内关联的单个文件,请在 redeploy 命令的末尾指定文件名。例如:
java weblogic.Deployer -adminurl http://localhost:7001 -user weblogic -password weblogic -name myApp -redeploy myApp/copyright.html始终指定相对于分解存档目录的根目录的更新文件的路径名。在上面的示例中,Web 应用程序作为企业应用程序的一部分进行部署,因此指定了模块目录 (
myApp/copyright.html)。如果已将 Web 应用程序模块部署为独立模块,而不是作为企业应用程序的一部分,则将单独指定该文件 (
copyright.html)。您还可以通过指定目录名而不是单个文件来重新部署整个文件目录。例如:
java weblogic.Deployer -adminurl http://localhost:7001 -user weblogic -password weblogic -name myApp -redeploy myApp/myjsps在上面的示例中,位于企业应用程序的 myjsps 子目录中的所有文件和子目录都重新部署到位。
AFAIK, this apply to the production mode too. So it must be a syntax problem in the command you use.
AFAIK,这也适用于生产模式。所以一定是你使用的命令有语法问题。
回答by ATorras
I'm sure that the problem is the "production" mode, that it should prevent the JSP refresh.
我确定问题是“生产”模式,它应该阻止 JSP 刷新。
Tomcat disables the JSP refresh in production mode too.
Tomcat 也在生产模式下禁用 JSP 刷新。
Regards.
问候。

