Advantages of JSP Over Servlet

Efficient: With traditional CGI, a new process is started for each HTTP request. If the CGI program does a relatively fast operation, the overhead of starting the process can dominate the execution time. With servlets, the Java Virtual Machine stays up, and each request is handled by a lightweight Java thread, not a heavyweight operating system … Read more

Types of Comments in JSP

There are two types of comments are allowed in the JSP. These are hidden and output comments. A hidden comments does not appear in the generated output in the html, while output comments appear in the generated output. Example of hidden comment: <%– This is hidden comment –%> Example of output comment:<!– This is output comment –> In JavaServer … Read more

Life Cycle Methods in JSP

  Life-cycle methods of the JSP are: jspInit(): The container calls the jspInit() to initialize the servlet instance. It is called before any other method, and is called only once for a servlet instance. _jspService():The container calls the _jspservice() for each request and it passes the request and the response objects. _jspService() method cann’t be … Read more

What is JSP Implicit Objects

Certain objects that are available for the use in JSP documents without being declared first. These objects are parsed by the JSP engine and inserted into the generated servlet. The implicit objects re listed below: request :It represents the request made by the client. The request implicit object is generally used to get request parameters, … Read more

What is JSP?

JSP is a dynamic scripting capability for web pages that allows Java as well as a few special tags to be embedded into a web file (HTML/XML, etc). The suffix traditionally ends with .jsp to indicate to the web server that the file is a JSP files. JSP is a server side technology – you … Read more