struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Johnson <ctj...@gmail.com>
Subject Re: accessing properties/attributes (scope)
Date Mon, 20 Aug 2012 15:39:17 GMT
Lukasz,
I changed <tiles:importAttribute /> to include 'scope="request"' and I now
see my variables in the request scope and can access them via
#request.url.  Thank you.
---

>From what I've read there are the following scopes in struts.

   - application
   - session
   - request
   - page
   - action

I can see application, session, request in <s:debug /> and see how to
access the different parts via #application, #session, #request.  I see
action as well but haven't tested accessing its attributes.

What I don't see is "page".

By default <tiles:importAttribute /> imports to the "page" scope.

I guess I'm just missing something important.  How do I access variables in
the page scope via ognl expressions?

Thank you,
-Chris
On Mon, Aug 20, 2012 at 9:11 AM, Lukasz Lenart <lukaszlenart@apache.org>wrote:

> 2012/8/20 Christopher Johnson <ctjctj@gmail.com>:
> > #url turns out to be null because it can't.  <s:debug /> does not show it
> > anywhere.
>
> Did you try #request.url ? As this should be a request scoped variable.
>
>
> Regards
> --
> Ɓukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> 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