posted 1 year ago
I have an issue in running a Spring MVC project on tomcat in eclipse IDE, when I launch the URL, I get 404. The same code is working perfectly fine when I create a war file and deploy from tomcat console.
Does anyone had this issue ? Any inputs would be greatly appreciated, I have been spending lot of time to test small change.
Does anyone had this issue ? Any inputs would be greatly appreciated, I have been spending lot of time to test small change.
Naveen N Kumar
Greenhorn
Posts: 6
posted 1 year ago
@Tim
I was working on a maven project and when I clean and recompile the project and deploy on Tomcat which is added Eclipse I get 404 error,
although same is working when I create a war and deploy from tomcat console.
If I don't clean the project, it works fine, wondering whats happening behind ??
I was working on a maven project and when I clean and recompile the project and deploy on Tomcat which is added Eclipse I get 404 error,
although same is working when I create a war and deploy from tomcat console.
If I don't clean the project, it works fine, wondering whats happening behind ??
Tim Nachreiner
Ranch Hand
Posts: 71
1
posted 1 year ago
First: Do you have the tomcat plugin in your pom.xml file?
Second: You need to remember that doing a Maven clean install does not start the tomcat server, that's why you are getting the 404 error.
you should launch your application by right-clicking, choosing Run-as, Maven build..., then enter tomcat7:run in the Goals text box (this assumes you have the tomcat7 plugin configured in your pom.xml file.
I'm assuming you are following an online tutorial. Which one is it?
Second: You need to remember that doing a Maven clean install does not start the tomcat server, that's why you are getting the 404 error.
you should launch your application by right-clicking, choosing Run-as, Maven build..., then enter tomcat7:run in the Goals text box (this assumes you have the tomcat7 plugin configured in your pom.xml file.
I'm assuming you are following an online tutorial. Which one is it?
Naveen N Kumar
Greenhorn
Posts: 6
posted 1 year ago
@Naveen
First. Please check location of web pages, are they placed in webcontent folder or not.
Second, also check the path of index page. Is is correct or not
I think there is no need of tomcat plugin in pom.xml
we can add apache tomcat from add server option in IDE.
You may need to add servlet dependency ....
First. Please check location of web pages, are they placed in webcontent folder or not.
Second, also check the path of index page. Is is correct or not
I think there is no need of tomcat plugin in pom.xml
we can add apache tomcat from add server option in IDE.
You may need to add servlet dependency ....

Don't get me started about those stupid light bulbs. |