Spring MVC 提示:HTTP Status 404 - /**/**
来源:互联网 发布:淘宝女生生日礼物 编辑:程序博客网 时间:2024/05/04 00:46
今天在编写Spring Security 自定义页面登入提示:
在该spring_mvc.xml 配置文件中主要完成的任务如下:
HTTP Status 404 - /SpringSecurity/login.action
spring_mvc.xml 配置文件:
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"xmlns:context="http://www.springframework.org/schema/context"xmlns:mvc="http://www.springframework.org/schema/mvc"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd"> <context:component-scan base-package="com.common.controller" /><!--避免IE执行AJAX时,返回JSON出现下载文件 --><bean id="mappingJacksonHttpMessageConverter"class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"><property name="supportedMediaTypes"><list><value>text/html;charset=UTF-8</value></list></property></bean><!-- 启动SpringMVC的注解功能,完成请求和注解POJO的映射 --><beanclass="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"><property name="messageConverters"><list><ref bean="mappingJacksonHttpMessageConverter" /><!-- JSON转换器 --></list></property></bean><!-- 配置文件上传,如果没有使用文件上传可以不用配置,当然如果不配,那么配置文件中也不必引入上传组件包 --><bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> <!-- 默认编码 --> <property name="defaultEncoding" value="utf-8" /> <!-- 文件大小最大值 --> <property name="maxUploadSize" value="10485760000" /> <!-- 内存中的最大值 --> <property name="maxInMemorySize" value="40960" /> </bean> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/pages/"></property> <property name="suffix" value=".jsp"></property> </bean></beans>
1、添加Controller 的自动扫描功能
2、返回View 视图资源封装
3、FileUpload 文件上传
4、AJAX 异步请求 实体注解
重点缺少:
<mvc:annotation-driven /> 注解驱动注入(比如:Controller、@RequestMapping等等),才导致页面总是提示:无法访问相关的资源信息
0 0
- Spring MVC 提示:HTTP Status 404 - /**/**
- Spring MVC HTTP Status 406
- Spring MVC HTTP Status 405
- spring mvc 数据绑定问题 提交表单提示HTTP status 400, The request sent by the client was syntactically incorrect
- spring mvc 数据绑定问题 提交表单提示HTTP status 400, The request sent by the client was syntactically incorrect
- SSM---访问后台提示HTTP Status 404
- HTTP Status 405 - Request method 'POST' not supported (Spring MVC)
- spring mvc中设置返回的http status自定义编码
- Spring MVC 遇到的问题http status 400
- 关于使用spring mvc时出现 HTTP Status 400
- spring http status 503 错误
- jsp spring mvc 上传时HTTP Status 405 - Request method 'GET' not supported是什么原因
- Spring MVC - HTTP Status 500 - Servlet.init() for servlet loginDispacher threw exception
- Spring MVC HTTP Status 405 – Request method ‘POST’ not supported
- tomcat HTTP Status 404
- HTTP Status 404
- HTTP Status 404解决办法
- HTTP Status 404 - /fdadssa/
- BZOJ 2463: [中山市选2009]谁能赢呢?
- java package import
- 创建多维数组
- Java中变量的初始化顺序
- 二维滤波cvFilter2D
- Spring MVC 提示:HTTP Status 404 - /**/**
- java读取本地的excel文件
- UI控件--Spinner
- 223_Rectangle Area
- UVA699 二叉树
- 如何组合长尾关键词
- Myeclipse+tomcat的java.lang.OutOfMemoryError: PermGen space
- linux 路由表 的一些相关资料
- Android的第一堂课,Activity生命周期