浏览 4937 次
该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2007-07-06
我用的是Myeclipse5.1+Eclipse3.2 +TomCat5.5.23+JDK1.5.0-09+webwork2.2.4请!!谢谢了!!!!!!!!!!!!!!!!!!!!!! 我的配置如下: ------------------------------------------------------------------------------- web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app 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>webwork</filter-name> <filter-class> com.opensymphony.webwork.dispatcher.FilterDispatcher </filter-class> </filter> <filter-mapping> <filter-name>webwork</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> </web-app> ----------------------------------------------------------------------------------- webwork.properties内容为: webwork.objectFactory=spring ----------------------------------------------------------------------------------- xwork.xml <!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWok1.0//EN" "http://www.opensymphony.com/xwork/xwork-1.0.dtd"> <xwork> <include file="webwork-default.xml"></include> <package name="default" extends="webwork-default"> <action name="register" class="userAction" method="register"> <result name="success">register_success.jsp</result> </action> </package> </xwork> ----------------------------------------------------------------------------------- spring的配置文件applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName"> <value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value> </property> <property name="url"> <value>jdbc:microsoft:sqlserver://localhost:1433</value> </property> <property name="username"> <value>sa</value> </property> <property name="password"> <value>sa</value> </property> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"> <ref bean="dataSource" /> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect"> org.hibernate.dialect.SQLServerDialect </prop> </props> </property> <property name="mappingResources"> <list> <value>org/thj/bookstore/vo/Orders.hbm.xml</value> <value>org/thj/bookstore/vo/Orderitem.hbm.xml</value> <value>org/thj/bookstore/vo/Catalog.hbm.xml</value> <value>org/thj/bookstore/vo/User.hbm.xml</value> <value>org/thj/bookstore/vo/Book.hbm.xml</value> </list> </property> </bean> <bean id="baseDAO" class="org.thj.bookstore.dao.BaseDAO" abstract="true"> <property name="sessionFactory"> <ref bean="sessionFactory" /> </property> </bean> <bean id="userDAO" class="org.thj.bookstore.dao.impl.UserDAO" parent="baseDAO"> </bean> <bean id="userService" class="org.thj.bookstore.service.impl.UserService"> <property name="userDAO"> <ref bean="userDAO" /> </property> </bean> <bean id="userAction" class="org.thj.bookstore.action.UserAction"> <property name="userService"> <ref bean="userService" /> </property> </bean> </beans> ----------------------------------------------------------------------------------- 启动tomcat服务器提示信息: 2007-7-6 13:48:40 org.apache.catalina.core.AprLifecycleListener lifecycleEvent 信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_09\bin;D:\workFolder\tomcat-5.5.23\bin 2007-7-6 13:48:40 org.apache.coyote.http11.Http11BaseProtocol init 信息: Initializing Coyote HTTP/1.1 on http-8080 2007-7-6 13:48:40 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 2172 ms 2007-7-6 13:48:41 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2007-7-6 13:48:41 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/5.5.23 2007-7-6 13:48:41 org.apache.catalina.core.StandardHost start 信息: XML validation disabled 2007-7-6 13:48:43 org.apache.catalina.core.ApplicationContext log 信息: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] 2007-7-6 13:48:44 org.apache.catalina.core.ApplicationContext log 信息: ContextListener: contextInitialized() 2007-7-6 13:48:44 org.apache.catalina.core.ApplicationContext log 信息: SessionListener: contextInitialized() 2007-7-6 13:48:44 org.apache.catalina.core.ApplicationContext log 信息: ContextListener: contextInitialized() 2007-7-6 13:48:44 org.apache.catalina.core.ApplicationContext log 信息: SessionListener: contextInitialized() log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax). log4j:WARN Please initialize the log4j system properly. log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester). log4j:WARN Please initialize the log4j system properly. 2007-7-6 13:49:03 org.apache.catalina.core.StandardContext start 严重: Error listenerStart 2007-7-6 13:49:03 org.apache.catalina.core.StandardContext start 严重: Context [/bookstort] startup failed due to previous errors 2007-7-6 13:49:05 org.apache.coyote.http11.Http11BaseProtocol start 信息: Starting Coyote HTTP/1.1 on http-8080 2007-7-6 13:49:05 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2007-7-6 13:49:05 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/281 config=null 2007-7-6 13:49:06 org.apache.catalina.storeconfig.StoreLoader load 信息: Find registry server-registry.xml at classpath resource 2007-7-6 13:49:06 org.apache.catalina.startup.Catalina start 信息: Server startup in 25922 ms 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2007-07-06
哪个大哥指点下小弟吧,我憋这三天了。快疯掉了,真晕死了。资料查了一大堆,不知道改哪里呀!!!!!!!!!!
|
|
返回顶楼 | |
发表时间:2007-07-06
看起来是log4j没有配置正确
尝试在web.xml中加入: <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/classes/log4j.properties</param-value> </context-param> <listener> <listener-class> org.springframework.web.util.Log4jConfigListener</listener-class> </listener> 注意log4jConfigLocation要根据你自己的情况配置 |
|
返回顶楼 | |
发表时间:2007-07-09
谢谢帮忙,还是出现同样问题!
|
|
返回顶楼 | |