<servlet>
<servlet-name></srvlet-name>
<jsp-file></jsp>
<init-param>
<param-name></param-name>
<param-value></param-value>
</init-param>
</servlet>
<%!
public void jspInit(){}
public void jspDestory(){}
%>
Servlet | JSP | |
Application | getServletContext().setAttribute(key,value); | application.setAttribute(key,value); |
Resquest | request.setAttribute(key,value); | request.setAttribute(key,value); |
Session | request.getSession().setAttribute(key,value); | session.setAttribute(key,value); |
Page | NONE | pageContext.setAttribute(key,value); |
pageContextˋ這jsp隱含變數有一特殊功能可指定存取任何範圍的attribute
pageContext.setAttribute(key,value); -->page範圍
pageContext.setAttribute(key,value,PageContext.SESSION_SCOPE); -->session範圍
如不確定是哪一範圍可用
pageContext.findAttribute(key)尋找
isErrorPage
errorPage
<web-app>
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<scripting-invalid>true</scripting-invalid>
</jsp-property-group>
</jsp-config>
</web-app>
${application.sno} <!-- Expreesion Language use -->
沒有留言:
張貼留言