-
导入Spring相应的jar包
-
web.xml配置
jstest index.html index.htm index.jsp default.html default.htm default.jsp mySpring org.springframework.web.servlet.DispatcherServlet contextConfigLocation classpath:mvc.xml 1 mySpring / default *.html org.springframework.web.context.ContextLoaderListener contextConfigLocation classpath:applicationContext.xml encodingFilter org.springframework.web.filter.CharacterEncodingFilter encoding UTF-8 forceEncoding true encodingFilter /* -
mvc.xml配置
-
applicationContext.xml配置
-
新建web项目的时候遇到的问题:
-
在打算把前后端数据交互做一下的时候,正常引用时js和css一直报404,是因为使用了如下配置:(引入静态文件)
-
-
然后换成这种写法就好了
-
-



