This is an interesting question. The intent behind the component tag was for it to behave like the other tags in that if you specified a relative location, it would be relative to the root of the theme, and an absolute location would be used untranslated.

So

<ww:component template="test.vm"/>

would be looked for, currently, in /decorators/xhtml/test.vm

<ww:component template="test.vm" theme="<%= request.getContextPath()"/>

should do what you want. If you have ideas for another syntax for this, I'd love to hear them.


M

Cameron Braid wrote:
Oh.. another thing.. is it possible to find templates that are specified
using a relative path, relative to the jsp that uses them ?

i.e.

/WEB-INF/views/test.jsp

<ww:component template="test.vm"/>

/WEB-INF/views/test.vm

hello from test.vm

Can this work, allowing both test.jsp and test.vm to be moved 'anywhere' and
this component tag still be able to load the vm ?

The reason I ask this is that you can't create a JSP function inside a JSP
page (or include) that can use jsp tags to evaluate its content, and I want
to use the component tag to achieve this.  Currently I need to use absolute
paths to resolve the .vm templates, which isn't to bad, but relative ones
will be handy.

---------------------------
<%!
void hello()
{
        %>
        use html content or JSP tag here
        <%
}
%>

<%hello()%>
---------------------------

..cam..

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Cameron Braid
Sent: Thursday, 29 May 2003 11:26 PM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] WebWork2 Templates (for JSP tags)


Can the webwork velocity resource loader also include the WEB-INF folder of the web application in the resource loader search path to enable custom themes/templates to reside in WEB-INF without having to prefix the theme name with WEB-INF in the jsp tag ?

..Cam..



-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork





------------------------------------------------------- This SF.net email is sponsored by: eBay Get office equipment for less on eBay! http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to