File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Please Help !! Help needed very urgently Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Please Help !! Help needed very urgently" Watch "Please Help !! Help needed very urgently" New topic

Please Help !! Help needed very urgently

kripa ganesh

Joined: Nov 01, 2001
Posts: 8
Am using Tomcat 3.2.1 and Servlets 2.1 for a small cart project. But whenever i use the post method the tomcat server it gives out an error that says Page could not be displayed because the service is not available..
Kindly help me on what i should do to get it working, is there any change i should make in the xml files to use the post method??
pls help
Juanjo Bazan
Ranch Hand

Joined: Feb 04, 2002
Posts: 231
It is not up to your tomcat to accept post requests, its a problem of your servlets.
Be sure you have coded the doPost method in your servlet.
If you want the Post method to do the same as the Get method you can just call doGet() from the doPost.
Rishi Tyagi
Ranch Hand

Joined: Feb 14, 2002
Posts: 100
You should try with the service method ,
Most probably you are using doGet method in the servlet which accept only HTTP GET requests and for the other HTTP requests you will receive the same error message what you are getting right now.
More specifically if you want this servlet accessible through HTTP POST request only then you can overwrite doPost method of HttpServlet Class.
If you want that your servlet should handle both HTTP GET and POST requests then you should use service method as it can accept both type of requests
Hope this will solve your problem
kripa ganesh

Joined: Nov 01, 2001
Posts: 8
Thanx a lot for the timely help.. have solved the problem with your suggestions.
I agree. Here's the link:
subject: Please Help !! Help needed very urgently
It's not a secret anymore!