Tuesday, March 15, 2016

How to change an existing Java application to dynamic web application in Eclipse and deploy it to tomcat server?

I have an old application to enhance and want to convert it into dynamic web application in Eclipse.

1. Open the java application in eclipse. Right click on the project name, and then choose "properties".




2. Choose Project Facets on the left side. On the right side, check "Dynamic Web Module" and "Java" box. Then click OK button.



3. Now this project is a dynamic web project.

4. Deploy the application to local tomcat server. Go to properties again as step 1.

Choose Deployment Assembly on the left side, then in the right side, add the real source directory and deploy path. Then click ok.


5. Add web module into tomcat 8 server.
Right click the Tomcat server and choose Add and Remove, the in the pop up window, add left side application to the right side. Now we can restart tomcat server, the new application will be deployed to the server side and run.



No comments:

Post a Comment