cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lu <l...@lululand.com>
Subject How to get context path in JX template?
Date Sat, 04 Sep 2004 10:49:06 GMT

Hi All,

I'm trying to get the context path in a JX template,
to do something like this:

<img src="${cocoon.request.contextPath}/images/logo.gif"/>

However, it appears that the cocoon.request object does
not have contextPath:

http://cocoon.apache.org/2.1/userdocs/flow/jxtemplate.html

I think this should be simple to do, though I'm still very
new at cocoon.  Is there a way to get the context path or
accomplish the same thing using another technique?

I'm trying to avoid:

- Using relatively paths.  I want to be able to use the
   template from different subdirectories.

- Having to define a variable in the calling flowscript.
   I don't want to have to define a contextPath variable
   from every reference.

I appreciate any help.  Thanks in advance!

                  - David -


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


Mime
View raw message