doPost() is not called in servlet logic
My problem is this.
- i have a jsp page with a <form action="/etc" method="POST">..</form>
- i have a servlet: XServlet.java in which i override the doGet() and the doPost() methods.
- in my form i have some submit buttons...one for each table
- because i have the method declared to be on POST i thought that in my servlet i don't have to do anything else just write my logic in doPost method:P
Everything i do in my jsp page...all is going to the doGet method.(?!)
String requestType = request.getMethod(); System.out.println("reqType(dinGet): " + requestType);"
Searching the internet i found on the sun forums this:
doGet method is called by the server (via the service method) to allow a servlet to handle a GET request.
As the form was submitted using POST method, doGet method won't get called and hence it won't print anything.
I don't get it. what am i doing wrong here? any ideas would make my day and make me learn something today.
Thank you in advanced :)