JAVA 認證心得 -- SCWCD 1.4 (3)
- SKIP_BODY EVAL_BODY_INCLUDE
- SKIP_PAGE EVAL_PAGE
- String username = (String) request.getSession().getAttribute(“ttt”);
- <%@page isTreadSafe=”false”%>
- the three type of JSP directive type are include , taglib , page
- In JSP , the default import list is
java.lang.*
java.servlet.http.*
java.servlet.*
java.servlet.jsp.*
- login-config (auth-method?,realm-name?,form-login-config?)
- servlet-mapping(servlet-name,url-pattern)
- setContentType() belong to ServletResponse
- res.sendRedirect(“dd”); req.getParameter(“dd”)
- ServletContext interface and GenericServlet class provide log method
- ServletOutputStream out = response.getOutputStream()
OutputStream out = response.getOutputStream()
- GenericServlet is abstract class , so must implement service(req,res)
- getIntHeader(“xxx”) of HttpServletRequest
- all the sub element of <web-app> are optional
- HttpSessionActivationListener === session migrated
HttpSessionAttributeListener === notify whether add remove replace method attributes in HttpSession objects
Notified change attr in ServletContext. Must implement ServletContextAttributeListener
- HttpServletResponse setStatus(int c) sendError(int c)
- This.getServletContext().log() log()
- Notify objects add remove form session must implement HttpSessionBindingListener interface
- HttpSessionListener notify a session is created or destroyed
sessionCreated(HttpSessionEvent se)
sessionDestroyed(HttpSessionEvent se)
No comments:
Post a Comment