12

回到原点,重新认识
  一、page 对象

page对象代表JSP本身,更准确地说它代表JSP被转译后的Servlet,它可以调用Servlet类所定义的方法。

  二、config 对象

config 对象里存放着一些Servlet 初始的数据结构。
config 对象实现于javax.servlet.ServletConfig 接口,它共有下列四种方法:
public String getInitParameter(name)
public java.util.Enumeration getInitParameterNames( )
public ServletContext getServletContext( )
public Sring getServletName( )

  三、request 对象

request 对象包含所有请求的信息,如:请求的来源、标头、cookies和请求相关的参数值等等。
request 对象实现javax.servlet.http.HttpServletRequest接口的,所提供的方法可以将它分为四大类: 阅读全文 »

作者:堕落天使 Tags: ,

09

有待慢慢补充一些常用的
 <welcome-file-list>
   <welcome-file>login.jsp</welcome-file>
 </welcome-file-list>
 <session-config>
   <session-timeout>30</session-timeout>
 </session-config>
 <error-page>
   <error-code>500</error-code>
   <location>/error.jsp</location>
 </error-page>
 <error-page>
   <error-code>404</error-code>
   <location>/404.jsp</location>
 </error-page>

作者:堕落天使 Tags: ,