You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joshua Jackson <jo...@gmail.com> on 2008/04/26 04:57:50 UTC

T5: Getting Request Info

Dear all,

There is a generic Request component in T5, but it hasn't got some
method in HttpServletRequest such as: getRemoteUser()  . I wanted to
get the user that access the apps. How do I do this in T5? Could
anyone give me an insights on this?

Thanks in advance

-- 
Let's show the world what we've got.

Blog: http://joshuajava.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: Getting Request Info

Posted by Kristian Marinkovic <kr...@porsche.co.at>.
yes you can... i have a Dispatcher that invalidates the
httpsession if a user specific ASO returns true on isLogout().

g,
kris




Marcus <mv...@gmail.com> 
28.04.2008 21:59
Bitte antworten an
"Tapestry users" <us...@tapestry.apache.org>


An
"Tapestry users" <us...@tapestry.apache.org>
Kopie

Thema
Re: T5: Getting Request Info






Hi,

Can I invalidate session using this code?

...
import javax.servlet.http.HttpServletRequest;
...
    @Inject
    private HttpServletRequest _httpServletRequest;
...
    public String onActionFromLogout() {
        _visit = null;
        _httpServletRequest.getSession().invalidate();
        return "start";
    }
...

What's the best practice?

Thanks,

Marcus


Re: T5: Getting Request Info

Posted by Marcus <mv...@gmail.com>.
Hi,

Can I invalidate session using this code?

...
import javax.servlet.http.HttpServletRequest;
...
    @Inject
    private HttpServletRequest _httpServletRequest;
...
    public String onActionFromLogout() {
        _visit = null;
        _httpServletRequest.getSession().invalidate();
        return "start";
    }
...

What's the best practice?

Thanks,

Marcus

Re: T5: Getting Request Info

Posted by Joshua Jackson <jo...@gmail.com>.
On 4/26/08, Howard Lewis Ship <hl...@gmail.com> wrote:
> You can also just inject the HttpServletRequest.  It is a "shadow" of
> the request in the RequestGlobals object.

Wow I didn't know that :) Great.

Thanks Howard.

-- 
Let's show the world what we've got.

Blog: http://joshuajava.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: Getting Request Info

Posted by Howard Lewis Ship <hl...@gmail.com>.
You can also just inject the HttpServletRequest.  It is a "shadow" of
the request in the RequestGlobals object.

On Fri, Apr 25, 2008 at 8:10 PM, Joshua Jackson <jo...@gmail.com> wrote:
> Never mind,
>
>  I made a workaround as such:
>
>     @Inject private RequestGlobals requestGlobals;
>
>     private HttpServletRequest request = requestGlobals.getHTTPServletRequest();
>
>  Cheers,
>
>
>
>  On 4/26/08, Joshua Jackson <jo...@gmail.com> wrote:
>  > Dear all,
>  >
>  > There is a generic Request component in T5, but it hasn't got some
>  > method in HttpServletRequest such as: getRemoteUser()  . I wanted to
>  > get the user that access the apps. How do I do this in T5? Could
>  > anyone give me an insights on this?
>  >
>  > Thanks in advance
>  >
>  > --
>  > Let's show the world what we've got.
>  >
>  > Blog: http://joshuajava.wordpress.com/
>  >
>
>
>  --
>  Let's show the world what we've got.
>
>  Blog: http://joshuajava.wordpress.com/
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: Getting Request Info

Posted by Joshua Jackson <jo...@gmail.com>.
Never mind,

I made a workaround as such:

    @Inject private RequestGlobals requestGlobals;

    private HttpServletRequest request = requestGlobals.getHTTPServletRequest();

Cheers,

On 4/26/08, Joshua Jackson <jo...@gmail.com> wrote:
> Dear all,
>
> There is a generic Request component in T5, but it hasn't got some
> method in HttpServletRequest such as: getRemoteUser()  . I wanted to
> get the user that access the apps. How do I do this in T5? Could
> anyone give me an insights on this?
>
> Thanks in advance
>
> --
> Let's show the world what we've got.
>
> Blog: http://joshuajava.wordpress.com/
>


-- 
Let's show the world what we've got.

Blog: http://joshuajava.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org