您的位置:首页 > 编程语言 > Java开发

java servlet and jsp cookbook 第一章 读后总结

2011-06-15 10:54 591 查看
1:为什么servlet抛出 ServletException,IOException

(1): if the servlet detected a security violation or some other request problem ,the servlet throw ServletException

(2):The servlet throws IOException because the response.getWriter(
) (as well as PrintWriter.close( )) method call can throw an
IOException

2:如何立即编译jsp文件?(可解决服务缓存问题)

在jsp文件后加上jsp_precompile=true参数即可

oreilly源话:

You can avoid delays by precompiling the JSP. If you request the
JSP with a jsp_precompile=true parameter, Tomcat converts the JSP, but
does not send back a response. An example is http://localhost:8080/home/firstJ.jsp?jsp_precompile=true.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: