??xml version="1.0" encoding="utf-8" standalone="yes"?>日韩精品一级中文字幕精品视频免费观看,欧美亚洲日本一区,有码一区二区三区http://www.aygfsteel.com/ec2008/category/26383.html·古之学者必有师·做学者亦要做师者·FIGHTING·zh-cnFri, 04 Jun 2010 21:53:38 GMTFri, 04 Jun 2010 21:53:38 GMT60div 弹出?/title><link>http://www.aygfsteel.com/ec2008/archive/2008/09/17/229485.html</link><dc:creator>月芽?/dc:creator><author>月芽?/author><pubDate>Wed, 17 Sep 2008 09:15:00 GMT</pubDate><guid>http://www.aygfsteel.com/ec2008/archive/2008/09/17/229485.html</guid><wfw:comment>http://www.aygfsteel.com/ec2008/comments/229485.html</wfw:comment><comments>http://www.aygfsteel.com/ec2008/archive/2008/09/17/229485.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/ec2008/comments/commentRss/229485.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/ec2008/services/trackbacks/229485.html</trackback:ping><description><![CDATA[<br /> <br /> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #0000ff;"><</span><span style="color: #800000;">html</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;"><</span><span style="color: #800000;">head</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;"><</span><span style="color: #800000;">style</span><span style="color: #0000ff;">></span><span style="background-color: #f5f5f5; color: #800000;"><br /> body</span><span style="background-color: #f5f5f5; color: #000000;">{</span><span style="background-color: #f5f5f5; color: #ff0000;"><br /> font-size</span><span style="background-color: #f5f5f5; color: #000000;">:</span><span style="background-color: #f5f5f5; color: #0000ff;">12px</span><span style="background-color: #f5f5f5; color: #000000;">;</span><span style="background-color: #f5f5f5; color: #ff0000;"><br /> </span><span style="background-color: #f5f5f5; color: #000000;">}</span><span style="background-color: #f5f5f5; color: #800000;"><br /> </span><span style="color: #0000ff;"></</span><span style="color: #800000;">style</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;"><</span><span style="color: #800000;">script </span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="text/javascript"</span><span style="color: #ff0000;"> language</span><span style="color: #0000ff;">="javascript"</span><span style="color: #0000ff;">></span><span style="background-color: #f5f5f5; color: #000000;"><br /> </span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;"> divShow(tip){<br /> </span><span style="background-color: #f5f5f5; color: #008000;">//</span><span style="background-color: #f5f5f5; color: #008000;">基础定义</span><span style="background-color: #f5f5f5; color: #008000;"><br /> </span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;"> bgWidth,bgHeight;<br /> </span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;"> msgWidth</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">300</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> </span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;"> msgHeight</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">100</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> </span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;"> titleHeight</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">20</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> bgWidth</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">document.body.offsetWidth;<br /> bgHeight</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">document.body.offsetHeight;<br /> </span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;"> titleBgColor</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">#99CCFF</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> <br /> </span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;"> bgDiv</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">document.createElement(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">div</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br /> bgDiv.setAttribute(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">id</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">,</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">bgDiv</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br /> bgDiv.style.position</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">absolute</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> bgDiv.style.top</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">0</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> bgDiv.style.left</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">0</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> bgDiv.style.background</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">#777</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> bgDiv.style.filter</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> bgDiv.style.opacity</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">0.6</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> bgDiv.style.width</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">bgWidth</span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">px</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> bgDiv.style.height</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">bgHeight</span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">px</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> bgDiv.style.zIndex</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">100</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> document.body.appendChild(bgDiv);<br /> <br /> </span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;"> msgDiv</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">document.createElement(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">div</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br /> msgDiv.setAttribute(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">id</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">,</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">msgDiv</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br /> msgDiv.setAttribute(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">align</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">,</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">center</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br /> msgDiv.style.background</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">white</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> msgDiv.style.position</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">absolute</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> msgDiv.style.left</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">35%</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> msgDiv.style.top</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">40%</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> msgDiv.style.width</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">msgWidth</span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">px</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> msgDiv.style.height</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">msgHeight</span><span style="background-color: #f5f5f5; color: #000000;">+</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">px</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> msgDiv.style.textAlign</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">center</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> msgDiv.style.zIndex</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">101</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> <br /> </span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;"> title</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">document.createElement(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">div</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br /> title.setAttribute(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">id</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">,</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">title</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br /> title.setAttribute(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">align</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">,</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">right</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br /> title.style.background</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">titleBgColor;<br /> title.style.filter</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20, finishX=100, finishY=100,style=1,opacity=75,finishOpacity=100);</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> title.style.opacity</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">0.75</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> title.style.height</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">titleHeight;<br /> title.innerHTML</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;"><span id='closeButton' style='cursor:pointer'>关闭</span></span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">;<br /> <br /> document.body.appendChild(msgDiv);<br /> document.getElementById(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">msgDiv</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).appendChild(title);<br /> </span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;"> txt</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">document.createElement(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">p</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br /> txt.style.margin</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">1em 0</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;"><br /> txt.setAttribute(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">id</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">,</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">msgTxt</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br /> txt.innerHTML</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;">tip;<br /> document.getElementById(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">msgDiv</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).appendChild(txt);<br /> </span><span style="background-color: #f5f5f5; color: #0000ff;">var</span><span style="background-color: #f5f5f5; color: #000000;"> closeAll</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #000000;"> document.getElementById(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">closeButton</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">);<br /> closeAll.onclick</span><span style="background-color: #f5f5f5; color: #000000;">=</span><span style="background-color: #f5f5f5; color: #0000ff;">function</span><span style="background-color: #f5f5f5; color: #000000;">(){<br /> document.body.removeChild(bgDiv);<br /> document.getElementById(</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">msgDiv</span><span style="background-color: #f5f5f5; color: #000000;">"</span><span style="background-color: #f5f5f5; color: #000000;">).removeChild(title);<br /> document.body.removeChild(msgDiv);<br />   }<br /> <br /> }<br /> </span><span style="color: #0000ff;"></</span><span style="color: #800000;">script</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;"></</span><span style="color: #800000;">head</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;"><</span><span style="color: #800000;">body</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;"><</span><span style="color: #800000;">div </span><span style="color: #ff0000;">id</span><span style="color: #0000ff;">="bgContent"</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;"><</span><span style="color: #800000;">input </span><span style="color: #ff0000;">type</span><span style="color: #0000ff;">="button"</span><span style="color: #ff0000;"> value</span><span style="color: #0000ff;">="弹出"</span><span style="color: #ff0000;"> onclick</span><span style="color: #0000ff;">="divShow('昄我吧');"</span><span style="color: #0000ff;">/></span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;"></</span><span style="color: #800000;">div</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;"></</span><span style="color: #800000;">body</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000ff;"></</span><span style="color: #800000;">html</span><span style="color: #0000ff;">></span></div> <br /> <img src ="http://www.aygfsteel.com/ec2008/aggbug/229485.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/ec2008/" target="_blank">月芽?/a> 2008-09-17 17:15 <a href="http://www.aygfsteel.com/ec2008/archive/2008/09/17/229485.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>*.properties文gd http://www.aygfsteel.com/ec2008/archive/2008/08/15/222290.html月芽?/dc:creator>月芽?/author>Fri, 15 Aug 2008 08:15:00 GMThttp://www.aygfsteel.com/ec2008/archive/2008/08/15/222290.htmlhttp://www.aygfsteel.com/ec2008/comments/222290.htmlhttp://www.aygfsteel.com/ec2008/archive/2008/08/15/222290.html#Feedback0http://www.aygfsteel.com/ec2008/comments/commentRss/222290.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/222290.html
举例Q当面显C旅客图片时Q我们可以通过传递文件名l一个servlet
在其中补全图片的全\径,然后再显C到面
q样做的好处Q在面看不到图片的存储目录l构Q其中补全全路径Ӟ我们可以把图片\径做成可配置的放?。properties中,q样以后目录变了也不用更改代?br />
package com.hunau.liuyong;

import java.io.FileInputStream;
import java.io.InputStream;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;

public class ReadPropertyies {
    
public String getImage(String name) {
        String tem 
= "defaule name";
        
try {
            
/*
             * InputStream in =
             * getClass().getResourceAsStream("test.properties"); Properties p =
             * new Properties(); p.load(in); tem = p.get(name).toString();
             
*/
            InputStream in 
= new FileInputStream("E:\\test\\test2.properties");
            ResourceBundle rb 
= new PropertyResourceBundle(in);
            tem 
= rb.getString(name);

        } 
catch (Exception e) {
            e.printStackTrace();
        }
        
return tem;
    }

    
public static void main(String[] args) {
        ReadPropertyies rp 
= new ReadPropertyies();
        String name 
= rp.getImage("name");
        System.out.println(
"NAME=" + name);
    }
}





]]>
oracle exp导出与imp导入http://www.aygfsteel.com/ec2008/archive/2008/08/14/222077.html月芽?/dc:creator>月芽?/author>Thu, 14 Aug 2008 10:00:00 GMThttp://www.aygfsteel.com/ec2008/archive/2008/08/14/222077.htmlhttp://www.aygfsteel.com/ec2008/comments/222077.htmlhttp://www.aygfsteel.com/ec2008/archive/2008/08/14/222077.html#Feedback1http://www.aygfsteel.com/ec2008/comments/commentRss/222077.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/222077.html exp命oQ?br />
1 exp username/psw@TEST file=d:test.dmp full=y
2 exp username/psw@TEST file=d:test.dmp owner=(ly)
3 exp username/psw@TEST file= d:test.dmp tables=(grid1,grid2)
1其中一是将TestQ与某一数据库对应的oracle服务名)数据库进行整体导?br /> 2属于用户ly的所有表导出
3表grid1Q与grid2导出
dQtest.dmp是导出的文g地址

imp命oQ?br />
1 imp system/psw@TEST  file=d:test.dmp
2 imp system/psw@TEST  full=y  file=d:test.dmp ignore=y
3 imp system/psw@TEST  file=d:test.dmp  tables=(grid1)
ignore=y表示如果被导入的数据库中某个表已l存在就忽略不导入那个表
3表示只导入grid1q个?br />
在导入导出前要先试下对应的数据库是否是通的Qtnsping test来测试,同样test是服务名
所有命令可在cmd下执?br />

]]>
正则实现关键?高亮昄http://www.aygfsteel.com/ec2008/archive/2008/08/14/222029.html月芽?/dc:creator>月芽?/author>Thu, 14 Aug 2008 07:59:00 GMThttp://www.aygfsteel.com/ec2008/archive/2008/08/14/222029.htmlhttp://www.aygfsteel.com/ec2008/comments/222029.htmlhttp://www.aygfsteel.com/ec2008/archive/2008/08/14/222029.html#Feedback0http://www.aygfsteel.com/ec2008/comments/commentRss/222029.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/222029.html<!--代码如下-->
<
script language="javascript" type="text/javascript">
    
var keys =     {
                    
"关键?":["http://www.url.com","#F4F9FF"],
                    
"关键?":["http://www.url.com","#F4F9FF"],
                    
"关键?":["http://www.url.com","#F4F9FF"]
                   
}
    document.body.innerHTML 
= document.body.innerHTML.replace(/(关键?|关键?|关键?)/g,function(){
                
var tem=arguments[0];
                
return tem.fontcolor(keys[u][1]).link(keys[u][0]);
            }
        );
</script>

]]>
servlet囄验证?http://www.aygfsteel.com/ec2008/archive/2008/08/07/220685.html月芽?/dc:creator>月芽?/author>Thu, 07 Aug 2008 07:24:00 GMThttp://www.aygfsteel.com/ec2008/archive/2008/08/07/220685.htmlhttp://www.aygfsteel.com/ec2008/comments/220685.htmlhttp://www.aygfsteel.com/ec2008/archive/2008/08/07/220685.html#Feedback0http://www.aygfsteel.com/ec2008/comments/commentRss/220685.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/220685.html/**
 * 说明Q生成验证码servlet
 * ~写者:LiuYong
 * 日期Q?008 8.7
 * 使用时直接把servlet讉K路径传给src好了,如果要重C生就把img的onclick加个document.getElementById("imgId").src="<%=request.getContextPath() %>/servlet/RandomCodeServlet";okQ不q火狐里面不行。呵?br />  
*/
package com.hunau.liuyong;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.Random;

import javax.imageio.ImageIO;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * <p>
 * Title:生成验证?br />  * <p>
 * Description:在servlet中生成验证码
 * </p>
 * 
 
*/
public class RandomCodeServlet extends HttpServlet {

    
// 高度
    private int width = 90;

    
// 宽度
    private int height = 20;

    
protected void service(HttpServletRequest req, HttpServletResponse resp)
            
throws ServletException, java.io.IOException {
        BufferedImage buffImg 
= new BufferedImage(width, height,
                BufferedImage.TYPE_INT_RGB);
        Graphics2D g 
= buffImg.createGraphics();
        Random random 
= new Random();
        g.setColor(Color.WHITE);
        g.fillRect(
00, width, height);
        
// 讄字体
        Font font = new Font("Times New Roman", Font.BOLD, 20);
        g.setFont(font);
        
// 画边?/span>
        g.setColor(Color.GRAY);
        g.drawRect(
00, width - 1, height - 1);

        g.setColor(Color.GRAY);
        
// 随机产生q扰U?/span>
        for (int i = 0; i < 50; i++) {
            
int x = random.nextInt(width);
            
int y = random.nextInt(height);
            
int x1 = random.nextInt(2);
            
int y1 = random.nextInt(2);
            g.drawLine(x, y, x 
+ x1, y + y1);
        }
        
// 数字字母集合
        char[] numbersAndLettersStore = ("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
                .toCharArray();
        String randomCode 
= null;
        
int red = 0, green = 0, blue = 0;
        
for (int i = 0; i < 4; i++) {
            red 
= random.nextInt(255);
            green 
= random.nextInt(255);
            blue 
= random.nextInt(255);
            g.setColor(
new Color(red, green, blue));
            String tem 
= String.valueOf(numbersAndLettersStore[random
                    .nextInt(
62)]);
            randomCode 
+= tem;
            g.drawString(tem, 
15 * i + 1617);
        }
        
// 验证码保存到Session范围
        HttpSession session = req.getSession();
        session.setAttribute(
"code", randomCode.toString());
        
// 止~存
        resp.setHeader("Prama""no-cache");
        resp.setHeader(
"Coche-Control""no-cache");
        resp.setDateHeader(
"Expires"0);
        resp.setContentType(
"image/jpeg");
        
// 图像输出到
        ServletOutputStream sos = resp.getOutputStream();
        ImageIO.write(buffImg, 
"jpeg", sos);
        sos.close();
    }

}


]]>
oracl存储q程 试http://www.aygfsteel.com/ec2008/archive/2008/08/06/220378.html月芽?/dc:creator>月芽?/author>Wed, 06 Aug 2008 03:12:00 GMThttp://www.aygfsteel.com/ec2008/archive/2008/08/06/220378.htmlhttp://www.aygfsteel.com/ec2008/comments/220378.htmlhttp://www.aygfsteel.com/ec2008/archive/2008/08/06/220378.html#Feedback0http://www.aygfsteel.com/ec2008/comments/commentRss/220378.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/220378.html
create or replace procedure Xiao_Note
(
name 
in varchar2,
email 
in varchar2,
dept 
in varchar2
)
is
begin
insert into email (id,name,email,dept) values(Autoaddid.Nextval,name,email,dept);
commit;
end Xiao_Note;
其中Autoaddid.Nextval是徏的一个oracle的自增长序列Q用于做主键用的
~译成功后。测?br />
。。?  
public
 static void main(String[] args) throws SQLException {
              
        CommonDAO dao
=new CommonDAO();
        Connection conn
=dao.getConnection();
        String procedure 
= "{call XIAO_NOTE(?,?,?)}";
        CallableStatement cstmt 
= conn.prepareCall(procedure);
        cstmt.setString(
1,"liuyong1111");
        cstmt.setString(
2,"liuyongcic@163.com");
        cstmt.setString(
3,"xx");
        cstmt.executeUpdate();
        System.out.println(
"ok");
               
    }
。。?br />



]]>
数据验证新思维Q通过input属性配|完成数据验?/title><link>http://www.aygfsteel.com/ec2008/archive/2008/07/30/218805.html</link><dc:creator>月芽?/dc:creator><author>月芽?/author><pubDate>Wed, 30 Jul 2008 09:57:00 GMT</pubDate><guid>http://www.aygfsteel.com/ec2008/archive/2008/07/30/218805.html</guid><wfw:comment>http://www.aygfsteel.com/ec2008/comments/218805.html</wfw:comment><comments>http://www.aygfsteel.com/ec2008/archive/2008/07/30/218805.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/ec2008/comments/commentRss/218805.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/ec2008/services/trackbacks/218805.html</trackback:ping><description><![CDATA[代码如下Q?br /> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #000000;"><!</span><span style="color: #000000;">DOCTYPE HTML PUBLIC </span><span style="color: #000000;">"</span><span style="color: #000000;">-//W3C//DTD HTML 4.01 Transitional//EN</span><span style="color: #000000;">"</span><span style="color: #000000;"><br /> </span><span style="color: #000000;">"</span><span style="color: #000000;">http://www.w3.org/TR/html4/loose.dtd</span><span style="color: #000000;">"</span><span style="color: #000000;">></span><span style="color: #000000;"><br /> </span><span style="color: #000000;"><</span><span style="color: #000000;">html</span><span style="color: #000000;">></span><span style="color: #000000;"><br /> </span><span style="color: #000000;"><</span><span style="color: #000000;">head</span><span style="color: #000000;">></span><span style="color: #000000;"><br /> </span><span style="color: #000000;"><</span><span style="color: #000000;">meta http</span><span style="color: #000000;">-</span><span style="color: #000000;">equiv</span><span style="color: #000000;">=</span><span style="color: #000000;">"</span><span style="color: #000000;">Content-Type</span><span style="color: #000000;">"</span><span style="color: #000000;"> content</span><span style="color: #000000;">=</span><span style="color: #000000;">"</span><span style="color: #000000;">text/html; charset=gb2312</span><span style="color: #000000;">"</span><span style="color: #000000;">></span><span style="color: #000000;"><br /> </span><span style="color: #000000;"><</span><span style="color: #000000;">title</span><span style="color: #000000;">></span><span style="color: #000000;">无标题文?/span><span style="color: #000000;"></</span><span style="color: #000000;">title</span><span style="color: #000000;">></span><span style="color: #000000;"><br /> </span><span style="color: #000000;"><</span><span style="color: #000000;">script</span><span style="color: #000000;">></span><span style="color: #000000;"><br /> <br /> function verifyAndSend(form,verifyOrNot){<br /> var msg</span><span style="color: #000000;">=</span><span style="color: #000000;">""</span><span style="color: #000000;">;<br /> </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(verifyOrNot){<br /> var inputBoxs </span><span style="color: #000000;">=</span><span style="color: #000000;"> form.tags(</span><span style="color: #000000;">"</span><span style="color: #000000;">input</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br /> </span><span style="color: #0000ff;">for</span><span style="color: #000000;"> (var i</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;i</span><span style="color: #000000;"><</span><span style="color: #000000;">inputBoxs.length;i</span><span style="color: #000000;">++</span><span style="color: #000000;">) {<br /> var inputValue </span><span style="color: #000000;">=</span><span style="color: #000000;"> inputBoxs[i].value.toUpperCase();<br /> var isRequired</span><span style="color: #000000;">=</span><span style="color: #000000;">inputBoxs[i].getAttribute(</span><span style="color: #000000;">"</span><span style="color: #000000;">required</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br /> var fileType</span><span style="color: #000000;">=</span><span style="color: #000000;">inputBoxs[i].getAttribute(</span><span style="color: #000000;">"</span><span style="color: #000000;">fileType</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br /> var filedName</span><span style="color: #000000;">=</span><span style="color: #000000;">inputBoxs[i].getAttribute(</span><span style="color: #000000;">"</span><span style="color: #000000;">filedName</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br /> </span><span style="color: #008000;">//</span><span style="color: #008000;">判断是否为空Q可以重新写个函?/span><span style="color: #008000;"><br /> </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> (isRequired </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #0000ff;">null</span><span style="color: #000000;"> </span><span style="color: #000000;">&&</span><span style="color: #000000;"> isRequired</span><span style="color: #000000;">==</span><span style="color: #000000;">"</span><span style="color: #000000;">true</span><span style="color: #000000;">"</span><span style="color: #000000;">) {<br /> </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(inputValue</span><span style="color: #000000;">==</span><span style="color: #0000ff;">null</span><span style="color: #000000;">||</span><span style="color: #000000;">inputValue</span><span style="color: #000000;">==</span><span style="color: #000000;">""</span><span style="color: #000000;">){<br /> msg</span><span style="color: #000000;">=</span><span style="color: #000000;">msg</span><span style="color: #000000;">+</span><span style="color: #000000;">filedName</span><span style="color: #000000;">+</span><span style="color: #000000;">"</span><span style="color: #000000;">不能为空</span><span style="color: #000000;">"</span><span style="color: #000000;">+</span><span style="color: #000000;">"</span><span style="color: #000000;">\n</span><span style="color: #000000;">"</span><span style="color: #000000;">;<br /> }<br /> }</span><span style="color: #008000;">//</span><span style="color: #008000;"><br /> </span><span style="color: #008000;">//</span><span style="color: #008000;">判断是否是Email格式<br /> </span><span style="color: #008000;">//</span><span style="color: #008000;">调用emailVerify函数Ӟ我们q可以通过fileType去自动解析出要调用那个函数像Qemail+Verify<br /> </span><span style="color: #008000;">//</span><span style="color: #008000;">通过解析Q字W串q接得到var tem="emailVerify(inputBoxs[i])";之后Q然后通过eval(tem);来执行函?br /> </span><span style="color: #008000;">//</span><span style="color: #008000;">q样做的目的是减少代码量,E序自动Ҏ你input的属性设|调用相应的Ҏ</span><span style="color: #008000;"><br /> </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(fileType</span><span style="color: #000000;">!=</span><span style="color: #0000ff;">null</span><span style="color: #000000;">&&</span><span style="color: #000000;">fileType</span><span style="color: #000000;">==</span><span style="color: #000000;">"</span><span style="color: #000000;">email</span><span style="color: #000000;">"</span><span style="color: #000000;">){<br /> var tem</span><span style="color: #000000;">=</span><span style="color: #000000;">emailVerify(inputBoxs[i]);<br /> </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(tem</span><span style="color: #000000;">!=</span><span style="color: #000000;">"</span><span style="color: #000000;">success</span><span style="color: #000000;">"</span><span style="color: #000000;">){<br /> msg</span><span style="color: #000000;">=</span><span style="color: #000000;">msg</span><span style="color: #000000;">+</span><span style="color: #000000;">filedName</span><span style="color: #000000;">+</span><span style="color: #000000;">"</span><span style="color: #000000;">email格式不正?/span><span style="color: #000000;">"</span><span style="color: #000000;">+</span><span style="color: #000000;">"</span><span style="color: #000000;">\n</span><span style="color: #000000;">"</span><span style="color: #000000;">;<br /> }<br /> }<br /> <br /> <br /> }<br /> <br /> </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(msg</span><span style="color: #000000;">!=</span><span style="color: #000000;">""</span><span style="color: #000000;">){<br /> alert(msg);<br /> }</span><span style="color: #0000ff;">else</span><span style="color: #000000;">{<br /> alert(</span><span style="color: #000000;">"</span><span style="color: #000000;">开始调用后台函?/span><span style="color: #000000;">"</span><span style="color: #000000;">);<br /> }<br /> <br /> }</span><span style="color: #0000ff;">else</span><span style="color: #000000;">{<br /> </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #000000;">""</span><span style="color: #000000;">;<br /> }<br /> <br /> }<br /> <br /> function emailVerify(filed){<br /> </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(filed.value.isEmail()){<br /> </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">success</span><span style="color: #000000;">"</span><span style="color: #000000;">;<br /> }</span><span style="color: #0000ff;">else</span><span style="color: #000000;">{<br /> </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">E-mail格式不正?/span><span style="color: #000000;">"</span><span style="color: #000000;">;<br /> }<br /> }<br /> <br /> </span><span style="color: #008000;">//</span><span style="color: #008000;">判断字符串是否是Email字符Ԍ若是则返回trueQ否则返回false</span><span style="color: #008000;"><br /> </span><span style="color: #000000;">String.prototype.isEmail </span><span style="color: #000000;">=</span><span style="color: #000000;"> function() {<br />     </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> </span><span style="color: #000000;">/^</span><span style="color: #000000;">\w</span><span style="color: #000000;">+</span><span style="color: #000000;">@.</span><span style="color: #000000;">+</span><span style="color: #000000;">\.\w</span><span style="color: #000000;">+</span><span style="color: #000000;">$</span><span style="color: #000000;">/</span><span style="color: #000000;">g.test(</span><span style="color: #0000ff;">this</span><span style="color: #000000;">);<br /> }<br /> </span><span style="color: #000000;"></</span><span style="color: #000000;">script</span><span style="color: #000000;">></span><span style="color: #000000;"><br /> </span><span style="color: #000000;"></</span><span style="color: #000000;">head</span><span style="color: #000000;">></span><span style="color: #000000;"><br /> <br /> </span><span style="color: #000000;"><</span><span style="color: #000000;">body</span><span style="color: #000000;">></span><span style="color: #000000;"><br /> </span><span style="color: #000000;"><</span><span style="color: #000000;">form method</span><span style="color: #000000;">=</span><span style="color: #000000;">"</span><span style="color: #000000;">post</span><span style="color: #000000;">"</span><span style="color: #000000;"> action</span><span style="color: #000000;">=</span><span style="color: #000000;">"</span><span style="color: #000000;">xx.xx</span><span style="color: #000000;">"</span><span style="color: #000000;"> name</span><span style="color: #000000;">=</span><span style="color: #000000;">"</span><span style="color: #000000;">loginForm</span><span style="color: #000000;">"</span><span style="color: #000000;">></span><span style="color: #000000;"><br /> E</span><span style="color: #000000;">-</span><span style="color: #000000;">MAILd名:</span><span style="color: #000000;"><</span><span style="color: #000000;">input type</span><span style="color: #000000;">=</span><span style="color: #000000;">"</span><span style="color: #000000;">text</span><span style="color: #000000;">"</span><span style="color: #000000;"> required</span><span style="color: #000000;">=</span><span style="color: #000000;">"</span><span style="color: #000000;">true</span><span style="color: #000000;">"</span><span style="color: #000000;"> fileType</span><span style="color: #000000;">=</span><span style="color: #000000;">"</span><span style="color: #000000;">email</span><span style="color: #000000;">"</span><span style="color: #000000;"> filedName</span><span style="color: #000000;">=</span><span style="color: #000000;">"</span><span style="color: #000000;">E-MAILd?/span><span style="color: #000000;">"</span><span style="color: #000000;">/></span><span style="color: #000000;"><br /> </span><span style="color: #000000;"><</span><span style="color: #000000;">input type</span><span style="color: #000000;">=</span><span style="color: #000000;">"</span><span style="color: #000000;">button</span><span style="color: #000000;">"</span><span style="color: #000000;"> value</span><span style="color: #000000;">=</span><span style="color: #000000;">"</span><span style="color: #000000;">登陆</span><span style="color: #000000;">"</span><span style="color: #000000;"> onClick</span><span style="color: #000000;">=</span><span style="color: #000000;">"</span><span style="color: #000000;">verifyAndSend(loginForm,true);</span><span style="color: #000000;">"</span><span style="color: #000000;">/></span><span style="color: #000000;"><br /> </span><span style="color: #000000;"></</span><span style="color: #000000;">form</span><span style="color: #000000;">></span><span style="color: #000000;"><br /> </span><span style="color: #000000;"></</span><span style="color: #000000;">body</span><span style="color: #000000;">></span><span style="color: #000000;"><br /> </span><span style="color: #000000;"></</span><span style="color: #000000;">html</span><span style="color: #000000;">></span><span style="color: #000000;"><br /> </span></div> <br /> <img src ="http://www.aygfsteel.com/ec2008/aggbug/218805.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/ec2008/" target="_blank">月芽?/a> 2008-07-30 17:57 <a href="http://www.aygfsteel.com/ec2008/archive/2008/07/30/218805.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>工具?/title><link>http://www.aygfsteel.com/ec2008/archive/2008/07/24/217216.html</link><dc:creator>月芽?/dc:creator><author>月芽?/author><pubDate>Thu, 24 Jul 2008 08:22:00 GMT</pubDate><guid>http://www.aygfsteel.com/ec2008/archive/2008/07/24/217216.html</guid><wfw:comment>http://www.aygfsteel.com/ec2008/comments/217216.html</wfw:comment><comments>http://www.aygfsteel.com/ec2008/archive/2008/07/24/217216.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/ec2008/comments/commentRss/217216.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/ec2008/services/trackbacks/217216.html</trackback:ping><description><![CDATA[1.一个统计访问来源的好东?br /> http://www.clustrmaps.com/<br /> 2.操纵Excel工具apache poi<br /> http://www.apache.org<br /> 3.|站速工?br /> http://www.webwait.com<br /> 4.在线提色工具<br /> http://www.colorhunter.com/<br /> 5.<strong>pdf-->word<br /> </strong>http://www.hellopdf.com/download.php<br /> 6.js效验框架<br /> http://tetlaw.id.au/view/javascript/really-easy-field-validation<br /> 7.W号链接应用-mklink<br /> <span>创徏W号链接不仅可以当作快捷方式使用Q最重要的是重定向链接符可以被程序读取然后重定向真正的位|,q是快捷方式无法做到的?br /> 8.</span><font size="+0"><a onmousedown="return c({'fm':'as','F':'','T':'','title':this.innerHTML,'url':this.href,'p1':0,'y':''})" target="_blank"><font size="3"><font color="#c60a00">SnagIt</font></font></a>截图好工?br /> 9.~存开源框Ӟ</font><a target="_blank">Terracotta</a> <a target="_blank">Ehcache</a> <br /> 10.http://www.findjar.com  jar包查询网? <img src ="http://www.aygfsteel.com/ec2008/aggbug/217216.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/ec2008/" target="_blank">月芽?/a> 2008-07-24 16:22 <a href="http://www.aygfsteel.com/ec2008/archive/2008/07/24/217216.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>列表昄Ӟ当数据不pageSizeӞ自动补充IJShttp://www.aygfsteel.com/ec2008/archive/2008/07/21/216409.html月芽?/dc:creator>月芽?/author>Mon, 21 Jul 2008 09:51:00 GMThttp://www.aygfsteel.com/ec2008/archive/2008/07/21/216409.htmlhttp://www.aygfsteel.com/ec2008/comments/216409.htmlhttp://www.aygfsteel.com/ec2008/archive/2008/07/21/216409.html#Feedback0http://www.aygfsteel.com/ec2008/comments/commentRss/216409.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/216409.html
function initList(perPageSize){
//alert(perPageSize);
var listTable=document.getElementById("listTable");
    
var rowLength = listTable.rows.length;
    
//alert("rowLength"+rowLength);
    if( rowLength<=perPageSize ){
        
forvar i=0 ; i<perPageSize-rowLength ; i++ ){
        
//alert("ddd");
            var rowObj = listTable.insertRow();
            rowObj.className
="c";
            
forvar j=0 ; j<listTable.rows[ 0 ].cells.length ; j++ ){
            
//alert("xxx");
                var cellObj=rowObj.insertCell();
                cellObj.style.height
="24";
                
//cellObj.innerHTML="ASDG";
            }
        }
    }
}





]]>
tomcat数据源配|?试http://www.aygfsteel.com/ec2008/archive/2008/07/19/216063.html月芽?/dc:creator>月芽?/author>Sat, 19 Jul 2008 09:08:00 GMThttp://www.aygfsteel.com/ec2008/archive/2008/07/19/216063.htmlhttp://www.aygfsteel.com/ec2008/comments/216063.htmlhttp://www.aygfsteel.com/ec2008/archive/2008/07/19/216063.html#Feedback0http://www.aygfsteel.com/ec2008/comments/commentRss/216063.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/216063.html
   <Context>
         
            
<Resource name="jdbc/test"
              type
="javax.sql.DataSource"
              username
="liuyong"
              password
="liuyong"
              driverClassName
="oracle.jdbc.OracleDriver"
              maxIdle
="2"
              maxWait
="5000"
              url
="jdbc:oracle:thin:@localhost:1521:liuyong"
              maxActive
="4"/>
 
</Context>  
一Q把上面的代码,加入tomcatQ安装目录下conf文g夹下的server.xml中,位置攑֜  </GlobalNamingResources>节点之后吧!QE:\tomcat6\conf\Q?br />
二:另外再徏一个和你工E名一L.xml文gQ把上述代码COPYq去Q然后保存放在E:\tomcat6\conf\Catalina\localhost文g夹中Q如果没有Catalina目录p己徏Q好

三:之后呢在你的工程web.xml中加入如下代码:
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/test</res-ref-name>
<res-type>javax.sql.DataSource </res-type>
<res-auth>Container</res-auth>
</resource-ref>

完了Q配|结束,开始测试:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="java.sql.*"%>
<%@ page import="javax.naming.*"%>
<%@ page import="javax.sql.*"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>tomcat datasource test</title>
</head>
<body>
<%
Context initContext 
= new InitialContext();
//法一Q?/span>java:/comp/envq个玩意是固定的
//Context envContext = (Context) initContext.lookup("java:/comp/env");
//DataSource db = (DataSource)envContext.lookup("jdbc/test");
//法二Q?br />
DataSource db = (DataSource)initContext.lookup("java:/comp/env/jdbc/test");
Connection conn = db.getConnection(); 
Statement stmt 
= conn.createStatement();
ResultSet rs 
= stmt.executeQuery("SELECT * FROM XIAO");
while(rs.next()){
       out.print(rs.getString(
"name")+"__ ");
       out.print(rs.getString(
"school")+"<br>");
}
rs.close();
stmt.close();
conn.close();
%> 
</body>
</
html>

game over
周末真无聊啊Q?br />



]]>
js 动态创建增加表格的行,q设|相应的属?/title><link>http://www.aygfsteel.com/ec2008/archive/2008/07/15/214914.html</link><dc:creator>月芽?/dc:creator><author>月芽?/author><pubDate>Tue, 15 Jul 2008 03:22:00 GMT</pubDate><guid>http://www.aygfsteel.com/ec2008/archive/2008/07/15/214914.html</guid><wfw:comment>http://www.aygfsteel.com/ec2008/comments/214914.html</wfw:comment><comments>http://www.aygfsteel.com/ec2008/archive/2008/07/15/214914.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/ec2008/comments/commentRss/214914.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/ec2008/services/trackbacks/214914.html</trackback:ping><description><![CDATA[<div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #0000ff;">function</span><span style="color: #000000;"> addRow(){<br /> //其中mainTb时table的Id<br /> //mainBody时表g体的Id<br /> //表格l构Q?lt;table id="mainTb"><tbody id="mainBody"><tr><td>。。。。。?lt;/td></tr></tbody></table><br /> </span><span style="color: #0000ff;">var</span><span style="color: #000000;"> tableObj </span><span style="color: #000000;">=</span><span style="color: #000000;"> document.getElementById(</span><span style="color: #000000;">"</span><span style="color: #000000;">mainTb</span><span style="color: #000000;">"</span><span style="color: #000000;">);  <br /> </span><span style="color: #0000ff;">var</span><span style="color: #000000;"> tableBodyObj </span><span style="color: #000000;">=</span><span style="color: #000000;"> document.getElementById(</span><span style="color: #000000;">"</span><span style="color: #000000;">mainBody</span><span style="color: #000000;">"</span><span style="color: #000000;">);  <br /> </span><span style="color: #0000ff;">var</span><span style="color: #000000;"> newRowObj </span><span style="color: #000000;">=</span><span style="color: #000000;"> document.createElement(</span><span style="color: #000000;">"</span><span style="color: #000000;"><tr name='trN' onMouseOver='tOn(this);' onMouseOut='tOn2(this);' onclick='aler<br /> <br /> ();'></span><span style="color: #000000;">"</span><span style="color: #000000;">);  <br /> </span><span style="color: #0000ff;">var</span><span style="color: #000000;"> newtext1 </span><span style="color: #000000;">=</span><span style="color: #000000;"> document.createElement(</span><span style="color: #000000;">"</span><span style="color: #000000;"><td class='listdata'></span><span style="color: #000000;">"</span><span style="color: #000000;">);  <br /> </span><span style="color: #0000ff;">var</span><span style="color: #000000;"> newtext2 </span><span style="color: #000000;">=</span><span style="color: #000000;"> document.createElement(</span><span style="color: #000000;">"</span><span style="color: #000000;"><td class='listdata'></span><span style="color: #000000;">"</span><span style="color: #000000;">);  <br /> </span><span style="color: #0000ff;">var</span><span style="color: #000000;"> newtext3 </span><span style="color: #000000;">=</span><span style="color: #000000;"> document.createElement(</span><span style="color: #000000;">"</span><span style="color: #000000;"><td class='listdata'></span><span style="color: #000000;">"</span><span style="color: #000000;">);  <br /> </span><span style="color: #0000ff;">var</span><span style="color: #000000;"> newtext4 </span><span style="color: #000000;">=</span><span style="color: #000000;"> document.createElement(</span><span style="color: #000000;">"</span><span style="color: #000000;"><td class='listdata'></span><span style="color: #000000;">"</span><span style="color: #000000;">);  <br /> </span><span style="color: #0000ff;">var</span><span style="color: #000000;"> newtext5 </span><span style="color: #000000;">=</span><span style="color: #000000;"> document.createElement(</span><span style="color: #000000;">"</span><span style="color: #000000;"><td class='listdata'></span><span style="color: #000000;">"</span><span style="color: #000000;">);  <br /> </span><span style="color: #0000ff;">var</span><span style="color: #000000;"> newtext6 </span><span style="color: #000000;">=</span><span style="color: #000000;"> document.createElement(</span><span style="color: #000000;">"</span><span style="color: #000000;"><td class='listdata'></span><span style="color: #000000;">"</span><span style="color: #000000;">);  <br /> </span><span style="color: #0000ff;">var</span><span style="color: #000000;"> newtext7 </span><span style="color: #000000;">=</span><span style="color: #000000;"> document.createElement(</span><span style="color: #000000;">"</span><span style="color: #000000;"><td class='listdata'></span><span style="color: #000000;">"</span><span style="color: #000000;">); <br /> </span><span style="color: #0000ff;">var</span><span style="color: #000000;"> num</span><span style="color: #000000;">=</span><span style="color: #000000;">eval(document.getElementById(</span><span style="color: #000000;">"</span><span style="color: #000000;">flag</span><span style="color: #000000;">"</span><span style="color: #000000;">).value)</span><span style="color: #000000;">+</span><span style="color: #000000;">1</span><span style="color: #000000;">;<br /> document.getElementById(</span><span style="color: #000000;">"</span><span style="color: #000000;">flag</span><span style="color: #000000;">"</span><span style="color: #000000;">).value</span><span style="color: #000000;">=</span><span style="color: #000000;">num;<br /> newtext1.innerHTML</span><span style="color: #000000;">=</span><span style="color: #000000;">num;<br /> newtext2.innerHTML</span><span style="color: #000000;">=</span><span style="color: #000000;">document.getElementById(</span><span style="color: #000000;">"</span><span style="color: #000000;">flight</span><span style="color: #000000;">"</span><span style="color: #000000;">).value;<br /> newtext3.innerHTML</span><span style="color: #000000;">=</span><span style="color: #000000;">document.getElementById(</span><span style="color: #000000;">"</span><span style="color: #000000;">lk_strt</span><span style="color: #000000;">"</span><span style="color: #000000;">).value;<br /> newtext4.innerHTML</span><span style="color: #000000;">=</span><span style="color: #000000;">document.getElementById(</span><span style="color: #000000;">"</span><span style="color: #000000;">lk_seat</span><span style="color: #000000;">"</span><span style="color: #000000;">).value;<br /> newtext5.innerHTML</span><span style="color: #000000;">=</span><span style="color: #000000;">document.getElementById(</span><span style="color: #000000;">"</span><span style="color: #000000;">lk_bdno</span><span style="color: #000000;">"</span><span style="color: #000000;">).value;<br /> newtext6.innerHTML</span><span style="color: #000000;">=</span><span style="color: #000000;">document.getElementById(</span><span style="color: #000000;">"</span><span style="color: #000000;">lkdate</span><span style="color: #000000;">"</span><span style="color: #000000;">).value;<br /> newtext7.innerHTML</span><span style="color: #000000;">=</span><span style="color: #000000;">"</span><span style="color: #000000;">?/span><span style="color: #000000;">"</span><span style="color: #000000;">;<br /> newRowObj.appendChild(newtext1);<br /> newRowObj.appendChild(newtext2);<br /> newRowObj.appendChild(newtext3);<br /> newRowObj.appendChild(newtext4);<br /> newRowObj.appendChild(newtext5);<br /> newRowObj.appendChild(newtext6);<br /> newRowObj.appendChild(newtext7);<br /> tableBodyObj.appendChild(newRowObj);<br /> </span><span style="color: #000000;">}</span></div> <img src ="http://www.aygfsteel.com/ec2008/aggbug/214914.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/ec2008/" target="_blank">月芽?/a> 2008-07-15 11:22 <a href="http://www.aygfsteel.com/ec2008/archive/2008/07/15/214914.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>div+css布局 技?/title><link>http://www.aygfsteel.com/ec2008/archive/2008/07/14/214735.html</link><dc:creator>月芽?/dc:creator><author>月芽?/author><pubDate>Mon, 14 Jul 2008 07:11:00 GMT</pubDate><guid>http://www.aygfsteel.com/ec2008/archive/2008/07/14/214735.html</guid><wfw:comment>http://www.aygfsteel.com/ec2008/comments/214735.html</wfw:comment><comments>http://www.aygfsteel.com/ec2008/archive/2008/07/14/214735.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/ec2008/comments/commentRss/214735.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/ec2008/services/trackbacks/214735.html</trackback:ping><description><![CDATA[<br /> 链接的那几个事件可以添加到面的Q何元素,有时可以代替onmouseover和onmouseout Q很方便<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img id="Codehighlighter1_15_38_Open_Image" onclick="this.style.display='none'; Codehighlighter1_15_38_Open_Text.style.display='none'; Codehighlighter1_15_38_Closed_Image.style.display='inline'; Codehighlighter1_15_38_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_15_38_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_15_38_Closed_Text.style.display='none'; Codehighlighter1_15_38_Open_Image.style.display='inline'; Codehighlighter1_15_38_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /><span style="color: #800000">#box div:hover </span><span id="Codehighlighter1_15_38_Open_Text"><span style="color: #000000">{</span><span style="color: #ff0000">background-color</span><span style="color: #000000">:</span><span style="color: #0000ff">blue</span><span style="color: #000000">;</span><span style="color: #000000">}</span></span></div> ----------------------------------------------------------------------------------------------------------------------------------------------<br /> css中书写表辑ּQ?br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><img id="Codehighlighter1_6_78_Open_Image" onclick="this.style.display='none'; Codehighlighter1_6_78_Open_Text.style.display='none'; Codehighlighter1_6_78_Closed_Image.style.display='inline'; Codehighlighter1_6_78_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_6_78_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_6_78_Closed_Text.style.display='none'; Codehighlighter1_6_78_Open_Image.style.display='inline'; Codehighlighter1_6_78_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /><span style="color: #800000">input </span><span id="Codehighlighter1_6_78_Open_Text"><span style="color: #000000">{</span><span style="color: #ff0000">star </span><span style="color: #000000">:</span><span style="color: #0000ff"> expression(<br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />onmouseover=function(){this.style.borderColor="#060"</span><span style="color: #000000">}</span></span><span style="color: #800000">,<br /> <img id="Codehighlighter1_102_132_Open_Image" onclick="this.style.display='none'; Codehighlighter1_102_132_Open_Text.style.display='none'; Codehighlighter1_102_132_Closed_Image.style.display='inline'; Codehighlighter1_102_132_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_102_132_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_102_132_Closed_Text.style.display='none'; Codehighlighter1_102_132_Open_Image.style.display='inline'; Codehighlighter1_102_132_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" />onmouseout=function()</span><span id="Codehighlighter1_102_132_Open_Text"><span style="color: #000000">{</span><span style="color: #ff0000">this.style.borderColor="#c00"</span><span style="color: #000000">}</span></span><span style="color: #800000">)}</span></div> <br /> -----------------------------------------------------------------------------------------------------------------------------------------------<br /> 在通过div+cssq行面布局Ӟ实现下面的效果:要注意:<br /> <img alt="" src="http://www.aygfsteel.com/images/blogjava_net/ec2008/project.jpg" border="0" /><br /> css代码Q?br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #800000">ul</span><span style="color: #000000">{</span><span style="color: #ff0000"><br /> </span><span style="color: #000000">}</span><span style="color: #800000"><br /> <br /> li</span><span style="color: #000000">{</span><span style="color: #ff0000"><br /> float</span><span style="color: #000000">:</span><span style="color: #0000ff">left</span><span style="color: #000000">;<br /> //当用float 控制li标签横向昄Q用<div>来放每一行时Q在W二行的W一个li标签要设|stlye的clear为leftQ这h能正常分两行昄Q如果把两个ul标签攑֜一个div中,用br换行的话׃用设|clearQ但是这两行的间的行距会比较?br /> </span><span style="color: #000000">}</span></div> 面代码Q?br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #0000ff"><</span><span style="color: #800000">div </span><span style="color: #ff0000">class</span><span style="color: #0000ff">="lineHeight"</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #0000ff"><</span><span style="color: #800000">div</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #0000ff"><</span><span style="color: #800000">ul</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #0000ff"><</span><span style="color: #800000">li </span><span style="color: #ff0000">class</span><span style="color: #0000ff">="fontT"</span><span style="color: #0000ff">></span><span style="color: #000000">航班?/span><span style="color: #0000ff"></</span><span style="color: #800000">li</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #0000ff">。。。。。?/span><span style="color: #000000"><br /> </span><span style="color: #0000ff"><</span><span style="color: #800000">li </span><span style="color: #ff0000">class</span><span style="color: #0000ff">="inputC"</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #0000ff"><</span><span style="color: #800000">input </span><span style="color: #ff0000">id</span><span style="color: #0000ff">="flight"</span><span style="color: #ff0000"> type</span><span style="color: #0000ff">="text"</span><span style="color: #ff0000"> class</span><span style="color: #0000ff">="queryinput"</span><span style="color: #ff0000"> size</span><span style="color: #0000ff">="17"</span><span style="color: #ff0000"> maxlength</span><span style="color: #0000ff">="10"</span><span style="color: #ff0000"> tabindex</span><span style="color: #0000ff">="20"</span><span style="color: #ff0000"> </span><span style="color: #0000ff">/></span><span style="color: #000000"><br /> </span><span style="color: #0000ff"></</span><span style="color: #800000">li</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #0000ff"></</span><span style="color: #800000">ul</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #0000ff"></</span><span style="color: #800000">div</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #0000ff"><</span><span style="color: #800000">div</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #0000ff"><</span><span style="color: #800000">ul</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #0000ff"><</span><span style="color: #800000">li </span><span style="color: #ff0000">class</span><span style="color: #0000ff">="fontT"</span><span style="color: #ff0000"> style</span><span style="color: #0000ff">="clear:left;"</span><span style="color: #0000ff">></span><span style="color: #000000">旅客日期</span><span style="color: #0000ff"></</span><span style="color: #800000">li</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #0000ff">。。。。。?/span><span style="color: #000000"><br /> </span><span style="color: #0000ff"><</span><span style="color: #800000">li </span><span style="color: #ff0000">class</span><span style="color: #0000ff">="fontT"</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #0000ff"><</span><span style="color: #800000">input </span><span style="color: #ff0000">type</span><span style="color: #0000ff">="button"</span><span style="color: #ff0000"> name</span><span style="color: #0000ff">="submit"</span><span style="color: #ff0000"> value</span><span style="color: #0000ff">="查询(Q)"</span><span style="color: #ff0000"> class</span><span style="color: #0000ff">="queryinput"</span><span style="color: #ff0000"> accesskey</span><span style="color: #0000ff">="Q"</span><span style="color: #ff0000"> <br /> <br /> onclick</span><span style="color: #0000ff">="_retrieve();"</span><span style="color: #ff0000"> tabindex</span><span style="color: #0000ff">="100"</span><span style="color: #0000ff">/></</span><span style="color: #800000">li</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #0000ff"></</span><span style="color: #800000">ul</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #0000ff"></</span><span style="color: #800000">div</span><span style="color: #0000ff">></span><span style="color: #000000"><br /> </span><span style="color: #0000ff"></</span><span style="color: #800000">div</span><span style="color: #0000ff">></span></div> <br /> <img src ="http://www.aygfsteel.com/ec2008/aggbug/214735.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/ec2008/" target="_blank">月芽?/a> 2008-07-14 15:11 <a href="http://www.aygfsteel.com/ec2008/archive/2008/07/14/214735.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>java反射应用对BEAN的操作,写通用cR标{时有用http://www.aygfsteel.com/ec2008/archive/2008/07/11/214245.html月芽?/dc:creator>月芽?/author>Fri, 11 Jul 2008 05:52:00 GMThttp://www.aygfsteel.com/ec2008/archive/2008/07/11/214245.htmlhttp://www.aygfsteel.com/ec2008/comments/214245.htmlhttp://www.aygfsteel.com/ec2008/archive/2008/07/11/214245.html#Feedback0http://www.aygfsteel.com/ec2008/comments/commentRss/214245.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/214245.html
package
 com.hunau.liuyong;

import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;

//其中User是一个beanQ里面就一个name属?br /> public class Test {
    
public static void main(String[] args) throws SecurityException, NoSuchMethodException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, InvocationTargetException{
User user
=new User();
List list
=new ArrayList();
list.add(user);
System.out.print(
"+++++++");
Method method
=getSetMethod(list.get(0).getClass(),"name");
System.out.print(
"+++++++");
method.invoke(list.get(
0),"liuyong");
method
=getGetMethod(list.get(0).getClass(),"name");
System.out.println(method.invoke(list.get(
0),null));
}

public static Method getGetMethod(Class objectClass,String fieldName) throws SecurityException, NoSuchMethodException{
    System.out.print(
"+++++++");
    StringBuffer sb
=new StringBuffer();
    sb.append(
"get");
    sb.append(fieldName.substring(
0,1).toUpperCase());
    sb.append(fieldName.substring(
1));
    Method method
=objectClass.getMethod(sb.toString(), null);
    System.out.print(
"+++++++");
    
return method;
}

public static Method getSetMethod(Class objectClass,String fieldName) throws SecurityException, NoSuchMethodException, NoSuchFieldException{
    Class[] parameterTypes
=new Class[1];
    Field field
=objectClass.getDeclaredField(fieldName);
    System.out.println(
"dasg");
    parameterTypes[
0]=field.getType();
    StringBuffer sb
=new StringBuffer();
    System.out.println(
"dasg");
    sb.append(
"set");
    sb.append(fieldName.substring(
0,1).toUpperCase());
    sb.append(fieldName.substring(
1));
    System.out.println(fieldName);
    Method method
=objectClass.getMethod(sb.toString(), parameterTypes);
    System.out.println(
"dasg");
    
return method;
    
}
}


]]>
易ajax例子+ajax解析xmlhttp://www.aygfsteel.com/ec2008/archive/2008/05/31/205099.html月芽?/dc:creator>月芽?/author>Sat, 31 May 2008 15:53:00 GMThttp://www.aygfsteel.com/ec2008/archive/2008/05/31/205099.htmlhttp://www.aygfsteel.com/ec2008/comments/205099.htmlhttp://www.aygfsteel.com/ec2008/archive/2008/05/31/205099.html#Feedback3http://www.aygfsteel.com/ec2008/comments/commentRss/205099.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/205099.html阅读全文

]]>
通过weblogic中的数据源连接数据库http://www.aygfsteel.com/ec2008/archive/2008/04/25/195997.html月芽?/dc:creator>月芽?/author>Fri, 25 Apr 2008 07:59:00 GMThttp://www.aygfsteel.com/ec2008/archive/2008/04/25/195997.htmlhttp://www.aygfsteel.com/ec2008/comments/195997.htmlhttp://www.aygfsteel.com/ec2008/archive/2008/04/25/195997.html#Feedback0http://www.aygfsteel.com/ec2008/comments/commentRss/195997.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/195997.html 2、编写访问jdbc/test的java代码
package com.hunau.liuyong;

import java.sql.Connection;
import java.sql.SQLException;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;

public class Conn {
    
private Connection conn;
    
private DataSource ds;
    
public Conn() {
        
try {
            Context initCtx 
= new InitialContext();
            
if (initCtx == null) {
                
throw new Exception("上下文加载失?/span>");
            }
            
//获取在weblogic中配|的“jdbc/test”数据?/span>
            ds = (DataSource) initCtx.lookup("jdbc/test");
        } 
catch (Exception ex) {
            ex.printStackTrace();
        }
    }

    
public Connection getConn() {
        
try {
            conn 
= ds.getConnection();
        } 
catch (SQLException ex) {
            ex.printStackTrace();
        }
        
return conn;
    }

    
public void closeConn(Connection conn) {
        
try {
            
if (conn != null) {
                conn.close();
                conn 
= null;
            }
        } 
catch (SQLException ex) {
            ex.printStackTrace();
        }
    }

}
3、actionQservletQjsp中通过Conn去获得连接访问数据库的连接,其余步骤和普通jdbc操作一?br />


]]>
每日phttp://www.aygfsteel.com/ec2008/archive/2008/04/21/194445.html月芽?/dc:creator>月芽?/author>Mon, 21 Apr 2008 02:11:00 GMThttp://www.aygfsteel.com/ec2008/archive/2008/04/21/194445.htmlhttp://www.aygfsteel.com/ec2008/comments/194445.htmlhttp://www.aygfsteel.com/ec2008/archive/2008/04/21/194445.html#Feedback0http://www.aygfsteel.com/ec2008/comments/commentRss/194445.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/194445.html 某种力量又促使我开始关注英语了Q希望能够坚持下?br />
Time is running out 没时间了
She's just letting off steam 她只是发泄一下而已
Hey, come on. Pull yourself together 嘿,来吧Q打L_?br /> I wish I had never met you 我真希望我从来都没遇到过?br /> Don't slack off! 别偷?
It's natural to slack off towards the end of a hard day's work 辛苦工作了一? 快结束时有所松懈是很自然?br /> This is a piece of work I can be proud of q是我的得意之作
I'm thinking about a visit to Paris. 我在考虑d黎旅?
To happen on account of something else 后者是前者事物发生的原因
What's your plan for the summer holiday? 暑假计划q什么?
I'll probably stay home and watch TV. 我可能会呆在家看电视
The heat made him feel he wasn't up to more热他感到再也受不了?br /> Up to doing sth 表示某h胜Q做某事。用在系动词之后Q常跟有-ing句
If you don't feel up to writing it alongQwe can do it together.如果你感到独自写不了Q我们可以一起写
In favor of something 支持或赞同做某事
He was in favor of the retention of capital punishment. 他支持保留死?br /> Life is a battle from cradle to grave. 人生是一Z生到ȝ战斗
as you make your bed,so you must lie in lt;自食其果



]]>
oracl学习W记http://www.aygfsteel.com/ec2008/archive/2008/03/29/189475.html月芽?/dc:creator>月芽?/author>Sat, 29 Mar 2008 07:58:00 GMThttp://www.aygfsteel.com/ec2008/archive/2008/03/29/189475.htmlhttp://www.aygfsteel.com/ec2008/comments/189475.htmlhttp://www.aygfsteel.com/ec2008/archive/2008/03/29/189475.html#Feedback0http://www.aygfsteel.com/ec2008/comments/commentRss/189475.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/189475.html ---------------------------------------
先通过【c:\>SQLPLUS /NOLOG】进入到【SQL>?br /> 然后通过【SQL>conn sys/oracle@liuyong_127.0.0.1 as sysdba】连接到数据库其中sys是徏立数据库?br />
pȝ帐户Q而oracle是自p的密码,liuyong_127.0.0.1是在net manager中配|的一个服务命名,好像

是例E命名;当系l提C已q接上时Q即可进行配|新用户操作【create user liuyong identified by

"liuyong";】以及之后的授权操作像【grant create session to liuyong;】【grant create table to

liuyong;】【grant create tablespace to liuyong;】【grant create view to liuyong;?然后q要

授予用户使用表空间的权限【alter user l
iuyong quota unlimited on SYSTEM;】其中SYSTEM是表I间

的名字,也可新徏表空_然后再分配。到现在为止可以通过liuyong用户d表了?br />

必要的时?我们需要重启ORACLE服务?

1.关闭服务?br />
SQL > shutdown immediate

2.启动服务?br />
SQL > startup

3.启动监听?br />
SQL > lsnrctl start

授予用户操作表的权限
grant connect,resource,dba to user_id;

授予一个user_id sysdba权限
grant   sysdba   to   user_id;


---------------------

orcle中创建队列用于表主键

create sequence SQE_SEARCHID
maxvalue 
999999999
minvalue 
1
start with 
1
increment by 
1
cycle
;

使用的时候只学要Q?br />
select SQE_SEARCHID.nextval from dual
或者:
insert into tbl_cxqqxxb(searchid,name) values(lpad(SQE_SEARCHID.nextval,'9','0'),'tocas');
其中lpad是固定searchid长度?Q不够左边补0Q还有个rpad

关于sequence的一文章:
在oracle中sequence是所谓的序列P每次取的时候它会自动增加,一般用在需要按
序列h序的地方?br />
1?nbsp;create sequence
你首先要有create sequence或者create 
any sequence权限Q?br /> create sequence emp_sequence
INCREMENT 
BY 1 -- 每次加几?/span>
START WITH 1 -- ?开始计?/span>
NOMAXVALUE -- 不设|最大?/span>
NOCYCLE -- 一直篏加,不@?/span>
CACHE 10;

一旦定义了emp_sequenceQ你可以用CURRVALQNEXTVAL
CURRVAL
=q回sequence的当前?br /> NEXTVAL=增加sequence的|然后q回sequence?br /> 比如Q?br /> emp_sequence.CURRVAL
emp_sequence.NEXTVAL

可以使用sequence的地方:
- 不包含子查询、snapshot、VIEW?nbsp;SELECT 语句
- INSERT语句的子查询?br /> - NSERT语句的VALUES?br /> - UPDATE ?nbsp;SET?br />
可以看如下例子:
INSERT INTO emp VALUES
(empseq.nextval, 
'LEWIS''CLERK',7902, SYSDATE, 1200NULL20);

SELECT empseq.currval FROM DUAL;

但是要注意的是:
- W一ơNEXTVALq回的是初始|随后的NEXTVAL会自动增加你定义的INCREMENT BY|
然后q回增加后的倹{CURRVAL Lq回当前sequence的|但是在第一ơNEXTVAL
初始化之后才能用CURRVALQ否则会出错。一ơNEXTVAL会增加一ơsequence的|
所以如果你在同一个语句里面用多个NEXTVALQ其值就是不一L。明白?
- 如果指定CACHE|oracle可以预先在内存里面攄一些sequenceQ这样存取的?br /> 些?br /> cache里面的取完后Qoracle自动再取一l到cache?nbsp;使用cache或许会蟩P 比如
数据库突然不正常down掉(
shutdown abort),cache中的sequence׃丢失. 所以可
以在create sequence的时候用nocache防止q种情况?br />
2?nbsp;Alter sequence
你或者是该sequence的ownerQ或者有ALTER 
ANY sequence权限才能改动sequence?nbsp;?br /> 以alter除startg外的所有sequence参数。如果想要改变start|必须drop sequence
再re
-create。例子:
ALTER sequence emp_sequence
INCREMENT 
BY 10
MAXVALUE 
10000
CYCLE 
-- ?0000后从头开?/span>
NOCACHE;

影响sequence的初始化参数Q?br /> sequence_CACHE_ENTRIES 
=
讄能同时被cache的sequence数目?br />
可以很简单的Drop sequence
DROP sequence order_seq;

l束


本篇文章来源?nbsp;站长中国 转蝲请以链接形式注明出处 |址Qhttp:
//www.zzchn.com/edu/Database/Oracle/20070803/25375.html




]]>
面表现 ajax初探http://www.aygfsteel.com/ec2008/archive/2007/10/16/153336.html月芽?/dc:creator>月芽?/author>Tue, 16 Oct 2007 09:40:00 GMThttp://www.aygfsteel.com/ec2008/archive/2007/10/16/153336.htmlhttp://www.aygfsteel.com/ec2008/comments/153336.htmlhttp://www.aygfsteel.com/ec2008/archive/2007/10/16/153336.html#Feedback0http://www.aygfsteel.com/ec2008/comments/commentRss/153336.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/153336.html 很早p动的接触qajaxQ一直只有一个懵懂的概念Q?br />                         ajax是javascript的一U应用;
                        ajax是增强用户友好度的一U尝?br />                         ajax是web2.0的一个概?br /> 下午没特别的事,打开了一个在我收藏夹沉封已久的网站,现在和大家一起分享下Qhttp://www.w3schools.com  个h觉得q个|站的内Ҏ显易懂,是入门的l好选择Q?br /> 里面的教E应该都是ؓ推广w3c标准服务的,在徏设普通网站到企业U的应用都用的到Q?br /> good luck for youQ?br />




]]>
ssh整合例子---struts、hibernate、spring+unit单元试http://www.aygfsteel.com/ec2008/archive/2007/10/11/152134.html月芽?/dc:creator>月芽?/author>Thu, 11 Oct 2007 11:55:00 GMThttp://www.aygfsteel.com/ec2008/archive/2007/10/11/152134.htmlhttp://www.aygfsteel.com/ec2008/comments/152134.htmlhttp://www.aygfsteel.com/ec2008/archive/2007/10/11/152134.html#Feedback5http://www.aygfsteel.com/ec2008/comments/commentRss/152134.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/152134.html 今天H然想独自配配sshQ说q就q了Q还比较顺畅,出现了错误,但很快就排除了,本来准备写篇详细点的文章的,但等下还有点事,p先介l个大概Q如果有问题的话mail meQliuyongcic@163.com Q?br />       环境配置Qjdk1.5+tomcat5.5+myeclipse
                struts1.2+hibernate3.1+spring2.0
      E序采用标准的MVCQ分三层构徏Qweb层,business层,DAO层;其中DAO层用C单的泛型
      数据库mysql spring的单元测?br />
djar包环境:
1.新徏工程
2.工程-右键-myeclipse-add struts capability
3.                  add spring capabilityQ选择librariesӞ选择spring2.0 core librariesQspring aop librariesQ?br /> spring2.0 web librariesQspring2.0 remoting librariesQspring2.0 misc librariesQsrping2.0 orm/dao/hibernate3 librariesQ?br /> 4.                  add hibernate capability
5.按上q添加后Q在把下载的ssh包中的文件ctrl+vq去Q?br /> 6.配置数据?br /> spring里面的数据库配置参数自己M改吧
    <bean id="dataSource"
        
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        
<property name="driverClassName"
            value
="com.mysql.jdbc.Driver" />
        
<property name="url"
            value
="jdbc:mysql://localhost:3306/liuyong" />
        
<property name="username" value="root" />
        
<property name="password" value="root" />
    
</bean>
数据库表ddl
CREATE TABLE `xiao` (
  `id` 
int(11) NOT NULL,
  `name` varchar(
255default NULL,
  `school` varchar(
255default NULL,
  PRIMARY KEY  (`id`)
) ENGINE
=InnoDB DEFAULT CHARSET=gb2312;
然后在里面添加一条记录:
QidQnameQschoolQ(1QliuyongQ?a >www.hunau.netQ以便测试之?br />
6.发布Q注意发布后Q要删除lib包中的asm-2.2.3.jarQ?br /> 因ؓ有冲H)
7.q行

源文件下载:Q其中lib目录的jar包太大,未包含进来)
/Files/ec2008/SSH.rar
如果有问题的话mail meQliuyongcic@163.com



]]>
java与js主要区别Q持l更Chttp://www.aygfsteel.com/ec2008/archive/2007/10/05/150546.html月芽?/dc:creator>月芽?/author>Fri, 05 Oct 2007 06:52:00 GMThttp://www.aygfsteel.com/ec2008/archive/2007/10/05/150546.htmlhttp://www.aygfsteel.com/ec2008/comments/150546.htmlhttp://www.aygfsteel.com/ec2008/archive/2007/10/05/150546.html#Feedback2http://www.aygfsteel.com/ec2008/comments/commentRss/150546.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/150546.html
//java
String[] b=new String[8];

//js
var a=new Array(8);



]]>
对hql查询l果的显C?/title><link>http://www.aygfsteel.com/ec2008/archive/2007/09/25/148006.html</link><dc:creator>月芽?/dc:creator><author>月芽?/author><pubDate>Tue, 25 Sep 2007 02:56:00 GMT</pubDate><guid>http://www.aygfsteel.com/ec2008/archive/2007/09/25/148006.html</guid><wfw:comment>http://www.aygfsteel.com/ec2008/comments/148006.html</wfw:comment><comments>http://www.aygfsteel.com/ec2008/archive/2007/09/25/148006.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/ec2008/comments/commentRss/148006.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/ec2008/services/trackbacks/148006.html</trackback:ping><description><![CDATA[情况一Q?br /> <div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 0, 0);">        List ha </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> ArrayList();<br />          ha</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">session.createQuery(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">SELECT test2.id,test2.name FROM Test2 as test2</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">).list();<br />         </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">ha = session.createCriteria(Test2.class).list();</span><span style="color: rgb(0, 128, 0);"><br /> </span><span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);"> (Iterator it </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> ha.iterator(); it.hasNext();) {<br />             Object[] test2 </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> (Object[]) it.next();<br />             System.out.print(test2[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">]);<br />             System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">test2[</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">]);    <br />         }</span></div> 情况一Z也可以动态的在hql语句中构Z个新的对象,定义相应的setQgetҎQ然后就可以像第三种情况一样用了Q这样便于从action到jsp面LC:参照<br /> ?a id="viewpost1_TitleUrl" href="../articles/145440.html">jsp通过logic:iterate或html:optionsCollection循环昄action中传q来的对象List</a>?br /> <br /> 情况二:<br /> <div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 0, 0);">        List ha </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> ArrayList();<br />          ha</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">session.createQuery(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">SELECT test2.name FROM Test2 as test2</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">).list();<br />         </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">ha = session.createCriteria(Test2.class).list();</span><span style="color: rgb(0, 128, 0);"><br /> </span><span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);"> (Iterator it </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> ha.iterator(); it.hasNext();) {<br />             System.out.println(it.next());    <br />         }</span></div> 情况三:<br /> <div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 0, 0);">        List ha </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> ArrayList();<br />          ha</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">session.createQuery(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">SELECT test2 FROM Test2 as test2</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">).list();<br />         </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">ha = session.createCriteria(Test2.class).list();</span><span style="color: rgb(0, 128, 0);"><br /> </span><span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);"> (Iterator it </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> ha.iterator(); it.hasNext();) {<br />             Test2 test2</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">(Test2)it.next();<br />             System.out.println(test2.getName());    <br />         }</span></div> <br /> <br /> <img src ="http://www.aygfsteel.com/ec2008/aggbug/148006.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/ec2008/" target="_blank">月芽?/a> 2007-09-25 10:56 <a href="http://www.aygfsteel.com/ec2008/archive/2007/09/25/148006.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>action中到jsp面的数据传?/title><link>http://www.aygfsteel.com/ec2008/archive/2007/09/24/147864.html</link><dc:creator>月芽?/dc:creator><author>月芽?/author><pubDate>Mon, 24 Sep 2007 10:16:00 GMT</pubDate><guid>http://www.aygfsteel.com/ec2008/archive/2007/09/24/147864.html</guid><wfw:comment>http://www.aygfsteel.com/ec2008/comments/147864.html</wfw:comment><comments>http://www.aygfsteel.com/ec2008/archive/2007/09/24/147864.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/ec2008/comments/commentRss/147864.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/ec2008/services/trackbacks/147864.html</trackback:ping><description><![CDATA[<br /> action中:<br /> <div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 0, 0);">        LoginForm loginForm </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> (LoginForm) form;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> TODO Auto-generated method stub</span><span style="color: rgb(0, 128, 0);"><br /> </span><span style="color: rgb(0, 0, 0);">        String name</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">loginForm.getName();<br />         request.setAttribute(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">name</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">, name);<br />         request.setAttribute(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">form</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">, loginForm);</span></div> <br /> jsp中显C:<br /> <div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);"><%=</span><span style="color: rgb(0, 0, 0);">request.getParameter(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">name</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)</span><span style="color: rgb(0, 0, 0);">%></span><span style="color: rgb(0, 0, 0);"><br />  </span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">bean:write name</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">name</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">/></span><span style="color: rgb(0, 0, 0);"><br />  </span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">bean:write name</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">form</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"> property</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">name</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">/></span></div> <br /> 如果是传递持久化cȝ对象的话Q显C同form的显CZ?br /> <img src ="http://www.aygfsteel.com/ec2008/aggbug/147864.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/ec2008/" target="_blank">月芽?/a> 2007-09-24 18:16 <a href="http://www.aygfsteel.com/ec2008/archive/2007/09/24/147864.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>jsp通过logic:iterate或html:optionsCollection循环昄action中传q来的对象Listhttp://www.aygfsteel.com/ec2008/archive/2007/09/15/145440.html月芽?/dc:creator>月芽?/author>Sat, 15 Sep 2007 15:58:00 GMThttp://www.aygfsteel.com/ec2008/archive/2007/09/15/145440.htmlhttp://www.aygfsteel.com/ec2008/comments/145440.htmlhttp://www.aygfsteel.com/ec2008/archive/2007/09/15/145440.html#Feedback2http://www.aygfsteel.com/ec2008/comments/commentRss/145440.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/145440.html
        List allUser=this.getLoginServiceImpl().find();
        request.setAttribute(
"user", allUser);
        
return mapping.findForward("listUser");
注:其中User对象有id和name属?br />
jsp昄Q法一
            <html:select property="school">
            
<html:option value="">
                
<bean:message key="login.select" />
           
</html:option>
                
<logic:present name="user">
                    
<logic:iterate id="user" name="user" offset="0">
                        
<option value="<bean:write name="user" property="id" />">
                            
<bean:write name="user" property="name" />
                        
</option>
                    
</logic:iterate>
                
</logic:present>
        
</html:select>
jsp昄Q法?br />
       <html:select property="school">
           
<html:optionsCollection name="user" value="id" label="name"/>
       
</html:select>

optionsCollection标签用法Q?br /> 与options标签一PoptionsCollection标签可以从集合或者是包含集合的对象里获得选项的标{?值对。在q两U情况里Q集合或包含集合的对象必L一个作用域对象Q否则定制标{ְ无法讉K它?br />
1.与包含集合的对象配合使用
举例QuserForm动作表单有一个如下所C的ArrayListcd的userList属性,相应的setQgetҎQ通过在action中设|好userForm后,request.setAttribute("userForm",userForm)Q?br /> 在jsp面Q?br />
<html:select property="school">
<html:optionsCollection name="userForm"
      property
="userList"/>
</html:select>

2.与集合配合?br /> action?br />
ArrayList userList=new ArrayList();
userList.add(
new LabelValueBean("1","haha"));
userList.add(
new LabelValueBean("2","dada"));
userList.add(
new LabelValueBean("3","xiaoxiao"));
request.setAttribute(
"userList",userList);
jsp面
<html:select property="school">
<html:optionsCollection name="userList"
      label
="label" value="value"/>
</html:select>

Q注Q边学边shareQ如有问题,Ƣ迎交流学习Q?br />



]]>
问题集锦http://www.aygfsteel.com/ec2008/archive/2007/09/15/145433.html月芽?/dc:creator>月芽?/author>Sat, 15 Sep 2007 15:01:00 GMThttp://www.aygfsteel.com/ec2008/archive/2007/09/15/145433.htmlhttp://www.aygfsteel.com/ec2008/comments/145433.htmlhttp://www.aygfsteel.com/ec2008/archive/2007/09/15/145433.html#Feedback0http://www.aygfsteel.com/ec2008/comments/commentRss/145433.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/145433.html
Cannot find message resources under key org.apache.struts.action.MESSAGE
错误Q在struts-config.xml配个默认的资源文件文件就可以了!奇?br />
hibernate版本问题Q?br /> 做一个hibernate单测试,代码如下
Test2.hhm.xml
    <class name="bean.Test2" table="Test2" schema="dbo" catalog="xiaoxiao">
        
<id name="id" type="java.lang.Integer">
            
<column name="ID" />
            
<generator class="increment" />
        
</id>
        
<property name="name" type="java.lang.String">
            
<column name="NAME" length="50" />
        
</property>
    
</class>
hibernate.cfg.xml
<session-factory>
    
<property name="connection.username">sa</property>
    
<property name="connection.url">
        jdbc:microsoft:sqlserver:
//localhost:1433;DatabaseName=xiaoxiao
    </property>
    
<property name="dialect">
        org.hibernate.dialect.SQLServerDialect
    
</property>
    
<property name="myeclipse.connection.profile">sql2000</property>
    
<property name="connection.password">sa</property>
    
<property name="connection.driver_class">
        com.microsoft.jdbc.sqlserver.SQLServerDriver
    
</property>
    
<property name="show_sql">true</property>
    
<property name="current_session_context_class">thread</property>
    
<mapping resource="bean/Test2.hbm.xml" />
</session-factory>
试代码Q?br />
        Session session = HibernateSessionFactory.getSessionFactory()
                .getCurrentSession();
        session.beginTransaction();

/*        List ha = new ArrayList();
        // ha=session.createQuery("from Test").list();
        ha = session.createCriteria(Test2.class).list();
        for (Iterator it = ha.iterator(); it.hasNext();) {
            Test2 test2 = (Test2) it.next();
            System.out.println(test2.getName());
        }
*/
/*        Test2 test2=new Test2();
        test2.setName("haha");
        session.save(test2);
*/
        
/*        Test2 test2=(Test2)session.load(Test2.class, 3);
        test2.setName("love you");
*/
        
/*        Test2 test2=(Test2)session.load(Test2.class, 3);
        session.delete(test2);
*/
        
        session.beginTransaction().commit();
其中HibernateSessionFactorycL用的myeclipse自动生成的那?/span>HibernateSessionFactory.java
发现Q在3.1版本下能正常q行Q但?.0版本下,只能查,不能增删改,不报M错误?br />






]]>
Struts Message Resources记http://www.aygfsteel.com/ec2008/archive/2007/09/13/144867.html月芽?/dc:creator>月芽?/author>Thu, 13 Sep 2007 07:10:00 GMThttp://www.aygfsteel.com/ec2008/archive/2007/09/13/144867.htmlhttp://www.aygfsteel.com/ec2008/comments/144867.htmlhttp://www.aygfsteel.com/ec2008/archive/2007/09/13/144867.html#Feedback0http://www.aygfsteel.com/ec2008/comments/commentRss/144867.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/144867.html 1.在web.xml中配
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
    org.apache.struts.action.ActionServlet
</servlet-class>
<init-param>

<param-value>
    com.hunau.liuyong.struts.ApplicationResources
</param-value>

</init-param>
</servlet>

2.在struts-confg.xml?br />
<message-resources parameter="com.hunau.liuyong.struts.ApplicationResources"/>

如果要在资源文g中定义一个动态的内容Q像“helloQ月芽儿”
可以如下Q?br />
message.hello=hello:{0}
在页面引用时传一个参数给它就OK
<bean:message key="message.hello" arg0="月芽?/span>"/>
如果不止一个参数就{1}{2}对应arg1 arg2





]]>
Struts中的error handlingQhtml:messages 与html:errors的显C错误消息的区别 http://www.aygfsteel.com/ec2008/archive/2007/09/13/144847.html月芽?/dc:creator>月芽?/author>Thu, 13 Sep 2007 06:48:00 GMThttp://www.aygfsteel.com/ec2008/archive/2007/09/13/144847.htmlhttp://www.aygfsteel.com/ec2008/comments/144847.htmlhttp://www.aygfsteel.com/ec2008/archive/2007/09/13/144847.html#Feedback0http://www.aygfsteel.com/ec2008/comments/commentRss/144847.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/144847.html 标签都能完成。而他们在语法上的区别也很,举例说明Q?lt;html:messages/>

        ActionMessages message = new ActionMessages();
        
//从Request范围获得出错面的资源文件属?/span>
        MessageResources messageResources = getResources(request);
        
//判断是否出错Q出错就d到message对象中,其中add的第一个属性用于标识不同的错误信息Q第二个属性是得到错误?nbsp;       C字W串Q?/span>W一个属性与昄面的Property对应Q如果设Z样就把错一hC出?/span>
        if(bookEditForm.getAuthor().equals(""))
            message.add(
"author"new ActionMessage(
            "
error.field", messageResources.getMessage("label.author", request)));
        
if(bookEditForm.getTitle().equals(""))
            message.add(
"author2"new ActionMessage(
            "
error.field", messageResources.getMessage("label.title", request)));
        
//判断是否有错误,q蟩?nbsp;       
        if(!message.isEmpty()){
        //在Request范围保存错误消息
            saveMessages(request, message);
            
return mapping.findForward("showEdit");
        }
面昄Q?br /> 其中id属性可以随便取Q但beanQwirte的name要与id一P昄全部错误信息׃要Property属性,昄特定的出错信息就要指定property属?br />
            <html:messages id="haha" property="author" message="true"> 
                
<font style="font-weight:bold; color=#FF0000">
                <
bean:write name="haha" />
               
</font><br>
            
</html:messages>


<html:errors/>
        ActionErrors actionErrors = new ActionErrors();
        MessageResources messageResources 
= getResources(request);
        
        
if(bookEditForm.getAuthor().equals(""))
            actionErrors.add(
"author"new ActionError(
           
"error.field", messageResources.getMessage("label.author", request)));
        
if(bookEditForm.getTitle().equals(""))
            actionErrors.add(
"author2"new ActionError(
           
"error.field", messageResources.getMessage("label.title", request)));

        
if(!actionErrors.isEmpty()){
            saveErrors(request, actionErrors);
            
return mapping.findForward("showEdit");
        }

面昄Q?br />
<html:errors property="author"/>
//或?/span>
<html:errors />

最后:html:messages?.1以后出现的,也是推荐使用的;



]]>
Java日期处理http://www.aygfsteel.com/ec2008/archive/2007/09/12/144620.html月芽?/dc:creator>月芽?/author>Wed, 12 Sep 2007 13:31:00 GMThttp://www.aygfsteel.com/ec2008/archive/2007/09/12/144620.htmlhttp://www.aygfsteel.com/ec2008/comments/144620.htmlhttp://www.aygfsteel.com/ec2008/archive/2007/09/12/144620.html#Feedback0http://www.aygfsteel.com/ec2008/comments/commentRss/144620.htmlhttp://www.aygfsteel.com/ec2008/services/trackbacks/144620.html
public class Test {
    
public static void main(String[] args) {
        
// Calendar calendar=Calendar.getInstance();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(
                
"E--yyyyqM月dd日HH时mm分ssU?/span>", Locale.SIMPLIFIED_CHINESE);
        
// sdf.applyPattern("yyyyqMM月dd日HH时mm分ssU?);
        String timeStr = simpleDateFormat.format(Calendar.getInstance()
                .getTime());
        String timeStr2 
= simpleDateFormat.format(new Date().getTime());
        System.out.println(timeStr);

    }
}
日期和时间格式由<EM>日期和时间模?lt;/EM> 字符串指定?br />
字母 日期或时间元?表示 CZ
G Era 标志W? Text AD
y q? Year 1996; 96
M q中的月? Month July
w q中的周? Number 27
W 月䆾中的周数 Number 2
D q中的天? Number 189
d 月䆾中的天数 Number 10
F 月䆾中的星期 Number 2
E 星期中的天数 Text Tuesday
a Am/pm 标记 Text PM
H 一天中时?-23 Number 0
k 一天中时?-24 Number 24
K am/pm中小时数0-11 Number 0
h am/pm中小时数1-12 Number 12
m 时中的分钟? Number 30
s 分钟中的U数 Number 55
S 毫秒? Number 978
z 时区 General time zone GMT-08:00
Z 时区 RFC 822 time zone -0800


]]>
վ֩ģ壺 | ͬ| ʼ| | | ɽ| Զ| | | ţ| | ʯ| | Ǽ| ӽ| Ϸ| | ϲ| Ҵ| ڶ| ͼľ| | | ƽ| | Է| | | | ʤ| | | ƽ| | Į| Ϫ| г| | ˫| | |