- Posted by: Devendra Gupta
- Posted on: January 11 2001 10:22 EST
I have installed Apache with JServ 1.1.1 on SunOS 5.8 and running it on port 9000.
When I point browser "http:localhost:9000/servlet/Hello"
by typing directly, it works fine.
But if if try to invoke this servlet from a form as action using "POST" method, it doesn't work and I get "HTTP 400 - Bad Request" error but if i just refresh the page with current URL it shows result fine.
I tried to make a request from a "form" with "GET" method, this time it works fine and give the desired result.
Can anyone tell me that why a Servlet is not being inviked from a "form" using method "POST"?
Here I have taken servlet "Hello" as example. infact I am getting this problem as common for every servlet.
Thanks in advance, would appreciate if you can mail me at d_k_gupta at yahoo dot com
- Servlet call from "Form using POST method" doen't work??? by keerthi kanth on January 11 2001 12:41 EST
- Servlet call from "Form using POST method" doen't work??? by Devendra Gupta on January 11 2001 16:39 EST
doGet is the default method in the servelet.If you call doget from post in the form it won't work.If you make dopost in the servlet it will work.Check what you have done
Thank you very much Keerthi!