String currentPage = request.getAttribute("currentPage").toString();//这个值已经获取到了
${requestScope.currentPage} //我却得不到值??? 为什么或者说还有其它方法告诉我 谢谢
${requestScope.currentPage} //我却得不到值??? 为什么或者说还有其它方法告诉我 谢谢
解决方案 »
- JSP页面图片能显示出来,但是页面别的信息为空白
- 关于类构造的问题!
- JSP radio选中一个值,如何在点击提交按钮之后仍然选中该值?
- spring3 事务配置失效的问题
- 电子地图精英大会邀请您4月26日相聚北京!
- 帮忙看看是代码有问题还是系统有问题!
- 从数据库读入到下拉列表框!!
- 如何关联servlet api源码???
- jsp的文档路径问题,想download文件<a href="aaa.xls">sdsf</a>总是说早不到The requested resource (/servlet/aaa.xls) is not available
- resin闪退
- flex中获取html中传过来的参数问题
- 用户的密码不能修改
跟这个有关系吗?? 我现在就像拿到currentPage值。 ${requestScope.currentPage}这种方法取不到?
试过了 ,不行。jsp页面直接把${currentPage}打印出来了
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">在默认情况下,Servlet 2.4 / JSP 2.0支持。如果是别的版本下,将用到EL 表达式的 JSP页面的开头添加如下一句代码即可。
<%@ page isELIgnored="false" %> (这个我试过有用)
另外的 看参考资料,资料里面有的方法我试了没什么效果,仅仅参考参考资料:http://www.javaeye.com/topic/231840 http://www.javaeye.com/topic/155354
如果用struts2怎么表达???EL表达式的包我加不上。
String currentPage="currentPage";
request.setAttribute("currentPage",currentPage);
request.getRequestDispatcher("/requestJsp.jsp").forward(request, response);
}<%String currentPage=request.getAttribute("currentPage").toString(); %>
<%=currentPage %>
${currentPage}
${requestScope.currentPage }
结果:currentPage currentPage currentPage
看我的结果都出来了,你的结果让我困扰了。