webber

            BlogJava :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
            11 Posts :: 2 Stories :: 3 Comments :: 0 Trackbacks

          struts2標(biāo)簽的定義文件 struts-tags.tld

          struts2標(biāo)簽的定義文件 struts-tags.tld。

           

            在工程中使用struts2標(biāo)簽

            一、 struts2標(biāo)簽定義文件在struts2-core-2.0.11.1META-INF 下面,文件名為struts-tags.tld

            二、 如果工程使用了servlet2.3規(guī)范,要做兩件事,就能在工程中使用struts2標(biāo)簽了

            1: 在web.xml中增加標(biāo)簽庫的定義

          <taglib>
             <taglib-uri>/struts-tags</taglib-uri>
             <taglib-location>/WEB-INF/lib/struts2-core-2.0.11.1.jar</taglib-location>
            </taglib>
          /struts-tags 是struts2標(biāo)簽庫默認(rèn)的URI,建議使用這個(gè)名稱

            2 在JSP中使用taglib編譯指令導(dǎo)入標(biāo)簽庫 <%@ taglib prefix="s" uri="/struts-tags" %>

            三、 如果使用servlet2.4規(guī)范,不須要在web.xml中增加標(biāo)簽庫定義,只要做一件事,就行

            1 在JSP中使用taglib編譯指令導(dǎo)入標(biāo)簽庫 <%@ taglib prefix="s" uri="/struts-tags" %>

            四、 struts2標(biāo)簽自動(dòng)提示功能(解決struts2標(biāo)簽出現(xiàn)紅叉)

            1  把struts2包中的struts-tags.tld提取出來,放入本地硬盤上,我放入了E:workspacepicbinWEB-INFtldstruts-tags.tld

            2 eclipse--window--preferences 輸入TLD進(jìn)行搜索 ,選擇Amateras--TLD開始添加本地TLD文件,

            點(diǎn)Add ,URI 項(xiàng)輸入:/struts-tags ,Local Path項(xiàng)輸入:E:workspacepicbinWEB-INFtldstruts-tags.tld

            點(diǎn)OK  ,重啟eclipse 寫struts2標(biāo)簽時(shí),就有提示了,紅叉也沒了

            如圖

          struts2標(biāo)簽的定義文件 struts-tags.tld

          posted on 2010-01-13 15:26 webber 閱讀(826) 評(píng)論(0)  編輯  收藏

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 寿光市| 蒙山县| 广平县| 绿春县| 沽源县| 新宁县| 油尖旺区| 湄潭县| 包头市| 安乡县| 江川县| 定兴县| 丹东市| 海阳市| 鄄城县| 聊城市| 仪陇县| 肃北| 观塘区| 临西县| 布拖县| 宜昌市| 长宁区| 和顺县| 盐亭县| 盱眙县| 青铜峡市| 大方县| 宁海县| 古蔺县| 盐山县| 铜陵市| 嵩明县| 视频| 仙居县| 德阳市| 六枝特区| 文水县| 偏关县| 哈尔滨市| 瓮安县|