You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Miguel Angel Hernández <mi...@gmail.com> on 2007/03/20 02:41:10 UTC

Tap4 Obtaining assets dynamically

Hi all,

Does anybody nows a way to obtain Assets dynamically?

cheers,

miguel

Re: Re: Session

Posted by Jesse Kuhnert <jk...@gmail.com>.
Don't we already? ;)

http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/timeout.html

On 3/24/07, Howard Lewis Ship <hl...@gmail.com> wrote:
> That's useful enough that someone should add a JIRA issue suggesting
> we supply that as a standard component.
>
> On 3/22/07, Kristian Marinkovic <kr...@porsche.co.at> wrote:
> > i think a better strategy is to reduce the sesion-timeout in the
> > web.xml to lets say 2mins and to implement a javascript function
> > that issues periodic keep-alive requests every 1.5mins or so.
> > thus preventing the session from expiring...
> >
> > and when someone closes his browser the session will not
> > stay in memory for too long :)
> >
> > g,
> > kris
> >
> >
> >
> >
> > Tim Sawyer <li...@calidris.co.uk>
> > 22.03.2007 11:10
> > Bitte antworten an
> > "Tapestry users" <us...@tapestry.apache.org>
> >
> >
> > An
> > users@tapestry.apache.org
> > Kopie
> > "James Sherwood" <js...@rgisolutions.com>
> > Thema
> > Re: Session
> >
> >
> >
> >
> >
> >
> > I believe the timeout for this is configured through web.xml
> >
> > <session-config>
> >   <session-timeout>30</session-timeout> <!-- minutes -->
> > </session-config
> >
> > Tim.
> >
> > On Tuesday 20 March 2007 17:16, James Sherwood wrote:
> > > Hello,
> > >
> > > We have an admin side with a user login etc.
> > >
> > > The problem is, the session times out after soo many minutes(we run
> > under
> > > tomcat) of being idle and they user has to log back in.
> > >
> > > Is there any way to make this indefinate and if so, is there any impact
> > on
> > > resources etc?
> > >
> > > Thanks,
> > > James
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >
>
>
> --
> Howard M. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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


Re: Re: Session

Posted by Howard Lewis Ship <hl...@gmail.com>.
That's useful enough that someone should add a JIRA issue suggesting
we supply that as a standard component.

On 3/22/07, Kristian Marinkovic <kr...@porsche.co.at> wrote:
> i think a better strategy is to reduce the sesion-timeout in the
> web.xml to lets say 2mins and to implement a javascript function
> that issues periodic keep-alive requests every 1.5mins or so.
> thus preventing the session from expiring...
>
> and when someone closes his browser the session will not
> stay in memory for too long :)
>
> g,
> kris
>
>
>
>
> Tim Sawyer <li...@calidris.co.uk>
> 22.03.2007 11:10
> Bitte antworten an
> "Tapestry users" <us...@tapestry.apache.org>
>
>
> An
> users@tapestry.apache.org
> Kopie
> "James Sherwood" <js...@rgisolutions.com>
> Thema
> Re: Session
>
>
>
>
>
>
> I believe the timeout for this is configured through web.xml
>
> <session-config>
>   <session-timeout>30</session-timeout> <!-- minutes -->
> </session-config
>
> Tim.
>
> On Tuesday 20 March 2007 17:16, James Sherwood wrote:
> > Hello,
> >
> > We have an admin side with a user login etc.
> >
> > The problem is, the session times out after soo many minutes(we run
> under
> > tomcat) of being idle and they user has to log back in.
> >
> > Is there any way to make this indefinate and if so, is there any impact
> on
> > resources etc?
> >
> > Thanks,
> > James
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Antwort: Re: Session

Posted by Kristian Marinkovic <kr...@porsche.co.at>.
i think a better strategy is to reduce the sesion-timeout in the
web.xml to lets say 2mins and to implement a javascript function
that issues periodic keep-alive requests every 1.5mins or so. 
thus preventing the session from expiring...

and when someone closes his browser the session will not
stay in memory for too long :)

g,
kris




Tim Sawyer <li...@calidris.co.uk> 
22.03.2007 11:10
Bitte antworten an
"Tapestry users" <us...@tapestry.apache.org>


An
users@tapestry.apache.org
Kopie
"James Sherwood" <js...@rgisolutions.com>
Thema
Re: Session






I believe the timeout for this is configured through web.xml

<session-config>
  <session-timeout>30</session-timeout> <!-- minutes -->
</session-config

Tim.

On Tuesday 20 March 2007 17:16, James Sherwood wrote:
> Hello,
>
> We have an admin side with a user login etc.
>
> The problem is, the session times out after soo many minutes(we run 
under
> tomcat) of being idle and they user has to log back in.
>
> Is there any way to make this indefinate and if so, is there any impact 
on
> resources etc?
>
> Thanks,
> James
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org

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



Re: Session

Posted by Tim Sawyer <li...@calidris.co.uk>.
I believe the timeout for this is configured through web.xml

<session-config>
  <session-timeout>30</session-timeout> <!-- minutes -->
</session-config

Tim.

On Tuesday 20 March 2007 17:16, James Sherwood wrote:
> Hello,
>
> We have an admin side with a user login etc.
>
> The problem is, the session times out after soo many minutes(we run under
> tomcat) of being idle and they user has to log back in.
>
> Is there any way to make this indefinate and if so, is there any impact on
> resources etc?
>
> Thanks,
> James
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org

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


Session

Posted by James Sherwood <js...@rgisolutions.com>.
Hello,

We have an admin side with a user login etc.

The problem is, the session times out after soo many minutes(we run under 
tomcat) of being idle and they user has to log back in.

Is there any way to make this indefinate and if so, is there any impact on 
resources etc?

Thanks,
James 


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


Re: Tap4 Obtaining assets dynamically

Posted by Miguel Angel Hernández <mi...@gmail.com>.
Hi,

Well I solved this problem:
I just needed to Inject tapestry's ContextAssetFactory, into my component,
like this:

@InjectObject("service:tapestry.asset.ContextAssetFactory")
public abstract AssetFactory getAssetFactory();

Then I invoked the createAbsoluteAsset method on the factory like this:

getAssetFactory().createAbsolute("context-path-to-file",
getPage().getLocale(),getLocation());

I got this hint by reading the HiveDoc for tapestry, which imho is a little
hard to read...

regards,

miguel

On 3/19/07, Miguel Angel Hernández <mi...@gmail.com> wrote:
>
> Hi all,
>
> Does anybody nows a way to obtain Assets dynamically?
>
> cheers,
>
> miguel
>