Spring添加标签构建错误 [英] Spring adding Tags build error
问题描述
我有以下错误,我无法找到答案。有人可以在这里帮助我。
I have got the following errors and i am unable to find an answer. Can someone help me here.
说明资源路径位置类型
找不到http://的标签库描述符www.springframework.org/tagscontact.jsp / Spring3HibernateMaven / src / main / webapp / WEB-INF / jsp line 1 JSP问题
Description Resource Path Location Type Can not find the tag library descriptor for "http://www.springframework.org/tags" contact.jsp /Spring3HibernateMaven/src/main/webapp/WEB-INF/jsp line 1 JSP Problem
描述资源路径位置类型
找不到http://www.springframework.org/tags/form的标签库描述符contact.jsp / Spring3HibernateMaven / src / main / webapp / WEB-INF / jsp line 2 JSP问题
Description Resource Path Location Type Can not find the tag library descriptor for "http://www.springframework.org/tags/form" contact.jsp /Spring3HibernateMaven/src/main/webapp/WEB-INF/jsp line 2 JSP Problem
我的JSP代码如下:
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
在我的Web.xml中,代码如下:
In my Web.xml the code is as follows;
<jsp-config>
<taglib>
<taglib-uri>http://www.springframework.org/tags/form</taglib-uri>
<taglib-location>spring-form.tld</taglib-location>
</taglib>
</jsp-config>
我如何解决这个错误?
推荐答案
您不需要在web.xml中配置taglib。只需确保org.springframework.web.servlet-xxx.jar在您的类路径(web-inf / lib)上。它包含TLD文件。
You shouldn't need to configure the taglib in web.xml. Just make sure the org.springframework.web.servlet-xxx.jar is on your classpath (web-inf/lib). It contains the TLD files.
这篇关于Spring添加标签构建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!