KeyDevil 2017-07-31 14:12 采纳率: 0%
浏览 1653

JAVAEE、SSM框架,报错:HTTP Status 500 求大神解决!

这是页面报错信息
这是所引用的jar包,并额外引入了tomcat的jar包
<?xml version="1.0" encoding="UTF-8"?>


encodingFilter

org.springframework.web.filter.CharacterEncodingFilter


encoding
UTF-8



encodingFilter
/*


springmvc

org.springframework.web.servlet.DispatcherServlet


contextConfigLocation
classpath:NETCTOSS.xml

1


springmvc
*.do


这是 web.xml的设置
<?xml version="1.0" encoding="UTF-8"?>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd">
<!-- 配置组件扫描 -->

<!-- 配置MVC注解扫描 -->

<!-- 配置视图解析器 -->



<!-- 配置拦截器 -->
<mvc:interceptors>
    <mvc:interceptor>
        <mvc:mapping path="/**"/>
        <mvc:exclude-mapping path="/toLogin.do"/>
        <bean class="cn.tedu.nectoss.interceptors.SessionInterceptor"/>
    </mvc:interceptor>
</mvc:interceptors>

<!-- 读取db.properties文件 -->
<util:properties id="db" location="classpath:db.properties" />

<!-- 配置连接池 -->
<bean id="ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    <property name="driverClassName" value="#{db.driver}"/>
    <property name="url" value="#{db.url}"/>
    <property name="username" value="#{db.user}"/>
    <property name="password" value="#{db.pwd}"/>
</bean>

<!-- 配置SqlSessionFactoryBean -->
<bean id="ssfb" class="org.mybatis.spring.SqlSessionFactoryBean">
    <!-- 指定连接池 -->
    <property name="dataSource" ref="ds"/>
    <!-- 指定映射文件 -->
    <property name="mapperLocations" value="cn/tedu/netctoss/entity/mapper/*.xml"/>
</bean> 

<!-- 配置MapperScannerConfigurer *-->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
    <!-- 指定映射器所在的包名 -->
    <property name="basePackage" value="cn.tedu.netctoss.dao"/>
    <!-- 指定注解类 ****-->
<!--    <property name="annotationClass" value=""/> -->
</bean>


这是容器的设置
项目结构
另外:我用的是jdk1.6(系统有双jdk 1.6和1.8) 也试过高版本的spring-webmvc 还是报错 测试文件全部通过,包括dao层,Servlet层 但一在tomcat上跑就不行
Controller代码
唯一的jsp文件

  • 写回答

5条回答 默认 最新

  • justinhxw 2017-08-01 07:06
    关注

    你有写地址吗,而且你跳转的时候loginController,文件是LoginController,仔细看报错

    评论

报告相同问题?

悬赏问题

  • ¥15 MapReduce结果输出到HBase,一直连接不上MySQL
  • ¥15 扩散模型sd.webui使用时报错“Nonetype”
  • ¥15 stm32流水灯+呼吸灯+外部中断按键
  • ¥15 将二维数组,按照假设的规定,如0/1/0 == "4",把对应列位置写成一个字符并打印输出该字符
  • ¥15 NX MCD仿真与博途通讯不了啥情况
  • ¥15 win11家庭中文版安装docker遇到Hyper-V启用失败解决办法整理
  • ¥15 gradio的web端页面格式不对的问题
  • ¥15 求大家看看Nonce如何配置
  • ¥15 Matlab怎么求解含参的二重积分?
  • ¥15 苹果手机突然连不上wifi了?