java.lang.ClassNotFoundException: org.springframework.web.servlet.view.velocity.VelocityConfigurer
这个问题加入 spring-context-support-3.2.2.RELEASE.jar 就OK了
velocity eclipse插件
https://code.google.com/p/veloeclipse/
<bean id="velocityConfig" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer" p:resourceLoaderPath="/WEB-INF/velocity/" /> <!-- p:configLocation="classpath:common/velocity.properties" /> --> <bean id="viewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver" p:suffix=".vm" />
SpringMVC + velocity获得requset session的问题
首先,要在 org.springframework.web.servlet.view.velocity.VelocityViewResolver 里把
request/session 暴露出来:
p:exposeRequestAttributes="true" p:exposeSessionAttributes="true"
然后,就可以页面上拿到你在java code 里 set 的 attribute :
如:
request.setAttribute("now",new Date()); session.setAttribute("now2",new Date());
在页面上直接拿就好了,不需要再用request.xxx 因为上面的两个true 会把request session 里的数据merge到context 里 ,
$now $now2
相关推荐
J2EE开发中velocity获取项目地址,使用框架springmvc+velocity视图器,velocity配置toolboxConfigLocation使.vm文件获取项目资源地址和设置静态资源地址。 此处demo实现效果为:test.vm模板通过调用${ctx.rootPath}...
maven+springMVC+mybatis+velocity+mysql+junit项目框架搭建
Spring+SpringMVC+Mybatis+Velocity+Maven整合
springMVC+Velocity+iBATIS的整合小demo
maven+springmvc+spring+ibatis+velocity+mysql
Spring+Hibernate+SpringMVC+Velocity+Maven整合
一套基于SpringMVC+velocity框架的web应用 ,基于注解,页面使用sitemesh进行包含
SpringMVC+ibatis+velocity整合例子,虽然比较简单。可以为没有配置好的同学作为参考。
J2ee开源模板后台是基于 springmvc+mybatis+easyui+velocity 技术实现的一套模板后台,把一些通用的功能模板化,可以在线打包生成整站源码包括 jsp页面,为开发人员节省时间 ,生成的功能有增删改查,查询包括按列...
maven+springMVC+mybatis+velocity+mysql+junit 代码生成器
使用最流行的Springmvc+mybatis+velocity+easyui+jquery1.4.1架构
Spring4+Velocity2+Maven整合例子,idea开发。直接运行。
应用实例,可运行maven+springmvc+mybaits+freemarker+velocity。
第一章 企业项目开发--maven+springmvc+spring+mybatis+velocity整合代码的github地址:https://github.
大型商城网站源码springmvc+freemarker+velocity+ibatis,最新最前沿的技术,特别适合二次开发
该资源是SpringMVC Annotation+hibernate+velocity的一个简单例子,供大家参考使用。
2):采用spring3.2作为bean容器管理,springMVC处理请求转发,Velocity进行页面渲染,Mybatis作为数据持久层。CXF作为同步通信机制。 3):数据库进行加密访问。 4):注解的使用。 5):Vecity模板引擎页面渲染...
采用最新的springmvc3.2、mybatis3.2、velocity1.7整合,完整的配置文件和测试例子,注解完成,轻量级的视图搭配
基于springmvc框架,基本jar包都在,下载后配置改改,有些包可能不存在,但是无妨碍,改改即可运行,值得研究
SpringMVC3+velocity最简单配置例子,入门级的demo