我是struts的新手。我有在tomcat上運行我的Struts應用程序時,請求的資源不可用錯誤。Struts2請求的資源不可用
我的目錄結構是:
struts.xml的
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<!-- remove these constant elements in production -->
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="true" />
<package name="app02a" namespace="" extends="struts-default">
<action name="Product_input">
<result>/jsp/Product.jsp</result>
</action>
<action name="Product_save" class="app02a.Product" method="execute">
<result>/jsp/Details.jsp</result>
</action>
</package>
</struts>
的web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app 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_2_5.xsd"
version="2.5">
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Restrict direct access to JSPs.
For the security constraint to work, the auth-constraint
and login-config elements must be present -->
<security-constraint>
<web-resource-collection>
<web-resource-name>JSPs</web-resource-name>
<url-pattern>/jsp/*</url-pattern>
</web-resource-collection>
<auth-constraint/>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
</web-app>
注:
1.I已包括在lib文件夾和所有罐子他們在構建路徑
2.I使用的struts-2.3.16.1
3.I我正在嘗試執行此網址
http://localhost:8080/app02a/Product_input.action
請幫助我所缺少的
定義「included all jars」;不要讓我們猜你正在部署什麼。 –