Well, actually I am wrong about that and yes, if there is no "/", it
will use the namespace name:

  if (!locationArg.startsWith("/")) {
            ActionContext ctx = invocation.getInvocationContext();
            HttpServletRequest req = (HttpServletRequest)
ctx.get(ServletActionContext.HTTP_REQUEST);
            String base = ResourceUtil.getResourceBase(req);
            locationArg = base + "/" + locationArg;
        }

musachy

On Thu, Jul 16, 2009 at 3:36 PM, Musachy Barroso<musa...@gmail.com> wrote:
> there is no magic there, remove the first "/" and give it a try.
>
> musachy
>
> On Thu, Jul 16, 2009 at 12:29 PM, stanlick<stanl...@gmail.com> wrote:
>>
>> I am working on a plug-in and having trouble getting the runtime to find my
>> freemarker pages.  I have a folder named pages in my plugin.jar where my
>> freemarker pages reside.  My struts-plugin.xml is referring to the pages as
>> follows:
>>
>> <result type="freemarker">/pages/config.ftl</result>
>>
>> However, I am receiving a runtime
>>
>> java.io.FileNotFoundException: Template /config/pages/config.ftl not found.
>>        at 
>> freemarker.template.Configuration.getTemplate(Configuration.java:489)
>>
>> I have studied the struts2-config-browser-plugin and I'm now starting to
>> wonder if there is some magic with respect to the freemarker folder being
>> called config-browser which happens to be the same namespace of the plugin.
>>
>> Does anyone know the mechanics of these names?
>>
>> Peace,
>> Scott
>> --
>> View this message in context: 
>> http://www.nabble.com/Plug-in-creation-and-freemarker-page-location-tp24522925p24522925.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to