Please enable JavaScript.
Coggle requires JavaScript to display documents.
JSP - Coggle Diagram
JSP
Implicit Objects
Application
ServletContext
a representation of the JSP page through its entire lifecycle
Session
HTTPSession
track client session between client requests
Config
ServletConfig
allows access to the Servlet or JSP engine initialization parameters
PageContext
PageContext
stores references to the request and response objects
Response
HTTPServletResponse
to add new cookies or date stamps, HTTP status codes, etc.
Page
Object
an actual reference to the instance of the page
Request
HTTPServletRequest
provides methods to get the HTTP header information
Exception
Throwable
used to generate response to errors
Out
JSPWriter
out.println(dataType dt)
out.print(dataType dt)
out.flush()
Scripting Elements
Scriptlet Tags <%___%>
Embedding Java in HTML for JSP code
JSP Expression Tags <%=___%>
Evaluates expressions. Incorporate arithmetic and logical expressions so that can be evaluated.
JSP Declaration Tags <%!___%>
They can declare.
Classes
Instances
Inner classes
Variables
Methods
Action Elements
JSP Forward Action <jsp:forward page=“URL” />
Forward the requester to a new page
JSP Include Action <jsp:include page=“URL” />
For including STATIC or DYNAMIC resources at request time
Java Bean - Provides a public no-argument constructor
<jsp:setProperty name=“nome” property=“value” />
<jsp:getProperty name=“nome” property=“value” />
<jsp:useBean id=“name” class=“fully_qualified_pathname” scope=“{page|request|session|application}” />
Directives Elements
Page
- <% page attribute= "value" %>
Can be use to import classes
import attributes (allowed to appear multiple times) eg: <% page import = "java.util.*" %>
Include
- <% include file = "resource file" %>
Can be use to insert files
Includes the content of the files - The original content will be includes with the included content. eg: <% include file = "helloWorld.jsp" %>
Contents of the included file are parsed as regular JSP text - Can include static HTML, scripting elements , directives and actions
Taglib
- <% taglib uri = "uriofthetaglibrary" %>
Can be use to define tag library
Use the Tag Library Descriptor (TLD) to define the tag