JSP Basics

JSP (Java Server Pages)

JSP is a dynamic language,  for building web pages  that uses Java as server side language.

Architecturally JSP may be viewed as high-level abstraction for Java Servlets, and can be run using any servlet container.

JSPpractical introduction

When you write a JSP, practically you are writing an HTML that contains xml-like tags or java snippets for processing, .

This is the code of a basic web page

	<head><title>A Web Page</title></head>
	<body><h1>A Web Page</h1>
	<p>page content..</p>

A JSP, de facto, is an HTML page that contains Java expressions embedded in special tags. As example, here follow a simple example that write programmatically 7 lines

	<head><title>A JSP Page</title></head>
	<h1>A JSP Page</h1>
	<% for(int i=0; i<7; i++){ %>
		<b>Generated Line number <%=i%> <br/>
	<% } %>