views:

24

answers:

2

I am currently upgrading our web application from Webwork to Struts2. I run to problem with freemarker that I am unable to resolve.

In FTL file I have:

<#assign c=JspTaglibs["http://java.sun.com/jstl/core"]>

When rendering the page I get:

JspTaglibs["http://java.sun.com/jstl/core"] is undefined.

I use other taglibs (e.g. spring and struts), I have them defined in web.xml and it works fine.

How can I make standard libraries work?

+1  A: 

This URI is deprecated over a decade ago. Use http://java.sun.com/jsp/jstl/core. On the other hand, you also need to ensure that you've JSTL installed properly (by just placing/having the JAR file(s) in the webapp's runtime classpath).

BalusC
A: 

Turns out it was the simplest thing. /WEB-INF/lib directory was not fully populated and it caused this error. I did full rebuild of the project and it works like magic now.

Ula Krukar
That's exactly what I was trying to tell you when talking about webapp's runtime classpath. The `/WEB-INF/lib` folder is one of the paths covered by the default webapp's runtime classpath ... If you didn't understood what I meant with "webapp's runtime classpath", then you should have said that so. I would just have explained that in more detail.
BalusC