response.getPrintWriter() & getOutputStream() can not be called on same instance twice, otherwise throw
IllegalStateException
sendRedirect()
can not be called if response is commited/flushed, otherwise exception will be thrown
tell browser to get resource from another location
ServeletContext -> getResource() & getResourceAsStream()
- Can NOT access dynamic resource such as JSP, Servlet
- Might cause security issue if not used properly
ServletContext -> getRealPath() is NOT FOR
- file sitting in Jar file
- file sitting in network
JSP:useBean
- id - compulsory
- scope - optional
- combine of following
- class
- type
- class & type
- beanName & type
<jsp:setProperty name="beanName" property="property"|param="property" />
* param is parameter from request
<jsp:setProperty/getProperty name="..." property="..." /> will do automatic conversion
JSP container populate tablib mapping in Three ways
- container explicit-map definition in web.xml
- container Implicit-map the one defined in packed Jar file (tld file contains URI info),
- container add known entries by default, such as http://java.sun.com/JSP/jstl/a.tld
taglib lookUp
- roote-relative URL
- relative URL, container will append "WEB-INF" in front of the relative URL
IF NOT FOUND
- If absolute URI, error thrown
- If root-relative, try to find on application's root directory
- if relative-path, try to find it on the same location as JSP
Three different ways to get RequestDispatcher in servlet
- getServletContext().getRequestDispatcher("/user/absolute/path/servlet")
- ServletContext.getNamedDispatcher("nameOfServletInWebXML")
- request.getRequestDispatcher("maybe/relative")
Forward
Redirect
Authenticate
- Basic - not encrypted, password saved in plain text
- Digest - encrypted
- Client-Cert - end user authenticate using HTTPS, require user to possess public key certificate (PKC)
- Form - form method: POST, action: j_security_check, username field: j_username, password filed: j_password
分享到:
相关推荐
SCWCD学习笔记, 85% pass
SCWCD 310-081 NOTES.pdf
mz_scwcd_notes_lettersize.zip
SCWCD 认证考试笔记, 整理的非常全面,基本上Cover到了全部的考试范围,值得收藏!
Java认证考试.SCWCD是一个关于java方面的web开发的证书考试。主要讲述servlet技术
java web servlet scwcd
scwcd认证题库 scwcd认证题库 scwcd认证题库 scwcd认证题库 scwcd认证题库
Sun Certified Web Component Developer for J2EE 5 代号:310-083 该文档题量:239 主要看前100题,我考了两次,出的题都是在100以内。 我考式时出的题全是这套题上的,没有一个没在这套题上。...
SUN SCWCD认证考试真实题目练习(有答案),不多说了。 英文原版题目+答案! 各个类型的都有。 下载好好学习吧。
scwcd的考试,测试代码,如果希望参加此类考试将非常的有帮助
NULL 博文链接:https://superzhouych.iteye.com/blog/566945
sun公司的scwcd考试认证材料,英文原版pdf
scwcd ebook ch 1 scwcd ebook ch 1
for java scwcd exam.
SCWCD 部分试题
SCWCD模拟软件合集,昨天刚刚考过SCWCD,感觉不错,所以将备战时的一些资料发出来与大家分享。
SCWCD模拟题合集,昨天刚刚考过SCWCD,感觉不错,所以将备战时的一些资料发出来与大家分享。
scwcd的出题者编写的书籍 强烈建议一看!