Spring Security comes bundled with several JSP tag libraries which provide a range of different services.
All taglib classes are included in the core
spring-security-xx.jar
file, with the
security.tld
located in the JAR's
META-INF
directory. This means for JSP 1.2+ web
containers you can simply include the JAR in the WAR's
WEB-INF/lib
directory and it will be available. If
you're using a JSP 1.1 container, you'll need to declare the JSP
taglib in your web.xml file
, and include
security.tld
in the WEB-INF/lib
directory. The following fragment is added to
web.xml
:
<taglib> <taglib-uri>http://www.springframework.org/security/tags</taglib-uri> <taglib-location>/WEB-INF/security.tld</taglib-location> </taglib>