Search code examples
javaweb.xmltaglibstruts-1

my web.xml does not know taglib tag


I want to use html tags in my jsp, so I have to add the tag lib in web.xml when I add these lines to web.xml:

<taglib>
    <taglib-uri>/tags/struts-html</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>

it does not know taglib tag


Solution

  • <taglib> tags must be inside the <jsp-config> tag.

    But using Struts2, you absolutely don't need struts-html taglib, it is from Struts 1, which is older, and completely different.

    Just take a tour of Struts2 features, and you will discover you don't have to use html-tags anymore, luckily.