求助高手!关于struts的问题 如何在jsp页面上获取Action的mapping?在struts的Action方法有个mapping参数,当跳转到页面时,如何获得这个参数? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 jsp文件通过struts-config.xml的配置文件与jspForm关联然后jspForm.java调用jspAction处理..跳转获得参数的话可以在struts-config.xml中的scope="session"即可.. 在配置文件里面的mapping吗?我觉得可以用action处理一下,把该参数传回来的方式吧使用rrequest或者什么 整个过程 首先在jsp页面的***.do?action=XXX然后在action里面获取这个参数 用String str=request.getParameter("XXX");最后在这个action里面用return mapping.forward("bbb");然后在xml中<forward name="bbb" path="/你想要的页面"/> 直接在action里面处理的时候把ActionMapping存在Session里应该可以,不过不知道楼主要做什么用, session简单一点session.getAttribute('aa',mapping obj) 谢谢大家,已解决。方法:org.apache.struts.config.ActionConfig mapping = (org.apache.struts.config.ActionConfig)request.getAttribute("org.apache.struts.action.mapping.instance"); action中new ActionForward(mapping.getInput())在struts-config。xml中<action .... input="/*.jsp">当验证出错时,就由上面的方法指向跳转的页面业务逻辑页面上的跳转action中return(maping.findForward("aa"));struts-config。xml中<action ......> <forward name="aa" path="/*.jsp"/></action> 求工商银行网银接口demo jsp中嵌入asp.net页面,如何触发asp.net页面的事件? poi合并单元格后设置边框问题,在线等~~~ extjs集成struts2从数据库得到列表集合 那位高手给个意见 新手问个关于 权限的问题。。 structs ActionForm 问题 weblogic配置问题 在jsp页面中怎样设置断点,调试程序? 为何用taxbean.getProduct()可以,用<jsp:getProperty name="taxbean" property="Product" /> 不行 struts标签html:select 怎么实现onchange事件 记录集问题
然后jspForm.java调用jspAction处理..跳转获得参数的话可以在struts-config.xml中的scope="session"即可..
我觉得可以用action处理一下,把该参数传回来的方式吧
使用rrequest或者什么
首先在jsp页面的***.do?action=XXX
然后在action里面获取这个参数 用String str=request.getParameter("XXX");
最后在这个action里面用return mapping.forward("bbb");
然后在xml中<forward name="bbb" path="/你想要的页面"/>
session.getAttribute('aa',mapping obj)
方法:
org.apache.struts.config.ActionConfig mapping = (org.apache.struts.config.ActionConfig)request.getAttribute("org.apache.struts.action.mapping.instance");
new ActionForward(mapping.getInput())
在struts-config。xml中
<action ....
input="/*.jsp">
当验证出错时,就由上面的方法指向跳转的页面业务逻辑页面上的跳转
action中
return(maping.findForward("aa"));
struts-config。xml中
<action ......>
<forward name="aa" path="/*.jsp"/>
</action>