我在ie上的url是这个
http://localhost:8080/Information/student.action?pager.offset=10
我在一个FILTER里写的函数int offset = 0;
try {
System.out.println(request.getParameter("pager.offset"));
offset = Integer.parseInt(request.getParameter("pager.offset"));
System.out.println("nonononononono");
} catch (NumberFormatException ignore) {
System.out.println("nononononononorrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr");
}
return offset;打印出来的结果:
null
nononononononorrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
null
nononononononorrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
http://localhost:8080/Information/student.action?pager.offset=10
我在一个FILTER里写的函数int offset = 0;
try {
System.out.println(request.getParameter("pager.offset"));
offset = Integer.parseInt(request.getParameter("pager.offset"));
System.out.println("nonononononono");
} catch (NumberFormatException ignore) {
System.out.println("nononononononorrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr");
}
return offset;打印出来的结果:
null
nononononononorrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
null
nononononononorrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
解决方案 »
- Capicom签名加密,java验签解密
- 请教高手:spring +struts2+hibernate 问题
- <s:select>国际化问题
- 请教,怎么样才能在JSP中导出EXCEL和PDF文件时用EXCEL和Acrobt read打开,而不是嵌入在浏览器中。
- 学习JSTL时遇到的问题
- 求救!!!!(vb代码改为java代码)在线等待!!!
- 求教java.sql.SQLException: General errorn 错误
- 请问各位学jsp&servlet有什么比较好的书
- 问!SERVLET的CLASS文件放在哪个目录下面?
- jsp <select>问题
- 在STRUTS 2里面的拦截器里怎么获得页面传来的值呢
- hibernate中用native生成策略时为什么抛这个异常?
改成 offset = (new Integer(request.getParameter("pager.offset"))).intValue;
试一下
你说你测试过可以用".", 有测试代码吗???
但在一个filter里就出现上面的问题了out.println("tttttttttttttttttttttttttttttttttttt");
out.println("hello"+request.getParameter("name"));
out.println("hello"+request.getParameter("test.name"));
out.println("tttttttttttttttttttttttttttttttttttt");
转成HttpServletRequest格式,LZ是不是忘了转了
在filter过滤时没指定特定的页面而是一个包下的或是某一类的页面,!!
简单的说就:
单独的这个页面指定咯参数但别的页面却没又指定啊,别的页面我相信也没必要指定那些参数