• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

http status 404-/result.jsp

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
for the .class files I just miss typed it in the forum. It is actually WEB-INF
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Look! I laid an egg! Why does it smell like that? Tiny ad, does this smell weird to you?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic