我现在把login.jsp放在根目录下,一访问,就出现404错误。
我把 filter 和下面的 监听器去掉,正常
web.xml
<?xml version="1.0" encoding="UTF-8"?>
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"
version="2.5">
struts2
org.apache.struts2.dispatcher.FilterDispatcher
exclude
login.jsp
struts2
/*.action
<!-- 指明spring配置文件在何处 -->
contextConfigLocation
classpath*:applicationContext.xml
<!-- 加载spring配置文件applicationContext.xml -->
org.springframework.web.context.ContextLoaderListener
index.html
index.htm
index.jsp
default.html
default.htm
default.jsp
struts.xml
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
index.jsp
login.jsp
usernameInvalid.jsp
passwordInvalid.jsp