Re: using jsptaglibs to include content from another web application
Attila Szegedi <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
I think the problem is that Tomcat's JSP engine recognizes that URL as a special URI and supplies an internal implementation for it. (That HTTP URL certainly doesn't resolve to an actual taglib.) However, you might be able to use FreeMarker servlet's <@include> directive (not to be confused with <#include>!) See here: <http://freemarker.sourceforge.net/docs/pgui_misc_servlet.html#pgui_misc_servlet_include> Attila. -- twitter: http://twitter.com/szegedi weblog: http://constc.blogspot.com home: http://www.szegedi.org On 2010.07.26., at 20:23, Deepa wrote: > > Hi, > I have spent a few days trying to figure out a solution to this and would really > appreciate some pointers to what I might be doing wrong. > > In my freemarker template, I need to include the content from another web > application using jstl jsp tag library. > > Within a jsp, I have been able to make this work by using > > <%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt' %> > <c:import url="<%=url%>" context="/public"/> > > In my ftl, I tried the following > > <#assign c=JspTaglibs["http://java.sun.com/jstl/core_rt"]> > <@c.import url="someurl"> > > and included the following in my web.xml > <listener> > <listener-class>freemarker.ext.jsp.EventForwarding</listener-class> > </listener> > > but it isn't working and it seems that by including that listener my web > application fails to deploy on tomcat and I don't see any errors in the logs. > > Has anyone been able to get this to work. Can you see anything obvious that I > might be doing wrong or something I should have included and haven't. > > I would really appreciate any help on this. I have some files that are in a > different web application and would like to be able to include the contents in > my current web application. > > > I am using Spring 3.0.3.RELEASE with freemarker 2.3.16 and tomcat 6.0.26 > > Any pointers on this would be greatly appreciated. > > Thanks, > Deepa. ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/