为了账号安全,请及时绑定邮箱和手机立即绑定

HTTP Status 404 - /SH_/students/students/Students_query_success.jsp type Status report message /SH_/students/students/Students_query_success.jsp description The requested resource is not available. Apache Tomcat/7.0.42

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
 "http://struts.apache.org/dtds/struts-2.1.dtd">
<struts>

  <package name="default" namespace="/" extends="struts-default">
  
  </package>
 <package name="users" namespace="/users" extends="default">
 <action  name="*_*" class="action.{1}Action" method="{2}">
    <result name="login_success">/users/Users_login_success.jsp</result>
      <result name="login_failure">/users/Users_login.jsp</result>
      <result name="logout_success">/users/Users_login.jsp</result>
      <result name="input">/users/Users_login.jsp</result>
 </action>
  
 </package>
 

 <!-- 在tree.jsp中把treeMenu的学生列表的link改为Action就可以了     students/Students_query.action-->
  <package name="students" namespace="/students" extends="default">
     <action name="*_*"  class="action.{1}Action"  method="{2}">
      <result name="query_success">students/Students_query_success.jsp</result>
     </action>
  </package>
   
</struts>
<script type="text/javascript"> 
var treeMenu = [
	{ level:1, name:"学生管理"},
	{ level:2, name:"学生列表", ico:"images/icon_default.gif",link:"students/Students_query.action"},
	{ level:1, name:"教师管理"},
	{ level:2, name:"教师列表", ico:"images/icon_default.gif",link:"role_list.html"},
	{ level:1, name:"信息管理"},
	{ level:2, name:"新闻管理", ico:"images/icon_default.gif",link:"news_list.html"},
	{ level:2, name:"公告管理", ico:"images/icon_default.gif",link:"bulletin_list.html"},
	{ level:1, name:"系统邮件", ico:"images/icon_default.gif"},
	{ level:1, name:"网络文件", ico:"images/icon_default.gif",link:"complaint_list.html"}
];
</script>
package action;

import java.util.List;

import entity.Students;

import service.StudentsDao;
import service.Impl.StudentsDaoImpl;

public class StudentsAction extends SuperAction{
      /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public String query(){
    	  StudentsDao sdao=new StudentsDaoImpl();
    	List<Students> list=sdao.queryAllStudents();
    	if(list!=null && list.size()>0){
    	    session.setAttribute("Students_list", list);
    	    //return "query_success";
    	}
    	  return "query_success";
      }
}

我除了和老师的项目名不一样  其他的都一样   为什么会报这种错误  

正在回答

2 回答

 <result name="query_success">students/Students_query_success.jsp</result> 路劲不对   

<result name="query_success">/students/Students_query_success.jsp</result>students包前面加一个斜杠

0 回复 有任何疑惑可以回复我~

我也是这个问题,请问你解决了吗

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

HTTP Status 404 - /SH_/students/students/Students_query_success.jsp type Status report message /SH_/students/students/Students_query_success.jsp description The requested resource is not available. Apache Tomcat/7.0.42

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信