日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

Express Learning Struts Menu

系統(tǒng) 2686 0

Express Learning Struts Menu

The firts go struts menu official site dowload struts-menu-X.X.X.war file,把文件放到Tomecate 目錄webapps 目錄下,然后啟動tomcate,訪問http://localhost: 9090 /struts-menu-X.X.X,you will shoult effect。

The following introduction express create struts - menu item.

1.拷貝相應的類庫到lib目錄下。
velocity-tools-view-1.0.jar
velocity-1.4.jar
struts-menu-2.4.2.jar
struts-1.2.9.jar
standard-1.0.6.jar
log4j-1.2.8.jar
jstl-1.0.6.jar
commons-logging-1.0.4.jar

2.拷貝struts-menu工程中的common??? ?image??? scripts??? styles?? templates等目錄到新的web工程?
拷貝taglib.jsp到webroot下

三.新建一個jsp文件index.jsp內容如下

<% @?include?file = " /taglibs.jsp " %>

<! DOCTYPE?html?PUBLIC? " -//W3C//DTD?XHTML?1.0?Strict//EN "
????
" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd " >

< html?xmlns = " http://www.w3.org/1999/xhtml " ?xml:lang = " en " ?lang = " en " >
< head >
????
< title > Struts?Menu?Example?Application </ title >

????
< meta?http - equiv = " Content-Type " ?content = " text/html;?charset=utf-8 " ? />

????
< script?type = " text/javascript " ?src = " scripts/nicetabs.js " ></ script >
????
????
< link?rel = " stylesheet " ?type = " text/css " ?media = " screen "
????????href
= " styles/global.css " ? />
????
< link?rel = " stylesheet " ?type = " text/css " ?media = " screen "
??????href
= " styles/nicetabs.css " ? />

</ head >
< body?id = " index " >
< div?id = " content " ?style = " width:?100% " >
????
< h2 > Struts?Menu?Examples </ h2 >
????
< p >
????????Click?on?the?menu?links?below?to?see?the?different?types?of?menus
????????supported?by?Struts?Menu.
????
</ p >

????
< menu:useMenuDisplayer?name = " Velocity " ?config = " /templates/index.html " >
????????
< ul? class = " glassList " >
????????
< menu:displayMenu?name = " indexMenu " />
????????
</ ul >
????
</ menu:useMenuDisplayer >

</ div >

< div?id = " footer " >
??
< a?href = " http://struts-menu.sf.net " > Struts?Menu?Homepage </ a >
</ div >
</ body >
</ html >

WEB-INF下建立struts-config.xml內容如下
<? xml?version = " 1.0 " ?encoding = " ISO-8859-1 " ? ?>

<! DOCTYPE?struts - config?PUBLIC
??????????
" -//Apache?Software?Foundation//DTD?Struts?Configuration?1.1//EN "
??????????
" http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd " >
< struts - config >
??
<!-- ? ========== ?Plug?Ins?Configuration? ================================== ? -->
??
< plug - in?className = " net.sf.navigator.menu.MenuPlugIn " >
????
< set - property?property = " menuConfig " ?value = " /WEB-INF/menu-config.xml " />
??
</ plug - in >
</ struts - config >

?

建立menu-config.xml內容如下
<? xml?version = " 1.0 " ?encoding = " UTF-8 " ? ?>

< MenuConfig >

??
< Displayers >
????
< Displayer???name = " DropDown "
?????????????????type
= " net.sf.navigator.displayer.DropDownMenuDisplayer " />
????
< Displayer???name = " Simple "
?????????????????type
= " net.sf.navigator.displayer.SimpleMenuDisplayer " />
????
< Displayer???name = " CoolMenu "
?????????????????type
= " net.sf.navigator.displayer.CoolMenuDisplayer " />
????
< Displayer???name = " CoolMenu4 "
?????????????????type
= " net.sf.navigator.displayer.CoolMenuDisplayer4 " />
????
< Displayer???name = " MenuForm "
?????????????????type
= " net.sf.navigator.example.PermissionsFormMenuDisplayer " />
????
< Displayer???name = " ListMenu "
?????????????????type
= " net.sf.navigator.displayer.ListMenuDisplayer " />
????
< Displayer???name = " TabbedMenu "
?????????????????type
= " net.sf.navigator.displayer.TabbedMenuDisplayer " />
????
< Displayer???name = " Velocity "
?????????????????type
= " net.sf.navigator.displayer.VelocityMenuDisplayer " />
????
< Displayer???name = " XtreeMenu "
?????????????????type
= " net.sf.navigator.displayer.XtreeMenuDisplayer " />
????
< Displayer???name = " CSSListMenu "
?????????????????type
= " net.sf.navigator.displayer.CSSListMenuDisplayer " />
??
</ Displayers >

??
< Menus >

????
< Menu??name = " indexMenu " ??title = " Examples " >
????????
<!-- ?page?attribute?indicating?a?context?relative?resource.
?????????????The?context?path?will?be?prepended?to?the?value.?
--> ????????
????????
< Item??title = " tablemeun "
???????????????toolTip
= " Shows?table?menu "
???????????????page
= " /tablemenu.jsp " />
????????
< Item??name = " listmenu " ??title = " CoolMenu?Example "
???????????????toolTip
= " Shows?menu?using?CoolMenu "
???????????????page
= " /listmenu.jsp " />
????????
< Item??title = " Velocity?XTree?Menu "
???????????????toolTip
= " Shows?Velocity?generated?XTree "
???????????????page
= " /velocity-xtree.jsp " />
???????????????
????
</ Menu >

??
</ Menus >

</ MenuConfig >

?

部署工程,訪問,出現(xiàn)如下效果。

Express Learning Struts Menu
這是最普通的效果。
試著往menu-config.xml中加入item對應的menu也會跟著增加。

?

參考

http://code.google.com/p/strutsmenu/source/

?

?

?

?

?

Express Learning Struts Menu


更多文章、技術交流、商務合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯(lián)系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發(fā)表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 古蔺县| 泰和县| 永福县| 广汉市| 甘肃省| 大英县| 广昌县| 工布江达县| 菏泽市| 磐安县| 鄂温| 军事| 滕州市| 紫云| 义马市| 邳州市| 博乐市| 蓬溪县| 安康市| 辽宁省| 綦江县| 都昌县| 和田市| 信丰县| 赫章县| 永济市| 岳西县| 琼海市| 连山| 商南县| 鹰潭市| 永登县| 棋牌| 繁峙县| 阜南县| 吉木乃县| 南木林县| 潼关县| 石阡县| 明光市| 德江县|