Day 3

Quiz

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, ...

Get Sams Teach Yourself BEA WebLogic Server 7.0™ in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.