Java Server Pages
Submitted by Ahmed Hashim on Thu, 2005-08-25 22:03.
Java Server Page technology provides a simple, fast way to develop dynamic web applications.
In JSP you can create web pages to access Databases, Directories ...etc to generate a dynamic content.
JSP contains Custom tag option in order to reduce the amount of code you write in JSP page and write it in the Tag Handler which can be reusable.
JSP specification has the common used tag libraries to make it easier and easier to make the basic operations in java like loops, statement, expressions and even access your session and request object. This tag libraries is [JSTL|http://java.sun.com/products/jsp/jstl/index.jsp] (JSP Standard Tag Libraries)
__How JSP is working?__%%%
when you write a jsp Page the [Web Server] compile it and create a [Servlet] for this jsp page.
__How can i write a jsp page? __%%%
JSP pages is a web pages which combine JSP Scriptlet with HTML tags, so if you create a page .jsp and write your html tags the web server will compile it, then you can request your page with its name. If you would like to add any java code you can use the JSP scriptlet tags as follow:
{{{
<%
//add java code here.
%>
}}}
Then the web server will execute this block on the server and return you the result inside the html.
Fore more information about web server setup read about tomcat in [this article|http://www.egjug.org/?q=tomcat_linux].
__JSP Hello World__%%%
*Setup your Java SDK.
*[Setup your web server|http://www.egjug.org/?q=node/101].
*Create your first page:
{{{
Hello EGJUG





