I am completely new to JAVA. I need to write a servlet which will consume http post parameters sent from a client. I already have a java application platform server and could deploy my applications there. What I need is to write a servlet which will react to posted parameters.
Apparently I will need to expose these variables in Servlet? I did google and came across results where it is suggested to use REST frameworks to achieve this. Is this not possible writing plane java code (e.g. to be run Tomcat) without using any additional framework? A link to sample or tutorial would be helpful too.
Thanks
No, you don’t need a REST framework.
Just write a servlet that extends
HttpServletand implementsdoPost().Start with the Sun/Oracle tutorial:
http://java.sun.com/developer/onlineTraining/Programming/BasicJava1/servlet.html
Here are the javadocs for the parent class:
http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html