<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    freefly
    一門技術,如果不能講出來,那么就是沒有理解,如果不能很好的講出來,那么就是理解不夠透徹!
    posts - 9,comments - 3,trackbacks - 0
    1. Background

             Usually,When we develop our web application,we need create menu.We can use Javascript to design web menu,but if thus,we have to compile many codes,and our application hasn't good  revisability and maintainability .Struts-menu provides us a convenient web menu design way,we can put our web menu data in  a menu-config.xml configuration file,and read the data with struts-menu lable.

       2.  Struts  Menu Example
        
            You can go here http://demo.raibledesigns.com/struts-menu/ to see the example;
            Or download the example application :struts-menu-2.3.zip,follow the below instruction:  
                   Unzip it to a local directory.  
                   Download and install Tomcat or another Java Servlet container.  
                   Put struts-menu.war in Tomcat's webapps folder and start the server. 
                   Go to http://localhost:8080/struts-menu 

     3.   Integrating Struts Menu into your application

          1.  Place struts-menu-2.3.jar into your app's WEB-INF/lib directory.(maybe you also need put common-lang.jar)
          2.  Place struts-menu.tld,and struts-menu-el.tld into your app's WEB-INF directory
          3.  Copy the common,images,scripts,template,styles directory from the above struts-menu.war exmaple application  to your web directory.(if use Myeclipse,put those directorys in webroot directory)
          4.  Add the plug-in settings to your struts-config.xml file.                 
                 
                   <plug-in className="net.sf.navigator.menu.MenuPlugIn">
                             <set-property property="menuConfig"
                                         value="/WEB-INF/menu-config.xml"/>
                    </plug-in>
         
            5.  You will need to declare your menu's attributes in a your App /WEB-INF/menu-config.xml file.Here's  a short  snippet of what might look like:        
           
                 <Menu name="contactMenu" title="Contact" location="?Contact">
                      <Item name="email" title="E-Mail" location="?EMail"/>
                      <Item name="phone" title="Phone" location="?Phone"/>
                 </Menu>
        
             6.   Add a taglib declaration to the top of your JSP: 

            <%@ taglib uri="http://struts-menu.sf.net/tag" prefix="menu" %>

            7.  Add taglib code to render your menu in your JSP: 

                   <menu:useMenuDisplayer name="TabbedMenu"
                       bundle="org.apache.struts.action.MESSAGE">
                        <menu:displayMenu name="Home"/>
                        <menu:displayMenu name="About"/>
                   </menu:useMenuDisplayer>
           
              
           8.  Below is a whole test.jsp
                <%@ page contentType="text/html; charset=UTF-8" %>
                <%@ taglib uri="            <%@ taglib uri="            <html:html>
                 <head>
                 <html:base />
                     <title>menu</title>
       
                     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

          
                     <link rel="stylesheet" type="text/css" media="screen"
                                   href="styles/global.css" />
                          <link rel="stylesheet" type="text/css" media="screen"
                                  href="styles/coolmenu.css" />
        
                    <script type="text/javascript" src="scripts/coolmenus4.js"></script>
                    <script type="text/javascript" src="scripts/cm_addins.js"></script>
                </head>
     
                <body>
                   <script type="text/javascript" src="scripts/coolmenu4-config.js"></script> 
       
                   <menu:useMenuDisplayer name="CoolMenu4"
                       bundle="org.apache.struts.action.MESSAGE">
                       <menu:displayMenu name="Home"/>
                      <menu:displayMenu name="About"/>
                  </menu:useMenuDisplayer>
              </body>
           </html:html>








                  
            


    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 久久成人18免费网站| 久久经典免费视频| 亚洲女人影院想要爱| 女人张开腿等男人桶免费视频 | 亚洲美女自拍视频| 精品国产免费观看| 青青青国产手机频在线免费观看 | wwwxxx亚洲| 自拍偷自拍亚洲精品第1页| 亚洲成人免费电影| 日韩在线视频线视频免费网站| 亚洲v高清理论电影| 日韩一区二区在线免费观看| 免费在线看黄的网站| 亚洲日产乱码一二三区别 | 久久水蜜桃亚洲av无码精品麻豆| 成人毛片免费观看| 国产精品免费AV片在线观看| WWW亚洲色大成网络.COM| 亚洲天天做日日做天天看| 亚洲AV无码不卡在线观看下载| 亚洲一区二区三区免费观看| a一级爱做片免费| 亚洲日韩精品国产3区| 亚洲欧洲日产韩国在线| 亚洲桃色AV无码| 日本一区免费电影| 日韩视频在线精品视频免费观看| 两个人看的www视频免费完整版| WWW亚洲色大成网络.COM| 亚洲色图激情文学| 亚洲福利视频导航| 亚洲桃色AV无码| 亚洲A∨精品一区二区三区| 最近免费中文字幕视频高清在线看| 国产亚洲免费的视频看| 一区二区三区免费视频网站| 亚洲国产欧美一区二区三区| 亚洲国产日韩在线人成下载| 亚洲AV本道一区二区三区四区| 亚洲人成国产精品无码|