
报java.lang.NoSuchMethodException: com.action.StudentAction.studentInformation()错误
action:publicclassStudentActionextendsActionSupport{publicStringStudentInformation(){...
action:public class StudentAction extends ActionSupport{
public String StudentInformation(){
HttpServletRequest req = ServletActionContext.getRequest();
StudentInfo studentInfo = this.studentService.getStudent(this.stuid);
req.setAttribute("studentInfo", studentInfo);
return "studentInformation";
stuid有get/set方法
xml:
<action name="studentAction!*" method="{1}" class="studentAction">
<result name ="preAdd">/admin/student/student_list.jsp</result>
<result name ="studentInformation">/admin/student/student_information</result>
</action>
页面就会报NoSuchMethodException 这个错 求答 展开
public String StudentInformation(){
HttpServletRequest req = ServletActionContext.getRequest();
StudentInfo studentInfo = this.studentService.getStudent(this.stuid);
req.setAttribute("studentInfo", studentInfo);
return "studentInformation";
stuid有get/set方法
xml:
<action name="studentAction!*" method="{1}" class="studentAction">
<result name ="preAdd">/admin/student/student_list.jsp</result>
<result name ="studentInformation">/admin/student/student_information</result>
</action>
页面就会报NoSuchMethodException 这个错 求答 展开
展开全部
Struts是区分大小写的,你配置里面全是小写。
但是你的类名和方法名都是大写开头的!
但是你的类名和方法名都是大写开头的!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |