
When a Servlet is invoked
A HTTP request is sent by the browser client to the server in one of the following cases, - A URL is entered on the address field of the browser,and enter button is pressed. - A hyperlink is clicked on a HTML page. - A form is filled and submit button is pressed. Now let us see how a Servlet is actually invoked when a form is filled. Consider a login.html page and a form as shown shown below, <HTML> -- -- <form name=login method=POST action=/ Servlet / myLoginServlet> <input type=text name=userName> <input type=password name=userPW?> <input type=submit name=login value=Log-IN > </form> -- -- </HTML> When the user clicks the submit button with the word Log-IN printed on it,the Servlet LoginServlet is invoked. The method used is POST to transfer the client user input to the Server. What happens next is all about server side web component the servlet. We will also look into more details about the container,the servlet and web.xml Servlet Container A servlet container is a subset or a part of a web server. The web server has to take care of internet networking connection,handle TCP/ IP protocol. The servlet container must support HTTP /1.0,and also has to adhere to some basic minimum functionalities laid down by the servlet specification from by Sun Microsystems. The container achieves this by implementing the Java Servlet 2.3 API. When we are using one of the Java Servlet API interfaces,we are actually using the vendor specific classes which implement these Interfaces. This is a very important point which you have to keep in mind. This is one of the ways by which Sun Microsystems has ensured to achieve vendor neutrality. That is to say a web application written once should be portable to any other web server (implementing the Java servlet specification) without changing any of the code.
Jsp Discussion
- - Two forms in one JSP
- - PASS VARIABLES BETWEEN 2
- - Table data
- - Unable to laod the image
- - The Ultimate Web UI Frame




