I am running tomcat7 within Eclipse. When I set Tomcat/Properties/Location: /Servers/Tomcat v7.0 Server at localhost.server, I CAN reach localhost:8080, but gets 404 error on my sites (localhost:8080/mysite/user/adduser). When I set Location: [workspace metabase], I get 404 error on both localhost:8080 and localhost:8080/mysite/user/adduser.
What did I do wrong?
Make sure your Web Module is added to Tomcat and has the expected path. To do so:
Open the Servers tab (Window -> Show View -> Servers).
Double-click the Tomcat Server (a new window will open)
On this window, check the Modules tabs.
Related
I followed the instruction on this page to create a simple maven web app:
However, when on step 11: Right click on project -> run as -> run on server, there is no "tomcat" and i got an error message: the selection did not contain any resources that can run on a server.
image
Also as the picture shown, I have successfully added tomcat in servers view and the app is also shown in the server list unfer tomcat 8.0. In the property->runtimes window, tomcat is in the list and checked. but 'make it primary" is disabled and in the "runtime composition" panel the message is <no runtime selected>.
localhost:8080/mavenWebApp got 404 error.
What could be the problem?
There is a maven spring mvc project which I imported in eclipse . The same project is running successfully in my colleague's desktop . When i start the tomcat server in eclipse, I am not able to see http://localhost:8080/test/ , it is showing as error http status 404 . I even changed the port no to 8081 and ran it again but it is giving same error . It is not able to find the index.jsp page .
Try to use
File -> Import -> [General] -> Project interchange (for the whole ZIP)
or
File -> Import -> [General] -> Existing project into workspace (for the extracted file)
for eclipse to import them properly.
Do you see tomcat running properly under localhost:8080 or 8081 ? if not, then it means something is wrong with Tomcat in general, what can you see in catalina.log file during tomcat start attempt (or in the command shell where you attempt 'catalina start' ?
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
The first answer in the above query solved the issue . I was getting classNotFoundException due to which index.jsp I was unable to view .
I configured Tomcat Server 6.0.24 in STS and started successfully
But when I am trying to connect to http://localhost:8080/ it is giving me the following error
HTTP Status 404 - /
type Status report
message /
description The requested resource is not available.
Apache Tomcat/7.0.57
Any Solution, unfortunately i'm a newbie...my Java developer isn't available for the next one more week and I've to do the HTML modification in the portal.
I need a solution to fix this.
I tried to switch server location but Tomcat never starts. I closed the STS and went into localhost:8080 then my tomcat page shows up.
But the problem is only when STS is open i get 404 error.
I created a spring web application in eclipse, with Tomcat as runtime server.
It worked fine,and I could see my app working using:
http://localhost:8080/MyAppName/
But once I did switch location(from workspace metadata to tomcat location ) in the tomcat server properties of eclipse, application is giving HTTP Status 404 when I am trying to access it by :
http://localhost:8080/MyAppName/
I followed this tutorial to create a sample helloworld web application in eclipse:
http://javapapers.com/spring/spring-mvc-hello-world/
Can someone help me know why this is happening?
I am using tomcat 7 + eclipse luna
I installed Jetty and I run it with ./jetty.sh start, and it is running:
a#a:~/java/jetty/bin$ ./jetty.sh start
Starting Jetty: Already Running!
a#a:~/java/jetty/bin$
But when I go to localhost:8080, I see
Error 404 - Not Found. No context on this server matched or handled
this request. Contexts known to this server are:
Powered by Jetty:// Java Web Server
What am I doing wrong?
Jetty is probably running fine - the 404 is coming from the server. You probably don't have a default web page set to respond to a root request (where something like index.html would be).
Take a look at this: Jetty - Default page for root path
* EDIT 2013-12-22T16:25Z *
If you make changes to your application you'll have to release your war file & bounce the Jetty process unless you've got the Jetty deployment set up to automatically refresh the application.
Take a look at this: Auto-Reloading WAR in Jetty standalone