在我发出action请求的时候。它会报这样子的错误HTTP Status 404 - No result defined for action cn.com.huarenworld.action.UserWebIndex and result input
我的问题是为什么为什么会有这样子的错误,我知道配置文件里面加上
<result name="input">/userWeb/new1/index1.jsp</result>这么一句就可以吧解决转到对应的页面。但是这不是我想要的(转到input的页面上)我想知道,这是什么造成的。我想要它转到其他页面去。不是有input的错误,转到input对应的页面
这是表单(action)
<td width="71%" class="font14"><a href="../userWebCooperateInfo.action?companyid='<s:property value="#session.companyid"/>'" class="font14" target="_self">招商合作</a></td>
这是action配置文件
<action name="userWebCooperateInfo" class="userWebIndexAction" method="findById">
<result name="blackandred">/userWeb/black/cooperate.jsp</result>
<result name="blue">/userWeb/blue/cooperate.jsp</result>
<result name="new1">/userWeb/new1/flaunt.jsp</result>
</action>
这是action类
public String findById(){
this.setOther(userWebService.findById(otherid));
ActionContext.getContext().getSession().put("userWebOhterInfoList",userWebService.findOtherInfo(companyid));
String model=((Company)ActionContext.getContext().getSession().get("company")).getModel();
if("black".equals(model) || "red".equals(model)){
return "blackandred";
}else if("new1".equals(model)){
return "new1";
}else{
return "blue";
}
}