0

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.

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.

Rajesh Chamarthi
  • 18,568
  • 4
  • 40
  • 67
user399082
  • 11
  • 1
  • 1
  • 1

6 Answers6

2

Your project hierarchy is the one that needs to be checked project- src- servlet

    webcontent-
               web-inf-
                       web.xml
               index.jsp

Your url will be http://localhost:8080/project

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
ashishksh
  • 41
  • 4
2

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
  • 73,784
  • 33
  • 194
  • 347
2

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
  • 34,983
  • 11
  • 83
  • 114
0

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
  • 23,575
  • 2
  • 47
  • 51
0

Might be

1)Don't violate folder creation structure hierarchy and place corresponding files

2)web applications are not deployed

3)right URL to access the web application

4)Container not yet started(because check out the port numbers that may clash with earlier configured setups )

Community
  • 1
  • 1
Ajay Takur
  • 6,079
  • 5
  • 39
  • 55
-1

It could be due to missing tld files in WEB-INF directory which are being used, inside JSP, example JSTL Core.

<c:out value="${salary}"/>