Introduction JSP stands for Java Server Pages. Actually, JSP in itself isn't a language,
instead it is more of a technology used by Java on the server side to
display dynamic content on the web pages.
Essentially JSP pages are just normal HTML with Java codes embedded in
them. So a general understanding of HTML and Java is required for learnning
JSP. If you do not have even basic knowledge about HTML, please consider
taking the course HTML.
How JSP works? The below is the process:
- The Web browser sends a request to your web server asking for a page.
- The Web server loads the page and looks for JSP code to run.
- If JSP code is found, the web server runs the code and sends the results
to the Web browser. So the result page on the client side looks like a pure
HTML page.
You may wonder why we need an JSP page to display web contents while we have
HTML. Well, HTML can be used to display web contents, but the page is
static, not dynamic. Image you have a website that sells products, and
you want to display the name, price, description and category of each
product on a page. Normally in HTML you would have to write this page
out by hand, and everytime you change products or prices you would have
to go back and re-write the page. But if you use JSP, you can select records
from a database and generate the HTML page when an user request it. When
you get a new product or change the prices you will only have to change
the information in the database and the page will automatically be updated
to reflect those changes without writing a single line of code.
|