- 浏览: 35344 次
- 性别:
- 来自: 郑州
文章分类
最新评论
-
yekui:
把Liberarise 重新导,src等都从新倒 即可解决。
tomcat编译工程之后classes文件夹下没有文件或者缺失文件解决办法 -
w1113:
刚才也碰到你的这个问题,编译后的class文件发布不上去,最后 ...
tomcat编译工程之后classes文件夹下没有文件或者缺失文件解决办法 -
苏叶晚晚:
我也遇到了同样。。。无奈的问题。唉==
用楼主的奇思妙想的办法 ...
tomcat编译工程之后classes文件夹下没有文件或者缺失文件解决办法
<?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">
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- 配置上下文 -->
<!-- 作用:定义Spring配置文件位置,可以定义多个文件,也可以使用通配符 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
WEB-INF/classes/applicationContext.xml,WEB-INF/classes/spring/spring-*.xml
</param-value>
<!-- ,ssss.xml(为spring的配置文件) -->
</context-param>
<!-- Struts2过滤器 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<!-- 解决hibernate延迟加载出现的问题,要放在Struts2过滤器之前 -->
<!--
作用:Spring管理hibernate的Session,在事务管理的类执行完后,不立刻关闭Session,
而将Session保存在一个线程变量中,在线程退出前关闭Session;这样在整个request过程中
始终使用一个session,也就可以在request的任何时期lazy loading数据。 主要是为了实现hibernate的延迟加载功能
-->
<filter>
<filter-name>lazyLoadingFilter</filter-name>
<filter-class>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
<!-- singleSession默认设置为true,如何为false就等于没有设置OpenSessionInView -->
<init-param>
<param-name>singleSession</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<!-- 配置Spring监听器 -->
<!-- 作用:启动web应用,就加载Spring,让Spring管理Bean -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- 解决hibernate延迟加载出现的问题,仍需要放在Struts2过滤器的filter-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>
</web-app>
<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">
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- 配置上下文 -->
<!-- 作用:定义Spring配置文件位置,可以定义多个文件,也可以使用通配符 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
WEB-INF/classes/applicationContext.xml,WEB-INF/classes/spring/spring-*.xml
</param-value>
<!-- ,ssss.xml(为spring的配置文件) -->
</context-param>
<!-- Struts2过滤器 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<!-- 解决hibernate延迟加载出现的问题,要放在Struts2过滤器之前 -->
<!--
作用:Spring管理hibernate的Session,在事务管理的类执行完后,不立刻关闭Session,
而将Session保存在一个线程变量中,在线程退出前关闭Session;这样在整个request过程中
始终使用一个session,也就可以在request的任何时期lazy loading数据。 主要是为了实现hibernate的延迟加载功能
-->
<filter>
<filter-name>lazyLoadingFilter</filter-name>
<filter-class>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
<!-- singleSession默认设置为true,如何为false就等于没有设置OpenSessionInView -->
<init-param>
<param-name>singleSession</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<!-- 配置Spring监听器 -->
<!-- 作用:启动web应用,就加载Spring,让Spring管理Bean -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- 解决hibernate延迟加载出现的问题,仍需要放在Struts2过滤器的filter-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>
</web-app>
发表评论
-
经典sql语句大全
2011-03-07 17:42 835一、基础 1、说明:创建数据库CREATE DATABA ... -
Java面向对象设计最佳实践
2011-03-07 17:40 762Java面向对象设计最佳实践 内置类设计 从这篇文 ... -
Spring AOP处理日志
2011-03-07 17:39 1205Spring AOP处理日志 AOP正 ... -
验证码相关2
2011-03-07 16:57 659登录的jsp页面: <%@ page language= ... -
验证码相关
2011-03-07 16:55 797public class RandomNumUtil { ... -
LoginInterceptor (用户登录拦截器类)
2011-03-07 16:54 1819public class LoginInterceptor e ... -
PageHelper (分页导航类,根据当前页计算导航链接)
2011-03-07 16:54 2572public class PageHelper { ... -
Pager(分页查询类)
2011-03-07 16:53 1265public class Pager extends Hibe ... -
FileTool (文件工具类)
2011-03-07 16:51 1573public class FileTool { ... -
CustomActionSupport (继承ActionSupport的类)
2011-03-07 16:50 784public class CustomActionSuppor ... -
StringTool(字符串工具类)
2011-03-07 16:49 1361public class StringTool { ... -
DateFormatTool(日期格式和字符串格之间转换类,日期转换器用到此类)
2011-03-07 16:49 1920public class DateFormatTool { ... -
LongConvert(Long类型转换器)
2011-03-07 16:48 918public class LongConvert extend ... -
IntConvert(整数类型转换器)
2011-03-07 16:47 794public class IntConvert extends ... -
DateConvert(日期类型转换器)
2011-03-07 16:47 1697public class DateConvert extend ... -
Xwork-conversion.properties资源文件全文
2011-03-07 16:46 1113java.sql.Timestamp=com.wyt.comm ... -
Struts.priperties配置文件全文
2011-03-07 16:46 758struts.objectFactory=spring str ... -
SSH2整合过程中出现的错误及解决方法
2011-03-07 16:45 1079老是报,ERROR [main] (Conte ... -
SSH2整合的顺序
2011-03-07 16:44 9761. 添加Spring 2.0的Libraries 选择 ... -
log4j.properties资源文件全文
2011-03-07 16:43 659log4j.rootLogger=INFO,ERROR,con ...
相关推荐
web.xml配置文件详解让开发人员更加清楚web.xml是怎么配置。以及各个配置的作用。
web.xml配置详解web.xml配置详解web.xml配置详解web.xml配置详解web.xml配置详解web.xml配置详解web.xml配置详解
web.xml配置文件详解[文].pdf
在web.xml中引入其他xml配置文件的步骤,含引入错误解决。
全新的java web项目的配置文件,新建的纯净的web.xml文件,没做任何改动,下载就可以使用了。
spring-mvc.xml spring-mybatis.xml web.xml log4j.properties,项目中需要用到的配置文件。直接可用。
Web.xml配置文件.pdf
关于web.xml配置文件记录.docx
spring在web.xml中和在struts中的不同配置..pdf
很实用的web.xml配置,里面包括过滤器,防止乱码,配置默认页,配置404或其它异常等错误页,开发项目时直接复制进去,完全搞定
部署描述文件 web.xml 配置详解 简单易学
web.xml文件配置.doc 讲的是配置比较全
web.xml配置文件
详细说明了部署描述符文件web.xml中各个元素的用法
J2EE中关于web.xml文件的配置
weblogic.xml配置详解,web服务器相关配置