• Post Reply Bookmark Topic Watch Topic
  • New Topic

ReverseServlet.java  RSS feed

 
Manju Jain
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The file reverse.html is in c:\orion\default-web-app
The file ReverseServlet.class is in
c:\orion\default-web-app\WEB-INF\classes
When the browser is pointed to http://localhost/reverse.html , it processes the html file but on pressing submit button , its unable to locate //localhost/servlet/ReverseServlet file.
Am I missing something?
Thanks in advance
jytsika
 
Marilyn de Queiroz
Sheriff
Posts: 9081
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The files are in the correct places. What is the exact error message you are getting?
 
Manju Jain
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Marilyn,
The error is: Http 404 not found [ servlet class file ]
One more thing , I am using doPost to get the user parameter and
doGet to send back the processed information. Is it ok? If I substitute a different servlet file in form's action attribute then the server is able to find it.
Thanks,
jytsika
 
Marilyn de Queiroz
Sheriff
Posts: 9081
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you have your doGet and doPost reversed. Normally people use doGet to get the original page and doPost when you press the submit button.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!