Taglib inside Maven dependency jar. How do I configure this taglib inside the web.xml?

蹲街弑〆低调 提交于 2019-12-06 14:18:11
Ricardo Jl Rufino

You do not need to configure anything in web.xml, if the taglib is in \META-INF\taglib.tld inside your jar, it is automatic, Tomcat already recognizes.

You can use the jsp :

<% @ Taglib prefix = "my" uri = "http://www.mytags.com/"%>

If you add in your POM the taglig dependency, it will be added in the WEB-INF/lib directory of your webapp.

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