JSP XML CheatSheet
来源:百度文库 编辑:神马文学网 时间:2024/04/29 02:10:50
JSP 2.0 XML Cheat Sheet
Copyright (c) 2005 NDP Software. Some Rights Reserved.
General
Use int i=0; (instead of <%!) Use int i=0; (instead of <%=) Use if (... (instead of <% )
SCOPE="page|request|session|application"
JSTL
Tag or JSP Files
Tag Files Only
Page Only
Scriptlets
javax.servlet.jsp.PageContextpageContext PagefindAttribute, getAttribute, getAttributesScope, getAttributeNamesInScope, setAttribute javax.servlet.jsp.JspWriterout Pageclear, clearBuffer, flush, getBufferSize, getRemaining javax.servlet.ServletConfigconfig PagegetInitParameter, getInitParameterNames java.lang.Throwableexception PagegetMessage, getLocalizedMessage, printStackTrace, toString java.lang.Objectpage Page javax.servlet.ServletResponseresponse Page javax.servlet.ServletRequestrequest Request getAttribute, getParameter, getParameterNames, getParameterValues, setAttribute javax.servlet.http.HttpSessionsession SessiongetAttribute, getId, setAttribute javax.servlet.ServletContextapplication ApplicationgetAttribute, getMimeType, getRealPath, setAttribute
EL
operations and | && | or | || | ‘+‘ | ‘-‘ | * | / | div | % | mod | gt | lt | ge | le | ==| eq | ne {‘-‘| ! | not | empty} pageContext The context for the JSP page. Provides access to various objects, including servletContext, session, request, and response. pageScope Maps page-scoped variable names to their values. requestScope Maps request-scoped variable names to their values. sessionScope Maps session-scoped variable names to their values. applicationScope Maps application-scoped variable names to their values. param Maps a request parameter to a single String parameter value (obtained by calling ServletReqwuest.getParameter(String name)). paramValues Maps a request parameter name to an array of String values for that parameter name (obtained by calling ServletRequest.getParameterValues(String name)). header Maps a request header name to a single String header value (obtained by calling ServletRequest.getHeader(String name)). headerValues Maps a request header name to an array of String values for that header (obtained by calling ServletRequest.getHeaders(String)). coookie Maps a cookie name to a single Cookie object. Cookies are retrieved according to the semantics of HttpServletRequest.getCookies(). If same name is shared by multiple cookies, an implementation must use the first encountered in the array of Cookie objects returned by the getCookies() method. However, the ordering of cookies currently unsspecified in the Servlet specification. initParam Maps a context initialization parameter name to a String parameter value (obtained by calling ServletContext.getInitparameter(String name)).
boolean fn:contains(string, substring) boolean fn:containsIgnoreCase(string, substring) boolean fn:startsWith(string, prefix) boolean fn:endsWith(string, suffix) String[] fn:split(string, separator) String fn:substring(string, begin, end) String fn:substringBefore(string, substring) String fn:substringAfter(string, substring) String fn:replace(string, before, after) String fn:toLowerCase(string) String fn:toUpperCase(string) String fn:trim(string) int fn:indexOf(string, suffix) int fn:length(String or Collection) String fn:join(String[], separator) String fn:escapeXml(string)
This work is licensed under aCreative Commons Attribution-NonCommercial-NoDerivs 2.5 License.
Copyright (c) 2005 NDP Software. Some Rights Reserved.
General
Use
SCOPE="page|request|session|application"
JSTL
javax.servlet.jsp.PageContextpageContext PagefindAttribute, getAttribute, getAttributesScope, getAttributeNamesInScope, setAttribute javax.servlet.jsp.JspWriterout Pageclear, clearBuffer, flush, getBufferSize, getRemaining javax.servlet.ServletConfigconfig PagegetInitParameter, getInitParameterNames java.lang.Throwableexception PagegetMessage, getLocalizedMessage, printStackTrace, toString java.lang.Objectpage Page javax.servlet.ServletResponseresponse Page javax.servlet.ServletRequestrequest Request getAttribute, getParameter, getParameterNames, getParameterValues, setAttribute javax.servlet.http.HttpSessionsession SessiongetAttribute, getId, setAttribute javax.servlet.ServletContextapplication ApplicationgetAttribute, getMimeType, getRealPath, setAttribute
EL
operations and | && | or | || | ‘+‘ | ‘-‘ | * | / | div | % | mod | gt | lt | ge | le | ==| eq | ne {‘-‘| ! | not | empty} pageContext The context for the JSP page. Provides access to various objects, including servletContext, session, request, and response. pageScope Maps page-scoped variable names to their values. requestScope Maps request-scoped variable names to their values. sessionScope Maps session-scoped variable names to their values. applicationScope Maps application-scoped variable names to their values. param Maps a request parameter to a single String parameter value (obtained by calling ServletReqwuest.getParameter(String name)). paramValues Maps a request parameter name to an array of String values for that parameter name (obtained by calling ServletRequest.getParameterValues(String name)). header Maps a request header name to a single String header value (obtained by calling ServletRequest.getHeader(String name)). headerValues Maps a request header name to an array of String values for that header (obtained by calling ServletRequest.getHeaders(String)). coookie Maps a cookie name to a single Cookie object. Cookies are retrieved according to the semantics of HttpServletRequest.getCookies(). If same name is shared by multiple cookies, an implementation must use the first encountered in the array of Cookie objects returned by the getCookies() method. However, the ordering of cookies currently unsspecified in the Servlet specification. initParam Maps a context initialization parameter name to a String parameter value (obtained by calling ServletContext.getInitparameter(String name)).
boolean fn:contains(string, substring) boolean fn:containsIgnoreCase(string, substring) boolean fn:startsWith(string, prefix) boolean fn:endsWith(string, suffix) String[] fn:split(string, separator) String fn:substring(string, begin, end) String fn:substringBefore(string, substring) String fn:substringAfter(string, substring) String fn:replace(string, before, after) String fn:toLowerCase(string) String fn:toUpperCase(string) String fn:trim(string) int fn:indexOf(string, suffix) int fn:length(String or Collection) String fn:join(String[], separator) String fn:escapeXml(string)
This work is licensed under aCreative Commons Attribution-NonCommercial-NoDerivs 2.5 License.
JSP XML CheatSheet
JSP与XML的结合
JSP与XML的结合
JSP与XML的结合2
JSP与XML的结合(1)
JSP与XML的结合(2)
JSP与XML的结合(3)
JSP中web配置:web.xml
使用JSP + JAVABEAN + XML 开发的一个例子
应用JDOM处理数据库到XML转换的JSP实现
用web.xml控制Web应用的行为|Java与XML|JSP技术|在线教程
用web.xml控制Web应用的行为|Java与XML|JSP技术|在线教程
用web.xml控制Web应用的行为|Java与XML|JSP技术|在线教程
Gmail Shortcuts (printable cheatsheet)
jsp
jsp
JSP
在JSP开发中使用jdom解析临时存放数据的XML文件
使用JSP JAVABEAN XML 开发的一个例子 统一教学网
JSP中web配置:web.xml - 那A安捏的Blog - CSDNBlog
xml
用XML JSP实现网页内容动态显示的方案_技巧_网页_IT专家网
用XML JSP实现网页内容动态显示的方案_技巧_网页_IT专家网
ASP讲座之一:网页开发利器:高效易学的ASP--中国站长学院,ASP,PHP,JSP,XML,SQL,FLASH,CSS,ASP.NET