摘要:
有如下功能: 从index.jsp页面点击超链接进入TestServlet服务器,TestServlet服务器再请求转发到test.jsp。 在index.jsp里设置了request的attribute:requestKey1,在TestServlet服务器里设置了request的attribut 阅读全文
摘要:
1). 为什么要解决相对路径的问题: 在有一个 Servlet 转发页面的情况下, 会导致相对路径的混乱. 比如: -WebContent(当前WEB应用的名称) -a.jsp -test -b.jsp -c.jsp 超链接 转发 超链接 希望的是从a.jsp > HelloServlet >b.j 阅读全文
摘要:
问题1:requestscope.contextpath和<%=request.getContextPath()%>有何区别? 问题2:${requestscope.contextpath}和${pageContext.request.contextPath}有何区别? 需要访问一个Authorit 阅读全文
摘要:
最近学习过滤器的时候,dispatcher可以指定过滤器被Servlet容器拦截的方式,可以是REQUEST、INCLUDE、FORWARD、ERROR,默认是REQUEST方式。 现在有两个filter:helloFilter、secondFilter。从index.html页面超链接到dispa 阅读全文
摘要:
学习自定义标签时,做一个练习: haha.txt文件: 问题:运行jsp文件时,发现第二行字符串没有显示出来。 原因:<和>会被当成标签标志而不会显示出来 做了如下转换: 于是研究了一下转义字符,如下: 1.组成 1.组成 转义字符串(Escape Sequence),即字符实体(Character 阅读全文
摘要:
错误信息如下: Servlet.service() for servlet [jsp] in context with path [/20161017] threw exception [/tag/simpleTag.jsp (line: 25, column: 44) Expecting "jsp 阅读全文
摘要:
一.功能描述: 页面如下所示: 运行报错: java.io.FileNotFoundException: E:\apache-tomcat-8.0.37\work\Catalina\localhost\20161013ShoppingCart\SESSIONS.ser (系统找不到指定的路径。)at 阅读全文
摘要:
问题如下: java.io.FileNotFoundException: E:\apache-tomcat-8.0.37\work\Catalina\localhost\20161013ShoppingCart\SESSIONS.ser (系统找不到指定的路径。) at java.io.FileOu 阅读全文
摘要:
现象:写了如下一个jsp文件,导入需要用到的两个包: 运行结果报错:org.apache.jasper.JasperException: /index.jsp (line: 1, column: 17) equal symbol expected at org.apache.jasper.compi 阅读全文
摘要:
org.apache.commons.dbutils Class QueryRunner org.apache.commons.dbutils Class QueryRunner java.lang.Object org.apache.commons.dbutils.AbstractQueryRun 阅读全文