关于struts1.3的返回forword问题

hnyywq 2011-03-08 09:31:08
ActionMapping的getInputForward()方法,是返回一个什么来的?写具体点,最好讲给列子。因DC还没好,环境也没起来所以测试不了,求解释。
...全文
207 10 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
hnyywq 2011-03-08
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 wlcxx98 的回复:]

mapping.getInputForword()
获取action当中input中的值对应的地址
<action path="/test"
type="org.apache.struts.webapp.example.TestAction"
name="testForm"
……
[/Quote]

完全正解,给分咯。。。虽然已经解决了,但还是3KU
dream1210 2011-03-08
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 wlcxx98 的回复:]
mapping.getInputForword()
获取action当中input中的值对应的地址
<action path="/test"
type="org.apache.struts.webapp.example.TestAction"
name="testForm"
scope="request"
input="testInput">
<……
[/Quote]

+1
hnyywq 2011-03-08
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 zn85600301 的回复:]

引用 1 楼 hnyywq 的回复:

高手真少,OK!我已经自己解决了。

看来还是百度比发帖子快
[/Quote]
不是百度的,公司内部邮箱,只能上一些技术论坛的,自己摸索的,在STRUTS配置文件看到的
breeze 2011-03-08
  • 打赏
  • 举报
回复
mapping.getInputForword()
获取action当中input中的值对应的地址
<action path="/test"
type="org.apache.struts.webapp.example.TestAction"
name="testForm"
scope="request"
input="testInput">
<forward name="testInput" path="/testInput.jsp"/>
</action>
getInputForward();获取的就是action中input里的testinput,通过testinput又找到forward里这个别名对应的path/testInput.jsp
hnyywq 2011-03-08
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 l_h_y123 的回复:]

mapping.getInputForward(),Struts1.x中,在Action里可以通过这个方法返回错误页(也就是struts-config.xml中定义的<action>中的input错误页) ,大哥,你就用了五分钟就解决了,高手还没起床呢,哪里叫高手真少啊。。。
[/Quote]

恩,正解,但不一定是定义的错误页面,我现在做的这个阿尔及利亚局点的代码,并不是当错误页面返回的,而且当成一个需要经常调用的页面使用!呵呵~不过还是谢谢回答
李鸿远 2011-03-08
  • 打赏
  • 举报
回复
mapping.getInputForward(),Struts1.x中,在Action里可以通过这个方法返回错误页(也就是struts-config.xml中定义的<action>中的input错误页) ,大哥,你就用了五分钟就解决了,高手还没起床呢,哪里叫高手真少啊。。。
zn85600301 2011-03-08
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 hnyywq 的回复:]

高手真少,OK!我已经自己解决了。
[/Quote]
看来还是百度比发帖子快
学习Java中 2011-03-08
  • 打赏
  • 举报
回复
getInputForward

public ActionForward getInputForward()

Create (if necessary) and return an ActionForward that corresponds to the input property of this Action.

Returns:
The input forward for this action mapping.
Since:
Struts 1.1



http://www.tiansky.net/DBbbs/viewthread.jsp?tid=236
hnyywq 2011-03-08
  • 打赏
  • 举报
回复
解不了贴,只要有人能说出来就给分了。。。。。。。。
hnyywq 2011-03-08
  • 打赏
  • 举报
回复
高手真少,OK!我已经自己解决了。

67,549

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧