Tomcat (apache-tomcat-6.0.36)
Struts2(struts-2.3.7)
JDK(1.6.0_10)
配置文件代码web.xml
<?xml version="1.0" encoding="GBK"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<!-- 定义Struts 2的FilterDispatcher的Filter -->
<filter>
<!-- 定义核心Filter的名字 -->
<filter-name>struts2</filter-name>
<!-- 定义核心Filter的实现类 -->
<filter-class>org.apache.Struts2.dispatcher.FilterDispatcher</filter-class>
</filter> <!-- FilterDispatcher用来初始化Struts2并且处理所有的Web请求 -->
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>struts.xml
<?xml version="1.0" encoding="GBK"?>
<!-- 指定Struts 2配置文件的DTD信息 -->
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd"><!-- struts是Struts 2配置文件的根元素 -->
<struts>
<!-- Struts 2的Action必须放在指定的包空间定义下 -->
<package name="helloworld" extends="struts-default">
<!-- 定义login的Action,该Action的实现类为lee.Action类 -->
<action name="Login" class="lee.LoginAction">
<!-- 定义处理结果和资源之间映射关系 -->
<result name="error">/error.jsp</result>
<result name="success">/welcome.jsp</result>
</action>
</package>
</struts>
问题:访问http://localhost:8080/helloworld/login.jsp时报404错误
tomcat
struts2 我导入的包
commons-fileupload-1.2.2.jar
commons-logging-1.1.1.jar
freeer-2.3.19.jar
ognl-3.0.5.jar
struts2-core-2.3.7.jar
xwork-core-2.3.7.jar请大家帮我看看,谢谢先!
Struts2(struts-2.3.7)
JDK(1.6.0_10)
配置文件代码web.xml
<?xml version="1.0" encoding="GBK"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<!-- 定义Struts 2的FilterDispatcher的Filter -->
<filter>
<!-- 定义核心Filter的名字 -->
<filter-name>struts2</filter-name>
<!-- 定义核心Filter的实现类 -->
<filter-class>org.apache.Struts2.dispatcher.FilterDispatcher</filter-class>
</filter> <!-- FilterDispatcher用来初始化Struts2并且处理所有的Web请求 -->
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>struts.xml
<?xml version="1.0" encoding="GBK"?>
<!-- 指定Struts 2配置文件的DTD信息 -->
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd"><!-- struts是Struts 2配置文件的根元素 -->
<struts>
<!-- Struts 2的Action必须放在指定的包空间定义下 -->
<package name="helloworld" extends="struts-default">
<!-- 定义login的Action,该Action的实现类为lee.Action类 -->
<action name="Login" class="lee.LoginAction">
<!-- 定义处理结果和资源之间映射关系 -->
<result name="error">/error.jsp</result>
<result name="success">/welcome.jsp</result>
</action>
</package>
</struts>
问题:访问http://localhost:8080/helloworld/login.jsp时报404错误
tomcat
struts2 我导入的包
commons-fileupload-1.2.2.jar
commons-logging-1.1.1.jar
freeer-2.3.19.jar
ognl-3.0.5.jar
struts2-core-2.3.7.jar
xwork-core-2.3.7.jar请大家帮我看看,谢谢先!
解决方案 »
- 刚学到Session,遇到一点小问题求解释!!
- JSP如何动态的将Select中的某行选中
- 关于不启动MyEclipse运行工程
- JSP登陆界面,图片怎么放到页面中间?
- 急求java打印PDF文件
- smartupload组件 能不能把上传的图片保存到数据库中,而不是目录里.
- jsp读数据库的问题 急
- 连接数据库出现问题!!请大家帮忙~~~~
- 高手急救!!!!!!!!!!
- 在servlet中有类似与jsp中的application对象吗?如果有,怎么用,都说applet能与servlet通讯,applet能与jsp通讯吗?
- hibernate执行多对多关联查询时,关联表数据被删除
- java客户端调用webservice时候,服务端通过spring注入的对象为空,怎么解决吖
而且我Tomcat下就这一个helloworld项目
第4个是项目helloworld也删除掉啊?
麻烦你了。
还是报一样的错误我配置文件都贴在发贴那里了,您帮我看看。是个很简单的helloworld应该,我刚接触struts2。麻烦了。
[email protected]