Re: getting contextPath from FreemarkerServlet templates

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Sunday, April 6, 2008, 10:55:56 PM, Zemian Deng wrote:

> Hello list,
>  
> I tried to follow the documentation in using Freemarker in webapp.
> I have it setup and running fine. But then I don't know how to
> replace this EL from my original JSP file:
> <a href="${pageContext.request.contextPath}/demo">demo</a>

The Web Application Framework has to expose the contextPath (by
putting it into the data-model) if it's allowed for the templates to
access that. By default it's not part of the data-model.

> Can someone help me?

-- 
Best regards,
 Daniel Dekany


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.