Learning About JSPs
An introduction into JSP or Java Server Pages
What is JSP?
Java Server Pages or JSP is an extension of servlets.
It is a server-side scripting language.
JSP helps in the creation of webpages that have dynamic
content. Such as;
- User inputs through forms on a webpage
- Websites with pages that share information
- Loading information through a database
- Sending email from a webpage
It is a similar to ASP or PHP.
The files are written as text files with a “.jsp” extension.
It is written as a combination of HTML and Java;
·
The HTML handles the overall look of the webpage
·
Java handles the logic
JSP code is written in the following manner;
<%
Java Code %>
This is contained within a document with HTML tags as well
and saved as a .jsp file.
JSP can also include JavaScript and CSS.
Understand the Architecture of JSP
In order to process JSP, the web server requires two things;
- JSP Container
- Servlet Engine
JSP container is what provides the run-time environment for the JSPs and understands the Java concepts.
The servlet engine loads the class and executes it.
Let us further investigate how this works;
In the end, following the process, the JSP code converts the dynamic web page into what seems like a static web page to send to the client.
Comments
Post a Comment