File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Please Help !! Help needed very urgently" Watch "Please Help !! Help needed very urgently" New topic
Author

Please Help !! Help needed very urgently

kripa ganesh
Greenhorn

Joined: Nov 01, 2001
Posts: 8
Hello,
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
thanx
Kripa
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.
HTH
Rishi Tyagi
Ranch Hand

Joined: Feb 14, 2002
Posts: 100
Dear
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
Rishi
kripa ganesh
Greenhorn

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: http://aspose.com/file-tools
 
subject: Please Help !! Help needed very urgently