Posts

Showing posts with the label sendRedirect

Quick Refresh : Servlet

Image
Quick Refresh : Servlet Question: What is a Servlet? Answer: Java Servlets are server side components that provides a powerful mechanism for developing server side of web application. Earlier CGI was developed to provide server side capabilities to the web applications. Although CGI played a major role in the explosion of the Internet, its performance, scalability and reusability issues make it less than optimal solutions. Java Servlets changes all that. Built from ground up using Sun's write once run anywhere technology java servlets provide excellent framework for server side processing. Question: What are the types of Servlet? Answer: There are two types of servlets, GenericServlet and HttpServlet. GenericServlet defines the generic or protocol independent servlet. HttpServlet is subclass of GenericServlet and provides some http specific functionality linke doGet and doPost methods. Question: Is Servlet a singleton class ? Answer:A Servlet is not a singleton class...

Quick Refresh : JSP

Image
Quick Refresh : JSP Question:  What are implicit Objects available to the JSP Page? Answer:  Implicit objects are the objects available to the JSP page. These objects are created by Web container and contain information related to a particular request, page, or application. The JSP implicit objects are: Variable Class Description application javax.servlet.ServletContext The context for the JSP page's servlet and any Web components contained in the same application. config javax.servlet.ServletConfig Initialization information for the JSP page's servlet. exception java.lang.Throwable Accessible only from an error page. out javax.servlet.jsp.JspWriter The output stream. page java.lang.Object The instance of the JSP page's servlet processing the     current request. Not typically used by JSP page authors. pageContext javax.servlet.jsp.PageContext The context for the JSP page. Provides a single API to manage the v...