Spring与Velocity
来源:互联网 发布:json数组添加对象 编辑:程序博客网 时间:2024/06/05 18:21
视图解析器的属性说明:
<!-- 视图解析 --> <bean id="viewResolver" <property name="exposeSpringMacroHelpers" value="true"/> <property name="requestContextAttribute" value="rc" /> <property name="exposeRequestAttributes" value="true" /> <property name="exposeSessionAttributes" value="true" /> </bean>
exposeSpringMacroHelpers:
在视图解析器的定义中,”exposeSpringMacroHelpers”设置是否通过Spring的宏库暴露一个RequestContext(名为 springBindRequestContext)供外部使用,默认值为false。它暴露了处理表单和验证错误信息的宏操作;
requestContextAttribute:
“requestContextAttribute” 把Spring的RequestContext对象暴露为变量rc。
利用${rc.contextPath}来获取应用程序的contextPath(也 就是/MyUsers);
exposeRequestAttributes:
exposeRequestAttributes默认值false,设置是否所有的request属性在与模板进行合并之前添加到model中。(可以理解为request范围内包含的所有对象,而不是一个真正的Request对象。)
exposeSessionAttributes:
exposeSessionAttributes默认值false,设置是否所有的session属性在与模板进行合并之前添加到model中。
0 0
- Spring与Velocity
- Spring MVC 与 Velocity 整合
- spring mvc 与velocity配置
- velocity使用(二)--velocity与spring整合
- Spring velocity
- Spring Velocity
- 关于Spring与Velocity结合的问题(获得request,session)
- velocity+struts+spring+ibatis
- velocity和spring整合
- Spring使用Velocity模版
- Spring PropertyPlaceholderConfigurer with Velocity
- spring-velocity-jsp
- Spring整合velocity
- Spring MVC 整合Velocity
- Spring MVC 集成 Velocity
- spring mvc 整合 velocity
- spring mvc整合velocity
- Spring MVC整合Velocity
- UIViewController的生命周期
- uestc 1221 Ancient Go
- 数式の演算子と関数
- 【转载】Log4j之高级配置
- EventBus使用详解(一)——初步使用EventBus
- Spring与Velocity
- Spring整合JMS(一)——基于ActiveMQ实现
- mysql 错误解决方案-积累
- PHP防盗链文件下载的基本思想
- jdk7/8 TOMCAT7
- 最近在写一个distributed cache,把设计思想分享一下
- Spring整合JMS(二)——三种消息监听器
- linux mysql 操作命令
- extjs5搭建管理系统-环境搭建