要使用Struts的標籤,首先要先將下載的Struts檔案中的lib目錄下,struts- bean.tld、struts-html.tld、struts-logic.tld複製至/WEB-INF下,例如這邊是複製至/WEB- INF/tld目錄下。
然後您要在web.xml中設定tld檔,一個設定範例如下:
- web.xml
... 
   <taglib> 
    <taglib-uri>/tags/struts-html</taglib-uri> 
    <taglib-location>
        /WEB-INF/tld/struts-html.tld
    </taglib-location> 
  </taglib>
 
  <taglib> 
    <taglib-uri>/tags/struts-bean</taglib-uri> 
    <taglib-location>
        /WEB-INF/tld/struts-bean.tld
    </taglib-location> 
  </taglib>
 
  <taglib> 
    <taglib-uri>/tags/struts-logic</taglib-uri> 
    <taglib-location>
        /WEB-INF/tld/struts-logic.tld
    </taglib-location> 
  </taglib>
... 這樣您就可以使用Struts的標籤了,上面這三個是最常用的標籤,您也可以照同樣的方式設定其它您要使用的標籤。
以下將列出一些Struts標籤的參考範例,但目的並不在於詳細介紹每一個標籤的屬性與用法,而僅作一個快速參考,詳細的標籤使用您可以參考以下的資源:

