关于jstl也就是c标签的配置使用

配置jstl步凑:  

  1.将下载的tld目录中的tld文件放在Web应用程序中的Web-Info目录下,也可建一个目录放在Web-Info目录下。  

  (如果使用的是jb8在其jbuilder8/thirdparty/jakarta-taglibs/standard-1.0.1/tld目录中)  

  如直接放在Web-Info目录下  

  在你的web.xml文件  

      <taglib>  

          <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>  

          <taglib-location>/WEB-INF/*.tld</taglib-location>  

      </taglib>  

  如建一个目录放在Web-Info目录下   (假设目录为tld)  

  在你的web.xml文件  

      <taglib>  

          <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>  

          <taglib-location>/WEB-INF/tld/*.tld</taglib-location>  

      </taglib>  

  2.在的左边框中的Project名称*.jpx上右击选择properties属性  

  在path页中选择Required   Libraries  

  选择Add键,选择New键  

  取一个名称并在library   paths边的add键将standard-1.0.1目录中的lib目录加入点击ok即可。  

  3.Web.xml中的  

          <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>  

          <taglib-location>/WEB-INF/tld/*.tld</taglib-location>  

  是为了提高程序的可维护性。  

   

  如不在Web.xml中定义<taglib>  

  可在jsp页面中直接用<%@   taglib   prefix="c"   uri="/WEB-INF/c.tld"   %>  

 

 

posted on 2013-06-15 22:28  java疯子  阅读(242)  评论(0)    收藏  举报

导航