请高手帮忙看看,404错误
请高手帮忙看看 到底是哪里的错误信息: Initializing Coyote HTTP/1.1 on http-8080
2012-3-9 22:32:22 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 260 ms
2012-3-9 22:32:22 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2012-3-9 22:32:22 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.13
log4j:WARN No appenders could be found for logger (com.opensymphony.xwork2.config.providers.XmlConfigurationProvider).
log4j:WARN Please initialize the log4j system properly.
2012-3-9 22:32:23 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Unable to load configuration. - action - file:/D:/My%20Documents/Documents/Workspace/.metadata/.me_tcat/webapps/login/WEB-INF/classes/struts.xml:8:41
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:428)
at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4340)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: Unable to load configuration. - action - file:/D:/My%20Documents/Documents/Workspace/.metadata/.me_tcat/webapps/login/WEB-INF/classes/struts.xml:8:41
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415)
... 28 more
Caused by: Action class [login] not found - action - file:/D:/My%20Documents/Documents/Workspace/.metadata/.me_tcat/webapps/login/WEB-INF/classes/struts.xml:8:41
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:420)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:365)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:479)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:275)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:204)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66) --------------------编程问答-------------------- 应该是struts.xml文件位置问题吧! --------------------编程问答-------------------- 现在struts在src下,不是这个的问题吧 --------------------编程问答-------------------- 没人吗
--------------------编程问答-------------------- struts文件内容在此
<?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="struts-default.xml"/>
<package name="struts" extends="struts-default">
<action name="logon" class="login">
<result name="success">/success.jsp</result>
<result name="input">/login.jsp</result>
</action>
<action name="save" class="login" method="save">
<result name="success">/success.jsp</result>
<result name="error">/error.jsp</result>
</action>
<action name="update" class="login" method="update">
<result name="success">/success.jsp</result>
<result name="update">/update.jsp</result>
<result name="error">/error.jsp</result>
</action>
<action name="delete" class="login" method="delete">
<result name="success">/success.jsp</result>
<result name="error">/error.jsp</result>
</action>
<action name="show" class="login" method="findAllUsers">
<result name="success">/list.jsp</result>
<result name="error">/error.jsp</result>
</action>
</package>
</struts>
--------------------编程问答--------------------
你的配置文件就错了, --------------------编程问答--------------------
说明你的配置文件错了 --------------------编程问答-------------------- 你的struts2.xml配置的是啥啊。回去看看基础把。
我这告诉你思路把。
<action name="delete" class="login" method="delete">
<result name="success">/success.jsp</result>
<result name="error">/error.jsp</result>
</action>
上面是你的代码。OK。你如果想执行这个删除的方法,你进哪个action啊。我看了你的所有struts配置。就
是一个空白。它不报错还出奇了。 --------------------编程问答-------------------- class的action要写全名 --------------------编程问答-------------------- 严重: Exception starting filter struts2
Unable to load configuration. - action - file:/D:/My%20Documents/Documents/Workspace/.metadata/.me_tcat/webapps/login/WEB-INF/classes/struts.xml:8:41
这里的问题...具体我也不清楚哈... --------------------编程问答--------------------
看样子,是配置文件没有读到。
为什么没有读到,file:/D:/My%20Documents
有个空格,你看看路径。
补充:Java , Java EE