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
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
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
Joined: Nov 01, 2001
Thanx a lot for the timely help.. have solved the problem with your suggestions.