毕业论文开发语言企业开发JAVA技术.NET技术WEB开发Linux/Unix数据库技术Windows平台移动平台嵌入式论文范文英语论文
您现在的位置: 毕业论文 >> java技术 >> 正文

Resource interpreted as Stylesheet but transferred with MIME type text/html

更新时间:2014-4-13:  来源:毕业论文

 <context:component-scan base-package="controller" />       <mvc:annotation-driven />       <mvc:resources location="/img/" mapping="/img/**"/>       <mvc:resources location="/css/" mapping="/css/**"/>      <mvc:resources location="/js/" mapping="/js/**"/>      <mvc:resources location="/font-awesome/" mapping="/font-awesome/**"/>      <mvc:resources location="/style/" mapping="/style/**"/>      <mvc:interceptors>           <mvc:interceptor>             <mvc:mapping path="/um/**"/>                           <bean class="interceptor.UserInterceptor" />           </mvc:interceptor>       </mvc:interceptors>     <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">         <property name="maxUploadSize" value="1000000" />     </bean>     <!-- ViewResolver -->      <bean id="viewResolver" class="org.springframework.web.servlet.view.ResourceBundleViewResolver">       <property name="basename" value="views"/>       <property name="order" value="1"/>     </bean>     <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">           <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>         <property name="prefix" value="/"/>           <property name="suffix" value=".jsp"/>       </bean>  </beans>  

web.xml
 <?xml version="1.0" encoding="UTF-8"?><display-name>Caiyuanzi</display-name>         <context-param>     <param-name>contextConfigLocation</param-name>     <param-value>classpath*:applicationContext*.xml</param-value>   </context-param>   <context-param>     <param-name>log4jConfigLocation</param-name>     <param-value>classpath:log4j.properties</param-value>   </context-param>   <servlet>     <servlet-name>hello</servlet-name>     <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>   </servlet>   <servlet-mapping>     <servlet-name>hello</servlet-name>     <url-pattern>/</url-pattern>   </servlet-mapping>     <listener>     <listener-class>              org.springframework.web.util.Log4jConfigListener          </listener-class>   </listener>   <listener>     <listener-class>             org.springframework.web.context.ContextLoaderListener         </listener-class>   </listener>   <filter>             <filter-name>CharacterEncodingFilter</filter-name>             <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>           <init-param>                 <param-name>encoding</param-name>                 <param-value>UTF-8</param-value>             </init-param>               <init-param>                    <param-name>forceEncoding</param-name>                   <param-value>true</param-value>           </init-param>      </filter>    <filter-mapping>        <filter-name>CharacterEncodingFilter</filter-name>        <url-pattern>/*</url-pattern>    </filter-mapping>   <welcome-file-list>     <welcome-file>/</welcome-file>   </welcome-file-list> </web-app>
在controller里RequestMapping加了/**这货

设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优尔论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。