Java Server Pages (JSP) is a technology that helps software developers create dynamically generated web pages based on HTML , XML, or other document types.
A JSP file is similar to an HTML file. Unlike HTML files, JSP files can contain java code within <% and %> tags.
Released in 1999 by Sun Microsystems, JSP is similar to PHP, but uses Java programming language.
To deploy and run Java Server Pages, a compatible web server, such as Apache Tomcat or Jetty is required.
Why JSP:
With servlets, it is easy to:
◦ Read form data
◦ Read HTTP request headers
◦ Set HTTP status codes and response headers
◦ Use cookies and session tracking
◦ Share data among servlets
◦ Remember data between requests
But, it sure is a pain:
Using println() statements to generate HTML
◦ Coding the presentation logic and business logic is not a good practice
◦ A change in one of these requires the modification of the entire code
◦ Programmers with different skill sets are required for creating and maintaining these Servlets, being java programs, are best suited for coding business logic
A technology with the power of Servlets and ease of HTML is required to code presentation logic, so that the web designers can also easily use it.
Java Server Page (JSP) is one such technology that fits into the above mentioned statement.
Note : JSP doesn't give you anything that you could not in principle do with a servlet.
But it is convenient to write (and to modify!) regular HTML than to have a multiple println statements that generate the HTML.
Next
Keep in touch with this Blog we will Update more and more.
ReplyDeleteThe main motive of the Big data app development is to spread the knowledge so that they can give more big data engineers to the world.
ReplyDelete