views:

41

answers:

3

Respected Sir/Mam,

I am trying to run some basic servlet and jsp program with Tomcat. but it gives some error. I am using Tomcat 6.0.29 and jdk 1.6.0_21. I have done everthing properly. But when i click on WebAppl link in Tomcat then it gives below error

HTTP Status 404 - /WebAppl/

type Status report

message /WebAppl/

description The requested resource (/WebAppl/) is not available.   

I tried another code which was running properly on Tomcat 5.5.9. But still gives same error here.

HTTP Status 404 - /SampleAppl/

type Status report

message /SampleAppl/

description The requested resource (/SampleAppl/) is not available.

What should I do to solve this error?

Is it because of new version of Tomcat? Can anyone guide me.

+1  A: 

Either you are not using the right URL to access the web application, or you had an error when deploying. Have a look at the Tomcat server logs to see if there is anything in there.

Also the management console might help you getting the URL right.

Thorbjørn Ravn Andersen
+1  A: 

It looks like your web applications are not deployed. Check carefully the log files of the booting of your tomcat. It will indicate when it starts deploying your webapps and why they failed.

The stacktraces stick out like a sore thumb and following the Up, or looking in down for 'Caused By' lines usually gives a reason why they do not deploy.

If you are stumped you may want to post some parts to this site to ask for guidance.

Peter Tillemans
A: 

You say you are using tomcat. In that case check the $tomcat/webapps directory. There should be a WebAppl and a SampleAppl directory (and/or war) in there.

Als check the $tomcat/logs directory and read catalina.out (the logfile). Check for Exceptions and the text deployed. You would expect that it says that application WebAppl is deployed.

Of course,you do have to connect to your tomcat. Tomcat is usually listening in port 8080 (check $tomcat/conf/servlet.xml). It could be that you are connecting to another application at port 80 (the http default, usually Apache or IIS).

If it is in port 8080, your URL should look like: http://localhost:8080/WebAppl

extraneon
Also search for "ERROR" in the catalina.out and other (e.g. application specific) log files.
Stephen C
The port is not the problem. He retrieved a Tomcat-typical error report, so the port in URL is fine.
BalusC