亚洲欧洲无码AV电影在线观看 ,亚洲高清专区日韩精品,亚洲最大黄色网站http://www.tkk7.com/freefly/category/27345.html一門技術,如果不能講出來,那么就是沒有理解,如果不能很好的講出來,那么就是理解不夠透徹!zh-cnThu, 15 Nov 2007 17:33:43 GMTThu, 15 Nov 2007 17:33:43 GMT60Config Struts-menu in applicationhttp://www.tkk7.com/freefly/archive/2006/04/05/39389.htmlfreeflyfreeflyWed, 05 Apr 2006 07:23:00 GMThttp://www.tkk7.com/freefly/archive/2006/04/05/39389.htmlhttp://www.tkk7.com/freefly/comments/39389.htmlhttp://www.tkk7.com/freefly/archive/2006/04/05/39389.html#Feedback0http://www.tkk7.com/freefly/comments/commentRss/39389.htmlhttp://www.tkk7.com/freefly/services/trackbacks/39389.html
  • 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>








                  
            



    freefly 2006-04-05 15:23 發表評論
    ]]>
    solution for mess code in struts+spring+hibernate+mysql4.1 http://www.tkk7.com/freefly/archive/2006/03/23/37026.htmlfreeflyfreeflyThu, 23 Mar 2006 05:07:00 GMThttp://www.tkk7.com/freefly/archive/2006/03/23/37026.htmlhttp://www.tkk7.com/freefly/comments/37026.htmlhttp://www.tkk7.com/freefly/archive/2006/03/23/37026.html#Feedback0http://www.tkk7.com/freefly/comments/commentRss/37026.htmlhttp://www.tkk7.com/freefly/services/trackbacks/37026.html Here is my solution for  mess code on page,hope this can help you!
     The point is your database coding should be consistent with the coding of  character that you plan to insert into the database.
     Attention: Here,I take "UTF-8" as default character coding way .
     There are three steps:
     1. set page charset 
         e.g      <%@ page language="java" contentType="text/html; charset=UTF-8" %>
        
     2. create character filter:
         package com.victory.util;

         import javax.servlet.http.HttpServlet;
         import javax.servlet.Filter;
         import javax.servlet.FilterConfig;
         import javax.servlet.ServletException;
         import javax.servlet.ServletRequest;
         import javax.servlet.ServletResponse;
         import javax.servlet.FilterChain;
         import javax.servlet.http.*;
         import java.io.IOException;
         public class CharacterEncodingFilter
           extends HttpServlet
           implements Filter {

           private FilterConfig filterConfig;
           private String targetEncoding = "ASCII";

         /**
          * Called by the web container to indicate to a filter that it is being placed
          * into service.
          *
          * @param filterConfig FilterConfig
          * @throws ServletException
          * @todo Implement this javax.servlet.Filter method
         */
          public void init(FilterConfig filterConfig) throws ServletException {
          this.filterConfig = filterConfig;
          this.targetEncoding = filterConfig.getInitParameter("encoding");
         }

        /**
         * The <code>doFilter</code> method of the Filter is called by the container
         * each time a request/response pair is passed through the chain due to a
         * client request for a resource at the end of the chain.
         *
         * @param request ServletRequest
         * @param response ServletResponse
         * @param chain FilterChain
         * @throws IOException
         * @throws ServletException
         * @todo Implement this javax.servlet.Filter method
         */
         public void doFilter(ServletRequest srequest, ServletResponse sresponse,
                           FilterChain chain) throws IOException, ServletException {
          try {
            HttpServletRequest request = (HttpServletRequest) srequest;
            request.setCharacterEncoding(targetEncoding);
            chain.doFilter(srequest, sresponse);
              }
          catch (ServletException sx) {
             filterConfig.getServletContext().log(sx.getMessage());
              }
          catch (IOException iox) {
             filterConfig.getServletContext().log(iox.getMessage());
            }
          }

        /**
         * Called by the web container to indicate to a filter that it is being taken
         * out of service.
         *
         * @todo Implement this javax.servlet.Filter method
         */
         public void destroy() {
           filterConfig = null;
           targetEncoding = null;
         }
      }
      
      3.config web.xml
        attention: add these to your web.xml
         <filter>
         <filter-name>EncodingFilter</filter-name>
         <filter-class>com.victory.util.CharacterEncodingFilter</filter-class>
         <init-param>
           <param-name>encoding</param-name>
           <param-value>UTF-8</param-value>
         </init-param>
        </filter>
        <filter-mapping>
        <filter-name>EncodingFilter</filter-name>
         <url-pattern>/*</url-pattern>
        </filter-mapping> 
      4.set database configration
         modify the file:    my.ini
         [client]     default-character-set=utf8 
         [mysqld]  default-character-set=utf8
      5.restart Mysql server
      6.modified your table coding way to utf8

         or ceate your table like this :
         CREATE TABLE `user` (
        `ID` int(11) NOT NULL auto_increment,
        `USERNAME` varchar(50) NOT NULL default '',
        `PASSWORD` varchar(50) NOT NULL default '',
         PRIMARY KEY  (`ID`)
         ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
      7.restrart your tomcat sever

       OK,it's all.

       Authrougn I have sovled   my problem, I think I  don't have enough understanding for it,  So hope    communicate with you! 

       Attention:mess code also exist in your database,through page hasn't mess code.
       
         


       
      
           
         



    freefly 2006-03-23 13:07 發表評論
    ]]>
    主站蜘蛛池模板: www在线观看播放免费视频日本| 男女交性无遮挡免费视频| 亚洲爆乳大丰满无码专区| 午夜国产精品免费观看| 高清免费久久午夜精品| 国产精品高清视亚洲一区二区 | 九九99热免费最新版| 亚洲久本草在线中文字幕| 日韩免费视频播放| 欧洲精品码一区二区三区免费看| 亚洲人成伊人成综合网久久久| 国产青草视频在线观看免费影院| 成人爽A毛片免费看| 亚洲经典千人经典日产| 亚洲AV无码AV吞精久久| 国产免费69成人精品视频| 亚洲一区二区三区影院| 99在线免费视频| 亚洲成av人片在线看片| 精品97国产免费人成视频| 亚洲精品无码乱码成人| 十八禁无码免费网站| 亚洲国产精品综合一区在线| 成年在线网站免费观看无广告 | 亚洲成人黄色在线观看| 免费av欧美国产在钱| 日本精品久久久久久久久免费| 在线亚洲午夜理论AV大片| 人妻无码久久一区二区三区免费| 精品亚洲国产成AV人片传媒| 久久电影网午夜鲁丝片免费| 免费人成又黄又爽的视频在线电影| 国产亚洲一区二区三区在线观看| 免费观看美女用震蛋喷水的视频| 国产精品亚洲片在线观看不卡| 91精品国产免费网站| 亚洲韩国—中文字幕| 无码一区二区三区免费视频| 中国性猛交xxxxx免费看| 亚洲日韩精品一区二区三区| 1000部禁片黄的免费看|