The Servlet Technology Model

  • The getWriter() method of the ServletResponse interface returns a PrintWriter object suitable for writing character data in the response.
  • The setValue() method of the Cookie class is used to assign a new value to a cookie after the cookie is created.
  • A cookie is created by the server on request from a client. It is stored on a client computer.
  • The getOutputStream() method returns a ServletOutputStream suitable for writing binary data in the response.
  • The getWriter() method of the ServletResponse interface returns a PrintWriter object suitable for writing character data in the response.
  • The sendError() method of the HttpResponse interface sends an error response to the client using the specified status code and message.
  • The getRequestURL() method of the HttpServletRequest interface returns the URL associated with the request as a String.
  • The getCookies() method of the HttpServletRequest interface returns an array of cookie objects that a client sends with a request. However, if no cookies are sent, this method returns a null value.
  • A servlet has three life cycle methods. They are init(), service(), and destroy().
  • A servlet has no main() method. The container is responsible for managing the life-cycle of a servlet.
  • The servlet init parameters are read only once when the container initializes the servlet.
  • Before calling the init() method, a servlet class must be loaded and instantiated.
  • The element of the deployment descriptor declares the initialization parameters that are applicable for an entire Web application.
  • For each request, the Container creates a separate thread.
  • The init() and destroy() methods are called only once in the life of a servlet.

Pass SCWCD Certification Java 1.4 /J2EE in a first attempt:
The pre-requisite for this certification is the SCJP certification exam.

Continue reading

Q. What are the prerequisites for the SCWCD 1.4 exam?

A. Before taking the SCWCD 1.4 exam, you must first pass the Sun Certified Java Programmer exam (CX310-025 or CX310-035 or CX310-055 or CX310-065).

Q. How should I prepare for the exam?

A. To prepare for the exam, you should use a web server (for example Tomcat). A step-by-step guide for installing Tomcat can be found here. You must practice well with the code. You can download the servlet and JSP specifications from the following links: http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html, http://jcp.org/aboutJava/communityprocess/final/jsr152/index.html, and http://jcp.org/aboutJava/communityprocess/final/jsr052/index.html.

Q. What are the exam objectives? Continue reading

Q. What are the prerequisites for the SCWCD 5 exam?

A. Before taking the SCWCD 5 exam, you must first pass the Sun Certified Java Programmer exam (CX310-025 or CX310-035 or CX310-055 or CX310-065).

Q. How should I prepare for the CX 310-083 exam?

A. To prepare for the CX 310-083 exam, you should use a Web server (for example Tomcat). A step-by-step guide for installing Tomcat can be found here. You must practice well with the code. You can download the Servlet and JSP specifications from the following links: http://jcp.org/aboutJava/communityprocess/final/jsr154/index.html, http://jcp.org/aboutJava/communityprocess/final/jsr152/index.html, and http://jcp.org/aboutJava/communityprocess/final/jsr052/index.html.

Q. What are the exam objectives? Continue reading

The Servlet Technology Model

  • The getWriter() method of the ServletResponse interface returns a PrintWriter object suitable for writing character data in the response.
  • The setValue() method of the Cookie class is used to assign a new value to a cookie after the cookie is created.
  • A cookie is created by the server on request from a client. It is stored on a client computer.
  • Continue reading

Q. What are the prerequisites for the SCWCD 5 exam?

A. Before taking the SCWCD 5 exam, you must first pass the Sun Certified Java Programmer exam (CX310-025 or CX310-035 or CX310-055 or CX310-065).

Q. How should I prepare for the SCWCD 5 exam?

A. To prepare for the SCWCD 5 (CX310-083) exam, you should use a Web server (for example Tomcat). A step-by-step guide for installing Tomcat can be found at uCertify article page: How to install and configure tomcat for windows. You must practice well with the code.
Continue reading