DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5395>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5395

ActionContext class

           Summary: ActionContext class
           Product: Struts
           Version: Nightly Build
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Controller
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Draft source code for a new action class, ActionContext. This is a helper object 
to expose the Struts shared resource which are be stored in the application, 
session, or request contexts, as appropriate. An instance should be created for 
each request processed. The  methods which return resources from
the request or session contexts are not thread-safe. Provided for use by other 
servlets in the application so they can easily access the Struts shared resource 
The resources are stored under attributes in the application, session, or 
request contexts. The ActionContext methods simply return the resource from 
under the context and key used by the Struts. 

This is being tested in conjunction with a Velocity servlet. The ActionContext 
is introduced into the VelocityContext as a object named get. This then lets the 
velocity template designers to chant:

$!get.message("index.title")

where a JSP would use 

<bean:message key="index.title")

Similiar methods are provided for "links" and "actions". 

This version of the Velocity servlet automatically exposes the request and 
session contexts (as facades), so they have access to ActionForms and whatnot.

This is a "first blush" draft, and I'm sure there are many ways it could be 
improved, and things I haven't thought of. Suggestions welcome.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to