struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Othon Reyes Sanchez" <othon.re...@gmail.com>
Subject Re: how to access a session variable in an action class?
Date Mon, 03 Mar 2008 19:19:18 GMT
I wonder what mojoRising is thrying to achieve.

As Dave Newton said "setting something to session from the JSP is a little
suspicious" because tipically you want things the other way around( from
action to jsp) and if you need to send some data to the action, you have to
use parameters (in the url or as a field in a form ).



On Mon, Mar 3, 2008 at 1:13 PM, Dave Newton <newton.dave@yahoo.com> wrote:

> Oops, I misunderstood the question.
>
> Musachy's correct, though; setting something to session from the JSP is a
> little suspicious.
>
> Dave
>
> --- Musachy Barroso <musachy@gmail.com> wrote:
> > That would be to set the value on your action. On your jsp, use the
> > "set" tag, and set the "scope" attribute to session:
> >
> > http://struts.apache.org/2.x/docs/set.html
> >
> > btw, if you are setting something on the session in your jsp and using
> > it on the actions, there is a good chance that you are doing something
> > wrong.
> >
> > On Mon, Mar 3, 2008 at 2:03 PM, Dave Newton <newton.dave@yahoo.com>
> wrote:
> > > --- mojoRising <jpiser@averoinc.com> wrote:
> > >  > Hi, I want to set a parameter in the session from my JSP, and then
> > access
> > >  > it from my action class. I am not sure what the correct syntax is
> for
> > this.
> > >  > Could someone please explain? Thanks!
> > >
> > >
> >
> http://struts.apache.org/2.x/docs/how-do-we-get-access-to-the-session.html
> > >
> > >  Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message