You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Bruce Petro <bp...@artromick.com> on 2007/06/18 23:33:24 UTC
T5: Inject/Path and Contexts
In the documentation, I see the path details but I cannot find anywhere
a listing of the possible values of "context:" - the only one I see
listed in the documentation is classpath. But for assets in general,
wouldn't you tend to want to find images kept in a shared location such
as under webapps? Is there a context for that?
@Inject
@Path("context:images/tapestry_banner.gif")
private Asset _banner;
RE: T5: Inject/Path and Contexts
Posted by Bruce Petro <bp...@artromick.com>.
Hmm...
You specify a full path below - is it hard coded like that?
I would assume webapps boils down to where ever you point your jetty
starter for a webapp root dir? IE: Does it get this from some set
location or does it leave it to jetty start up and configuration to
define where "/" is based?
In other words, my project is set up for jetty start to point to the
project:/webapps directory, not embedded down into the src directory. Is
that kosher?
-----Original Message-----
From: Howard Lewis Ship [mailto:hlship@gmail.com]
Sent: Monday, June 18, 2007 6:00 PM
To: Tapestry users
Subject: Re: T5: Inject/Path and Contexts
Sorry if the docs are lagging; your example is valid. The file will
be src/main/webapp/images/tapestry_banner.gif.
On 6/18/07, Bruce Petro <bp...@artromick.com> wrote:
> In the documentation, I see the path details but I cannot find
anywhere
> a listing of the possible values of "context:" - the only one I see
> listed in the documentation is classpath. But for assets in general,
> wouldn't you tend to want to find images kept in a shared location
such
> as under webapps? Is there a context for that?
>
>
>
> @Inject
>
> @Path("context:images/tapestry_banner.gif")
>
> private Asset _banner;
>
>
>
>
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: Inject/Path and Contexts
Posted by Howard Lewis Ship <hl...@gmail.com>.
Sorry if the docs are lagging; your example is valid. The file will
be src/main/webapp/images/tapestry_banner.gif.
On 6/18/07, Bruce Petro <bp...@artromick.com> wrote:
> In the documentation, I see the path details but I cannot find anywhere
> a listing of the possible values of "context:" - the only one I see
> listed in the documentation is classpath. But for assets in general,
> wouldn't you tend to want to find images kept in a shared location such
> as under webapps? Is there a context for that?
>
>
>
> @Inject
>
> @Path("context:images/tapestry_banner.gif")
>
> private Asset _banner;
>
>
>
>
--
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