Reputation: 11
Can anyone tell me..while running servlets iam using apache tomcat. But everytime i make changes to my web application..I have to export the war file and put into the webapp directory again and again..it is too much time consuming and very hectic. For even small changes i have to export war file and then put in my webapp directory. I cant run my web application without doing this..i mean new changes are not reflected till then.. Isn't there any other method..i think auto deploy should do..and however it is set to true in my web application. but it is not doing it..I have been searching on the net since 2 days..but didn't got any solution..please help..
Upvotes: 1
Views: 80
Reputation: 338171
As mentioned, the IDEs nowadays can do some rapid redeployment or hot-swapping of classes. This can work for some scenarios but not all.
For even more advanced hot-swapping in more scenarios, consider the commercial tool JRebel by ZeroTurnAround.com.
Upvotes: 0
Reputation: 112
You can develop with IDEs like Eclipse or Netbeans. It will be easy to develop and auto-deploy will be taken care by themselves. It will save much time. And completely developed final product can be exported at final stage.
Upvotes: 1
Reputation: 667
Most popular IDEs like Eclipse
, IntelliJ
or Netbeans
provide web testing and publishing tools for users, it's a very basic feature.
In case you're using Eclipse
, navigating to Web Tools Platform User Guide > Using the server tools
in help page, should be sufficient for you to set up the environment.
Here's online help document for Eclipse Mars, for your convenience.
Upvotes: 1
Reputation: 3491
A WAR
file is basically just a .zip with the respective webapp contents. Instead of deploying a WAR, you can deploy an "exploded WAR", being the contents of your webapp. Various build tools support doing this, for example, Maven supports the dir
packaging in the assembly plugin. Then, you can for example configure your project to build classes directly to your WEB-INF/classes
directory of your "exploded WAR".
EDIT: In case it wasn't clear - you just put the exploded WAR within a directory in the webapps directory where you normally put the WARs - so instead of application.war
, you just put an application
directory containing the webapp.
Upvotes: 1