C.F. Scheidecker Antunes wrote:

How do you save something to the Session scope and then access it within Struts?
I pretty much understand how to do it within a Servlet.

How do you do the same for the Context? I also know how to do it in a Servlet.

Same way; inside your Actions you can get the session through the request and the context through getServlet().getContext() (minus whatever end-of-day errors I've made)

Dave

Shall I make a getter for this model class and pass the parameter through an Action call or can I access the Session data from a Model Class? Then I guess my Model Class should extend some Struts class that would provide access to both the Session and the Context.

Yuck. In general you'd want to decouple your model from both Struts and web applications. This provides lots of benefits like testability and reuse (say in a standalone desktop app).

Dave



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

Reply via email to