my application is running in eclipse but i want to run it on tomcat .i want to run my spring application in tomcat server and don't want to use eclipse or any other tool, so how can i do that and where do i put my various files basically the directory of it, and the complete procedure to do that. main problem is in the directory structure and the path to be put in the tomcat server to run that application. i tried but it gives the 404 error file not found ,as i am new to the spring framework explain in detail
Asked
Active
Viewed 1,728 times
1
-
Make sure your tomcat server is running even eclipse is closed or not. – Altmish-E-Azam Dec 08 '14 at 11:09
-
yes the eclipse is closed – Jon Stark Dec 08 '14 at 11:18
-
Is your apache is running? – Altmish-E-Azam Dec 08 '14 at 11:22
-
yes apache is running – Jon Stark Dec 08 '14 at 11:28
-
Okay, Once build your application in eclipse id copy build file from your project and deploy this build file from tomcat html manager from browser and try to access your project. can I see sample url what are you trying to access from tomcat. – Altmish-E-Azam Dec 08 '14 at 11:31
-
As in your question you are saying that your project gives you `404` error this means your project has not deployed properly on web server. – Altmish-E-Azam Dec 08 '14 at 11:32
2 Answers
1
You are asking a very broad question. But, in an attempt to point you in the right direction please see this article. The link given provides insight into the directory structure of your application.
Now as far as running "outside of eclipse" you should be able to export your project from the "File" menu as a "Web Application Archive" or "WAR" file. This file can then be placed under ${CATALINA_BASE}/webapps and be launched when you start your container.
If you are using a stock configuration and you have an archive named "myapp.war", you can access it on
http://localhost:8080/myapp
I hope this information helps you get to where you need to go.

Dave G
- 9,639
- 36
- 41
1
First export the war file using eclipse as you are using eclipse.
Then follow the procedure