untime - Template processing error: "No mapping defined for spring framework tags

断了今生、忘了曾经 提交于 2019-12-12 01:22:26

问题


My current development environment is java 6, spring framework 3.2, weblogic 10.3.6 and using Freemarker templates. Everything is working fine in current environment, don't see any runtime issues while browsing pages.

IDE: eclipse kepler 4.3 and I am running weblogic server from eclipse IDE. My deployment assembly is from m2e plugin that comes with kepler.

Now I am upgrading to latest Weblogic 12.1.2 and java 7. I am able to successfully build, deploy and publish the module but while accessing pages, I see runtime issues with freemarker templates.

There is a related issue discussed in forum for tomcat deployment wherein solution is to add spring-security-taglibs to pom file and place spring-security-taglibs.jar in WEB-INF/lib folder. But that does not work for me.

Greatly appreciate any help in resolving this issue. I see many freemarker template exception related postings but not solution.

Below is the runtime error, I am seeing.

2013-09-23 14:16:30,696 [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR freemarker.runtime - Template processing error: "No mapping defined for http://www.springframework.org/tags"

The problematic instruction:

Java backtrace for programmers:

freemarker.template.TemplateModelException: No mapping defined for http://www.springframework.org/tags


回答1:


Sounds like FreeMarker's JSP extension haven't discovered the TLD file that contains <uri>http://www.springframework.org/tags</uri>. It looks for it under /WEB-INF/*.tld and /WEB-INF/lib/*.{jar,zip}/META-INF/*.tld. If it's not there and you don't want to put it there, you can map that URL to the TLD file location in the web.xml with the taglib element.




回答2:


Was this issue ever resolved? If i deploy the WAR externally from WL admin console, everything works fine and no freemarker template error. I am running into similar errors when deploying WAR from Eclipse (Mars) , Weblogic 12.2.1. Workaround is to copy TLDs to WEB-INF and then deploy from eclipse I get no errors. However, there shouldn't be a need to copy these TLDs as they are in the JAR files under WEB-INF/lib.



来源:https://stackoverflow.com/questions/18985142/untime-template-processing-error-no-mapping-defined-for-spring-framework-tag

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!