JSP-Java Server Page
JSP-Java Server Page
Servlet."
"When we have 20% of java code & 80% of HTML code then we will use JSP."
JSP
Servlet
JSP Loader
Compiler
Servlet
.class
JVM/Server
“JSP is tag support language like HTML but nested tagging of JSP tags not allow
in JSP.”
“it is more powerful then servlet and it contains more functionality in compare
to servlet.”
“We can’t use JSP tags or HTML Tags inside JSP tag. If we want use html tag,
we have separate JSP tag.”
JSP scripting element and JSP scripting tag.
there are 3 JSP scripting element and scripting tags which is use to perform
some special operation with in a JSP page .
1.Scriptlet tag- “if we want to write java code inside a JSP page we will write
that code inside scriptlet tag. and this code will put by JSP loader inside service
method of servlet.”
3.Expression tag- “if we want to print something within JSP page we will use
expression tag. it is substitution of out.println in JSP .“
HttpServletRequest Request
Response
PrintWriter out
Exception exception
JSP directives
“There are 3 JSP directive which is use to perform important operation with in a
JSP page.”
1. page directive – “if we want to import a package with in JSP page we will
use page directive it is also use to transfer error and exception from 1 JSP page
to another JSP page .”
3.taglib direct - “it is mainly used in custom tags to use or import .tld file.”
2. JSP include – “JSP include action element is mainly use include content
of another JSP or html page with in a JSP page .it is mainly use for single
page application .”