<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>








                  
            


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


    網站導航:
     
    主站蜘蛛池模板: 国产99视频精品免费专区| 免费一级做a爰片久久毛片潮| 日本三级在线观看免费| 国产亚洲精久久久久久无码AV | 亚洲免费网站在线观看| 久久综合给合久久国产免费| 久久亚洲精品AB无码播放| 久久香蕉国产线看免费| 777亚洲精品乱码久久久久久 | 久久这里只精品99re免费| 久久亚洲精品AB无码播放| 91成人免费观看| 亚洲偷自拍另类图片二区| 又粗又硬免费毛片| www永久免费视频| 久久精品国产亚洲| 日韩欧毛片免费视频| 亚洲AV成人无码网站| 亚洲欧洲久久久精品| 免费无码H肉动漫在线观看麻豆| 久久精品国产亚洲| 成人黄动漫画免费网站视频 | 久久精品国产99精品国产亚洲性色| 免费观看男人吊女人视频| ww亚洲ww在线观看国产| 国产免费人成在线视频| 怡红院免费全部视频在线视频| 亚洲视频一区二区在线观看| 免费高清小黄站在线观看 | 国产无限免费观看黄网站| 久久久久久久亚洲Av无码| 午夜时刻免费入口| 久草免费福利在线| 亚洲剧场午夜在线观看| www亚洲一级视频com| 在线a免费观看最新网站| 国产成人精品日本亚洲语音| 亚洲精品无码久久久久| 国产一精品一AV一免费孕妇| 亚欧国产一级在线免费| 亚洲国产中文在线视频|