***JSP***



JSP stands for java server pages and it is use to develop web based applications.

1.     Generally we place all the JSP programs inside project folder. Every JSP program ends with an extension “.JSP “. We no need to configure JSP as part of web.xml file. We can send the request to the JSP’s directly from the browser.



 
2.     There are so many advantages are available with JSP’s when compared with servlet. The following are some of the advantages of JSP’s when compared with servlets.

2.1.         JSP’s improve the productivity of the developer (we can develop the JSP projects quickly when compared with servlets).

2.2.         We can develop JSP’s without the package of java.

2.3.         By using JSP’s we can sprat out business logic and presentation logic.

3.     When we deploy the project and client has sent to request to JSP the server has converted JSP program into corresponding servlet.

4.     An Apache guy has released HttpServer. This server can process HTML pages, images and JavaScript. This server can’t run servlet’s and JSP’s.

*What is a Servlet Container?

Servlet container is a program which provides the implementation of Servlet-API. It is the responsibility of Servlet Container to create Servlet object and call the life cycle methods of servlet.

*What is JSP container?

A JSP container is a program which provides the implementation of JSP-API. It is the responsibility of JSP container to run JSP programs. A Tomcat Server is a collection of HttpServer, Servlet Container and JSP container.










Today’s server are aggregated into two ways. They are:
1.      Web Servers
2.     Application Servers
Most of the web servers run servlets and JSP’s. Application server run servelts and JSP’s as well as they can run EJB application also.








                                  Web logic Server Application Server     
Tomcat is called as Web Server, Web logic, Web Sphere, JBoss are called as Application Servers.
An application server provides the complete implementation to JEE.API. Where as web servers can provide the partial implementation of JEE API.

Procedure for when client send the request for the FirstTime

When we develop the JSP programs it is the responsibility of JSP container to convert JSP compiler to convert to run the JSP programs. The following steps will be carried out when a client send a request to server.
 









Servlets and jsp comparision:

v The server will carry out all the above the steps when the client has sent the request to the JSP for the 1st time. When the client has sent the request 2nd time directly server execute the servlet object of the corresponding JSP.

v Sun micro systems have inherited so many features of JSP programming language and develop JSP applications. Theoretically speaks we can develop JSP applications without writing java class.

v According to the discussion as of new we have assented that we can develop the projects quickly and deliver to the customer easily based on JSP’s. No doubt servlets gives setter performance when compared with JSP’s.

v Even though servlet’s give better performance when compared with JSP’s. We can’t measure the performance difference with human being eye. But when we consider the project cost we had a huge difference between servlet’s and JSP’s.

In most of the projects we use both servlets and JSP’s. If you want to execute huge amount to business logic we go with servlets. In the entire remaining scenario’s we use JSP’s.

It is the responsibility of the server to call the JSP compiler when the client sends the request to JSP. We can call JSP compiler manually. Generally we do this work to understand the internal code of generated servlet.




0 comments:

Post a Comment