Boost PC performance: How more available memory can improve productivity
Jsp quick reference card
1. scriptlet
Directives Contains a block of scripting code. A JSP page can
contain multiple blocks of scripting code.
page <% script code %>
Defines page-wide attributes. Example:
<%@ page attribute="value" ... %> <% String greeting =
request.getParameter("Greeting");
attributes, with default values, are: out.println(greeting); %>
JSP Quick Reference Card attribute = language="java" | session="true"
| contentType=text/html;charset="ISO-8859-1" expression
| import="package(s)" | buffer="8kb"
Basic Syntax | autoflush="true" | isThreadSafe="true" Defines statements evaluated on the server before
| info="text_string" | errorPage="relativeURL" sending the page output to the client.
| isErrorpage="true" | extends="class_name"
<%= expression %>
Default scripting language value = a string literal in single or double quotes.
Example:
The scripting language of a JSP page defaults to Java.
Insert the following line in a JSP page to configure the
include <%= myVar1%>
page to use JavaScript: Inserts text into a JSP page.
<%@ page language = "javascript" %>
<%@ include file = "path" ... %> Actions
Using white space taglib jsp:include
White space contained within the template code is Defines a custom tag library used by a JSP page. Call one JSP page from another. Upon completion, the
returned to the client as it was entered in the JSP.
<%@ taglib uri="tagLibraryURI" destination page returns control to the calling page.
prefix="tagPrefix" %>
Quoting attribute values <jsp:include page="path" flush="true"/>
After the taglib directive, reference the custom tags
Quote attribute values, using either single or double using the syntax: <jsp:include page="path" flush="true">
quotes, to all JSP elements. For example: <jsp:param name="paramName"
<tagPrefix:tagName> value="paramValue" /> ...
<%@ page contentType = "text/plain" %> ... </jsp:include>
</tagPrefix:tagName>
Writing comments for the JSP jsp:forward
A JSP comment is not output to the client as part of the
Scripting Elements Calls one JSP page from another. Execution of the calling
JSP page’s output. page is terminated by the call.
<%-- Comment string... --%> declaration <jsp:forward page="path" />
Creates page-wide definitions such as variables.
Outputting comments to the client <jsp:forward page="path">
<%! declaration %> <jsp:param name="paramName"
HTML comments are output to the client. value="paramValue" /> ...
Example: </jsp:forward>
<!-- comments -->
<%! private String foo = null;
public String getFoo() {return this.foo;} %>