-
Jun 22nd, 2012, 09:03 AM
#1
Spring deploy to tomcat
Hello,
I have created a Spring 3 project in Eclipse. Tested does it work on eclipse with tomcat. Now i want to deploy to server. How can I deploy my project to a Tomcat server?
Can you link me to any tutorial.
P.S. I hope you understand what I wanted to ask.
P.S.S sorry for my english.
Help is highly appreciated.
Regards
-
Jun 26th, 2012, 09:04 PM
#2
If you created the project as a Spring project in Eclipse, I will assume you are using Maven to build the project. If so, you can use Maven to generate a .war file for deployment to Tomcat.
To do this from a command line, navigate to the project root directory (the directory where the pom.xml file is) and run the command "mvn package" or "mvn install".
To do this from Eclipse, right-click on the project name in the Package Explorer. From the pop-up menu, select "Run As...", then "Maven install".
Either one of these methods should result in a .war file being created in the "target" directory under the project root.
Once you have a .war file, locate your Tomcat installation directory. Copy the .war file into the "webapps" directory under the Tomcat install directory. No need to unpack or do anything else with the file. Tomcat will automatically unpack it when the server is started. Start Tomcat, and you should be able to access the application.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules