The asset security mechanism introduced in 5.2 requires all assets to be
aliased otherwise they will be rejected. Just provide a contribution to the
ClasspathAssetAliasManager service.
public static void
contributeClasspathAssetAliasManager(MappedConfiguration<String, String>
configuration){
configuration.add("icons", "assets/icons");
}
On Sat, Sep 4, 2010 at 8:57 PM, Moritz Gmelin <[email protected]> wrote:
> Hi,
>
> I tried to convert an application from T5.1.0.5 to T5.2. I'm having
> problems with injected assets.
>
> In the .tml file I have an image like this
>
> <img src="${navleftred}"/>
>
> in the .java file for the page it is stated like this
>
>
> @Inject
> @Path("classpath:/assets/icons/nav_left_red.png")
> @Property
> private Asset navleftred;
>
> The file exists and is found (if I change the filename, then I get a file
> not found exception).
>
> But when I try to access the page, tapestry throws the following error.
>
> Unable to create a client URL for classpath resource
> assets/icons/nav_left_red.png: The resource path was not within an aliased
> path.
>
> What does this mean and how can I fix it in T5.2?
>
> Thanks
>
> Moritz
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
Best regards,
Igor Drobiazko
http://tapestry5.de