- 浏览: 122697 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
yingtaier:
[i][4/i]引用-[*]引用---[size=x-larg ...
使用Cxf在中的自定义拦截器来输出日志信息 -
风雨故都:
Page 里面有什么属性
WebService(cxf框架)返回一个包含有map的一个page对象 -
ys20081411:
请问这个乱码和jdk的版本有关系么?我用了你的代码,但是报错了 ...
JSPWiki使用说明书 -
thrillerzw:
哈哈,难啊。
我想找个女朋友,但是不会表白。 -
thrillerzw:
不能 把每带过的地方,只是当成一个路过的地方,从来没有付出过 ...
活在一个有梦想的世界里
web.xml
spring-mvc.xml
maven
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath*:spring/**/*.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class> </listener> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</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> <filter-mapping> <filter-name>encodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <servlet> <servlet-name>spring</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath*:/mvc/spring-mvc.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <!-- <servlet> <servlet-name>velocity</servlet-name> <servlet-class> org.apache.velocity.tools.view.servlet.VelocityViewServlet </servlet-class> <load-on-startup>10</load-on-startup> </servlet> <servlet-mapping> <servlet-name>velocity</servlet-name> <url-pattern>*.html</url-pattern> </servlet-mapping> --> <servlet-mapping> <servlet-name>spring</servlet-name> <url-pattern>/app/*</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app>
spring-mvc.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd"> <mvc:annotation-driven /> <context:component-scan base-package="com.nahai.view.controller" /> <context:annotation-config /> <!-- <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> <property name="basenames"> <list> <value>/WEB-INF/messages/messages</value> <value>/WEB-INF/messages/expMessages</value> <value>/WEB-INF/messages/chartMessages</value> </list> </property> <property name="cacheSeconds" value="-1" /> </bean> \ --> <!-- 解析器--> <!-- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/view/" p:suffix=".html" /> --> <!-- velocity解析器 --> <bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver"> <property name="contentType" value="text/html;charset=UTF-8" /> <property name="suffix" value=".html" /> </bean> <!-- velocity引擎 --> <bean id="velocityConfigurer" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer"> <property name="resourceLoaderPath"> <value>/view/</value> </property> <!--<property name="configLocation" value="/WEB-INF/velocity.properties" /> --> <property name="velocityProperties"> <props> <prop key="input.encoding">UTF-8</prop> <prop key="output.encoding">UTF-8</prop> </props> </property> </bean> </beans>
maven
<dependency> <groupId>velocity</groupId> <artifactId>velocity</artifactId> <version>1.7</version> <systemPath>D:/workspace/showView/src/main/webapp/WEB-INF/lib/velocity-1.7.jar</systemPath> <scope>system</scope> </dependency> <dependency> <groupId>velocity</groupId> <artifactId>velocity-tools-view-2.0.jar</artifactId> <version>2.0</version> <systemPath>D:/workspace/showView/src/main/webapp/WEB-INF/lib/velocity-tools-2.0.jar</systemPath> <scope>system</scope> </dependency> <dependency> <groupId>commons</groupId> <artifactId>collections.jar</artifactId> <version>1.0</version> <systemPath>D:/workspace/showView/src/main/webapp/WEB-INF/lib/commons-collections.jar</systemPath> <scope>system</scope> </dependency> <dependency> <groupId>commons</groupId> <artifactId>lang.jar</artifactId> <version>1.0</version> <systemPath>D:/workspace/showView/src/main/webapp/WEB-INF/lib/commons-lang.jar</systemPath> <scope>system</scope> </dependency> <dependency> <groupId>commons</groupId> <artifactId>commons-digester-1.8.jar</artifactId> <version>1.8</version> <systemPath>D:/workspace/showView/src/main/webapp/WEB-INF/lib/commons-digester-1.8.jar</systemPath> <scope>system</scope> </dependency> <dependency> <groupId>commons</groupId> <artifactId>commons-beanutils-1.8.3.jar</artifactId> <version>1.8</version> <systemPath>D:/workspace/showView/src/main/webapp/WEB-INF/lib/commons-beanutils-1.8.3.jar</systemPath> <scope>system</scope> </dependency>
发表评论
-
微信公众账号与网站信息对接
2013-07-10 17:37 8800最近做了一个微信 ... -
原子操作实现并发
2012-06-14 17:02 1171使用synchronized: 使用synchroni ... -
Trie 树 及Java实现
2012-02-01 11:39 1640举个简单的例子。 给你100000个长度不超过10的单词 ... -
activiti使用
2011-07-25 15:25 2414使用activiti报错 Caused by: java.l ... -
Struts2请求乱码问题
2011-05-06 16:25 1035ie6中的bug 在jsp请求Action ... -
软件开发流程图
2011-03-25 11:36 1164自己对软件开发流程理解 -
使用AOP实现异常处理
2011-03-16 15:08 5420@Aspect public class Service ... -
使用Freemarker和Struts2做动态表单
2011-03-01 09:49 4771由于项目中需要用到一个可定制的动态表单功能,管理员可以根 ... -
JSPWiki使用说明书
2010-08-31 16:26 7655在使 ... -
jsp 下载出现乱码和空格问题
2010-08-31 13:21 2151关于中文文件下载的问 ... -
代理服务器的缓存问题
2010-06-24 17:00 1166如果要使用代理服务器时,会出现页面信息串。 处理方法(写一个过 ... -
浅谈Eclipse调用Tomcat服务的原理
2010-06-11 14:23 3281转:http://www.173it.cn/Html/?5 ... -
w3c 中doc生成一个基于hibernate的hbm.xml文件
2010-06-03 13:01 1379package com.gosophia.metadata ... -
如何让eclipse辅助提示struts.xml文件的编写
2010-05-21 19:06 2159一般情况下,如果计算机连接上了internet,eclipse ... -
Eclipse 常用设置
2010-05-21 13:40 855转: http://www.blogjava.net/Todd ... -
Java程序执行原理
2010-05-02 17:10 970<o:p> </o:p>首先 ... -
什么是线程安全
2010-04-30 16:14 890如果你的代码所在 ... -
Servlet的线程安全问题
2010-04-30 15:46 690转:http://zjeers.iteye.com/blog/ ... -
JSR(转)
2010-04-26 13:35 1439J2ME 配置规范 ========= JSR 30 --- ... -
Jpa
2010-04-09 10:20 1903来自:http://www.oracle.com/ ...
相关推荐
SpringMVC3+velocity最简单配置例子,入门级的demo
J2EE开发中velocity获取项目地址,使用框架springmvc+velocity视图器,velocity配置toolboxConfigLocation使.vm文件获取项目资源地址和设置静态资源地址。 此处demo实现效果为:test.vm模板通过调用${ctx.rootPath}...
springMVC架构,maven , velocity , 数据源配置在项目中(springMVC的配置文件中)。
Spring MVC+Maven+Velocity配置实例
采用最新的springmvc3.2、mybatis3.2、velocity1.7整合,完整的配置文件和测试例子,注解完成,轻量级的视图搭配
SpringMVC+ibatis+velocity整合例子,虽然比较简单。可以为没有配置好的同学作为参考。
框架采用最流行技术springmvc4.0.6,和最流行持久层框架mybatis3.2.7,还有Velocity - 模板引擎,还有最新日志输出log4j2的配置并且分级别输出到不同文件, 感兴趣赶紧下载吧
基于springmvc框架,基本jar包都在,下载后配置改改,有些包可能不存在,但是无妨碍,改改即可运行,值得研究
整合velocity和jsp 通过不同视图解析器,返回不同视图
这是一个基于Velocity+SpringMVC+Spring+MyBatis架构的网站示例。 1.生成工程的步骤(前提jdk,eclipse,gradle都已安装配置完毕): 1)创建webapp目录,然后编写build.gradle 2)运行gradle createWebProject命令,...
通过策略接口,Spring 框架是高度可配置的,而且包含多种视图技术,例如 JavaServer Pages(JSP)技术、Velocity、Tiles、iText和POI。Spring MVC 框架并不知道使用的视图,所以不会强迫您只使用 JSP 技术。Spring ...
4、SpringMVC是真正的View层实现无关的,它不会强制开发员使用JSP,我们可以使用其他View技术,比如Velocity,Xskt等。 5、国际化支持,Spring的ApplicationContext提供了对国际化的支持,在这里可以很方便的使用。 6...
通过策略接口,Spring 框架是高度可配置的,而且包含多种视图技术,例如 JavaServer Pages(JSP)技术、Velocity、Tiles、iText和POI。Spring MVC 框架并不知道使用的视图,所以不会强迫您只使用 JSP 技术。Spring ...
SpringMVC还包含多种视图技术,例如 JSP,Velocity,Tiles,iText和POI等。SpringMVC分离了控制器。 SpringMVC具有如下特点: SpringMVC具有强大的灵活性,非侵入性和可配置性 SpringMVC提供了一个前端控制器...
分享一个spring+mybatis+velocity项目demo,该项目是之前给一个学第学习用的,主要基于springMVC、mybatis、velocity搭建的,使用maven构建,其中zai service层编写了两个简单组件,一个是email发送,一个是认证授权...
运行resin目录下的httpd.exe文件即可(请确保resin解压在D盘根目录下面,由于配置的时候是写死的引用D:\resin-pro-3.1.12\lib\aspectjweaver-1.7.0.jar)共有3个解压缩文件,由于csdn限制只能分解成多个文件上传,请...
通过策略接口,Spring 框架是高度可配置的,而且包含多种视图技术,例如 JavaServer Pages(JSP)技术、Velocity、Tiles、iText 和 POI。Spring MVC 框架并不知道使用的视图,所以不会强迫您只使用 JSP 技术。Spring...
通过策略接口,Spring 框架是高度可配置的,而且包含多种视图技术,例如 JavaServer Pages(JSP)技术、Velocity、Tiles、iText 和POI。Spring MVC 框架并不知道使用的视图,所以不会强迫您只使用 JSP 技术。Spring ...
高度可配置的,而且包含多种视图技术,例如JavaServer Pages(JSP)技术、Velocity、Tiles、iText 和 POI。Spring MVC 框架并不知道使用的视图,所以不会强迫您只使用JSP 技术。Spring MVC 分离了控 制器、模型对象...