To get parameters from the QueryString or from a POSTed form, do not use getAttribute, use:
But that's quite obvious, since $req is the request object and we all know how it works.
How do I set a request scoped object in an Interceptor and access it from a Velocity template?
I've tried every combination and find it too difficult to switch from Struts and Servlets to Webwork. The documentation could include a section which describes the application, session and request scopes in more detail. Three lines of documentation is not enough.
This does not work. Should it?
Found the problem. I have to put # in front of the key.
From the JavaDocs of the class com.opensymphony.webwork.views.velocity.VelocityManager
This method is responsible for creating the standard VelocityContext used by all WW2 velocity views. The following context parameters are defined:
Powered by a free Atlassian Confluence Open Source Project License granted to Apache Software Foundation. Evaluate Confluence today.