You can use ActionContext.getContext().getSession()

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Mathias Bogaert
Sent: Tuesday, October 14, 2003 11:27 AM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Best practice to get HttpSession in the Action

That's an option too if you only need to get an put attributes (returns
a
Map, not HttpSession).
If you want to eg. invalidate (logout.action) a session, you need the
HttpSession instance for that request.

You can also do ServletActionContext.getRequest().getSession().

Mathias

----- Original Message -----
From: "Cuong Tran" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 14, 2003 8:21 PM
Subject: Re: [OS-webwork] Best practice to get HttpSession in the Action


>
>  What about ActionContext.getSession()?
>
> --- Mathias Bogaert <[EMAIL PROTECTED]> wrote:
> > I use HttpServletRequestAware and then request.getSession().
> >
> > Cheers,
> > Mathias
> >
> > ----- Original Message -----
> > From: "Fred Lamuette" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, October 14, 2003 7:09 PM
> > Subject: [OS-webwork] Best practice to get HttpSession in the
> > Action
> >
> >
> > > Hi,
> > > What is the best practice to use HttpSession in the Action ?
> > > SessionInterceptor and SessionAware for the action ?
> > > Cheers
> > > R.
> > >
> > > -----Message d'origine-----
> > > De : [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] la
> > part de
> > > Jason Carreira
> > > Envoye : mardi 14 octobre 2003 17:25
> > > A : [EMAIL PROTECTED]
> > > Objet : RE: [OS-webwork] VisitorFieldValidator question
> > >
> > >
> > > You would apply the VisitorFieldValidator to the field "model"...
> > The
> > > problem with this is that validation errors will be added as
> > > "model.field1", whereas you can access the model fields in your
> > page as
> > > just "field1", so the error messages won't be displayed next to
> > the
> > > fields (or at all unless you specifically look for them).
> > >
> > > Usually if you're using ModelDriven, you'd want to put your
> > validations
> > > in your Action's validation.xml...
> > >
> > > -----Original Message-----
> > > From: Bryan White [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, October 13, 2003 8:51 PM
> > > To: WebWork
> > > Subject: [OS-webwork] VisitorFieldValidator question
> > >
> > > Hello all,
> > >
> > > Is it possible to have the VisitorFieldValidator validate my
> > model, if
> > > I'm
> > > using the model-driven interceptor?
> > > If so, what steps do I need to take to get that working?
> > >
> > > Thanks in advance,
> > >
> > > Bryan White
> > > [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by: SF.net Giveback Program.
> > > SourceForge.net hosts over 70,000 Open Source Projects.
> > > See the people who have HELPED US provide better services:
> > > Click here: http://sourceforge.net/supporters.php
> > > _______________________________________________
> > > Opensymphony-webwork mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by: SF.net Giveback Program.
> > > SourceForge.net hosts over 70,000 Open Source Projects.
> > > See the people who have HELPED US provide better services:
> > > Click here: http://sourceforge.net/supporters.php
> > > _______________________________________________
> > > Opensymphony-webwork mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by: SF.net Giveback Program.
> > > SourceForge.net hosts over 70,000 Open Source Projects.
> > > See the people who have HELPED US provide better services:
> > > Click here: http://sourceforge.net/supporters.php
> > > _______________________________________________
> > > Opensymphony-webwork mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> > >
> > >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: SF.net Giveback Program.
> > SourceForge.net hosts over 70,000 Open Source Projects.
> > See the people who have HELPED US provide better services:
> > Click here: http://sourceforge.net/supporters.php
> > _______________________________________________
> > Opensymphony-webwork mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
>
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> SourceForge.net hosts over 70,000 Open Source Projects.
> See the people who have HELPED US provide better services:
> Click here: http://sourceforge.net/supporters.php
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
>
>



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to