简体   繁体   English

我们能否在已部署的服务器中更新jar / war文件,然后重新加载新的jar / war文件?

[英]Can we update a jar / war file in a deployed server and then reload the new jar / war file?

Can we update a jar / war file in a deployed server and then reload the new jar / war file ? 我们可以在已部署的服务器中更新jar / war文件,然后重新加载新的jar / war文件吗? if so how simple we can achieve this, and please if possible list web servers which support this feature. 如果是这样,我们可以轻松实现这一目标,请尽可能列出支持此功能的Web服务器。

Yes. 是。

All major Java EE Servlet containers support this. 所有主要的Java EE Servlet容器都支持此功能。 All that I've worked with anyway, which includes Glassfish, Tomcat, WebSphere, WebLogic and JRun. 无论如何,我一直使用的所有工具,包括Glassfish,Tomcat,WebSphere,WebLogic和JRun。

I haven't used the other Oracle container, but I would think it does too. 我没有使用过其他Oracle容器,但我认为也可以。

That said, none of them support it all that reliably (they'll detect most changes, but there are certain types of class changes that will always require a restart), unless you're using JavaRebel underneath. 也就是说,除非您在下面使用JavaRebel ,否则它们都不可靠地支持所有功能(它们将检测大多数更改,但是某些类型的类更改始终需要重新启动)。

Just by copying the 'war' file in the Server domain folder will automatically deploy it. 仅通过复制Server域文件夹中的“ war”文件,即可自动部署它。 I have done it with glassfishv3.1 我已经用glassfishv3.1完成了

The path for windows is C:\\Program Files\\glassfish-3.1\\glassfish\\domains\\domain1\\autodeploy Windows的路径为C:\\ Program Files \\ glassfish-3.1 \\ glassfish \\ domains \\ domain1 \\ autodeploy

Once pasted another file gets created automatically [if the server is on] in the same directory 粘贴后,将自动在同一目录中创建另一个文件(如果服务器已打开)。

For the editing purposes the 'war' file can be opened with programs like WinRar or WinZip 为了进行编辑,可以使用WinRar或WinZip等程序打开“ war”文件

Just open the files that you want to change and save it when the winrar asks for it. 只需打开要更改的文件并在winrar要求时将其保存。

Both Tomcat and Jetty will support a hot deploy. TomcatJetty都将支持热部署。 They simply monitor the deploy directory for changes, so you can just copy the .war file into that directory, and the server will undeploy/redeploy. 他们只是监视部署目录中的更改,因此您只需将.war文件复制到该目录中,服务器将取消部署/重新部署。

JBoss. JBoss。 Just drop in the files in the correct location. 只需将文件放在正确的位置即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Web Sphere服务器,我们能否从部署的.war / .ear /中更新和读取文件。 文件? - Using web sphere server, Can we update and read file from the deployed .war/.ear/. files? 在WAR文件中打包JAR文件 - Packaging JAR file in WAR file 可以在任何服务器上部署war文件吗? - Can a war file be deployed on any server? 如何在其他.war文件中引用特定.war的jar文件 - How to refer a jar file of a particular .war in other .war file 如何将jar文件转换为war并部署到tomcat服务器 - How to convert jar file to war and deploy it in tomcat server 如何将 .war 文件转换为 JAR 文件? - How to convert a .war file into a JAR file? java war 文件在 jar 文件中抛出 FileNotFoundException - java war file throws FileNotFoundException in jar file 当 Struts2 位于 war 文件中的 jar 文件中并且 Struts2 被部署为 Wildfly 模块时,Struts2 找不到我的操作 - Struts2 can't find my actions when they are in a jar file within a war file and Struts2 is deployed as a Wildfly module .war文件与jar文件和Websphere共享库jar文件 - .war file with jar file and websphere shared library jar file JBoss:EAR中的WAR文件在类路径上找不到JAR库 - JBoss: WAR file in EAR can't find JAR library on classpath
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM