Cannot find the tag library descriptor for /WEB-INF/struts-html.tld in Struts

六眼飞鱼酱① 提交于 2019-12-02 21:38:45

问题


I am new to the Struts framework and while developing a simple Struts 2 application I'm getting the following error:

Cannot find the tag library descriptor for /WEB-INF/struts-html.tld

How do I fix this error?


回答1:


struts-html.tld is a TLD for Struts 1 tags.

Struts 2 uses a single TLD, struts-tags.tld, and it's in the struts2-core-2.x.x.jar.

You can declare it as follows:

<%@ taglib prefix="s" uri="/struts-tags" %>

There are other TLDs like struts-dojo-tags (deprecated in 2.1), struts-jquery-tags, etc... but start with the main one, take a tour of Struts2 and then eventually try to use the "extensions".




回答2:


Can not find the tag library descriptor

For above Error.

Please upload the Struts 2 core jar file to the Build path of your application/web project, it works.

Thanks Ghouse khan.



来源:https://stackoverflow.com/questions/14374311/cannot-find-the-tag-library-descriptor-for-web-inf-struts-html-tld-in-struts

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