我在a.jsp里把一个参数放到了session里(session.setAtribute("aa",aa))
然后我提交到一个action里 我应该怎样在这个action里把这个值取出来?
然后我提交到一个action里 我应该怎样在这个action里把这个值取出来?
解决方案 »
- 异常处理
- xiaoxiang上传组件的问题
- struts弹出,关闭页面的处理
- innerHTML 的问题,如果不够再加,十万火急!
- 关于SPLIT函数
- 如何設置tomcat默認網頁為我的web應用,
- servlet找不到
- 在jsp中怎样计算时间差?
- Error.jsp 这么出错了,帮我看看啊!!!!!!!!!!!!!!!!!!!!!!!
- javax.servlet.ServletException: Servlet execution threw an exception org.apache
- 请问怎样从jsp页面中调用已经在weblogic中部署好的EJB?
- 用什么办法可以使JSP页面的内容在firefox中不被复制?
request.getSession().getAttribute("aa");
Action中的
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)throws Exception{}
的参数不就是有request吗
public ActionForward aaa(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
request.getSession().getAttribute("aa");
}
1楼有错,不好意思。
public ActionForward ssssss(ActionMapping mapping,
ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {request.getSession().getAttribute("aa");}
public ActionForward ssssss(ActionMapping mapping,
ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {
......
String aa=(String)request.getSession().getAttribute("aa");
.....
}