锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲一区二区女搞男,老司机亚洲精品影视www,久久久久亚洲AV无码观看http://m.tkk7.com/1504/category/37844.html涓嶈交鏄撴湇杈?涓嶈交璦鏀懼純.--蹇?jī)鏄ⅵ鐨勮垶鍙板Q屽績(jī)鏈夊澶э紝鑸炲彴鏈夊澶с傝笍韙忓疄瀹炲仛浜嬶紝璁よ鐪熺湡鍋氫漢銆?/description>zh-cnThu, 01 Apr 2010 07:29:55 GMTThu, 01 Apr 2010 07:29:55 GMT60HSQL鏌ヨ涔辯爜銆愯漿鎬葷粨銆?/title><link>http://m.tkk7.com/1504/archive/2009/02/22/256104.html</link><dc:creator>weesun涓綾抽槼鍏?/dc:creator><author>weesun涓綾抽槼鍏?/author><pubDate>Sun, 22 Feb 2009 11:50:00 GMT</pubDate><guid>http://m.tkk7.com/1504/archive/2009/02/22/256104.html</guid><wfw:comment>http://m.tkk7.com/1504/comments/256104.html</wfw:comment><comments>http://m.tkk7.com/1504/archive/2009/02/22/256104.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/1504/comments/commentRss/256104.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/1504/services/trackbacks/256104.html</trackback:ping><description><![CDATA[<span style="font-size: 12pt;"><span style="font-size: 12pt;">鍦╯pring+hibernate涓細(xì)</span><span style="font-size: 12pt;">Hql</span><span style="font-size: 12pt;">涓湁涓枃鍙傛暟錛堝</span><span style="font-size: 12pt;">from test as c where c.name='寮犱笁'</span><span style="font-size: 12pt;">錛夌殑璇濊緲昏瘧鎴?/span><span style="font-size: 12pt;">sql</span><span style="font-size: 12pt;">鐨勬椂鍊欎細(xì)鍑虹幇涔辯爜錛岃В鍐沖姙娉曟槸鍦?/span><span style="font-size: 12pt;">application.xml</span><span style="font-size: 12pt;">涓姞鍏ヤ互涓嬭鍙ワ細(xì) <div id="vrdqimo" class="dp-highlighter"> <ol class="dp-xml"> <li id="jlqsqrh" class="alt"><span id="hgrdfxz" class="tag"><<span id="kmdytlo" class="tag-name">prop</span> <span id="tzqkmlg" class="attribute">key</span>=<span id="zjlcxlz" class="attribute-value">"hibernate.query.factory_class"</span><span id="dqwyeph" class="tag">></span>  </span> </li> <li id="vuekftw" class="">    org.hibernate.hql.classic.ClassicQueryTranslatorFactory    </li> <li id="facpniz" class="alt">prop<span id="jenecjq" class="tag">></span>   </li> </ol> </div> 鍦╤ibernate.cfg.xml   涓姞鍏ヤ笅闈㈢殑灞炴?  <br />     <br />   <property   name="hibernate.query.factory_class">   <br />     <br />             org.hibernate.hql.classic.ClassicQueryTranslatorFactory   <br />     <br />   </property>  </span></span> <img src ="http://m.tkk7.com/1504/aggbug/256104.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/1504/" target="_blank">weesun涓綾抽槼鍏?/a> 2009-02-22 19:50 <a href="http://m.tkk7.com/1504/archive/2009/02/22/256104.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Hibernate3.0涓疄鐜版ā緋婃煡璇€愭葷粨銆?/title><link>http://m.tkk7.com/1504/archive/2009/02/22/256103.html</link><dc:creator>weesun涓綾抽槼鍏?/dc:creator><author>weesun涓綾抽槼鍏?/author><pubDate>Sun, 22 Feb 2009 11:50:00 GMT</pubDate><guid>http://m.tkk7.com/1504/archive/2009/02/22/256103.html</guid><wfw:comment>http://m.tkk7.com/1504/comments/256103.html</wfw:comment><comments>http://m.tkk7.com/1504/archive/2009/02/22/256103.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/1504/comments/commentRss/256103.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/1504/services/trackbacks/256103.html</trackback:ping><description><![CDATA[浠婂ぉ鐨勯」鐩腑鍦ㄧ敤<font style="background-color: #c7edcc;" size="3">Hibernate3.0</font>榪涜妯$硦鏌ヨ鐨勬椂鍊欙紝鍑虹幇涓枃涔辯爜錛屽湪緗戜笂鏌ヤ簡(jiǎn)濂戒箙璧勬枡錛岀粓浜庤В鍐充簡(jiǎn)錛岀幇鍦ㄦ妸鏁寸悊鍚庣殑璐村嚭鏉ャ?br /> Hibernate涓疄鐜版ā緋婃煡璇紝鍙湁浠ヤ笅涓夌鏂瑰紡錛?<br /> <br /> 絎竴縐嶆柟寮忥細(xì)QBC鏌ヨ <br /> String name = "", info = ""; <br /> if (sub != null && sub.getSubname() != null) { <br /> name = sub.getSubname(); <br /> } <br /> if (sub != null && sub.getSubinfo() != null) { <br /> info = sub.getSubinfo(); <br /> } <br /> Criteria cr = session.createCriteria(Subject.class); <br /> cr.add(Expression.like("subname","%"+name+"%")); <br /> cr.add(Expression.like("subinfo","%"+info+"%")); <br /> <br /> 絎簩縐嶆柟寮忥細(xì)HQL鏌ヨ璇彞 <br /> String hql = "from Subject as s where s.subname like :name and s.subinfo like :info"; <br /> // 璋冪敤session鐨勮幏寰楁暟鎹垪琛ㄦ柟娉曪紝浼犻扝QL鏌ヨ璇彞 <br /> String  subnamevalue="瑕佹煡璇㈢殑涓枃鍊?;<br /> <font style="background-color: #c7edcc;" size="3">String   sql="";<br /> sql   = "from Pfapp  where name like :subname "; </font><br /> <font style="background-color: #c7edcc;" size="3">Query query = session.createQuery(sql); <br /> query.setString("subname","%"+subnamevalue+"%");<br /> </font>System.out.println("*********"+sql); <br /> <br /> 娉細(xì)Subject涓烘暟鎹簱琛╯ubject鏄犲皠鐨勭被錛涘畠鏈夌浉搴旂殑灞炴ubname銆乻ubinfo鍙?qiáng)鐩稿簲鐨刧et鍜宻et鏂規(guī)硶錛泂ub涓篠ubject鐨勪竴涓疄渚嬪寲瀵硅薄銆?br /> 鍙﹀璇存槑鐨勬槸錛氬鏋滀綘涓嶅啓瀵硅薄鍚嶇О錛岀洿鎺ュ啓瀛楁錛岄偅涔坔ibernate灝辨寜鐓ф暟鎹簱瀛楁榪涜鏌ユ壘 <br /> 濡傛灉浣犲啓   (瀵硅薄鍚?瀵硅薄灞炴э級(jí)錛岄偅涔坔ibernate灝辨寜鐓rmapping涓殑鏄犲皠瀛楁榪涜鏌ユ壘 <br /> 榪欐槸hibernate鐨勭伒媧諱箣澶勶紒錛? <img src ="http://m.tkk7.com/1504/aggbug/256103.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/1504/" target="_blank">weesun涓綾抽槼鍏?/a> 2009-02-22 19:50 <a href="http://m.tkk7.com/1504/archive/2009/02/22/256103.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>ant-build.xml鎵撳寘搴旂敤紼嬪簭銆愭葷粨銆?/title><link>http://m.tkk7.com/1504/archive/2009/02/22/256102.html</link><dc:creator>weesun涓綾抽槼鍏?/dc:creator><author>weesun涓綾抽槼鍏?/author><pubDate>Sun, 22 Feb 2009 11:47:00 GMT</pubDate><guid>http://m.tkk7.com/1504/archive/2009/02/22/256102.html</guid><wfw:comment>http://m.tkk7.com/1504/comments/256102.html</wfw:comment><comments>http://m.tkk7.com/1504/archive/2009/02/22/256102.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/1504/comments/commentRss/256102.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/1504/services/trackbacks/256102.html</trackback:ping><description><![CDATA[<p>寮勪簡(jiǎn)濂戒箙鐨刟nt鎵撳寘緇堜簬鏄庣櫧浜?jiǎn)锛岃创鍑烘潵澶у鍒嗕韩銆?font style="background-color: #c7edcc;" size="3"><br /> <?xml version="1.0" encoding="UTF-8"?><br /> <project name="gpdi" basedir="." default="deploy"><br />  <!-- Properties and Paths --><br />  <property name="dir.java.src" value="src" /><br />  <br />  <property name="dir.java.build" value="defaultroot/WEB-INF/classes" /><br />   <br />  <property name="dir.lib" value="lib" /><br />   <br />  <property name="dir.deploy" value="deploy" /></font></p> <p><font style="background-color: #c7edcc;" size="3"> <property name="file.manifest" value="manifest.txt" /></font></p> <p><font style="background-color: #c7edcc;" size="3"> <property name="file.jar" value="gpdi.jar" /><br />  <!-- Just to fool the test --><br />  <property name="gpdi.root" value="." /><br />     <!-- 鎺掗櫎java婧愭枃浠剁殑妯″紡闆?--><br />     <patternset id="no.java"><br />         <exclude name="**/*.java" /><br />     </patternset><br />  <path id="project.class.path"><br />   <pathelement location="${dir.java.build}"/><br />   <fileset dir="${dir.lib}" id="lib.path"><br />    <include name="**/*.jar"/><br />   </fileset><br />    <br />  </path><br />  <br />     <!-- 鍒濆鍖?寤虹珛鐩綍,澶嶅埗鏂囦歡 --><br />  <br />     <target name="init" depends="clean" description="鍒濆鍖?寤虹珛鐩綍,澶嶅埗鏂囦歡"></font></p> <p><font style="background-color: #c7edcc;" size="3">        <mkdir dir="${dir.java.build}" /></font></p> <p><font style="background-color: #c7edcc;" size="3">        <mkdir dir="${dir.dist}" /></font></p> <p><font style="background-color: #c7edcc;" size="3">        <copy todir="${dir.java.build}"></font></p> <p><font style="background-color: #c7edcc;" size="3">            <fileset dir="${dir.java.src}"></font></p> <p><font style="background-color: #c7edcc;" size="3">                <patternset refid="no.java" /></font></p> <p><font style="background-color: #c7edcc;" size="3">            </fileset></font></p> <p><font style="background-color: #c7edcc;" size="3">        </copy></font></p> <p><font style="background-color: #c7edcc;" size="3">    </target><br />  <br />     <!-- 娓呯悊,鍒犻櫎涓存椂鐩綍 --><br />  <br />     <target name="clean" description="娓呯悊,鍒犻櫎涓存椂鐩綍"></font></p> <p><font style="background-color: #c7edcc;" size="3">        <delete dir="${dir.java.build}" /></font></p> <p><font style="background-color: #c7edcc;" size="3">        <delete dir="${dir.dist}" /></font></p> <p><font style="background-color: #c7edcc;" size="3">        <echo level="info">娓呯悊瀹屾瘯</echo></font></p> <p><font style="background-color: #c7edcc;" size="3">    </target><br />  <br />  <!-- 緙栬瘧婧愭枃浠?-></font></p> <p><font style="background-color: #c7edcc;" size="3"> <target name="compile" <br />   <br />   depends="init" <br />   <br />   description="緙栬瘧婧愭枃浠?><br />   <br />   <javac srcdir="${dir.java.src}"<br />    <br />    destdir="${dir.java.build}"<br />    <br />    deprecation="off"<br />    <br />    debug="off"<br />    <br />    encoding="gbk"<br />    <br />    source="1.5" <br />    <br />    target="1.5"><br />    <br />    <classpath refid="project.class.path"/><br />    <br />   </javac><br />   <br />  </target></font></p> <p><font style="background-color: #c7edcc;" size="3">    <!-- 鍒涘緩娓呭崟鏂囦歡 --></font></p> <p><font style="background-color: #c7edcc;" size="3">    <target name="create.manifest" description="鍒涘緩娓呭崟鏂囦歡"><br />         <manifest file="${dir.java.src}/${file.manifest}"><br />             <attribute name="Built-By" value="${user.name}" /><br />             <attribute name="Main-Class" value="com.mfsoft.net.task.TaskJob" /><br />             <attribute name="Class-Path" value="lib/log4j-1.2.9.jar lib/classes12.jar lib/joone-engine.jar" /><br />         </manifest></font></p> <p><font style="background-color: #c7edcc;" size="3">    </target></font></p> <p><font style="background-color: #c7edcc;" size="3">    <!-- 鎵撳寘綾繪枃浠?--><br />  <br />     <target name="deploy" depends="create.manifest" description="鎵撳寘綾繪枃浠?><br />         <mkdir dir="${dir.deploy}" /><br />         <mkdir dir="${dir.deploy}/log" /><br />         <jar jarfile="${dir.deploy}/${file.jar}" manifest="${dir.java.src}/${file.manifest}"><br />             <fileset dir="${dir.java.build}" includes="db.properties,config.properties,log4j.properties,com/mfsoft/net/task/*.class,com/mfsoft/credit/modelmang/operation/*.class,<br />             com/mfsoft/net/datatranslate/*.class,com/mfsoft/net/pre/*.class,com/mfsoft/icity/platform/database/*.class,com/mfsoft/icity/platform/datashare/*.class,<br />             com/mfsoft/icity/platform/publicclass/*.class,com/mfsoft/credit/viable/*.class" />            <br />         </jar>  <br />   <!--澶嶅埗鐢ㄥ埌鐨勫簱浠ュ強(qiáng)鍏朵粬鏂囦歡 --><br /> <mkdir dir="${dir.deploy}/lib"/><br /> <copy todir="${dir.deploy}/lib"><br />  <fileset dir="defaultroot/WEB-INF/lib" includes="classes12.jar,joone-engine.jar,log4j-1.2.9.jar"/><br /> </copy>  <br /> <mkdir dir="${dir.deploy}/model"/> <br /> <copy todir="${dir.deploy}/model"><br />  <fileset dir="defaultroot/WEB-INF/classes" includes="*.snet"/><br /> </copy> <br />     </target><br /> </project></font></p> <img src ="http://m.tkk7.com/1504/aggbug/256102.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/1504/" target="_blank">weesun涓綾抽槼鍏?/a> 2009-02-22 19:47 <a href="http://m.tkk7.com/1504/archive/2009/02/22/256102.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍦⊿truts涓瑼ction浼犲弬鏁?[鎬葷粨]http://m.tkk7.com/1504/archive/2009/02/22/256101.htmlweesun涓綾抽槼鍏?/dc:creator>weesun涓綾抽槼鍏?/author>Sun, 22 Feb 2009 11:47:00 GMThttp://m.tkk7.com/1504/archive/2009/02/22/256101.htmlhttp://m.tkk7.com/1504/comments/256101.htmlhttp://m.tkk7.com/1504/archive/2009/02/22/256101.html#Feedback0http://m.tkk7.com/1504/comments/commentRss/256101.htmlhttp://m.tkk7.com/1504/services/trackbacks/256101.html

public ActionForward userSave(ActionMapping mapping, ActionForm form,
   HttpServletRequest request, HttpServletResponse response) {
  UserForm userForm = (UserForm) form;

  return mapping.findForward("userSave");
 }

//浼犲弬鏁?br />  public ActionForward userSave(ActionMapping mapping, ActionForm form,
   HttpServletRequest request, HttpServletResponse response) {
  UserForm userForm = (UserForm) form;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 String path = mapping.findForward("delete").getPath();

  //TODO: 璇誨彇鏈珹ction鎵鏈夌殑璇鋒眰鍙傛暟錛屽皢path閲嶆柊鏋勯狅紝鍔犱笂璇鋒眰鍙傛暟

  ActionForward forward= new ActionForward(path+"&pageId=1");
  forward.setRedirect(true);
//浼犲弬鏁板悗榪斿洖
  return forward;

 

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 // return mapping.findForward("userSave");
 }




]]>
淇濆瓨鍜屾彁浜ゆ寜閽簨浠禰鎬葷粨]http://m.tkk7.com/1504/archive/2009/02/22/256100.htmlweesun涓綾抽槼鍏?/dc:creator>weesun涓綾抽槼鍏?/author>Sun, 22 Feb 2009 11:43:00 GMThttp://m.tkk7.com/1504/archive/2009/02/22/256100.htmlhttp://m.tkk7.com/1504/comments/256100.htmlhttp://m.tkk7.com/1504/archive/2009/02/22/256100.html#Feedback0http://m.tkk7.com/1504/comments/commentRss/256100.htmlhttp://m.tkk7.com/1504/services/trackbacks/256100.html   
<input type="button" name="save" value="鐢熸垚琛ㄦ牸"onclick="javascript:Save();">
<input type="button" name="commit" value=" 鎻愪氦 "onclick="javascript:Commit();"> 
2.
 function Save()
    {
     var theForm=document.projectSetForm;
   theForm.action="scoreOperation.do?do=creat";
   theForm.submit();
    }
     function Commit()
    {
     var theForm=document.projectSetForm;
  theForm.action="projectSet.do?do=save";
  theForm.submit();
    }
3.
<html:form action="project/projectSet.do" method="POST" >
 </html:form>

]]>
bean:define id鐨勪嬌鐢╗鎬葷粨]http://m.tkk7.com/1504/archive/2009/02/22/256099.htmlweesun涓綾抽槼鍏?/dc:creator>weesun涓綾抽槼鍏?/author>Sun, 22 Feb 2009 11:40:00 GMThttp://m.tkk7.com/1504/archive/2009/02/22/256099.htmlhttp://m.tkk7.com/1504/comments/256099.htmlhttp://m.tkk7.com/1504/archive/2009/02/22/256099.html#Feedback0http://m.tkk7.com/1504/comments/commentRss/256099.htmlhttp://m.tkk7.com/1504/services/trackbacks/256099.html<bean:define   id="pagename"   name="requestName"/>  
   
  id:鎸囩殑鏄繖涓猙ean鐨勫敮涓鍚嶅瓧(鍙互鑷敱瀹氫箟鎴栬呰鍙互鑷畾涔変絾鏄繀欏誨敮涓)錛屽湪榪欓噷瀹氫箟鐨刬d="pagename" ,鍦ㄨ璋冪敤鐨勭綉欏甸噷闈㈠彲浠ラ殢渚跨殑浣跨敤鍜岃闂?  
  name:鎸囩殑鏄粠涓婁竴涓〉闈㈡垨鑰卆ction閲岄潰浼犺繃鏉ョ殑鍙橀噺錛屽彲浠ユ槸浠諱綍綾誨瀷銆?渚嬪鍐嶄笂涓緗戦〉瀹氫箟request.setAttribute("requestName", requestName);)  
  渚嬪錛? 
      鎴戞湁涓涓狟ean瀵硅薄User瀵硅薄錛岃繖涓噷闈繚瀛樹簡(jiǎn)admin綆$悊鍛樼殑涓漢淇℃伅錛屽鍚?name)錛屾у埆(sex)銆佸勾榫?age)閭d箞鎬庝箞鐢ㄥ憿銆? 
  鍦╝ction閲岄潰浣犲彲浠ユ妸User瀵硅薄浼犺繃鏉? 
  request.setAttribute("user",User);  
  鍦ㄩ〉闈? 
  <bean:define   id="admin"   name="user"./>  
  鐒跺悗灝卞彲浠ュ拰bean:write鎼厤浣跨敤  
  <bean:write   name="admin"   property="name"/>  
  <bean:write   name="admin"   property="sex"/>  
  <bean:write   name="admin"   property="age"/>

]]>
Hibernate瀹炵幇one-to-one綰ц仈淇濆瓨[鑷繁鎬葷粨]http://m.tkk7.com/1504/archive/2009/02/22/256097.htmlweesun涓綾抽槼鍏?/dc:creator>weesun涓綾抽槼鍏?/author>Sun, 22 Feb 2009 11:38:00 GMThttp://m.tkk7.com/1504/archive/2009/02/22/256097.htmlhttp://m.tkk7.com/1504/comments/256097.htmlhttp://m.tkk7.com/1504/archive/2009/02/22/256097.html#Feedback0http://m.tkk7.com/1504/comments/commentRss/256097.htmlhttp://m.tkk7.com/1504/services/trackbacks/256097.htmlhttp://m.tkk7.com/1504/admin/EditPosts.aspx?opt=1

鍦ㄥ叿浣撶殑欏圭洰搴旂敤涓?鎴戜滑寰堝皯浼?xì)鐢ㄥ堫C竴瀵逛竴鐨勭駭鑱旀搷浣?涓斿緢澶氭椂鍊欎竴瀵逛竴鐨勬搷浣滃彲浠ラ氳繃澶氬涓瀹炵幇,浣嗘槸涓瀵逛竴鏈夎嚜宸辯殑濂藉,灝辨槸鍦ㄤ換浣曟椂鍊欓兘鑳戒繚璇佷富澶栭敭鏁版嵁鐨勪竴鑷存?浣嗘槸澶氬涓鐨勬儏鍐典笅鏈繀鑳藉仛鍒?
鎴戝湪欏圭洰涓叿浣撶敤鍒頒簡(jiǎn)涓瀵逛竴鐨勭駭鑱旀搷浣?浠庣綉涓婃嬁浜?涓涓緥瀛愭潵鍋?浣嗘槸娌℃湁鎴愬姛,浜庢槸鍙ソ鑷繁鐮旂┒,鐜板湪鎶婁慨鏀瑰悗鐨勪唬鐮佸笘鍑烘潵.
鏈緥瀛愪嬌鐢?font size="3">hibernate3.jar+oracle鏁版嵁搴?br /> 搴撹〃:
CARD_TEST(CARDID[NUMBER(18)],CARDNUM[VARCHAR2(20)])
USER_TEST(USERID[NUMBER(18)],USERNAME[VARCHAR2(20)])
TestMain.java

package com.gpdi.test;
import org.hibernate.Session;
import org.hibernate.Transaction;
public class TestMain {
/**
 * 瀛樺偍涓涓敤鎴?br />  * @param user
 */
public void save(User user){
 user.setUsername("TEST");
 Card card=new Card();
 //Card card1=new Card();
 card.setCardnum("HGJUYT");
 //card1.setCardnum("fghy55");
 user.setCard(card);
 //user.setCard(card1);
 Session session=HibernateSessionFactory.currentSession();
    card.setUser(user);
    //card1.setUser(user);
 Transaction tr=session.beginTransaction();
 session.save(user);
 //session.save(card);
 tr.commit();
 session.close(); 
}

 public static void main(String[] args) throws Exception {
  TestMain test=new TestMain();
     test.save(new User());
 }

}
Card.java

package com.gpdi.test;

/**
 * Card generated by MyEclipse - Hibernate Tools
 */

public class Card  implements java.io.Serializable {
    // Fields   

     private Integer cardid;
     private String cardnum;
     private User user;

    // Constructors

    public User getUser() {
  return user;
 }
 public void setUser(User user) {
  this.user = user;
 }
 /** default constructor */
    public Card() {
    }
    /** full constructor */
    public Card(String cardnum) {
        this.cardnum = cardnum;
    }
    // Property accessors

    public Integer getCardid() {
        return this.cardid;
    }
   
    public void setCardid(Integer cardid) {
        this.cardid = cardid;
    }

    public String getCardnum() {
        return this.cardnum;
    }
   
    public void setCardnum(String cardnum) {
        this.cardnum = cardnum;
    }

}

User.java
package com.gpdi.test;

import java.util.HashSet;
import java.util.Set;

/**
 * User generated by MyEclipse - Hibernate Tools
 */

public class User  implements java.io.Serializable {
    // Fields   

     private Integer userid;
     private String username;
     private Card card;
     //private Set card = new HashSet();

    // Constructors

    public Card getCard() {
  return card;
 }

 public void setCard(Card card) {
  this.card = card;
 }

 /** default constructor */
    public User() {
    }

    /** full constructor */
    public User(String username) {
        this.username = username;
    }

    // Property accessors

    public Integer getUserid() {
        return this.userid;
    }
   
    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public String getUsername() {
        return this.username;
    }
   
    public void setUsername(String username) {
        this.username = username;
    }
}
HibernateSessionFactory.java

package com.gpdi.test;

import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.cfg.Configuration;

/**
 * Configures and provides access to Hibernate sessions, tied to the
 * current thread of execution.  Follows the Thread Local Session
 * pattern, see {@link http://hibernate.org/42.html}.
 */
public class HibernateSessionFactory {

    /**
     * Location of hibernate.cfg.xml file.
     * NOTICE: Location should be on the classpath as Hibernate uses
     * #resourceAsStream style lookup for its configuration file. That
     * is place the config file in a Java package - the default location
     * is the default Java package.<br><br>
     * Examples: <br>
     * <code>CONFIG_FILE_LOCATION = "/hibernate.conf.xml".
     * CONFIG_FILE_LOCATION = "/com/foo/bar/myhiberstuff.conf.xml".</code>
     */
    private static String CONFIG_FILE_LOCATION = "/hibernate.cfg.xml";

    /** Holds a single instance of Session */
 private static final ThreadLocal threadLocal = new ThreadLocal();

    /** The single instance of hibernate configuration */
    private static final Configuration cfg = new Configuration();

    /** The single instance of hibernate SessionFactory */
    private static org.hibernate.SessionFactory sessionFactory;

    /**
     * Returns the ThreadLocal Session instance.  Lazy initialize
     * the <code>SessionFactory</code> if needed.
     *
     *  @return Session
     *  @throws HibernateException
     */
    public static Session currentSession() throws HibernateException {
        Session session = (Session) threadLocal.get();

  if (session == null || !session.isOpen()) {
   if (sessionFactory == null) {
    try {
     cfg.configure(CONFIG_FILE_LOCATION);
     sessionFactory = cfg.buildSessionFactory();
    } catch (Exception e) {
     System.err
       .println("%%%% Error Creating SessionFactory %%%%");
     e.printStackTrace();
    }
   }
   session = (sessionFactory != null) ? sessionFactory.openSession()
     : null;
   threadLocal.set(session);
  }

        return session;
    }

    /**
     *  Close the single hibernate session instance.
     *
     *  @throws HibernateException
     */
    public static void closeSession() throws HibernateException {
        Session session = (Session) threadLocal.get();
        threadLocal.set(null);

        if (session != null) {
            session.close();
        }
    }

    /**
     * Default constructor.
     */
    private HibernateSessionFactory() {
    }

}
Card.hbm.xml

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
    Mapping file autogenerated by MyEclipse - Hibernate Tools
-->
<hibernate-mapping>
    <class name="com.gpdi.test.Card" table="CARD_TEST">
 
        <id name="cardid" type="integer">
            <column name="CARDID" />
            <generator class="foreign" >
            <param name="property">user</param>
            </generator>
        </id>
        <property name="cardnum" type="string">
            <column name="CARDNUM" length="45" not-null="true" />
        </property>
        <!--
        foreign-key="userid"鎸囧畾澶栭敭鍏寵仈鐨勫瓧孌?蹇呴』,涓嶅彲緙哄皯 ,cascade="save-update"鎸囧畾鎬庝箞鎿嶄綔綰ц仈,闈炲繀欏?br />         -->
       <one-to-one name="user" foreign-key="userid" class="com.gpdi.test.User" cascade="save-update"></one-to-one>
    </class>
</hibernate-mapping>

User.hbm.xml
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
    Mapping file autogenerated by MyEclipse - Hibernate Tools
-->
<hibernate-mapping>
    <class name="com.gpdi.test.User" table="USER_TEST">
        <id name="userid" type="integer">
            <column name="USERID" />
            <generator class="increment"/>
        </id>
        <property name="username" type="string">
            <column name="username" length="45" not-null="true" />
        </property>
        <one-to-one name="card" foreign-key="cardid" class="com.gpdi.test.Card" cascade="save-update"></one-to-one>
        <!--
       <set name="card" inverse="true" cascade="all">
        <key column="cardid" />
        <one-to-many class="com.gpdi.test.Card" />
        </set>
         <many-to-one  name="card" class="com.gpdi.test.Card"  insert="true" unique="true" lazy="false">
         <column name="cardid"  length="18"  />
        </many-to-one>
        -->
 
    </class>
</hibernate-mapping>
http://m.tkk7.com/Files/1504/one-to--one.rar


]]>
Hibernate涓瀵瑰鍙屽悜鍏寵仈鍙?qiáng)inverse鐨勪綔鐢╗鏁寸悊鎬葷粨]http://m.tkk7.com/1504/archive/2009/02/22/256095.htmlweesun涓綾抽槼鍏?/dc:creator>weesun涓綾抽槼鍏?/author>Sun, 22 Feb 2009 11:36:00 GMThttp://m.tkk7.com/1504/archive/2009/02/22/256095.htmlhttp://m.tkk7.com/1504/comments/256095.htmlhttp://m.tkk7.com/1504/archive/2009/02/22/256095.html#Feedback0http://m.tkk7.com/1504/comments/commentRss/256095.htmlhttp://m.tkk7.com/1504/services/trackbacks/256095.htmlhttp://m.tkk7.com/Files/1504/Hibernate-onetomany.txt涓涓竴瀵瑰鐨勫畬鏁翠緥瀛?璧勬枡鏉ユ簮緗戠粶,榪涜鏁寸悊.
people琛細(xì){peopleId,name}

address琛細(xì){addressId,peopleId,addressName,codeNumber}

package com.gpdi.test;

import org.hibernate.Session;

import com.gpdi.orm.object.Address;
import com.gpdi.orm.object.People;

public class Testp {

 /**
  * @param args
  */
 public static void main(String[] args)
 {
  People people = new People();
  people.setName("linda");
  Address address = new Address();
  address.setAddressName("yunnan");
  address.setCodeNumber("564123");
  address.setPeople(people);
  people.getAddresses().add(address);
  Session session = HibernateSessionFactory.currentSession();
  session.beginTransaction();
  session.save(people);
  session.getTransaction().commit();

 }

}

People.hbm.xml

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
    Mapping file autogenerated by MyEclipse - Hibernate Tools
-->
<hibernate-mapping>
    <class name="com.gpdi.orm.object.People" table="People">
  <id name="id" column="peopleId" unsaved-value="0" >
  <generator class="increment">
  </generator>
  </id>
  <property name="name" column="name"></property>
  <set name="addresses" cascade="save-update">
  <key column="peopleId" not-null="true" />
  <one-to-many class="com.gpdi.orm.object.Address"/>
  </set>

    </class>
</hibernate-mapping>

People.java

package com.gpdi.orm.object;

import java.util.HashSet;
import java.util.Set;

public class People implements java.io.Serializable
{
 private long id;
 private String name;
 private Set addresses = new HashSet();
 public Set getAddresses() {
  return addresses;
 }
 public void setAddresses(Set addresses) {
  this.addresses = addresses;
 }
 public long getId() {
  return id;
 }
 public void setId(long id) {
  this.id = id;
 }
 public String getName() {
  return name;
 }
 public void setName(String name) {
  this.name = name;
 }

}

Address.hbm.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
    Mapping file autogenerated by MyEclipse - Hibernate Tools
-->
<hibernate-mapping>
    <class name="com.gpdi.orm.object.Address" table="Address">
 <id name="id" column="addressId" unsaved-value="0">
 <generator class="increment">
 </generator>
 </id>
 <many-to-one name="people" column="peopleId" insert="false" update="false"></many-to-one>
 <property name="addressName" column="addressName"></property>
 <property name="codeNumber" column="codeNumber"></property>
    </class>
</hibernate-mapping>

Address.java
package com.gpdi.orm.object;
public class Address implements java.io.Serializable
{
 private long id;
 private People people;
 private String addressName;
 private String codeNumber;
 public String getAddressName() {
  return addressName;
 }
 public void setAddressName(String addressName) {
  this.addressName = addressName;
 }
 public String getCodeNumber() {
  return codeNumber;
 }
 public void setCodeNumber(String codeNumber) {
  this.codeNumber = codeNumber;
 }
 public long getId() {
  return id;
 }
 public void setId(long id) {
  this.id = id;
 }
 public People getPeople() {
  return people;
 }
 public void setPeople(People people) {
  this.people = people;
 }
}
涓嬭澆渚嬪瓙:鏁寸悊鍚?br /> 涓瀵瑰鐨勫畬鏁翠緥瀛?/a>
涓嬭澆渚嬪瓙:鏁寸悊鍓?br />



]]>
AJAX鍜孲truts鐨刟ction浜や簰浣跨敤[鍘熷垱鎬葷粨]http://m.tkk7.com/1504/archive/2009/02/22/256094.htmlweesun涓綾抽槼鍏?/dc:creator>weesun涓綾抽槼鍏?/author>Sun, 22 Feb 2009 11:34:00 GMThttp://m.tkk7.com/1504/archive/2009/02/22/256094.htmlhttp://m.tkk7.com/1504/comments/256094.htmlhttp://m.tkk7.com/1504/archive/2009/02/22/256094.html#Feedback1http://m.tkk7.com/1504/comments/commentRss/256094.htmlhttp://m.tkk7.com/1504/services/trackbacks/256094.html1.璇鋒眰欏甸潰鐨凧S,瀹㈡埛绔疄鐜?br /> <script type="text/javascript">
 var flagvalue=0;
 var rest="";
 var resta="";
 //瀹炵幇AJAX楠岃瘉
 var http_request = false;
 var infoForm_flag=false;
 var lotId="";
function Save()
{
   
      var infoForm=document.projectSetForm;
      infoForm_flag=infoForm;
      lotId=infoForm.lotId.value;
      //琛ㄥ悕縐?br />       var dc = infoForm.tablename.value;
      if(dc==""||dc==null){
       alert("琛ㄥ悕縐頒笉鑳戒負(fù)絀?");
       infoForm.tablename.focus();
       infoForm.tablename.select();
       return false;
 }
function send_request(url)
  {//鍒濆鍖栥佹寚瀹氬鐞嗗嚱鏁般佸彂閫佽姹傜殑鍑芥暟
    http_request = false;
    //寮濮嬪垵濮嬪寲XMLHttpRequest瀵硅薄
    if(window.XMLHttpRequest)
    { //Mozilla 嫻忚鍣?br />       http_request = new XMLHttpRequest();
      if (http_request.overrideMimeType)
      {//璁劇疆MiME綾誨埆
           http_request.overrideMimeType('text/xml');
      }
    }
    else if (window.ActiveXObject)
    { // IE嫻忚鍣?br />       try
      {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
      }
       catch (e)
      {
        try
        {
             http_request = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (e)
        {
        }
      }
    }
    if (!http_request) { // 寮傚父錛屽垱寤哄璞″疄渚嬪け璐?br />      window.alert("涓嶈兘鍒涘緩XMLHttpRequest瀵硅薄瀹炰緥.");
     return false;
    }
    http_request.onreadystatechange = processRequest;
    // 紜畾鍙戦佽姹傜殑鏂瑰紡鍜孶RL浠ュ強(qiáng)鏄惁鍚屾鎵ц涓嬫浠g爜
    http_request.open("GET", url, true);
    http_request.send(null);
  }
     //澶勭悊榪斿洖淇℃伅鐨勫嚱鏁?br />      function processRequest()
     {
         if (http_request.readyState == 4)
         {
             //鍒ゆ柇瀵硅薄鐘舵?br />              if (http_request.status == 200)
             {
                 //淇℃伅宸茬粡鎴愬姛榪斿洖錛屽紑濮嬪鐞嗕俊鎭?br />                  var str=http_request.responseText;//鑾峰緱浠庢湇鍔″櫒榪斿洖鐨勬枃鏈俊鎭?br />                  if(str=="no")
                 {
                     alert("鎮(zhèn)ㄩ夋嫨浜?jiǎn)妯″瀷鍒嗗睘涓嶅悓鐨勬ā鏉?璇烽夋嫨鍚屼竴妯℃澘瀵瑰簲鏄ā鍨?");
                     //return false;
                     infoForm_flag.action="projectSet.do?do=add&lotId="+lotId;
                     infoForm_flag.submit();
                 }
                 else
                 {
                  infoForm_flag.action="projectSet.do?do=creattable&save=-1";
               infoForm_flag.submit();
              }
             } else
             {
                 //欏甸潰涓嶆甯?br />                  alert("鎮(zhèn)ㄦ墍璇鋒眰鐨勯〉闈㈡湁寮傚父銆?);
             }
         }
     }
  function userCheck()
  {
    send_request('projectSet.do?do=check&rest='+rest);
  }
</script>
2.ProjectSetAction.java

package com.gpdi.softevaluate.action;

import java.io.PrintWriter;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import java.util.Iterator;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ProjectSetAction extends DispatchAction
{
         

/**
  * <p>妯℃澘楠岃瘉</p>
  * @param mapping
  * @param form
  * @param request
  * @param response
  * @return
  * @throws Exception
  */
 public ActionForward check(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response)throws Exception
 {
   String rest="";
   String lotId="";
   String retn="";
   String flag="";
   CommDaoFactory mgObj = new CommDaoFactory();
   try
   {
       rest=request.getParameter("rest");
       lotId=request.getParameter("lotId");
   }
   catch(Exception e)
   {
   
   }
if(!rest.equals("0")||!rest.equals("")||rest!=null)
 {
     flag="no";
}
else
{
      flag="ok";

}
       PrintWriter out=response.getWriter();
//鏈嶅姟鍣ㄨ繑鍥炰俊鎭?br />        out.write(flag);
       out.close();
     //璇誨彇鏈珹ction鎵鏈夌殑璇鋒眰鍙傛暟錛屽皢path閲嶆柊鏋勯狅紝鍔犱笂璇鋒眰鍙傛暟

     //ActionForward forward= new ActionForward("project/projectSet.do?do=add&lotId=6");
     //forward.setRedirect(true);
      //浼犲弬鏁板悗榪斿洖
     //return forward;    
    return mapping.findForward(null);
 
 }
public ActionForward creattable(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response)throws Exception
{
     //瀹炵幇鍔熻兘浠g爜
return mapping.findForward("create");
}

}
3.struts.config.xml
 <action attribute="projectSetForm" name="projectSetForm"
    parameter="do" path="/project/projectSet" scope="request"
       type="com.gpdi.softevaluate.action.ProjectSetAction" validate="false">
   <forward name="list" path="/project/viewProject.jsp" />
   <forward name="add" path="/project/addProject.jsp" />
   <forward name="create" path="/project/createTable.jsp" />
  </action>



]]>
鍘繪帀鏁扮粍涓噸澶嶇殑鏁板瓧[鍘熷垱]http://m.tkk7.com/1504/archive/2009/02/22/256093.htmlweesun涓綾抽槼鍏?/dc:creator>weesun涓綾抽槼鍏?/author>Sun, 22 Feb 2009 11:32:00 GMThttp://m.tkk7.com/1504/archive/2009/02/22/256093.htmlhttp://m.tkk7.com/1504/comments/256093.htmlhttp://m.tkk7.com/1504/archive/2009/02/22/256093.html#Feedback0http://m.tkk7.com/1504/comments/commentRss/256093.htmlhttp://m.tkk7.com/1504/services/trackbacks/256093.htmlpublic static ArrayList RemoveRepeatNumber(String[]input)
 {
    ArrayList   arraylist=new   ArrayList();  
    int k=0;
    for(int i = 0;i<input.length;i++)  
    {  
     boolean exist=true;  
     for(int j=0;j<arraylist.size();j++)  
     {  
      if(arraylist.get(j).toString().equals(input[i]) ) 
      {  
       exist=false;  
       break;  
      }  
     }  
     if(exist)
     {
         arraylist.add(k,input[i]); 
         k+=1;
     }
    } 
    return arraylist;
 }
 public static void main(String[]args)
 {
  String []st={"30","30","29"};
  ArrayList str =RemoveRepeatNumber(st);
  for(int i=0;i<str.size();i++)
  {
   System.out.println(str.get(i));
  }
 }

]]>
鍒ゆ柇鏁扮粍涓槸鍚︽湁閲嶅鏄暟瀛梉鍘熷垱]http://m.tkk7.com/1504/archive/2009/02/22/256092.htmlweesun涓綾抽槼鍏?/dc:creator>weesun涓綾抽槼鍏?/author>Sun, 22 Feb 2009 11:32:00 GMThttp://m.tkk7.com/1504/archive/2009/02/22/256092.htmlhttp://m.tkk7.com/1504/comments/256092.htmlhttp://m.tkk7.com/1504/archive/2009/02/22/256092.html#Feedback0http://m.tkk7.com/1504/comments/commentRss/256092.htmlhttp://m.tkk7.com/1504/services/trackbacks/256092.htmlpublic static boolean judgeEqual(String[]model)
 {
  /**鏃犻噸澶嶄負(fù)false,鏈夐噸澶嶄負(fù)true*/
  boolean flag=false;
  Set  set  =  new  HashSet(); 
  for(int  i  =  0;i<model.length;i++)
  { 
     if(!model[0].equals(model[i]))
     {
      flag=false;
     }
     else
     {
      flag=true;
     }
  } 
  
  return flag;
 }
 public static void main(String[]args)
 {
       String[] s  = {"1","1","1","1","1"};  
      System.out.println(judgeEqual(s));
 }


]]>
checkbox澶氶塠鎬葷粨]http://m.tkk7.com/1504/archive/2009/02/22/256090.htmlweesun涓綾抽槼鍏?/dc:creator>weesun涓綾抽槼鍏?/author>Sun, 22 Feb 2009 11:27:00 GMThttp://m.tkk7.com/1504/archive/2009/02/22/256090.htmlhttp://m.tkk7.com/1504/comments/256090.htmlhttp://m.tkk7.com/1504/archive/2009/02/22/256090.html#Feedback0http://m.tkk7.com/1504/comments/commentRss/256090.htmlhttp://m.tkk7.com/1504/services/trackbacks/256090.html1.
<td width="5%" class=content><div align="center">鍏ㄩ?lt;input type=checkbox name = "check" onclick = "javascript:allcheck();"></div></td>
2.   
 <td width=5%>
       <div align="center">
        <input type="checkbox" name="checkboxDelete"
         value="<bean:write name="po" property="projectid" />">
       </div>
      </td>

js浠g爜:
 <script language="javascript">
 var tag = false;
function doDelete()
{
 if(deletecheck())
 {
     var theForm=document.projectSetForm;
  theForm.action = "projectSet.do?do=delete&lotId=<%=request.getParameter("lotId") %>";
  theForm.submit();
 
 }
}
function deletecheck()
{
 var theForm = document.projectSetForm;
 var checked = false;
 if(typeof(theForm.checkboxDelete.length)=="undefined"){
  if(theForm.checkboxDelete.checked == true){
  checked = true;
  }
 }else{
 var len = theForm.checkboxDelete.length;
 for (var i=0;i<len;i++){
  if(theForm.checkboxDelete[i].checked == true){
  checked = true;
  break;
  }
   }
 }
 if(!checked){
 alert("璇瘋嚦灝戦夋嫨涓鏉¤鍒犻櫎鐨勮褰曪紒")
 return(false);
 }
 
 if(confirm("紜畾瑕佸垹闄ゅ悧錛?)){
  return(true);
  }
 return(false);
}
function allcheck(){
 var theForm = document.projectSetForm;
 var len = theForm.checkboxDelete.length;
 var i = 0
 if (tag == false)
  for (i=0;i<len;i++){
   theForm.checkboxDelete[i].checked = true;
   tag = true;
   }
  
 else{
  for ( i=0;i<len;i++){
   theForm.checkboxDelete[i].checked = false;
   tag = false;
  }
 }
}
</script>



]]>
JSP瀹炵幇EXCEL瀵煎嚭[鎬葷粨鍘熷垱]http://m.tkk7.com/1504/archive/2009/02/22/256089.htmlweesun涓綾抽槼鍏?/dc:creator>weesun涓綾抽槼鍏?/author>Sun, 22 Feb 2009 11:27:00 GMThttp://m.tkk7.com/1504/archive/2009/02/22/256089.htmlhttp://m.tkk7.com/1504/comments/256089.htmlhttp://m.tkk7.com/1504/archive/2009/02/22/256089.html#Feedback0http://m.tkk7.com/1504/comments/commentRss/256089.htmlhttp://m.tkk7.com/1504/services/trackbacks/256089.html1.JSP欏甸潰
<td width=165>
<div align="left">
<!-- 娣誨姞  2008-04-11 16:42 -->
<bean:define id="scoreId" name='Info' property='scoreId' /> 
<a href="scoreSet.do?do=importScore&scoreid=<%=scoreId%>" target="scoreexel">緇熻瀵煎嚭</a> 
<!--
<html:link action="softevaluate/scoreSet.do?do=setScore" paramName="Info" paramProperty="scoreId" paramId="scoreId">
鍙傛暟璁劇疆
</html:link>
<!-- 
<a href="scoreOperation.do?do=scoreSetE&scoreid=<%=scoreId%>" target="scoreexel">緇熻瀵煎嚭</a>   
<a href="scoreOperation.do?do=scoreSetE&scoreid=<%=scoreId%>">緇熻瀵煎嚭</a>
<a href="softevaluate/scoreSet.do?do=setScore">緇熻瀵煎嚭</a>
-->
</div>
</td> 
2.ScoreSetAction.java
public class ScoreSetAction extends DispatchAction
{
         /******瀹炵幇EXCEL鏁版嵁瀵煎嚭*******/
  public ActionForward importScore(ActionMapping mapping, ActionForm form,HttpServletRequest request,HttpServletResponse response)throws Exception
  {
 
   // 瀵煎嚭鏁版嵁綾誨瀷錛屾澶勬槸鍐欐鐨勪負(fù)3銆?br />    String scoreid = request.getParameter("scoreid");
   String []str=new String[3];
   scoreid=scoreid.replace("/", "");
   String maxscore = "";
   String minscore = "";

   ScoreSetExport scoreSetExport = new ScoreSetExport();
   LinkedHashMap hm = new LinkedHashMap();
   SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
   org.hibernate.classic.Session session = sessionFactory.openSession();
   Query query =session.createQuery("from ScoreViable");
   List users=query.list();
   session.close();
   sessionFactory.close();
   for (ListIterator iterator = users.listIterator(); iterator.hasNext(); )
   {
    ScoreViable user = (ScoreViable) iterator.next();
    System.out.println(user.getBeforCount() +"\n\tAge: " + user.getEndCount());
    maxscore=user.getBeforCount()+"";
    minscore=user.getEndCount()+"";
   }
   str[0]=scoreid;
   str[1]=maxscore;
   str[2]=minscore;
   List<ScoreRecordDetail> list = scoreSetExport.exportScoreSet(str,hm);
   ExcelManagerIf eem = ExcelManagerFactory.getInstance();
   /******************************************************************/
   /**涓嶅幓鎺変竴琛屼粛鐒惰皟鐢╡xport,鍘繪帀涓琛岃皟鐢╡xport1,鍙拡瀵逛竴縐嶆眹鎬誨鍑?/
   //eem.export(response, list,hm);
   eem.export1(response, list,hm);
   /******************************************************************/
   return null;
  }
}
3.ExcelManagerIf.java
import java.io.InputStream;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;

import javax.servlet.http.HttpServletResponse;

import com.gpdi.orm.object.ScoreRecordDetail;

public interface ExcelManagerIf
{
 
 /********************************************************************************************************/
 /** 2008-04-18 11:54*/
 public boolean export1(HttpServletResponse response, List<ScoreRecordDetail> list,LinkedHashMap hashMap);
 /********************************************************************************************************/
 
}
4.ExcelManagerFactory.java
public class ExcelManagerFactory
 {
   private static String key = "key";
   private ExcelManagerFactory() {
   }
  
   private static ExcelManagerIf instance = null;
   public static ExcelManagerIf getInstance(){
    if(instance == null){
             synchronized(key){
                 if(instance == null){
                     instance = new ExcelManagerImpl();
                 }
             }
         }
         return instance;
   }
}
5.ExcelManagerImpl.java
import javax.servlet.http.HttpServletResponse;

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFDataFormat;
import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.usermodel.HSSFFooter;
import org.apache.poi.hssf.usermodel.HSSFHeader;
import org.apache.poi.hssf.usermodel.HSSFPalette;
import org.apache.poi.hssf.usermodel.HSSFPrintSetup;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.hssf.util.Region;
import org.hibernate.Query;
import org.hibernate.ScrollableResults;
import org.hibernate.Session;

 

public class ExcelManagerImpl implements ExcelManagerIf
{
         /***************************************************************************************************************/
/**2008-04-18 11:36   姹囨誨鍑哄幓鎺夋棤鐢ㄧ殑絀烘牸*/
 public boolean export1(HttpServletResponse response, List<ScoreRecordDetail> list,LinkedHashMap hashMap) {
  Session session = null;
  try {
   // 鐢熸垚鐢?shù)瀛愯〃鏍兼枃錃g
   HSSFWorkbook wb = new HSSFWorkbook();
   // 閫氳繃鍏堝緩绔嬭〃鏍鹼紝鍚庡懡鍚嶅彲浠ュ畾涔変嬌鐢ㄧ殑緙栫爜錛屼粠鑰屼繚璇佹眽瀛楃殑姝e父鏄劇ず
   HSSFSheet sheet1 = wb.createSheet();
   /********************************************/
   /**娣誨姞 2008-04-15瀵煎嚭鎵撳嵃榛樿鏂瑰紡,true錛氭í鍚?nbsp;    false錛氱旱鍚?/
   sheet1.getPrintSetup().setLandscape(true);  
   /********************************************/
   sheet1.setColumnWidth((short) 0, (short) 5000);
   sheet1.setColumnWidth((short) 1, (short) 5000);
   sheet1.setColumnWidth((short) 2, (short) 5000);
   sheet1.setColumnWidth((short) 3, (short) 5000);
   // wb.setSheetName(0, "寮鍙戝晢璧勬枡",HSSFWorkbook.ENCODING_UTF_16);

   // HSSFRow row;

   // 鍏堝畾涔変竴涓瓧浣撳璞?br />    HSSFFont font = wb.createFont();
   font.setFontName("瀹嬩綋");
   font.setFontHeightInPoints((short) 16);// 瀛椾綋澶у皬
   font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);// 鍔犵矖

   // 瀹氫箟琛ㄥご鍗曞厓鏍兼牸寮?br />    HSSFCellStyle cellStyle = wb.createCellStyle();
   cellStyle.setFont(font);// 鍗曞厓鏍煎瓧浣?br />    cellStyle.setBorderBottom(cellStyle.BORDER_THIN);// 鍗曞厓鏍艱竟妗?br />    cellStyle.setBorderTop(cellStyle.BORDER_THIN);
   cellStyle.setBorderRight(cellStyle.BORDER_THIN);
   cellStyle.setBorderLeft(cellStyle.BORDER_THIN);
   cellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER); // 姘村鉤瀵歸綈鏂瑰紡

   // 瀹氫箟鏂扮殑璋冭壊鏉夸互渚垮畾涔夎嚜宸辯殑棰滆壊
   HSSFPalette palette = wb.getCustomPalette();
   // 鏇挎崲涓涓粯璁よ皟鑹叉澘涓凡緇忓畾涔夌殑棰滆壊
   palette.setColorAtIndex(HSSFColor.BLUE_GREY.index, (byte) 230, (byte) 230, (byte) 255);
   // 浣跨敤鍒氭墠瀹氫箟鐨勯鑹蹭負(fù)濉厖鑹?br />    cellStyle.setFillForegroundColor(HSSFColor.BLUE_GREY.index);
   cellStyle.setFillPattern((short) HSSFCellStyle.SOLID_FOREGROUND);

   // 鍐欏叆琛ㄥご
   HSSFCell c;

   // String[] headerName = (String[]) aHeaderName.get(type);
   int[] maxLen = new int[4];
   int maxCol = list.size() + 3;
   ScoreRecordDetail first = list.get(0);
   Long scoreId = first.getScoreRecord().getScoreid();

   session = HibernateSessionFactory.getCurrentSession();

   ScoreSet scoreSet = (ScoreSet) session.createQuery("from ScoreSet where scoreid = :scoreid").setLong("scoreid",
     scoreId).uniqueResult();
   String titleName = scoreSet.getScoreLot().getLotName() + "-" + scoreSet.getScoreModel().getScoremodelname();
   //杈撳嚭鏂囦歡鍚嶈惤瀛欏北
   String outFileName = scoreSet.getScoreModel().getScoremodelname();

   // 鍦ㄨ〃鍗曚腑鏂板緩0琛?br />    HSSFRow row0 = sheet1.createRow((short) 0);
   row0.setHeight((short) 600);
   c = row0.createCell((short) 0);
   HSSFCellStyle cellStyle0 = wb.createCellStyle();
   cellStyle0.setFont(font);// 鍗曞厓鏍煎瓧浣?
   cellStyle0.setAlignment(HSSFCellStyle.ALIGN_CENTER); // 姘村鉤瀵歸綈鏂瑰紡
   cellStyle0.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);

   cellStyle0.setBorderBottom(cellStyle.BORDER_THIN);// 鍗曞厓鏍艱竟妗?br />    cellStyle0.setBorderTop(cellStyle.BORDER_THIN);
   cellStyle0.setBorderRight(cellStyle.BORDER_THIN);
   cellStyle0.setBorderLeft(cellStyle.BORDER_THIN);

   c.setCellStyle(cellStyle0);// 鍗曞厓鏍肩殑鏍峰紡
   c.setEncoding(HSSFCell.ENCODING_UTF_16);// 緙栫爜
   c.setCellValue(titleName);// 鍗曞厓鏍煎?br />    sheet1.addMergedRegion(new Region(0, (short) 0, 0, (short) (maxCol-1)));

   // 鍦ㄨ〃鍗曚腑鏂板緩1琛?br />    /**
   HSSFRow row1 = sheet1.createRow((short) 1);
   row1.setHeight((short) 700);
   c = row1.createCell((short) 0);
   HSSFCellStyle cellStyle1 = wb.createCellStyle();
   cellStyle1.setAlignment(HSSFCellStyle.ALIGN_LEFT); // 姘村鉤瀵歸綈鏂瑰紡
   cellStyle1.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);

   cellStyle1.setBorderBottom(cellStyle.BORDER_THIN);// 鍗曞厓鏍艱竟妗?br />    cellStyle1.setBorderTop(cellStyle.BORDER_THIN);
   cellStyle1.setBorderRight(cellStyle.BORDER_THIN);
   cellStyle1.setBorderLeft(cellStyle.BORDER_THIN);

   c.setCellStyle(cellStyle1);// 鍗曞厓鏍肩殑鏍峰紡
   c.setEncoding(HSSFCell.ENCODING_UTF_16);// 緙栫爜
   c.setCellValue("璇勬爣涓撳絳懼瓧錛?);// 鍗曞厓鏍煎?/span>

   c = row1.createCell((short) 1);
   c.setCellStyle(cellStyle1);// 鍗曞厓鏍肩殑鏍峰紡

   c = row1.createCell((short) 2);
   c.setCellStyle(cellStyle1);// 鍗曞厓鏍肩殑鏍峰紡
   c.setEncoding(HSSFCell.ENCODING_UTF_16);// 緙栫爜
   c.setCellValue("鏃ユ湡錛?);// 鍗曞厓鏍煎?/span>

   c = row1.createCell((short) 3);
   c.setCellStyle(cellStyle1);// 鍗曞厓鏍肩殑鏍峰紡
   c.setEncoding(HSSFCell.ENCODING_UTF_16);// 緙栫爜
   SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
   c.setCellValue(sdf.format(new Date()));// 鍗曞厓鏍煎?br />             */
   // 鍦ㄨ〃鍗曚腑鏂板緩2琛?br />    HSSFRow row2 = sheet1.createRow((short) 1);
   row2.setHeight((short) 600);

   HSSFCellStyle cellStyle2 = wb.createCellStyle();
   cellStyle2.setAlignment(HSSFCellStyle.ALIGN_CENTER); // 姘村鉤瀵歸綈鏂瑰紡
   cellStyle2.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
   cellStyle2.setFillBackgroundColor(HSSFColor.AQUA.index);

   cellStyle2.setBorderBottom(cellStyle.BORDER_THIN);// 鍗曞厓鏍艱竟妗?br />    cellStyle2.setBorderTop(cellStyle.BORDER_THIN);
   cellStyle2.setBorderRight(cellStyle.BORDER_THIN);
   cellStyle2.setBorderLeft(cellStyle.BORDER_THIN);

   
   
   c = row2.createCell((short) 0);
   c.setCellStyle(cellStyle2);// 鍗曞厓鏍肩殑鏍峰紡
   c.setEncoding(HSSFCell.ENCODING_UTF_16);// 緙栫爜
   c.setCellValue("涓撳鍚嶇О");// 鍗曞厓鏍煎?br />    /*****************************************************************/
   sheet1.addMergedRegion(new Region(1, (short) 0, 1, (short) 1));
   //sheet1.addMergedRegion(new Region(2, (short) 0, 2, (short) 1));
   /*****************************************************************/

   row2.setHeight((short) 400);
   c = row2.createCell((short) 1);
   c.setCellStyle(cellStyle2);// 鍗曞厓鏍肩殑鏍峰紡
   c.setEncoding(HSSFCell.ENCODING_UTF_16);// 緙栫爜
   //c.setCellValue("欏圭洰");// 鍗曞厓鏍煎?/span>

   row2.setHeight((short) 400);
   c = row2.createCell((short) 2);
   c.setCellStyle(cellStyle2);// 鍗曞厓鏍肩殑鏍峰紡
   c.setEncoding(HSSFCell.ENCODING_UTF_16);// 緙栫爜
   c.setCellValue("鍒嗗?);// 鍗曞厓鏍煎?/span>

   //c = row2.createCell((short) 3);
   //c.setCellStyle(cellStyle2);// 鍗曞厓鏍肩殑鏍峰紡
   
   //閲嶅琛?br />    int rows=0;
   if(hashMap!=null){
    int j=0;
    
    HSSFRow[]  row_repeat= null;
    for (Iterator iterator = hashMap.values().iterator(); iterator.hasNext();) {
     Map map= (LinkedHashMap) iterator.next();     
     rows =map.size();
     row_repeat=new HSSFRow[map.size()];
     for(int i=0;i<rows;i++){
      /****************************************************/
      row_repeat[i] = sheet1.createRow((short) (2+i));
      //row_repeat[i] = sheet1.createRow((short) (3+i));
      /****************************************************/
      row_repeat[i].setHeight((short) 400);      
     }
     break;
    }
    
    for (Iterator iterator = hashMap.values().iterator(); iterator.hasNext();) {
     Map map= (LinkedHashMap) iterator.next();     
     int i=0;
     for (Iterator iter_key = map.keySet().iterator(); iter_key.hasNext();) {
      SysUser sysUser = (SysUser) iter_key.next();
      if(j==0){
       c = row_repeat[i].createCell((short) 0);
       c.setCellStyle(cellStyle2);// 鍗曞厓鏍肩殑鏍峰紡
       c.setEncoding(HSSFCell.ENCODING_UTF_16);// 緙栫爜
       c.setCellValue(sysUser.getUsername());// 鍗曞厓鏍煎?br />        /******************************************************************/
       sheet1.addMergedRegion(new Region(2+i, (short) 0, 2+i, (short) 1));
       //sheet1.addMergedRegion(new Region(3+i, (short) 0, 3+i, (short) 1)); 
       /******************************************************************/
       
       c = row_repeat[i].createCell((short) 1);
       c.setCellStyle(cellStyle2);// 鍗曞厓鏍肩殑鏍峰紡
  
       c = row_repeat[i].createCell((short) 2);
       c.setCellStyle(cellStyle2);// 鍗曞厓鏍肩殑鏍峰紡
       c.setEncoding(HSSFCell.ENCODING_UTF_16);// 緙栫爜
       c.setCellValue("40");// 鍗曞厓鏍煎?br />       }
      
      c = row_repeat[i].createCell((short) (3+j));      
      c.setCellStyle(cellStyle2);// 鍗曞厓鏍肩殑鏍峰紡
      c.setCellType(HSSFCell.CELL_TYPE_NUMERIC);//鏁板瓧鍨?br />       c.setEncoding(HSSFCell.ENCODING_UTF_16);// 緙栫爜
      
      c.setCellValue(Double.parseDouble(map.get(sysUser).toString()));// 鍗曞厓鏍煎?nbsp;     
      i++;
     }
     
     j++;
    }
   }

   // 鍦ㄨ〃鍗曚腑鏂板緩3琛?br />    /************************************************/
   HSSFRow row3 = sheet1.createRow((short) (2+rows));
   //HSSFRow row3 = sheet1.createRow((short) (3+rows));
   /************************************************/
   row3.setHeight((short) 400);

   c = row3.createCell((short) 0);
   c.setCellStyle(cellStyle2);// 鍗曞厓鏍肩殑鏍峰紡
   c.setEncoding(HSSFCell.ENCODING_UTF_16);// 緙栫爜
   c.setCellValue(scoreSet.getScoreModel().getScoremodelname() + " 璇勫垎");// 鍗曞厓鏍煎?br />    /******************************************************************************/
   //sheet1.addMergedRegion(new Region((3+rows), (short) 0,(3+rows), (short) 1));
   sheet1.addMergedRegion(new Region((2+rows), (short) 0,(2+rows), (short) 1));
   /******************************************************************************/

   c = row3.createCell((short) 1);
   c.setCellStyle(cellStyle2);// 鍗曞厓鏍肩殑鏍峰紡

   c = row3.createCell((short) 2);
   c.setCellStyle(cellStyle2);// 鍗曞厓鏍肩殑鏍峰紡
   c.setEncoding(HSSFCell.ENCODING_UTF_16);// 緙栫爜
   c.setCellValue("40");// 鍗曞厓鏍煎?/span>


   for (int i = 0; i < list.size(); i++) {

    sheet1.setColumnWidth((short) (i + 3), (short) 5000);

    ScoreRecordDetail o = list.get(i);
    String name = "";
    if (o.getDevelopid() != null) {
     BasDevelop basDevelop = (BasDevelop) session.createQuery("from BasDevelop where developid = :developid")
       .setLong("developid", o.getDevelopid()).uniqueResult();
     name = basDevelop.getDename();
    } else {
     ProductType productType = (ProductType) session.createQuery("from ProductType where productid = :productid")
       .setLong("productid", o.getProductid()).uniqueResult();
     name = productType.getProdname();
    }
/****************************************************************************/
    //c = row1.createCell((short) (i + 3));
    //c.setCellStyle(cellStyle1);// 鍗曞厓鏍肩殑鏍峰紡
/****************************************************************************/

    c = row2.createCell((short) (i + 3));
    c.setCellStyle(cellStyle2);// 鍗曞厓鏍肩殑鏍峰紡
    c.setEncoding(HSSFCell.ENCODING_UTF_16);// 緙栫爜
    c.setCellValue(name);// 鍗曞厓鏍煎?/font>

    c = row3.createCell((short) (i + 3));
    c.setCellStyle(cellStyle2);// 鍗曞厓鏍肩殑鏍峰紡
    c.setEncoding(HSSFCell.ENCODING_UTF_16);// 緙栫爜
    c.setCellType(HSSFCell.CELL_TYPE_NUMERIC);//鏁板瓧鍨?br />     c.setCellValue(o.getScore());// 鍗曞厓鏍煎?br />    }

   // 杈撳嚭Excel鏂囦歡
   errorOrExportExcel(response, wb, 2 ,outFileName);

  } catch (Exception e) {
   e.printStackTrace();
  }
  return false;
 }
 //緇撴潫
/***************************************************************************************************************/
}


]]>
鐐瑰嚮琛ㄥご鎺掑簭[鏁寸悊鎬葷粨]http://m.tkk7.com/1504/archive/2009/02/22/256088.htmlweesun涓綾抽槼鍏?/dc:creator>weesun涓綾抽槼鍏?/author>Sun, 22 Feb 2009 11:25:00 GMThttp://m.tkk7.com/1504/archive/2009/02/22/256088.htmlhttp://m.tkk7.com/1504/comments/256088.htmlhttp://m.tkk7.com/1504/archive/2009/02/22/256088.html#Feedback0http://m.tkk7.com/1504/comments/commentRss/256088.htmlhttp://m.tkk7.com/1504/services/trackbacks/256088.html銆?銆戣繖涓潪甯稿ソ鐢紝
<head>
<script type="text/javascript" src="sortabletable.js"></script>
<link type="text/css" rel="StyleSheet" href="sortabletable.css" />
</head>
鍦?lt;head></head>涔嬮棿鍔犲叆
銆?銆?lt;table class="sort-table" id="table-1" cellspacing="0">
瑕佹帓搴忕殑琛ㄤ腑瑕佸姞鍏?id="table-1"
銆?銆?lt;thead>
  <tr>
   <td>String</td>
   <td title="CaseInsensitiveString">String</td>
   <td>Number</td>
   <td>Date</td>
   <td>No Sort</td>
  </tr>
</thead>
鐐瑰嚮鐨勮〃澶翠箣闂村姞鍏?lt;thead></thead>
鍓╀笅鐨勪箣闂村姞鍏?lt;tbody></tbody>
<tbody>
  <tr>
   <td>apple</td>
   <td>Strawberry</td>
   <td>45</td>
   <td>2001-03-13</td>
   <td>Item 0</td>
  </tr>
  <tr>
   <td>Banana</td>
   <td>orange</td>
   <td>7698</td>
   <td>1789-07-14</td>
   <td>Item 1</td>
  </tr>
  <tr>
   <td>orange</td>
   <td>Banana</td>
   <td>4546</td>
   <td>1949-07-04</td>
   <td>Item 2</td>
  </tr>
 </tbody>
銆?銆?/span>
</table>
<script type="text/javascript">
var st1 = new SortableTable(document.getElementById("table-1"),
 ["String", "CaseInsensitiveString", "Number", "Date", "None"]);
</script>

浠g爜涓嬭澆http://m.tkk7.com/Files/1504/sorts.rar


]]>
JAVA鍥涜垗浜斿叆(灝忔暟鐐瑰悗淇濈暀涓や綅鏁板瓧)[鑷繁鎬葷粨]http://m.tkk7.com/1504/archive/2009/02/22/256087.htmlweesun涓綾抽槼鍏?/dc:creator>weesun涓綾抽槼鍏?/author>Sun, 22 Feb 2009 11:23:00 GMThttp://m.tkk7.com/1504/archive/2009/02/22/256087.htmlhttp://m.tkk7.com/1504/comments/256087.htmlhttp://m.tkk7.com/1504/archive/2009/02/22/256087.html#Feedback1http://m.tkk7.com/1504/comments/commentRss/256087.htmlhttp://m.tkk7.com/1504/services/trackbacks/256087.htmlpublic String getFourToFive(double score_type)
 {
  double bl=(Math.round(score_type/.01)*.01);
  String st=String.valueOf(bl);
  /**娉ㄦ剰,榪欓噷鐢?浣滀負(fù)鍒嗛殧絎︽槸澶辨晥鐨?涓嶇煡閬撲負(fù)浠涔?鎵浠ラ噰鐢ㄦ浛鎹㈢殑鍔炴硶*/
  st=st.replace(".", "_");
  String []st_arr=st.split("_");
  String temp="";
  if(st_arr[1].length()>2)
  {
   temp=st_arr[1].substring(0, 2);
  }
  else
  if(st_arr[1].length()<2)
  {
   temp=st_arr[1]+"0";
  }
  else
  {
   temp=st_arr[1];
  }
  return st_arr[0]+"."+temp;
 }


weesun涓綾抽槼鍏?/a> 2009-02-22 19:23 鍙戣〃璇勮
]]>
瀹為檯欏圭洰涓敤鍒扮殑宸ュ巶妯″紡[鑷繁鎬葷粨]http://m.tkk7.com/1504/archive/2009/02/22/256086.htmlweesun涓綾抽槼鍏?/dc:creator>weesun涓綾抽槼鍏?/author>Sun, 22 Feb 2009 11:22:00 GMThttp://m.tkk7.com/1504/archive/2009/02/22/256086.htmlhttp://m.tkk7.com/1504/comments/256086.htmlhttp://m.tkk7.com/1504/archive/2009/02/22/256086.html#Feedback0http://m.tkk7.com/1504/comments/commentRss/256086.htmlhttp://m.tkk7.com/1504/services/trackbacks/256086.html1.ExcelManagerFactory
package com.factory;

public class ExcelManagerFactory {
   private static String key = "key";
   private ExcelManagerFactory() {
   }
  
   private static ExcelManagerIf instance = null;
   public static ExcelManagerIf getInstance(){
    if(instance == null){
             synchronized(key){
                 if(instance == null){
                     instance = new ExcelManagerImpl();
                 }
             }
         }
         return instance;
   }
}

2.澹版槑涓涓帴鍙?/span>

package com.factory;

import java.io.InputStream;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;

import javax.servlet.http.HttpServletResponse;

import com.gpdi.orm.object.ScoreRecordDetail;

public interface ExcelManagerIf {
 
 public boolean export(HttpServletResponse response, List<ScoreRecordDetail> list,LinkedHashMap hashMap);
 /********************************************************************************************************/
 public boolean export1(HttpServletResponse response,List list,LinkedHashMap hashMap);
 /********************************************************************************************************/

 

}
3.瀹炵幇鎺ュ彛鐨勭被


package com.factory;

import java.io.IOException;

 


public class ExcelManagerImpl implements ExcelManagerIf
{
         public boolean export1(HttpServletResponse response, List list,LinkedHashMap hashMap)
         {
                    //瀹炵幇鍏蜂綋鍔熻兘鐨勪唬鐮佸疄鐜?br />          }
}
4.璋冪敤
  HttpServletResponse response=null;
  LinkedHashMap hm = new LinkedHashMap();
  List list = Object.getList();
   ExcelManagerIf eem = ExcelManagerFactory.getInstance();
   /******************************************************************/
   eem.export(response, list,hm);

 



]]>
Collection-鐢ㄥ嚑琛屼唬鐮佸疄鐜版帓搴廩杞琞http://m.tkk7.com/1504/archive/2009/02/22/256085.htmlweesun涓綾抽槼鍏?/dc:creator>weesun涓綾抽槼鍏?/author>Sun, 22 Feb 2009 11:20:00 GMThttp://m.tkk7.com/1504/archive/2009/02/22/256085.htmlhttp://m.tkk7.com/1504/comments/256085.htmlhttp://m.tkk7.com/1504/archive/2009/02/22/256085.html#Feedback1http://m.tkk7.com/1504/comments/commentRss/256085.htmlhttp://m.tkk7.com/1504/services/trackbacks/256085.html闃呰鍏ㄦ枃

]]>
Apache+Tomcat璐熻澆鍧囪 闆嗙兢銆愭暣鐞嗗鐢ㄣ?/title><link>http://m.tkk7.com/1504/archive/2009/02/22/256084.html</link><dc:creator>weesun涓綾抽槼鍏?/dc:creator><author>weesun涓綾抽槼鍏?/author><pubDate>Sun, 22 Feb 2009 11:20:00 GMT</pubDate><guid>http://m.tkk7.com/1504/archive/2009/02/22/256084.html</guid><wfw:comment>http://m.tkk7.com/1504/comments/256084.html</wfw:comment><comments>http://m.tkk7.com/1504/archive/2009/02/22/256084.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://m.tkk7.com/1504/comments/commentRss/256084.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/1504/services/trackbacks/256084.html</trackback:ping><description><![CDATA[<p><font size="2">鍥犱負(fù)寰堝欏圭洰涓細(xì)鐢ㄥ埌Apache+Tomcat璐熻澆鍧囪 鍜岄泦緹わ紝鏈榪戠爺絀朵簡(jiǎn)涓涓嬶紝灝嗗績(jī)寰楃暀涓嬶紝浠ュ鍚庣敤銆?br /> <a href="/Files/1504/apache_tomcat.rar">/Files/1504/apache_tomcat.rar</a><br /> <br /> 2010-03-28閲嶆柊鏁寸悊</font></p> <img src ="http://m.tkk7.com/1504/aggbug/256084.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/1504/" target="_blank">weesun涓綾抽槼鍏?/a> 2009-02-22 19:20 <a href="http://m.tkk7.com/1504/archive/2009/02/22/256084.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Hibernate澶氬澶氬弻鍚戝叧鑱旀槧灝勩愯漿甯栥?/title><link>http://m.tkk7.com/1504/archive/2009/02/22/256083.html</link><dc:creator>weesun涓綾抽槼鍏?/dc:creator><author>weesun涓綾抽槼鍏?/author><pubDate>Sun, 22 Feb 2009 11:17:00 GMT</pubDate><guid>http://m.tkk7.com/1504/archive/2009/02/22/256083.html</guid><wfw:comment>http://m.tkk7.com/1504/comments/256083.html</wfw:comment><comments>http://m.tkk7.com/1504/archive/2009/02/22/256083.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/1504/comments/commentRss/256083.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/1504/services/trackbacks/256083.html</trackback:ping><description><![CDATA[<span style="font-size: 10pt;">杞嚜錛歨ttp://blog.csdn.net/thinkGhoster/archive/2007/10/24/1841584.aspx<br />          Hibernate澶氬澶氬弻鍚戝叧鑱旀槧灝?</span> <p><span style="font-size: 10pt;">1銆佹暟鎹簱緇撴瀯</span></p> <p><span style="font-size: 10pt;">       category琛細(xì){ categoryId , categoryName }</span></p> <p><span style="font-size: 10pt;">       item琛細(xì){ itemId , itemName }</span></p> <p><span style="font-size: 10pt;">       category_item琛細(xì){ idCategory , idItem}</span></p> <p><span style="font-size: 10pt;">2銆丆ategory.hbm.xml</span></p> <div style="border-left-color: windowtext; padding-top: 4px; padding-right: 5.4pt; padding-bottom: 4px; padding-left: 5.4pt; background-image: none; background-repeat: repeat; background-attachment: scroll; background-color: #e6e6e6; width: 95%; background-position: 0% 0%; "> <div><span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: #0000ff;"><</span><span style="color: #800000;">hibernate-mapping</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"><</span><span style="color: #800000;">class </span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="com.persistent.Category"</span><span style="color: #ff0000;"> table</span><span style="color: #0000ff;">="category"</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"><</span><span style="color: #800000;">id </span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="id"</span><span style="color: #ff0000;"> column</span><span style="color: #0000ff;">="categoryId"</span><span style="color: #ff0000;"> unsaved-value</span><span style="color: #0000ff;">="null"</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />            </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"><</span><span style="color: #800000;">generator </span><span style="color: #ff0000;">class</span><span style="color: #0000ff;">="increment"</span><span style="color: #0000ff;">></</span><span style="color: #800000;">generator</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"></</span><span style="color: #800000;">id</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"><</span><span style="color: #800000;">property </span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="name"</span><span style="color: #ff0000;"> column</span><span style="color: #0000ff;">="categoryName"</span><span style="color: #0000ff;">></</span><span style="color: #800000;">property</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"><</span><span style="color: #800000;">set </span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="items"</span><span style="color: #ff0000;"> table</span><span style="color: #0000ff;">="category_item"</span><span style="color: #ff0000;"> cascade</span><span style="color: #0000ff;">="all"</span><span style="color: #ff0000;"> lazy</span><span style="color: #0000ff;">="false"</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />            </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"><</span><span style="color: #800000;">key </span><span style="color: #ff0000;">column</span><span style="color: #0000ff;">="idCategory"</span><span style="color: #0000ff;">></</span><span style="color: #800000;">key</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />            </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"><</span><span style="color: #800000;">many-to-many </span><span style="color: #ff0000;">class</span><span style="color: #0000ff;">="com.persistent.Item"</span><span style="color: #ff0000;"> column</span><span style="color: #0000ff;">="idItem"</span><span style="color: #0000ff;">></</span><span style="color: #800000;">many-to-many</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"></</span><span style="color: #800000;">set</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"></</span><span style="color: #800000;">class</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"></</span><span style="color: #800000;">hibernate-mapping</span><span style="color: #0000ff;">></span></span></div> </div> <p><span style="font-size: 10pt;">3銆両tem.hbm.xml</span></p> <div style="border-left-color: windowtext; padding-top: 4px; padding-right: 5.4pt; padding-bottom: 4px; padding-left: 5.4pt; background-image: none; background-repeat: repeat; background-attachment: scroll; background-color: #e6e6e6; width: 95%; background-position: 0% 0%; "> <div><span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: #0000ff;"><</span><span style="color: #800000;">hibernate-mapping</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"><</span><span style="color: #800000;">class </span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="com.persistent.Item"</span><span style="color: #ff0000;"> table</span><span style="color: #0000ff;">="item"</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"><</span><span style="color: #800000;">id </span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="id"</span><span style="color: #ff0000;"> column</span><span style="color: #0000ff;">="itemId"</span><span style="color: #ff0000;"> unsaved-value</span><span style="color: #0000ff;">="null"</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />            </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"><</span><span style="color: #800000;">generator </span><span style="color: #ff0000;">class</span><span style="color: #0000ff;">="increment"</span><span style="color: #0000ff;">></</span><span style="color: #800000;">generator</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"></</span><span style="color: #800000;">id</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"><</span><span style="color: #800000;">property </span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="name"</span><span style="color: #ff0000;"> column</span><span style="color: #0000ff;">="itemName"</span><span style="color: #0000ff;">></</span><span style="color: #800000;">property</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"><</span><span style="color: #800000;">set </span><span style="color: #ff0000;">name</span><span style="color: #0000ff;">="categories"</span><span style="color: #ff0000;"> table</span><span style="color: #0000ff;">="category_item"</span><span style="color: #ff0000;"> lazy</span><span style="color: #0000ff;">="false"</span><span style="color: #ff0000;"> inverse</span><span style="color: #0000ff;">="true"</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />            </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"><</span><span style="color: #800000;">key </span><span style="color: #ff0000;">column</span><span style="color: #0000ff;">="idItem"</span><span style="color: #0000ff;">></</span><span style="color: #800000;">key</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />            </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"><</span><span style="color: #800000;">many-to-many </span><span style="color: #ff0000;">class</span><span style="color: #0000ff;">="com.persistent.Category"</span><span style="color: #ff0000;"> column</span><span style="color: #0000ff;">="idCategory"</span><span style="color: #0000ff;">></</span><span style="color: #800000;">many-to-many</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"></</span><span style="color: #800000;">set</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    </span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"></</span><span style="color: #800000;">class</span><span style="color: #0000ff;">></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span></span><span style="font-size: 10pt;"><span style="color: #0000ff;"></</span><span style="color: #800000;">hibernate-mapping</span><span style="color: #0000ff;">></span></span></div> </div> <p><span style="font-size: 10pt;">4銆丆ategory.java鍜孖tem.java</span></p> <div style="border-left-color: windowtext; padding-top: 4px; padding-right: 5.4pt; padding-bottom: 4px; padding-left: 5.4pt; background-image: none; background-repeat: repeat; background-attachment: scroll; background-color: #e6e6e6; width: 95%; background-position: 0% 0%; "> <div><span style="font-size: 10pt;"><img id="_22_102_Open_Image" style="display: inline;" onclick="this.style.display='none'; document.getElementById('_22_102_Open_Text').style.display='none'; document.getElementById('_22_102_Closed_Image').style.display='inline'; document.getElementById('_22_102_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="_22_102_Closed_Image" style="display: none;" onclick="this.style.display='none'; document.getElementById('_22_102_Closed_Text').style.display='none'; document.getElementById('_22_102_Open_Image').style.display='inline'; document.getElementById('_22_102_Open_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" align="top" /><span style="color: #0000ff;">public</span><span style="color: #000000;"> </span><span style="color: #0000ff;">class</span><span style="color: #000000;"> Category </span><span id="_22_102_Closed_Text" style="border: 1px solid #808080; display: none; background-color: #ffffff;">...</span></span><span id="_22_102_Open_Text" style="display: inline;"><span style="font-size: 10pt;"><span style="color: #000000;">{    <br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #0000ff;">private</span></span><span style="font-size: 10pt;"><span style="color: #000000;"> Long id;<br /> </span><span style="color: #0000ff;">    private</span></span><span style="font-size: 10pt;"><span style="color: #000000;"> String name;<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #0000ff;">private</span><span style="color: #000000;"> Set items </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">new</span></span><span style="color: #000000;"><span style="font-size: 10pt;"> HashSet();<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />...<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><br /> <img id="_123_207_Open_Image" onclick="this.style.display='none'; document.getElementById('_123_207_Open_Text').style.display='none'; document.getElementById('_123_207_Closed_Image').style.display='inline'; document.getElementById('_123_207_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="_123_207_Closed_Image" style="display: none;" onclick="this.style.display='none'; document.getElementById('_123_207_Closed_Text').style.display='none'; document.getElementById('_123_207_Open_Image').style.display='inline'; document.getElementById('_123_207_Open_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif" align="top" /></span></span><span style="font-size: 10pt;"><span style="color: #0000ff;">public</span><span style="color: #000000;"> </span><span style="color: #0000ff;">class</span><span style="color: #000000;"> Item </span><span id="_123_207_Closed_Text" style="border: 1px solid #808080; display: none; background-color: #ffffff;">...</span></span><span id="_123_207_Open_Text"><span style="font-size: 10pt;"><span style="color: #000000;">{<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #0000ff;">private</span></span><span style="font-size: 10pt;"><span style="color: #000000;"> Long id;<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #0000ff;">private</span></span><span style="font-size: 10pt;"><span style="color: #000000;"> String name;<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: #0000ff;">private</span><span style="color: #000000;"> Set categories </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">new</span></span><span style="color: #000000;"><span style="font-size: 10pt;"> HashSet();<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />...<br /> <img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></span><span style="color: #000000;"><br /> <span style="font-size: 10pt;"><img alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    </span></span></div> </div> <p><span style="font-size: 10pt;">      鏄犲皠鏂囦歡涓繕鍙互涓嶇敤set鑰岀敤bag錛屽彧瑕佹妸set鍑虹幇鐨勫湴鏂規(guī)敼鎴恇ag灝辮錛岃繖鏍風(fēng)浉搴旂殑category.java鍜孖tem.java</span></p> <p><span style="font-size: 10pt;">鏂囦歡褰撲腑灝卞彲浠ョ敤List銆?/span></p> <img src ="http://m.tkk7.com/1504/aggbug/256083.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/1504/" target="_blank">weesun涓綾抽槼鍏?/a> 2009-02-22 19:17 <a href="http://m.tkk7.com/1504/archive/2009/02/22/256083.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>getOutputStream() has already been called for this response鐨勮В鍐熾愯嚜宸辨葷粨銆?http://m.tkk7.com/1504/archive/2009/02/22/256082.htmlweesun涓綾抽槼鍏?/dc:creator>weesun涓綾抽槼鍏?/author>Sun, 22 Feb 2009 11:17:00 GMThttp://m.tkk7.com/1504/archive/2009/02/22/256082.htmlhttp://m.tkk7.com/1504/comments/256082.htmlhttp://m.tkk7.com/1504/archive/2009/02/22/256082.html#Feedback0http://m.tkk7.com/1504/comments/commentRss/256082.htmlhttp://m.tkk7.com/1504/services/trackbacks/256082.html1.鍦ㄩ」鐩腑JSP欏甸潰杈撳嚭嫻佹樉紺轟負(fù)鍥劇墖鏃訛紝鍒鋒柊鏃訛紝鎶ヤ互涓嬮敊璇?br /> getOutputStream() has already been called for this response
index.jsp

<HTML>
<HEAD>
<TITLE></TITLE>

</HEAD>

<BODY>
<TABLE>
<TR>
<TD></TD>
</TR>
<TR>
<TD><img src="show.jsp"></TD>
</TR>
</TABLE>

</BODY>
</HTML>


show.jsp
<%@ page contentType="text/html; charset=gbk" %>
<%@ page import="java.io.*"%>
<%@ page import="cn.com.hnisi.visio.image.*"%>
<%
VisioDemo v=new VisioDemo();
v.setVisible(false);
try
{
 byte[] image = v.getVisio().createPreview(new File("E:/test/test.vsd"));
 response.setContentType("image/jpeg");
 OutputStream outs = response.getOutputStream();
 outs.write(image);
 outs.flush();

}
catch(Exception e)
{
    System.out.println(e.getMessage());
}
%>
鍑虹幇閿欒鍘熷洜鏄痳esponse鐨勬暟鎹祦娌℃湁閲婃斁
瑙e喅鍔炴硶
<%@ page contentType="text/html; charset=gbk" %>
<%@ page import="java.io.*"%>
<%@ page import="cn.com.hnisi.visio.image.*"%>
<%
VisioDemo v=new VisioDemo();
v.setVisible(false);
try
{
 byte[] image = v.getVisio().createPreview(new File("E:/test/test.vsd"));
 response.setContentType("image/jpeg");
 OutputStream outs = response.getOutputStream();
 outs.write(image);
 outs.flush();
 outs=null;
    response.flushBuffer();
    out.clear();
    out = pageContext.pushBody();

}
catch(Exception e)
{
    System.out.println(e.getMessage());
}
%>


]]>
浣跨敤display錛屽叧浜庡彇鍑哄垪鍊?http://m.tkk7.com/1504/archive/2009/02/22/256080.htmlweesun涓綾抽槼鍏?/dc:creator>weesun涓綾抽槼鍏?/author>Sun, 22 Feb 2009 11:16:00 GMThttp://m.tkk7.com/1504/archive/2009/02/22/256080.htmlhttp://m.tkk7.com/1504/comments/256080.htmlhttp://m.tkk7.com/1504/archive/2009/02/22/256080.html#Feedback0http://m.tkk7.com/1504/comments/commentRss/256080.htmlhttp://m.tkk7.com/1504/services/trackbacks/256080.html              <display:column    title="棰樼洰" sortable="true"  style="width: 15%" media="html">
                <ww:property value="#attr.row.ATTENTION_EVENT"/>&nbsp;
             </display:column>
</table>
閫氳繃   <ww:property value="#attr.row.ATTENTION_EVENT"/>鍙互瀹炵幇鍙栧嚭鍒楀箋傛敞鎰忥細(xì)#attr涓哄繀欏伙紝row涓?nbsp;<display:table >鐨勫睘鎬d鐨勫箋?

]]>
主站蜘蛛池模板: yellow视频免费看| 亚洲精品乱码久久久久蜜桃| 午夜在线a亚洲v天堂网2019| 色多多A级毛片免费看| 国产成人精品一区二区三区免费| 97在线观免费视频观看| 亚洲成A人片77777国产| 久久亚洲精品无码VA大香大香| 相泽南亚洲一区二区在线播放| 免费国产99久久久香蕉| 日本午夜免费福利视频| 亚洲国产人成网站在线电影动漫| 亚洲AV无码男人的天堂| 99久久免费看国产精品| 亚洲国产精品成人一区| 亚洲欧洲另类春色校园网站| 久久久受www免费人成| 国产美女无遮挡免费视频| 亚洲黄色免费观看| 九九免费观看全部免费视频| 国产一卡2卡3卡4卡2021免费观看| 在线精品亚洲一区二区小说 | 久久亚洲精品中文字幕| 美女视频黄视大全视频免费的| 久久www免费人成看片| 亚洲精品国产品国语在线| 激情无码亚洲一区二区三区 | 亚洲无砖砖区免费| 国产97视频人人做人人爱免费| 四虎影院免费视频| 亚洲精品在线免费观看视频| 丁香花在线观看免费观看图片 | 亚洲熟妇AV日韩熟妇在线| 色欲色香天天天综合网站免费| 亚洲第一区在线观看| 久久久国产亚洲精品| 四虎精品视频在线永久免费观看| 亚洲国产精品无码久久一线| 在线播放免费人成视频网站| 毛片免费观看网址| 亚洲宅男天堂a在线|