struts-menu(tablemenu样式)

struts-menu(tablemenu样式)

上篇文章讲了如何使用struts-menu这篇在上篇的基础上增加如果美化menu作出漂亮的menu来
1,tablemenu
新建一个jsp文件tablemenu.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 >
< div id = " header " >
< menu:useMenuDisplayer name = " Velocity "  config = " /templates/indextabs.html "
    bundle
= " org.apache.struts.action.MESSAGE " >
    
< ul id = " menuList " >
    
< menu:displayMenu name = " projectMenu " />
    
</ ul >
</ menu:useMenuDisplayer >
</ div >
<% @ include file = " /common/footer.jsp " %>
</ html >

在menu-config.xml的menus之间加入如下内容
  < Menu name = " projectMenu "  title = " Project Menu " >
        
< Item title = " Home "  toolTip = " Return to List of Menus "  page = " /index.jsp " />
        
< Item title = " Documentation "  toolTip = " View Project Documentation "
            location
= " http://struts-menu.sf.net " />
        
< Item title = " FAQs "  toolTip = " View Frequenty Asked Questions "
            location
= " http://struts-menu.sf.net/faq.html " />
        
< Item title = " Mailing Lists "  toolTip = " Subscribe to Mailing Lists "
            location
= " http://sourceforge.net/mail/?group_id=48726 " />
        
< Item title = " Mailing List Archives "
            toolTip
= " Search the Mailing List Archives "
            location
= " http://www.mail-archive.com/index.php?hunt=struts-menu " />
    
</ Menu >
部署运行工程,从主页点击tablemenu进入tablemenu的页面如图:

你可能感兴趣的:(struts-menu(tablemenu样式))