The spring framework is being studied recently, using spring MVC. Shows using velocity to find a related document as a reference
Some properties of the view parser
<bean id= "Viewresolver"
class= "Org.springframework.web.servlet.view.InternalResourceViewResolver" >
<property name= "Exposespringmacrohelpers" value= "true"/>
<property name= "Requestcontextattribute" value= "RC"/>
<property name= "Viewclass" value= "Org.springframework.web.servlet.view.JstlView"/>
<property name= "prefix" value= "/"/>
<property name= "suffix" value= ". jsp"/>
</bean>
In the definition of the view parser, the "exposespringmacrohelpers" setting exposes a RequestContext (named Springbindrequestcontext) to external use through spring's macro library. The default value is False. It exposes macro actions for processing forms and validating error messages;
"Requestcontextattribute" exposes spring's RequestContext object to variable RC. Use ${rc.contextpath} to get the application's ContextPath (that is,/myusers); Read user.name with ${rc.getmessage ("/web-inf/classes/")} Messages.properties localized information. This object is essential for view technologies that do not access serlvet requests (i.e. velocity and freemarker templates).
There are also some properties:
Exposerequestattributes: Default value False to set whether all request properties are added to the model before merging with the template. (This can be understood as all objects contained within the request scope, not a real request object.) Exposesessionattributes: Default value False to set whether all session properties are added to model before merging with the template. (See IBID.)