//这是配置文件
<action
parameter="method"
path="/welcome"
type="com.shen.struts.action.WelcomeAction">
<forward name="success" path="/sysmanage/welcome.jsp" />
<forward name="fail" path="/sysmanage/welcome.jsp" />
</action>
//在 SRC中引入这个action
<frame name="sysmanage" title=""
src="/welcome.do?mehtod=1" marginwidth=0 marginheight=0
scrolling="yes" frameborder=0 bordercolor="#999999">为什么转不过去,说明下,frame所在的JSP页是放在一个叫sysmanage的文件夹中的,不是直接放在WEB-INF外面的。
没办法通过ACTION跳,朋友们帮忙看看。
<action
parameter="method"
path="/welcome"
type="com.shen.struts.action.WelcomeAction">
<forward name="success" path="/sysmanage/welcome.jsp" />
<forward name="fail" path="/sysmanage/welcome.jsp" />
</action>
//在 SRC中引入这个action
<frame name="sysmanage" title=""
src="/welcome.do?mehtod=1" marginwidth=0 marginheight=0
scrolling="yes" frameborder=0 bordercolor="#999999">为什么转不过去,说明下,frame所在的JSP页是放在一个叫sysmanage的文件夹中的,不是直接放在WEB-INF外面的。
没办法通过ACTION跳,朋友们帮忙看看。
<forward name="fail" path="../sysmanage/welcome.jsp" />
加2点试试
有没有继承DispacthAction这个类 同意,楼主检查下,如果有继承的话,你就设置断点跟踪下看看到action里面去没有
<frame name="sysmanage" title=""
src="/welcome.do?mehtod=1" marginwidth=0 marginheight=0
scrolling="yes" frameborder=0 bordercolor="#999999">有这样的吗》???????
mydomain
src
WebRoot
WEB-INF
struts-config.xml
web.xml检查,welcome.jsp的位置,一般是放在/WebRoot/sysmanage/welcome.jsp下。
struts配置在struts-config.xml中。
配置如上的话,还是不行的话,
再试下:<frame name="sysmanage" title=""
src="http://localhost:8080/mydomain/welcome.do?mehtod=1" marginwidth=0 marginheight=0
scrolling="yes" frameborder=0 bordercolor="#999999">
设断点看是否能进action,进了action就跟踪,把路径都写成完全相对路径试下(这里的绝对路径是相对WebRoot来说的)。之后再考虑是否加..
第二步,如继承了,再检查(welcome.do?mehtod=1)
你的welcomeAction中是否有名字叫"1"的这个方法,有疑问???
最后就是路径问题了。好好检查吧。
<forward name="success" path="/web-inf/sysmanage/welcome.jsp" />
<forward name="fail" path="/web-inf/sysmanage/welcome.jsp" />
src="/welcome.do?mehtod=1"> 必须和 Action中的 parameter="method"
值相同,而且Action中 那些方法名字必须和URL传过来的值相同