栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

Struts-在JSP页面中由Struts提供的.tld的Taglib指令

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Struts-在JSP页面中由Struts提供的.tld的Taglib指令

我正在使用Struts 1.3.10进行演示:

  1. 在此处下载最新的struts库(http://struts.apache.org/download.cgi#struts1310)。请记住, 完整发行版 是您必须下载的,因为它包含带有Struts TLD的战争文件。
  2. 在Web应用程序上,将下载的存档文件中的所有lib复制到
    /WEB-INF/lib
    文件夹中。
  3. 对于JSTL库(与struts一起很好地工作),请转到此处(http://java.sun.com/products/jsp/jstl/)
  4. 一旦有了Struts TLD和JSTL Tld,就将它们放在
    /WEB-INF/tld/
    文件夹下(它 必须 位于/ WEB-INF /文件夹中)。
  5. 在web.xml上,添加以下内容(在
    <web-app>
    元素下方)
      <jsp-config><taglib>    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>    <taglib-location>/WEB-INF/tld/struts-bean.tld</taglib-location></taglib><taglib>    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>    <taglib-location>/WEB-INF/tld/struts-html.tld</taglib-location></taglib><taglib>    <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>    <taglib-location>/WEB-INF/tld/struts-logic.tld</taglib-location></taglib><taglib>    <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>    <taglib-location>/WEB-INF/tld/struts-nested.tld</taglib-location></taglib><taglib>    <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>    <taglib-location>/WEB-INF/tld/struts-tiles.tld</taglib-location></taglib><taglib>    <taglib-uri>/WEB-INF/sslext.tld</taglib-uri>    <taglib-location>/WEB-INF/tld/sslext.tld</taglib-location></taglib><taglib>    <taglib-uri>/WEB-INF/struts-layout.tld</taglib-uri>    <taglib-location>/WEB-INF/tld/struts-layout.tld</taglib-location></taglib><!-- Sun's JSTL --><taglib>    <taglib-uri>http://java.sun.com/jstl/fn</taglib-uri>    <taglib-location>/WEB-INF/tld/fn.tld</taglib-location></taglib><taglib>    <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>    <taglib-location>/WEB-INF/tld/fmt.tld</taglib-location></taglib><taglib>    <taglib-uri>http://java.sun.com/jstl/fmt-1-0</taglib-uri>    <taglib-location>/WEB-INF/tld/fmt-1_0.tld</taglib-location></taglib><taglib>    <taglib-uri>http://java.sun.com/jstl/fmt-rt</taglib-uri>    <taglib-location>/WEB-INF/tld/fmt-rt.tld</taglib-location></taglib><taglib>    <taglib-uri>http://java.sun.com/jstl/fmt-1-0-rt</taglib-uri>    <taglib-location>/WEB-INF/tld/fmt-1_0-rt.tld</taglib-location></taglib><taglib>    <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>    <taglib-location>/WEB-INF/tld/c.tld</taglib-location></taglib><taglib>    <taglib-uri>http://java.sun.com/jstl/core-1-0</taglib-uri>    <taglib-location>/WEB-INF/tld/c-1_0.tld</taglib-location></taglib><taglib>    <taglib-uri>http://java.sun.com/jstl/core-rt</taglib-uri>    <taglib-location>/WEB-INF/tld/c-rt.tld</taglib-location></taglib><taglib>    <taglib-uri>http://java.sun.com/jstl/core-1-0-rt</taglib-uri>    <taglib-location>/WEB-INF/tld/c-1_0-rt.tld</taglib-location></taglib><taglib>    <taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>    <taglib-location>/WEB-INF/tld/sql.tld</taglib-location></taglib><taglib>    <taglib-uri>http://java.sun.com/jstl/sql-1-0</taglib-uri>    <taglib-location>/WEB-INF/tld/sql-1_0.tld</taglib-location></taglib><taglib>    <taglib-uri>http://java.sun.com/jstl/sql-rt</taglib-uri>    <taglib-location>/WEB-INF/tld/sql-rt.tld</taglib-location></taglib><taglib>    <taglib-uri>http://java.sun.com/jstl/sql-1-0-rt</taglib-uri>    <taglib-location>/WEB-INF/tld/sql-1_0-rt.tld</taglib-location></taglib><taglib>    <taglib-uri>http://java.sun.com/jstl/x</taglib-uri>    <taglib-location>/WEB-INF/tld/x.tld</taglib-location></taglib><taglib>    <taglib-uri>http://java.sun.com/jstl/x-1-0</taglib-uri>    <taglib-location>/WEB-INF/tld/x-1_0.tld</taglib-location></taglib><taglib>    <taglib-uri>http://java.sun.com/jstl/x-rt</taglib-uri>    <taglib-location>/WEB-INF/tld/x-rt.tld</taglib-location></taglib><taglib>    <taglib-uri>http://java.sun.com/jstl/x-1-0-rt</taglib-uri>    <taglib-location>/WEB-INF/tld/x-1_0-rt.tld</taglib-location></taglib>



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/596030.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号