tomcat控制台信息:
2009-10-7 13:52:54 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The Apache Tomcat Native library which allows optimal performance in produ
ction environments was not found on the java.library.path: D:\Java\jdk1.5.0_16\b
in;.;C:\WINDOWS\system32;C:\WINDOWS;D:\Java\jdk1.5.0_16\bin;C:\Program Files\Thi
nkPad\Utilities;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Progr
am Files\Intel\Wireless\Bin\;C:\Program Files\ATI Technologies\ATI Control Panel
;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs
2009-10-7 13:52:54 org.apache.coyote.http11.Http11BaseProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8888
2009-10-7 13:52:54 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 828 ms
2009-10-7 13:52:54 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2009-10-7 13:52:54 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/5.5.27
2009-10-7 13:52:54 org.apache.catalina.core.StandardHost start
信息: XML validation disabled
2009-10-7 13:52:56 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2009-10-7 13:52:56 org.apache.catalina.core.StandardContext start
严重: Context [/myssh2] startup failed due to previous errors
2009-10-7 13:52:58 com.opensymphony.xwork2.config.providers.XmlConfigurationProv
ider register
信息: Parsing configuration file [struts-default.xml]
2009-10-7 13:52:58 com.opensymphony.xwork2.config.providers.XmlConfigurationProv
ider register
信息: Parsing configuration file [struts-plugin.xml]
2009-10-7 13:52:58 com.opensymphony.xwork2.config.providers.XmlConfigurationProv
ider register
信息: Parsing configuration file [struts.xml]
2009-10-7 13:52:58 org.apache.struts2.config.Settings getLocale
警告: Settings: Could not parse struts.locale setting, substituting default VM l
ocale
2009-10-7 13:52:59 com.opensymphony.xwork2.util.ObjectTypeDeterminerFactory <cli
nit>
信息: Setting DefaultObjectTypeDeterminer as default ...
2009-10-7 13:52:59 com.opensymphony.xwork2.util.logging.commons.CommonsLogger in
fo
信息: Parsing configuration file [struts-default.xml]
2009-10-7 13:52:59 com.opensymphony.xwork2.util.logging.commons.CommonsLogger in
fo
信息: Unable to locate configuration files of the name struts-plugin.xml, skippi
ng
2009-10-7 13:52:59 com.opensymphony.xwork2.util.logging.commons.CommonsLogger in
fo
信息: Parsing configuration file [struts-plugin.xml]
2009-10-7 13:52:59 com.opensymphony.xwork2.util.logging.commons.CommonsLogger in
fo
信息: Parsing configuration file [struts.xml]
2009-10-7 13:53:00 org.apache.coyote.http11.Http11BaseProtocol start
信息: Starting Coyote HTTP/1.1 on http-8888
2009-10-7 13:53:00 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2009-10-7 13:53:00 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/31  config=null
2009-10-7 13:53:00 org.apache.catalina.storeconfig.StoreLoader load
信息: Find registry server-registry.xml at classpath resource
2009-10-7 13:53:00 org.apache.catalina.startup.Catalina start
信息: Server startup in 6750 msweb.xml配置:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 
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">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/applicationContext.xml</param-value>
</context-param> <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>

<welcome-file-list>
  <welcome-file>index.jsp</welcome-file>
</welcome-file-list>
  
<servlet>
<servlet-name>context</servlet-name>
<servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
</web-app>ApplicationContext.xml部分配置:
<bean id="UserdbDAO" class="com.zjm.study.login.dao.UserdbDAO">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="loginAction" class="com.zjm.study.login.struts.LoginAction">
<property name="iLogin">
<ref bean="UserdbDAO" />
</property>
</bean>struts.xml配置:
<package name="login" namespace="/Login" extends="struts-default">
<action name="loginAction" class="loginAction" method="login">
<result name="input">/index.jsp</result>
<result name="suc">/main.jsp</result>
<result name="fal">/error.jsp</result>
</action>
</package>LoginAction.java代码:
com.zjm.study.login.struts.LoginAction;
import com.zjm.study.login.IFace.ILogin;
...................
public ILogin iLogin;
public ILogin getILogin() {
return iLogin;
}public void setILogin(ILogin iLogin) {
this.iLogin = iLogin;
}
public String login() throws Exception{.....}启动时,控制台报错,请帮忙

解决方案 »

  1.   

    没写那些吧
    <struts>
       <constant name="struts.devMode" value="true"/>
        <constant name="struts.i18n.encoding" value="GBK"></constant>
        <constant name="struts.locale" value="zh_CN"></constant>
        <constant name="struts.action.extension" value="action,do"></constant>
    </struts>
      

  2.   

    有没有导入commons-fileupload和commons-io这两个包啊
      

  3.   

    严重: Error filterStart
    2009-10-7 13:52:56 org.apache.catalina.core.StandardContext start
    严重: Context [/myssh2] startup failed due to previous errors
    2009-10-7 13:52:58 com.opensymphony.xwork2.config.providers.XmlConfigurationProv
    ider register这个地方不是告诉我们问题所在!<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>你换上这个试试!这个是从STRUTS2自带的BLANK项目里面的!目前错误提示不是代码本身的问题,而是配置!如果不行,你就套用BLANK项目里面的配置文件和JAR包嘛!
      

  4.   

    <constant name="struts.objectFactory" value="spring"></constant>
    这句加上试试
      

  5.   

    应该是配置文件错误 严重: Error filterStart
    过滤器配置错了吧