亚洲人成网站色在线观看,亚洲熟妇无码AV不卡在线播放 ,亚洲AV日韩AV永久无码下载http://m.tkk7.com/freefly/category/27351.html一門技術,如果不能講出來,那么就是沒有理解,如果不能很好的講出來,那么就是理解不夠透徹!zh-cnThu, 15 Nov 2007 17:34:25 GMTThu, 15 Nov 2007 17:34:25 GMT60growing in depressed moodhttp://m.tkk7.com/freefly/archive/2006/04/11/40435.htmlfreeflyfreeflyTue, 11 Apr 2006 04:41:00 GMThttp://m.tkk7.com/freefly/archive/2006/04/11/40435.htmlhttp://m.tkk7.com/freefly/comments/40435.htmlhttp://m.tkk7.com/freefly/archive/2006/04/11/40435.html#Feedback0http://m.tkk7.com/freefly/comments/commentRss/40435.htmlhttp://m.tkk7.com/freefly/services/trackbacks/40435.html      Ultimatelly,I solved my problem.    My work is switch my application from mysql to sqlserver database .   At the very start,I forgot start sqlserver service,so the error "refused connect"  always appear,(so stupid error).Next,ther error  "Hibernate operation: could not execute query; uncategorized SQLException for SQL [select user0_.ID as ID, user0_.USERNAME as USERNAME0_, user0_.PASSWORD as PASSWORD0_ from user user0_]; SQL state [S1000]; error code [156]; 在關鍵字 'user' 附近有語法錯誤。; nested exception is java.sql.SQLException: 在關鍵字 'user' 附近有語法錯誤."   comes out ,  the problem scratchs my head over .this moring i got one friend's help and eventually found the "user" should not be used as a table name,because "user" is a key in sqlserver.  
      Below is work I have done : (Note: my env is eclipse+myeclipse)
      First:modify applicationContext.xml:
      
      From:
      1.<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
           <property name="driverClassName">
                 <value>com.mysql.jdbc.Driver</value>
           </property>
           <property name="url">
                <value>jdbc:mysql://localhost:3306/test</value>
           </property>
           <property name="username">
                <value>root</value>
           </property>
           <property name="password">
               <value>whl</value>
           </property>
        </bean>
     2. <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
     
     To:
        <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
              <property name="driverClassName">
                   <value>net.sourceforge.jtds.jdbc.Driver</value>
              </property>
              <property name="url">
                   <value>jdbc:jtds:sqlserver://localhost:1433/test</value>
               </property>
               <property name="username">
                    <value>sa</value>
               </property>
               <property name="password">
                    <value>mssqlsys</value>
              </property>
         </bean>

        <prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop>
      Second: import the sqlserver driver:jtds-1.1.jar



freefly 2006-04-11 12:41 發表評論
]]>
solution for mess code in struts+spring+hibernate+mysql4.1 http://m.tkk7.com/freefly/archive/2006/03/23/37026.htmlfreeflyfreeflyThu, 23 Mar 2006 05:07:00 GMThttp://m.tkk7.com/freefly/archive/2006/03/23/37026.htmlhttp://m.tkk7.com/freefly/comments/37026.htmlhttp://m.tkk7.com/freefly/archive/2006/03/23/37026.html#Feedback0http://m.tkk7.com/freefly/comments/commentRss/37026.htmlhttp://m.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 發表評論
]]>
主站蜘蛛池模板: 成人a毛片免费视频观看| 久久亚洲精品11p| 好紧我太爽了视频免费国产| 亚洲av无码国产精品色在线看不卡| 亚洲人成网国产最新在线| 希望影院高清免费观看视频| 亚洲精品中文字幕无乱码| 亚洲免费观看网站| 亚洲一区二区三区在线| 妞干网免费视频在线观看| 亚洲精品无码mⅴ在线观看| 日韩一区二区在线免费观看 | 久久亚洲AV成人无码软件| 999任你躁在线精品免费不卡| 久久青青草原亚洲av无码app| 日本免费一区二区三区四区五六区| 亚洲欧洲日产国码久在线观看| 9420免费高清在线视频| 亚洲人成毛片线播放| 狠狠久久永久免费观看| 美女被免费网站视频在线| 久久国产成人精品国产成人亚洲 | 3344永久在线观看视频免费首页| 十八禁的黄污污免费网站| 久久精品国产亚洲精品| 99国产精品免费观看视频| 亚洲熟女www一区二区三区| 免费看男女下面日出水视频| 国产免费久久久久久无码| 亚洲综合国产精品| 四虎成人免费网站在线| 国产精品hd免费观看| 久久精品蜜芽亚洲国产AV| 日本免费人成黄页网观看视频| 国产免费牲交视频免费播放| 久久精品国产亚洲av影院| 国产精品国产午夜免费福利看| 99在线热播精品免费99热| 亚洲激情校园春色| 亚洲第一黄色网址| 中国人xxxxx69免费视频|