Submitted by heartin on Sun, 04/12/2015 - 01:50
Actions are XML elements that encapsulate functionality on a JSP page. Programmers can create them and they can be used by the nonprogrammer to introduce dynamic behavior to a JSP page without having any knowledge of Java programming language. For those, non-programmers these will like a new html or xml tag element.
There are two forms of action elements:
-
standard
-
custom.
Submitted by heartin on Sat, 04/11/2015 - 22:18
With the scripting support you can write your own java logic in a JSP page.
There are mainly two forms of scripting in a JSP
-
Newer Expression Language (EL)
-
Traditional Scripting
Traditional language-based scripting elements
Traditional language-based scripting elements in a JSP are further divided into:
Submitted by heartin on Sat, 04/11/2015 - 22:16
Directives are elements that provide the JSP translator with directions on how it should treat the JSP page being translated.
Our simplejsp from previous demo had the below page directive in it:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
Submitted by heartin on Sat, 04/11/2015 - 22:13
A JSP page can be said to be divided into two types of contents, which are template text and JSP elements. Template text is any non-java lines like html, comments, javascript, css etc. that are directly sent to the client without any processing. Java code is embedded into JSP pages using scripting elements and these elements will be processed and not directly rendered to the output like template text.
JSP elements can be mainly divided into 3 categories:
Submitted by heartin on Sat, 04/11/2015 - 22:11
JSPs are actually servlets, as you have already seen. Container will convert all jsp files into servlets before executing them. JSPs just provide an easy way to create components containing non-java code.
Once a JSP page is created and deployed, container will do some life cycle events, which also includes calling some of its methods similar to servlet life cycle events.
Pages