日期:2014-05-17  浏览次数:20611 次

struts2错误
用Struts2写第一个HelloWord程序就出错。各位大侠帮忙呀
web.xml配置
XML code
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_9" 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">
    <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>

    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

</web-app>



struts.xml配置

XML code
<?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.0.dtd">
     <struts>
     <include file="sturts-default.xml"></include>
     
     </struts>

整个应用就只有一个index.jsp文件
在浏览器中输入http://localhost:8080/HellWord后
报错
Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/HelloWord] has not been started

------解决方案--------------------
你的tomcat正常启动了吗?