页面报错
No result defined for action com.HMIS.Action.RegistrationWorkStation.RegistrationWorkStationAction and result input开始以为是在Action的返回值没有定义路径。。后来检查发现连我指定的函数都没有调用~~但是一直没有发现哪里写的有问题。求解答~~~java函数:
public String excuteAddPatient() throws Exception //增加患者
{
String identity = this.registrationWorkStationService.checkPatientByIdentity(this.identity); //检查患者身份证是否已经注册过
if(identity == null)
{
Patient patientInfo = new Patient();
patientInfo.setName(this.name);
patientInfo.setSex(this.sex);
patientInfo.setBirth(this.birth);
patientInfo.setAddress(this.address);
patientInfo.setPhone(this.phone);
patientInfo.setIdentity(this.identity);
patientInfo.setInsurance("sdfsafsa");
patientInfo.setFurConsultation(this.furConsultation); if(this.registrationWorkStationService.addPatient(patientInfo) == null)
{
return "false";
}
else
{
return "successAddPatient";
}
}
return "false";
}
struts配置内容:
<package name="RegMng" namespace="/RegMng" extends="struts-default">
<action name="addPatient" class="com.HMIS.Action.RegistrationWorkStation.RegistrationWorkStationAction">
<result name="successAddPatient">/RegistrationStation/AddReg.jsp</result>
<result name="success_checkBespoken">/RegistrationStation/PreRegList.jsp</result>
<result name="success_deleteBespoken">/RegistrationStation/PreRegList.jsp</result>
<result name="success_AddRegistlist">/RegistrationStation/AddReg.jsp</result>
<result name="success_getin">/RegistrationStation/AddReg.jsp</result>
</action>
</package>
JSP内容:
<s:form action="RegMng/addPatient!excuteAddPatient.action" theme="simple">
姓名:<s:textfield name="name"></s:textfield><br/><br/>
性别:<select name="sex">
<option value="男">男</option>
<option value="女">女</option>
</select>
<br/><br/>
身份证号:<s:textfield name="identity"/><br/><br/>
出生年月:<s:textfield name="birth" ></s:textfield><br/><br/>
住址:<s:textfield name="address"></s:textfield><br/><br/>
联系方式:<s:textfield name="phone"></s:textfield><br/><br/>
<s:submit type="button" value="注册" ></s:submit>
</s:form>
首先说明,action名字没有映射错误。。其他的几个result能够正常执行。。就这个不行。。
excuteAddPatient函数都没有调用。。求解答~~急!
No result defined for action com.HMIS.Action.RegistrationWorkStation.RegistrationWorkStationAction and result input开始以为是在Action的返回值没有定义路径。。后来检查发现连我指定的函数都没有调用~~但是一直没有发现哪里写的有问题。求解答~~~java函数:
public String excuteAddPatient() throws Exception //增加患者
{
String identity = this.registrationWorkStationService.checkPatientByIdentity(this.identity); //检查患者身份证是否已经注册过
if(identity == null)
{
Patient patientInfo = new Patient();
patientInfo.setName(this.name);
patientInfo.setSex(this.sex);
patientInfo.setBirth(this.birth);
patientInfo.setAddress(this.address);
patientInfo.setPhone(this.phone);
patientInfo.setIdentity(this.identity);
patientInfo.setInsurance("sdfsafsa");
patientInfo.setFurConsultation(this.furConsultation); if(this.registrationWorkStationService.addPatient(patientInfo) == null)
{
return "false";
}
else
{
return "successAddPatient";
}
}
return "false";
}
struts配置内容:
<package name="RegMng" namespace="/RegMng" extends="struts-default">
<action name="addPatient" class="com.HMIS.Action.RegistrationWorkStation.RegistrationWorkStationAction">
<result name="successAddPatient">/RegistrationStation/AddReg.jsp</result>
<result name="success_checkBespoken">/RegistrationStation/PreRegList.jsp</result>
<result name="success_deleteBespoken">/RegistrationStation/PreRegList.jsp</result>
<result name="success_AddRegistlist">/RegistrationStation/AddReg.jsp</result>
<result name="success_getin">/RegistrationStation/AddReg.jsp</result>
</action>
</package>
JSP内容:
<s:form action="RegMng/addPatient!excuteAddPatient.action" theme="simple">
姓名:<s:textfield name="name"></s:textfield><br/><br/>
性别:<select name="sex">
<option value="男">男</option>
<option value="女">女</option>
</select>
<br/><br/>
身份证号:<s:textfield name="identity"/><br/><br/>
出生年月:<s:textfield name="birth" ></s:textfield><br/><br/>
住址:<s:textfield name="address"></s:textfield><br/><br/>
联系方式:<s:textfield name="phone"></s:textfield><br/><br/>
<s:submit type="button" value="注册" ></s:submit>
</s:form>
首先说明,action名字没有映射错误。。其他的几个result能够正常执行。。就这个不行。。
excuteAddPatient函数都没有调用。。求解答~~急!
解决方案 »
- ActiveMQ中延迟发送消息的相关问题
- axis web services 怎么出来文件传输
- 几个java小问题想请教大家
- 初学。在linux下可以用什么来开发webservices?web客户端用什么开发?
- hibernate json 多对一 如何在取出多的时候关联取出一的数据
- 在命令行中部署EJB中用转换成EJB容器可识别代码包的问题
- url中大多了个"/",session就不正确了?
- 有关xml解析器的问题
- 如何在JTable上实现鼠标右键功能
- 高手来帮我看一看,对不对呀。急!!!!!!!!!
- 网页卡住问题,重启tomcat之后要好了,是什么原因不解
- weblogic报错,请大虾帮忙解决Exception in thread "AWT-EventQueue-0" java.lang
加上这句<result name="false">/XXX.jsp</result>
<result name="successAddPatient">/RegistrationStation/AddReg.jsp</result>
<result name="success_checkBespoken">/RegistrationStation/PreRegList.jsp</result>
<result name="success_deleteBespoken">/RegistrationStation/PreRegList.jsp</result>
<result name="success_AddRegistlist">/RegistrationStation/AddReg.jsp</result>
<result name="success_getin">/RegistrationStation/AddReg.jsp</result><result name="false">/XXX.jsp</result>
页面给Action传值的时候数据类型传递有问题