67,512
社区成员
发帖
与我相关
我的任务
分享
<?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">
<!--定义Spring的配置的位置,可以定义多个配置文件,可以使用通配符 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/applicationContext*.xml</param-value>
</context-param>
<!--设置一起动当前的Web应用,就加载Spring,让Spring管理Bean-->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Spring 刷新Introspector防止内存泄露 -->
<listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener>
<!-- 编码过滤 -->
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<!--解决Hibernate延迟加载出现的问题,需要放到struts2过滤器之前-->
<filter>
<filter-name>lazyLoadingFilter</filter-name>
<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
<!--Struts2的过滤器,使用Struts2,必须配置该项-->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--解决Hibernate延迟加载出现的问题,仍需要放到struts2过滤器mapping之前-->
<filter-mapping>
<filter-name>lazyLoadingFilter</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<!-- Struts Tag Library Descriptors -->
<jsp-config>
<taglib>
<taglib-uri>/WEB-INF/tlds/c.tld</taglib-uri>
<taglib-location>/WEB-INF/tlds/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/tlds/fn.tld</taglib-uri>
<taglib-location>/WEB-INF/tlds/fn.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/tlds/fmt.tld</taglib-uri>
<taglib-location>/WEB-INF/tlds/fmt.tld</taglib-location>
</taglib>
</jsp-config>
<!--
<error-page>
<error-code>500</error-code>
<location>/500.jsp</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/404.jsp</location>
</error-page>
-->
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>
</web-app>
搞定了,原因是weblogic10不识统配符(*)
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/applicationContext*.xml</param-value>
</context-param>
改成
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/applicationContext.xml</param-value>
</context-param>
在application.xml中import其它的就行了
Root WebApplicationContext: initialization started
[INFO ] 2011-10-20 00:24:08,540 method:org.springframework.context.support.AbstractApplicationContext.prepareRefresh(AbstractApplicationContext.java:456)
Refreshing Root WebApplicationContext: startup date [Thu Oct 20 00:24:08 PDT 2011]; root of context hierarchy
[INFO ] 2011-10-20 00:24:08,737 method:org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:555)
Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1cfeda3b: defining beans []; root of factory hierarchy
[INFO ] 2011-10-20 00:24:08,764 method:org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:214)
Root WebApplicationContext: initialization completed in 469 ms
[INFO ] 2011-10-20 00:24:09,097 method:com.opensymphony.xwork2.util.logging.commons.CommonsLogger.info(CommonsLogger.java:42)
Parsing configuration file [struts-default.xml]
[INFO ] 2011-10-20 00:24:09,222 method:com.opensymphony.xwork2.util.logging.commons.CommonsLogger.info(CommonsLogger.java:42)
Parsing configuration file [struts-plugin.xml]
[INFO ] 2011-10-20 00:24:09,261 method:com.opensymphony.xwork2.util.logging.commons.CommonsLogger.info(CommonsLogger.java:42)
Parsing configuration file [struts.xml]
[INFO ] 2011-10-20 00:24:09,515 method:com.opensymphony.xwork2.util.logging.commons.CommonsLogger.info(CommonsLogger.java:42)
Setting autowire strategy to name
<bean id="nativeJdbcExtractor" class="org.springframework.jdbc.support.nativejdbc.SimpleNativeJdbcExtractor" />
<bean id="oracleLobHandler" class="org.springframework.jdbc.support.lob.OracleLobHandler" lazy-init="true">
<property name="nativeJdbcExtractor">
<ref bean="nativeJdbcExtractor" />
</property>
</bean>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="lobHandler" ref="oracleLobHandler" />
<property name="configLocation" value="classpath:jbpm.hibernate.cfg.xml" />
</bean>
<context:component-scan base-package="com.hzunitech" />
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<!--
<tx:method name="save*" propagation="REQUIRED" />
<tx:method name="add*" propagation="REQUIRED" />
<tx:method name="del*" propagation="REQUIRED" />
<tx:method name="update*" propagation="REQUIRED" />
<tx:method name="manage*" propagation="REQUIRED" />
<tx:method name="get*" read-only="true" />
<tx:method name="search*" read-only="true" />
<tx:method name="*" read-only="true" />
-->
<tx:method name="*"/>
</tx:attributes>
</tx:advice>
<tx:advice id="startProcess" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="startProcess"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="allManagerMethod" expression="execution (* com.hzu.*.service..*(..))" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="allManagerMethod" />
</aop:config>
<bean id="springHelper" class="org.jbpm.pvm.internal.processengine.SpringHelper" />
<bean id="processEngine" factory-bean="springHelper" factory-method="createProcessEngine" />
<bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
<bean id="executionService" factory-bean="processEngine" factory-method="getExecutionService" />
<bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
<bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
<bean id="identityService" factory-bean="processEngine" factory-method="getIdentityService" />