日期:2014-05-17 浏览次数:20714 次
<display-name>exam</display-name> <servlet> <description> </description> <display-name>Action</display-name> <servlet-name>Action</servlet-name> <servlet-class>exam.Action</servlet-class> </servlet> <servlet-mapping> <servlet-name>Action</servlet-name> <url-pattern>*.jspx</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>Index.jspx</welcome-file> </welcome-file-list>
<display-name>Action</display-name> <servlet-name>Action</servlet-name> <servlet-class>exam.Action</servlet-class> </servlet> <servlet-mapping> <servlet-name>Action</servlet-name> <url-pattern>*.jspx</url-pattern> </servlet-mapping>
------解决方案--------------------
<servlet-class>exam.Action</servlet-class>
这里写的应该是类名的目录把。
并且用Strust框架的话要有一个strust框架的一个过滤器。那个过滤器是整个strust框架的核心。
<filter>
<filter-name>struts 2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts 2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>