Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

http status 404-/result.jsp

 
Nebiyu Haileselassie
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I keep getting /result.jsp is not available message when testing the JSP.
this is how I compiled the BeerSelect.java class

javac -classpath "c:\Program Files\tomcat\common\lib\servlet-api.jar";classes;. -d classes src\com\example\web\BeerSelect.java

I did not get any error and the .class file was created
so I coped it from the development directory to the deployment directory
Tomcat\Beer-v1\Web-INF\classes\com\example\web

Then restarted tomcat.

then I typed in http://localhost:8080/Beer-v1/form.html

the form displayed then I hit Submit that is when I get the error

Any Help I have been stuck on this for the second day now


thanks in indvance
 
Bertold Kolics
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have probably placed the result.jsp into the wrong directory. If you follow the examples, then it should be directly under the deployment directory (e.g. tomcat/webapps/Beer-v1) and not in the WEB-INF directory.
 
Nebiyu Haileselassie
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for responding.

I am still having the problem. this is what I have

result.jsp :
C:\Program Files\Tomcat\webapps\Beer-v1

form.html :
C:\Program Files\Tomcat\webapps\Beer-v1

BeerExpert.class:
C:\Program Files\Tomcat\webapps\Beer-v1\WEB-ING\classes\com\example\model

BeerSelect.class
C:\Program Files\Tomcat\webapps\Beer-v1\WEB-ING\classes\com\example\web

web.xml:
C:\Program Files\Tomcat\webapps\Beer-v1\WEB-INF

Am I missing somehing?

thanks again
 
Nebiyu Haileselassie
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for the .class files I just miss typed it in the forum. It is actually WEB-INF
 
magesh sripathy
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

just have a look at the extension of the file name .It may be a text file instead of JSP file,So while saving te file ,enter the file name in double quotes ie "result.jsp" in the save as dialog box.Restart the Tomcat ,i hope now you will get the correct output.

Regards,
Magesh.s
SCJP-98%
SCWCD-Inprogress
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nebiyu,
could you post your <FORM> which is in form.html ?
 
Nebiyu Haileselassie
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you

Bertold, Magesh and Satou, the problem is fixed

Magesh you were right the file extention was in text format.
renaming it with "result.jsp" fixed the problem.

This is what my form.html looks like
<html><body>
<h1 align="center">Beer Selection Page</h1>
<form method="POST"
action="SelectBeer.do">
Select beer characteristics<p>
Color:
<select name="color" size="1">
<option>light
<option>amber
<option>brown
<option>dark
</select>
<br><br>
<center>
<input type="SUBMIT">
</center>
</form></body><html>


Thanks again
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic