struts-menu使用教程
struts-menu可以做成各種各樣的menu,這里演示一些簡(jiǎn)單的用法。方便入門(mén)一、在sourceforge上下載最新版本的strutsmenu
http://struts-menu.sourceforge.net/
解壓縮zip文件得到struts-menu.war,解壓縮它,要用到里邊的js文件,imgage文件和css文件等
這個(gè)本來(lái)是struts-menu的演示工程,本文簡(jiǎn)化了里邊的東西,選擇里邊比較有代表性的幾個(gè)拿出。
二、新建一個(gè)web工程。
拷貝相應(yīng)的類(lèi)庫(kù)到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
等,基本就是struts-menu工程中的jar文件
拷貝struts-menu工程中的common image scripts styles templates等目錄到新的web工程
拷貝taglib.jsp到webroot下
三.新建一個(gè)jsp文件index.jsp內(nèi)容如下






































































































這是最普通的效果。
試著往menu-config.xml中加入item對(duì)應(yīng)的menu也會(huì)跟著增加。
下篇文章將繼續(xù)提供一些更漂亮一些的menu
posted on 2007-05-27 16:59 dreamstone 閱讀(6148) 評(píng)論(7) 編輯 收藏 所屬分類(lèi): web框架