我做的是一个简单的登录系统 用户名密码正确就跳转到正确页面,错误就转到错误页面
(1)在eclipse里可以显示这个页面:
但是我把网址复制到我的浏览器里就不行了……就显示
(2)在eclipse里我输入用户名和密码然后点登陆,就会出现这个……
求各位大神帮看看是怎么回事?
我的配置如下:
struts.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC "-//Aphache Software Fundation//DTD Struts Configuration 2.3/EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<package name="MyStruts2" namespace="/" extends="struts-default">
<action name="login" class="com.slw.action.LoginAction">
<result name="success">/welcome.jsp</result>
<result name="error">/error.jsp</result>
</action>
</package>
</struts>
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
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_3_0.xsd">
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>