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








                  
            


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


    網站導航:
     
    主站蜘蛛池模板: 无码视频免费一区二三区| 永久在线毛片免费观看| 中文字幕在线免费视频| 免费的黄色的网站| 阿v免费在线观看| 日韩毛片一区视频免费| 亚洲免费日韩无码系列| 国产精品成人免费观看| 亚洲阿v天堂在线2017免费| 国产精品内射视频免费| 嫩草在线视频www免费看| 国产精品白浆在线观看免费 | 久久青草精品38国产免费| 少妇性饥渴无码A区免费| 中文字幕日本人妻久久久免费| 国产午夜成人免费看片无遮挡| 久久精品成人免费看| 97青青草原国产免费观看| 成人免费AA片在线观看| 9久热这里只有精品免费| a毛片视频免费观看影院| 无码成A毛片免费| 国产高清不卡免费在线| 女人被免费视频网站| 免费A级毛片无码A| 亚洲人精品午夜射精日韩| 亚洲人成在线影院| 久久亚洲精品国产精品婷婷| 亚洲另类无码专区首页| 亚洲一级片免费看| 美女视频黄的免费视频网页| 国产91免费在线观看| 日韩一区二区在线免费观看| 亚洲AV无码乱码在线观看牲色| 亚洲一区二区三区无码中文字幕| 亚洲日本在线观看| 亚洲国产成人无码AV在线影院| 日本高清免费中文在线看| 免费无遮挡无码永久视频| 思思99re66在线精品免费观看| AV在线播放日韩亚洲欧|