首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 服务器 > Apache >

struts2异常

2012-04-27 
struts2错误用Struts2写第一个HelloWord程序就出错。各位大侠帮忙呀web.xml配置XML code?xml version1.0

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正常启动了吗?

热点排行