Reputation: 75
I am very new to eclipse-tomcat-maven, and I am having some serious problems with configurating them.
I create a simple webapp from eclipse->new project->maven project-> mvn-archerype-webapp, with a simple Hello world, but when I select my project and run it on server I get the following message: HTTP Status 404 The requested resource is not available.
I have tried a significant amount of troubleshooting such as changing the server location to "User Tomcat Installation", or changing the server HTTP/1.1 port from 8080 to 8088 and again to 8080, restarting eclipse and pc, and lots of other staff but nothing works.
I am using eclipse Juno and apache tomcat 6.0. The tomcat server is starting just fine but it doesn't find the index.jsp page.
I would appreciate any help, because I am honestly lost and I cannot continue to work my jsp pages, unless I solve this problem.
Upvotes: 1
Views: 17902
Reputation: 121
I puzzled over this at first after installing Tomcat and trying to get Eclipse to use it. Tomcat was running but wouldn't show its start page.
The page HTTP Error 404 when running Tomcat from Eclipse seemed to have an answer, but that did not work for me.
Finally I found a perfect fixit video at: How to resolve 404 Error with Tomcat Server and Eclipse Thanks to "facesagar" on Youtube, and > Problem: assuming you have Tomcat installed, Java EE, etc set up, the perspective set to Java EE, the Servers tab showing, and you have aleady installed the Tomcat server there by "New Server".
You can strt the server, but a browser returns an error from Tomcat serving localhost:8080 meaning, Tomcat is running, but it cannot find the root pages.
Solution given the above:
Wow... it worked!
Upvotes: 5
Reputation: 75
Actually the problem was: Eclipse is automatically configuring a different folder structure than the one I had in my work IDE. In more details: my work folder structure was: src/main/webapp/WEB-INF and src/main/webapp/index.jsp While in home Eclipse automatically put all of the jsp pages, into a new folder called WebContent! So while my project was set to find the index.jsp under the WebContent/... it searched under the webapp folder, and thus did not find any index.jsp page.
I accidentally discovered that, after searching for days, when I clicked on myproject->properties->project facets->Dynamic Web Module->Further Configuration Available, down on the right of the window.
The "Further Configuration Available" can only display the FIRST time you import a project! I' ve spent a lot of days trying to find out what was wrong, so I'd like to share it in case someone else has the same problem!
Upvotes: 6