October 2002
Beginner
816 pages
23h 32m
English
| A1: | A Java servlet can be initialized in two ways: programmatically and declaratively. In programmatic initialization, the instance variables of the servlet are initialized with the init() method. The declarative method of initialization uses the web.xml file to define the initialization parameters and their values. |
| A2: | The three methods of an HttpServlet that can be overridden are service(), doGet(), and doPost(). |
| A3: | To retrieve multiple values in a servlet, use the getParameterValues() method of the HttpServletRequest class. The getParamaterValues() method returns an array of String values that represent the multiple values selected in the HTML form. |
| A4: | Session handling in servlets can be done in four ways: hidden variables, URL rewriting, ... |
Read now
Unlock full access