You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "F. Da Costa Gomez" <dc...@fixed.com> on 2003/04/03 00:20:26 UTC

reaching external assets II

Hi,

... paths ... are evaluated relative to the context root.

This partial line comes from the Tap specification DTD (Appendix A).
To me it suggests that when I put my css and images dirs on the same level 
as WEB-INF I should be able to gain access to them, like so.
	<context-asset name="tapestry_icon" path="images/ico_t.gif"/>

This (or so I hope) would be a relative path which would expand into 
/context/images/ico_t.gif on the actual rendered page. I'm not sure of my 
assumption but the rendered page gives me /contextimages/ico_t.gif so that 
obviously is the wrong choice.

The following notation,
	<context-asset name="tapestry_icon" path="/images/ico_t.gif"/>

gives me /t2/images/ico_t.gif in the code of the rendered page (t2 being 
the context) but still no image is shown.

The code used to show the images is
	<span jwcid="@Image" image="ognl:assets.tapestry_icon">

Looking at the workbench I'm starting to get the feeling that it might have 
something to do with the locations of the .application and/ or .jwc page 
(where the assets are defined).
My definitions are located in subdir so that I do not clutter up the 
context nor the WEB-INF dir.
HTML are not placed in the context root but can be found underneath the 
WEB-INF dir as well in the subs next to their supporting .page/ .jwc and 
.java files.

I haven't got a clue any more.
Just wasted three days on this.
Any suggestions?

Fermin DCG

-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

Re: reaching external asstes

Posted by "F. Da Costa Gomez" <dc...@fixed.com>.
SOLVED & the good part is that it had nothing to do with Tapestry.
Just a matter of not reading through enough paperwork. ;)

It had to do with a line in the web.xml conderning the servlet mapping.
	<servlet-mapping>
		<servlet-name>StdTapestryServlet</servlet-name>
	**	<url-pattern>/</url-pattern>	**
	</servlet-mapping>

SHOULD read

	<servlet-mapping>
		<servlet-name>StdTapestryServlet</servlet-name>
	**	<url-pattern>/app</url-pattern>	**
	</servlet-mapping>

I'll read up on the why later. 4 now I'll just go on finishing my stuff. :)

Cheers
Fermin DCG

-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/