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

list页面都打不开了

不知道为什么,我照着这个代码抄了一遍,结果list页面都打不开了,配置文件我已经校验好几遍了,没有错啊!!

Message.xml:

<?xml version="1.0" encoding="UTF-8"?>


<!DOCTYPE mapper

    PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"

    "http://mybatis.org/dtd/mybatis-3-mapper.dtd">


<mapper namespace="Message">

  <resultMap type="com.imooc.bean.Message" id="MessageResult">

    <id column="id" jdbcType="INTEGER" property="id"/>

    <result column="COMMAND" jdbcType="VARCHAR" property="command"/>

    <result column="CONTENT" jdbcType="VARCHAR" property="content"/>

    <result column="DESCRIPTION" jdbcType="VARCHAR" property="description"/>

  </resultMap>

  <select id="queryMessageList" parameterType="com.imooc.bean.Message"  resultMap="MessageResult">

   select ID,COMMAND,DESCRIPTION,CONTENT from message where 1=1 

   <if test="command!=null and!&quot;&quot;.equals(command.trim())">and COMMAND=#{command}</if>

    <if test="description!=null and!&quot;&quot;.equals(description.trim())">

    and DESCRIPTION like '%' #{description} '%'

    </if>  

  </select>

  <delete id="deleteOne" parameterType="int">

     delete from MESSAGE where ID= #{_parameter}

  </delete>

  <delete id="deleteBatch" parameterType="java.util.List">

     delete from MESSAGE where ID in(

     <foreach collection="list" item="item" separator=",">

     #{item}

     </foreach>

     )

  </delete>

</mapper>


web.xml

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.5" 

xmlns="http://java.sun.com/xml/ns/javaee" 

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

  <display-name></display-name>

  <welcome-file-list>

    <welcome-file>index.jsp</welcome-file>

  </welcome-file-list>

<servlet>

  <servlet-name>ListServlet</servlet-name>

  <servlet-class>com.imooc.servlet.ListServlet</servlet-class>

  </servlet>

  <servlet-mapping>

  <servlet-name>ListServlet</servlet-name>

  <url-pattern>/List.action</url-pattern>

  </servlet-mapping>

  

 <servlet>

  <servlet-name>DeleteOneServlet</servlet-name>

  <servlet-class>com.imooc.servlet.DeleteOneServlet</servlet-class>

  </servlet>

  <servlet-mapping>

  <servlet-name>DeleteOneServlet</servlet-name>

  <url-pattern>/DeleteOneServlet.action</url-pattern>

  </servlet-mapping>

  

   <servlet>

  <servlet-name>DeleteBatchServlet</servlet-name>

  <servlet-class>com.imooc.servlet.DeleteBatchServlet</servlet-class>

  </servlet>

  <servlet-mapping>

  <servlet-name>DeleteBatchServlet</servlet-name>

  <url-pattern>/DeleteBatchServlet.action</url-pattern>

  </servlet-mapping>

</web-app>

  



正在回答

1 回答

控制台没有报错,页面上报的404

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

qq_赵成冬_0 提问者

解决了已经,是xml文件出了问题,我也不知道出在哪里,总之又写了一遍解决了
2016-08-22 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

list页面都打不开了

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