45 lines
2.1 KiB
XML
45 lines
2.1 KiB
XML
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="taglib">
|
|
<info><title>Tag Libraries</title></info>
|
|
|
|
|
|
<section xml:id="taglib-overview"><info><title>Overview</title></info>
|
|
|
|
|
|
<para>Spring Security comes bundled with several JSP tag libraries
|
|
that eases JSP writing. The tag libraries provide a range of different
|
|
services.</para>
|
|
</section>
|
|
|
|
<section xml:id="taglib-config"><info><title>Configuration</title></info>
|
|
|
|
|
|
<para>All taglib classes are included in the core
|
|
<literal>spring-security-xx.jar</literal> file, with the
|
|
<literal>security.tld</literal> located in the JAR's
|
|
<literal>META-INF</literal> directory. This means for JSP 1.2+ web
|
|
containers you can simply include the JAR in the WAR's
|
|
<literal>WEB-INF/lib</literal> 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 <literal>web.xml file</literal>, and include
|
|
<literal>security.tld</literal> in the <literal>WEB-INF/lib</literal>
|
|
directory. The following fragment is added to
|
|
<literal>web.xml</literal>:</para>
|
|
|
|
<para><programlisting><taglib>
|
|
<taglib-uri>http://www.springframework.org/security/tags</taglib-uri>
|
|
<taglib-location>/WEB-INF/security.tld</taglib-location>
|
|
</taglib> </programlisting></para>
|
|
</section>
|
|
|
|
<section xml:id="taglib-usage"><info><title>Usage</title></info>
|
|
|
|
|
|
<para>Now that you've configured the tag libraries, refer to the
|
|
individual reference guide sections for details on how to use them.
|
|
Note that when using the tags, you should include the taglib reference
|
|
in your JSP: <programlisting>
|
|
<%@ taglib prefix='security' uri='http://www.springframework.org/security/tags' %>
|
|
|
|
</programlisting></para>
|
|
</section>
|
|
</chapter> |