﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-我思故我强-文章分类-Ajax</title><link>http://www.blogjava.net/balajinima/category/26974.html</link><description /><language>zh-cn</language><lastBuildDate>Sat, 15 Dec 2007 13:56:52 GMT</lastBuildDate><pubDate>Sat, 15 Dec 2007 13:56:52 GMT</pubDate><ttl>60</ttl><item><title>23个免费的AJAX树菜单组件</title><link>http://www.blogjava.net/balajinima/articles/167666.html</link><dc:creator>李云泽</dc:creator><author>李云泽</author><pubDate>Fri, 14 Dec 2007 01:34:00 GMT</pubDate><guid>http://www.blogjava.net/balajinima/articles/167666.html</guid><wfw:comment>http://www.blogjava.net/balajinima/comments/167666.html</wfw:comment><comments>http://www.blogjava.net/balajinima/articles/167666.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/balajinima/comments/commentRss/167666.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/balajinima/services/trackbacks/167666.html</trackback:ping><description><![CDATA[
		<h2 class="post-title">
				<iframe name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-8438768637354676&amp;dt=1197595428390&amp;lmt=1189472716&amp;prev_fmts=728x15_0ads_al_s&amp;format=336x280_as&amp;output=html&amp;correlator=1197595428359&amp;channel=9876870027&amp;pv_ch=9876870027%2B&amp;url=http%3A%2F%2Fwww.duduwolf.com%2Fwiki%2F2007%2F544.html&amp;color_bg=FFFFFF&amp;color_text=000000&amp;color_link=006699&amp;color_url=006699&amp;color_border=FFFFFF&amp;ad_type=text_image&amp;ref=http%3A%2F%2Fwww.baidu.com%2Fs%3Fwd%3Dajax%25CA%25F7%26cl%3D3&amp;cc=100&amp;ga_vid=180716310.1197595428&amp;ga_sid=1197595428&amp;ga_hid=536533556&amp;flash=9&amp;u_h=600&amp;u_w=800&amp;u_ah=600&amp;u_aw=800&amp;u_cd=32&amp;u_tz=480&amp;u_java=true" frameborder="0" width="336" scrolling="no" height="280" allowtransparency="">
				</iframe>
		</h2>
		<div class="post-body">1、<a href="http://www.destroydrop.com/javascripts/tree/default.html" target="_blank">dTree</a><br />2、<a href="http://www.treemenu.net/" target="_blank">Treeview JavaScript</a><br />3、<a href="http://www.jackslocum.com/blog/2006/12/29/preview-drag-and-drop-enhancements-and-the-new-treepanel/" target="_blank">YUI Tree Panel Component with drag and drop and more</a><br />4、<a href="http://www.dhtmlgoodies.com/index.html?whichScript=drag-drop-folder-tree" target="_blank">Ajax drag’n drop folder tree by dhtmlgoodies.com</a>[<a href="http://www.dhtmlgoodies.com/scripts/drag-drop-folder-tree/drag-drop-folder-tree.html" target="_blank">Example Page</a>]<br />5、<a href="http://www.dhtmlgoodies.com/index.html?whichScript=ajax_update_data" target="_blank">Update a tree with Ajax by dhtmlgoodies.com</a>[<a href="http://www.dhtmlgoodies.com/scripts/ajax-update-data/ajax-update-data.html#" target="_blank">Example Page</a>]<br />6、<a href="http://www.dhtmlgoodies.com/index.html?whichScript=folder_tree_static" target="_blank">Static list based folder Tree by dhtmlgoodies.com</a>[<a href="http://www.dhtmlgoodies.com/scripts/folder-tree-static/folder-tree-static.html" target="_blank">Example Page</a>]<br />7、<a href="http://www.dhtmlgoodies.com/index.html?whichScript=folder_tree" target="_blank">Folder Tree (with PHP support)</a>[<a href="http://www.dhtmlgoodies.com/scripts/dhtmlgoodies-tree/dhtmlgoodies-tree-index.html" target="_blank">Example Page</a>]<br />8、<a href="http://www.silverstripe.com/tree-control/" target="_blank">Tree Control</a>[<a href="http://www.silverstripe.com/assets/tree/demo.html" target="_blank">Example Page</a>]<br />9、<a href="http://www.componentart.com/demos/splitter/features/expand_collapsePanes/WebForm1.aspx" target="_blank">Expand/Collapse Panes</a><br />10、<a href="http://www.mattkruse.com/javascript/mktree/" target="_blank">DHTML Tree</a><br />11、<a href="http://treemenu.nornix.com/" target="_blank">Nornix Tree Menu</a><br />12、<a href="http://www.milonic.com/treemenu/" target="_blank">Milonic Treemenu</a>[<a href="http://www.milonic.com/treemenu/tree/" target="_blank">Example Page</a>]<br />13、<a href="http://be.twixt.us/jquery/treeViewCollapsed.php">jQuery treeView</a> [animated]<br />14、<a href="http://www.softcomplex.com/products/tigra_tree_menu/" target="_blank">Tigra Tree Menu</a><br />15、<a href="http://scbr.com/docs/products/dhtmlxTree/index.shtml" target="_blank">dhtmlxTree</a>[Ajax powered with drag and drop function]<br />16、<a href="http://developer.yahoo.com/yui/examples/treeview/menu.html?mode=dist" target="_blank">Yahoo UI Tree Controll</a><br />17、<a href="http://www.dynamicdrive.com/dynamicindex1/navigate1.htm" target="_blank">Dynamic Drive Simple Tree Menu</a><br />18、<a href="http://www.twinhelix.com/dhtml/checktree/demo/" target="_blank">CheckTree</a><br />19、<a href="http://javascript.cooldev.com/scripts/cooltree/" target="_blank">CooljsTree</a> [<a href="http://javascript.cooldev.com/scripts/cooltree/demos/superdemo/" target="_blank">Example Page</a>]<br />20、<a href="http://colin.mollenhour.com/ajaxtree/files/ajaxtree-js.html" target="_blank">Ajax Tree</a><br />21、<a href="http://concepts.waetech.com/dom_tree/" target="_blank">Super-Simple DHTML Tree</a><br />22、<a href="http://www.treemenu.org/" target="_blank">Mortens JavaScript Tree Menu</a><br />23、<a href="http://ajaxwidgets.com/AllControlsSamples/TreeView.aspx" target="_blank">TreeView Widget Control for ASP.NET</a>[Thanks Thomas]</div>
<img src ="http://www.blogjava.net/balajinima/aggbug/167666.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/balajinima/" target="_blank">李云泽</a> 2007-12-14 09:34 <a href="http://www.blogjava.net/balajinima/articles/167666.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ajax简单实例</title><link>http://www.blogjava.net/balajinima/articles/158560.html</link><dc:creator>李云泽</dc:creator><author>李云泽</author><pubDate>Tue, 06 Nov 2007 07:12:00 GMT</pubDate><guid>http://www.blogjava.net/balajinima/articles/158560.html</guid><wfw:comment>http://www.blogjava.net/balajinima/comments/158560.html</wfw:comment><comments>http://www.blogjava.net/balajinima/articles/158560.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/balajinima/comments/commentRss/158560.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/balajinima/services/trackbacks/158560.html</trackback:ping><description><![CDATA[//设一个变量<br />  <br />  var XMLHttpReq=false;<br />  //创建一个XMLHttpRequest对象<br />  function createXMLHttpRequest(){<br />  if(window.XMLHttpRequest){ //Mozilla <br />  XMLHttpReq=new XMLHttpRequest();<br />  }<br />  else if(window.ActiveXObject){<br />  try{<br />  XMLHttpReq=new ActiveXObject("Msxml2.XMLHTTP");<br />  }catch(e){<br />  try{<br />  XMLHttpReq=new ActiveXObject("Microsoft.XMLHTTP");<br />  }catch(e){}<br />  }<br />  }<br />  }<br />  <br />  <br />  //发送请求函数<br />  function send(url){<br />  createXMLHttpRequest();<br />  XMLHttpReq.open("GET",url,true);<br />  XMLHttpReq.onreadystatechange=proce;   //指定响应的函数<br />  XMLHttpReq.send(null);  //发送请求<br />  }<br />  <br />  function proce(){<br />  if(XMLHttpReq.readyState==4){ //对象状态<br />  if(XMLHttpReq.status==200){//信息已成功返回，开始处理信息<br />  var res=XMLHttpReq.responseXML.getElementsByTagName("root")[0].getElementsByTagName("father")[0].firstChild.data;<br />  window.alert(res);<br />  }else{<br />  window.alert("所请求的页面有异常");<br />  }<br />  }<br />  }<br />  <br />  //身份验证 <br />  function check(){<br />  var name=document.getElementById("name").value;<br />  <br />  if(name==""){<br />  alert("请输入姓名");<br />  return false;<br />  }<br />  else{<br />  send('/WEB-INF/Xml.xml');<br />  }<br />  } <br />下面的可以取到ＸＭＬ．xml中的数据<br />var res=XMLHttpReq.responseXML.getElementsByTagName("father")[1].getElementsByTagName("children")[0].firstChild.data;<br /><br />XML.XML<br />&lt; xml version="1.0" encoding="UTF-8" &gt;<br />&lt;xml-body&gt;<br />&lt;root&gt;<br />   &lt;father&gt;<br />      &lt;children&gt;华&lt;/children&gt;<br />      &lt;girl&gt;jack&lt;/girl&gt;<br />   &lt;/father&gt;<br /><br />&lt;father&gt;<br />      &lt;children&gt;合营&lt;/children&gt;<br />   <br />   &lt;/father&gt;<br /><br />&lt;/root&gt;<br />&lt;/xml-body&gt;<br /><br /><img src ="http://www.blogjava.net/balajinima/aggbug/158560.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/balajinima/" target="_blank">李云泽</a> 2007-11-06 15:12 <a href="http://www.blogjava.net/balajinima/articles/158560.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ajax实现二级联动下拉框 </title><link>http://www.blogjava.net/balajinima/articles/146689.html</link><dc:creator>李云泽</dc:creator><author>李云泽</author><pubDate>Thu, 20 Sep 2007 02:04:00 GMT</pubDate><guid>http://www.blogjava.net/balajinima/articles/146689.html</guid><wfw:comment>http://www.blogjava.net/balajinima/comments/146689.html</wfw:comment><comments>http://www.blogjava.net/balajinima/articles/146689.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/balajinima/comments/commentRss/146689.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/balajinima/services/trackbacks/146689.html</trackback:ping><description><![CDATA[这个一个ajax的经典示例，也是ajax的长处所在。不多说了，下面来看代码。<br /><br />项目结构图：<br /><img height="161" alt="option1.jpg" src="http://www.blogjava.net/images/blogjava_net/rickhunter/ajax/option1.jpg" width="195" border="0" /><br /><br />index.jsp: <br /><div style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="COLOR: rgb(0,0,0)">&lt;%</span><span style="COLOR: rgb(0,0,0)">@ page language</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">java</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)"> contentType</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">text/html; charset=utf-8</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">%&gt;</span><span style="COLOR: rgb(0,0,0)"><br /><br /></span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">html</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />  </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">head</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />    </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">title</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)">My JSP </span><span style="COLOR: rgb(0,0,0)">'</span><span style="COLOR: rgb(0,0,0)">index.jsp</span><span style="COLOR: rgb(0,0,0)">'</span><span style="COLOR: rgb(0,0,0)"> starting page</span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">title</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />    </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">meta http</span><span style="COLOR: rgb(0,0,0)">-</span><span style="COLOR: rgb(0,0,0)">equiv</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">Content-Type</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)"> content</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">text/html; charset=utf-8</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />    </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">SCRIPT type</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">text/javascript</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />        var req;<br />        window.onload</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">function(){<br />        }<br />        <br />        function Change_Select()<br />        {<br />            var zhi</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">document.getElementById(</span><span style="COLOR: rgb(0,0,0)">'</span><span style="COLOR: rgb(0,0,0)">hero</span><span style="COLOR: rgb(0,0,0)">'</span><span style="COLOR: rgb(0,0,0)">).value;<br />            var url</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">select?id=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">+</span><span style="COLOR: rgb(0,0,0)">escape(zhi);<br />            </span><span style="COLOR: rgb(0,0,255)">if</span><span style="COLOR: rgb(0,0,0)">(window.XMLHttpRequest)<br />            {<br />                req</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)"> XMLHttpRequest();<br />            }</span><span style="COLOR: rgb(0,0,255)">else</span><span style="COLOR: rgb(0,0,0)"> </span><span style="COLOR: rgb(0,0,255)">if</span><span style="COLOR: rgb(0,0,0)">(window.ActiveXObject)<br />            {<br />                req</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)"> ActiveXObject(</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">Microsoft.XMLHTTP</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">);<br />            }<br />            <br />            </span><span style="COLOR: rgb(0,0,255)">if</span><span style="COLOR: rgb(0,0,0)">(req)<br />            {<br />                req.open(</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">GET</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">,url,</span><span style="COLOR: rgb(0,0,255)">true</span><span style="COLOR: rgb(0,0,0)">);<br />                req.onreadystatechange</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">callback;<br />                req.send(</span><span style="COLOR: rgb(0,0,255)">null</span><span style="COLOR: rgb(0,0,0)">);<br />            }<br />        }<br />        <br />        function callback()<br />        {<br />            </span><span style="COLOR: rgb(0,0,255)">if</span><span style="COLOR: rgb(0,0,0)">(req.readyState </span><span style="COLOR: rgb(0,0,0)">==</span><span style="COLOR: rgb(0,0,0)"> </span><span style="COLOR: rgb(0,0,0)">4</span><span style="COLOR: rgb(0,0,0)">)<br />            {<br />                </span><span style="COLOR: rgb(0,0,255)">if</span><span style="COLOR: rgb(0,0,0)">(req.status </span><span style="COLOR: rgb(0,0,0)">==</span><span style="COLOR: rgb(0,0,0)"> </span><span style="COLOR: rgb(0,0,0)">200</span><span style="COLOR: rgb(0,0,0)">)<br />                {<br />                    parseMessage();<br />                }</span><span style="COLOR: rgb(0,0,255)">else</span><span style="COLOR: rgb(0,0,0)">{<br />                    alert(</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">Not able to retrieve description</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">+</span><span style="COLOR: rgb(0,0,0)">req.statusText);<br />                }<br />            }<br />        }<br />        <br />        function parseMessage()<br />        {<br />            var xmlDoc</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">req.responseXML.documentElement;<br />            var xSel</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">xmlDoc.getElementsByTagName(</span><span style="COLOR: rgb(0,0,0)">'</span><span style="COLOR: rgb(0,0,0)">select</span><span style="COLOR: rgb(0,0,0)">'</span><span style="COLOR: rgb(0,0,0)">);<br />            var select_root</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">document.getElementById(</span><span style="COLOR: rgb(0,0,0)">'</span><span style="COLOR: rgb(0,0,0)">skill</span><span style="COLOR: rgb(0,0,0)">'</span><span style="COLOR: rgb(0,0,0)">);<br />            select_root.options.length</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">0</span><span style="COLOR: rgb(0,0,0)">;<br />            <br />            </span><span style="COLOR: rgb(0,0,255)">for</span><span style="COLOR: rgb(0,0,0)">(var i</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">0</span><span style="COLOR: rgb(0,0,0)">;i</span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">xSel.length;i</span><span style="COLOR: rgb(0,0,0)">++</span><span style="COLOR: rgb(0,0,0)">)<br />            {<br />                var xValue</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">xSel[i].childNodes[</span><span style="COLOR: rgb(0,0,0)">0</span><span style="COLOR: rgb(0,0,0)">].firstChild.nodeValue;<br />                var xText</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">xSel[i].childNodes[</span><span style="COLOR: rgb(0,0,0)">1</span><span style="COLOR: rgb(0,0,0)">].firstChild.nodeValue;<br />                var option</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)"> Option(xText,xValue);<br />                </span><span style="COLOR: rgb(0,0,255)">try</span><span style="COLOR: rgb(0,0,0)">{<br />                    select_root.add(option);<br />                }</span><span style="COLOR: rgb(0,0,255)">catch</span><span style="COLOR: rgb(0,0,0)">(e){<br />                }<br />            }<br />            <br />            <br />        }<br />    </span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">SCRIPT</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />  </span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">head</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />  <br />  </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">body</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />    </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">div align</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">center</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />        </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">form 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)">form1</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)"> method</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">post</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)"> action</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">""</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />            </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">TABLE width</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">70%</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)"> boder</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">0</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)"> cellspacing</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">0</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />                </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">TR</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />                    </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">TD align</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">center</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)">Double Select Box</span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">TD</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />                </span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">TR</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />                </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">TR</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />                    </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">TD</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />                        </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">SELECT 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)">hero</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)"> id</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">hero</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)"> onChange</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">Change_Select()</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />                            </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">OPTION value</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">0</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)">Unbounded</span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">OPTION</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />                            </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">OPTION value</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">1</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)">D.K.</span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">OPTION</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />                            </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">OPTION value</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">2</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)">NEC.</span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">OPTION</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />                            </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">OPTION value</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">3</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)">BOSS</span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">OPTION</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />                        </span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">SELECT</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />                        </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">SELECT 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)">skill</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)"> id</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">skill</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />                            </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">OPTION value</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">0</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)">Unbounded</span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">OPTION</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />                        </span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">SELECT</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />                    </span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">TD</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />                </span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">TR</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />                </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">TR</span><span style="COLOR: rgb(0,0,0)">&gt;&lt;</span><span style="COLOR: rgb(0,0,0)">td</span><span style="COLOR: rgb(0,0,0)">&gt;&amp;</span><span style="COLOR: rgb(0,0,0)">nbsp;</span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">td</span><span style="COLOR: rgb(0,0,0)">&gt;&lt;/</span><span style="COLOR: rgb(0,0,0)">TR</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />            </span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">TABLE</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />        </span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">form</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />    </span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">div</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />  </span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">body</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br /></span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">html</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br /></span></div><br />SelectServlet.java:<br /><div style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="COLOR: rgb(0,0,255)">package</span><span style="COLOR: rgb(0,0,0)"> com;<br /><br /></span><span style="COLOR: rgb(0,0,255)">import</span><span style="COLOR: rgb(0,0,0)"> java.io.IOException;<br /></span><span style="COLOR: rgb(0,0,255)">import</span><span style="COLOR: rgb(0,0,0)"> java.io.PrintWriter;<br /><br /></span><span style="COLOR: rgb(0,0,255)">import</span><span style="COLOR: rgb(0,0,0)"> javax.servlet.ServletException;<br /></span><span style="COLOR: rgb(0,0,255)">import</span><span style="COLOR: rgb(0,0,0)"> javax.servlet.http.HttpServlet;<br /></span><span style="COLOR: rgb(0,0,255)">import</span><span style="COLOR: rgb(0,0,0)"> javax.servlet.http.HttpServletRequest;<br /></span><span style="COLOR: rgb(0,0,255)">import</span><span style="COLOR: rgb(0,0,0)"> javax.servlet.http.HttpServletResponse;<br /><br /></span><span style="COLOR: rgb(0,0,255)">public</span><span style="COLOR: rgb(0,0,0)"> </span><span style="COLOR: rgb(0,0,255)">class</span><span style="COLOR: rgb(0,0,0)"> SelectServlet </span><span style="COLOR: rgb(0,0,255)">extends</span><span style="COLOR: rgb(0,0,0)"> HttpServlet {<br /><br />    </span><span style="COLOR: rgb(0,128,0)">/**</span><span style="COLOR: rgb(0,128,0)"><br />     * Constructor of the object.<br />     </span><span style="COLOR: rgb(0,128,0)">*/</span><span style="COLOR: rgb(0,0,0)"><br />    </span><span style="COLOR: rgb(0,0,255)">public</span><span style="COLOR: rgb(0,0,0)"> SelectServlet() {<br />        </span><span style="COLOR: rgb(0,0,255)">super</span><span style="COLOR: rgb(0,0,0)">();<br />    }<br /><br />    </span><span style="COLOR: rgb(0,128,0)">/**</span><span style="COLOR: rgb(0,128,0)"><br />     * Destruction of the servlet. &lt;br&gt;<br />     </span><span style="COLOR: rgb(0,128,0)">*/</span><span style="COLOR: rgb(0,0,0)"><br />    </span><span style="COLOR: rgb(0,0,255)">public</span><span style="COLOR: rgb(0,0,0)"> </span><span style="COLOR: rgb(0,0,255)">void</span><span style="COLOR: rgb(0,0,0)"> destroy() {<br />        </span><span style="COLOR: rgb(0,0,255)">super</span><span style="COLOR: rgb(0,0,0)">.destroy(); </span><span style="COLOR: rgb(0,128,0)">//</span><span style="COLOR: rgb(0,128,0)"> Just puts "destroy" string in log<br />        </span><span style="COLOR: rgb(0,128,0)">//</span><span style="COLOR: rgb(0,128,0)"> Put your code here</span><span style="COLOR: rgb(0,128,0)"><br /></span><span style="COLOR: rgb(0,0,0)">    }<br /><br />    </span><span style="COLOR: rgb(0,128,0)">/**</span><span style="COLOR: rgb(0,128,0)"><br />     * The doGet method of the servlet. &lt;br&gt;<br />     *<br />     * This method is called when a form has its tag value method equals to get.<br />     * <br />     * </span><span style="COLOR: rgb(128,128,128)">@param</span><span style="COLOR: rgb(0,128,0)"> request the request send by the client to the server<br />     * </span><span style="COLOR: rgb(128,128,128)">@param</span><span style="COLOR: rgb(0,128,0)"> response the response send by the server to the client<br />     * </span><span style="COLOR: rgb(128,128,128)">@throws</span><span style="COLOR: rgb(0,128,0)"> ServletException if an error occurred<br />     * </span><span style="COLOR: rgb(128,128,128)">@throws</span><span style="COLOR: rgb(0,128,0)"> IOException if an error occurred<br />     </span><span style="COLOR: rgb(0,128,0)">*/</span><span style="COLOR: rgb(0,0,0)"><br />    </span><span style="COLOR: rgb(0,0,255)">public</span><span style="COLOR: rgb(0,0,0)"> </span><span style="COLOR: rgb(0,0,255)">void</span><span style="COLOR: rgb(0,0,0)"> doGet(HttpServletRequest request, HttpServletResponse response)<br />            </span><span style="COLOR: rgb(0,0,255)">throws</span><span style="COLOR: rgb(0,0,0)"> ServletException, IOException {<br />        response.setContentType(</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">text/xml</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">);<br />        response.setHeader(</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">Cache-Control</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)">no-cache</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">);<br />        <br />        String targetId</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)">id</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">).toString();<br />        String xml_start</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&lt;selects&gt;</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">;<br />        String xml_end</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&lt;/selects&gt;</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">;<br />        String xml</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,255)">if</span><span style="COLOR: rgb(0,0,0)">(targetId.equalsIgnoreCase(</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">0</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">)){<br />            xml</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&lt;select&gt;&lt;value&gt;0&lt;/value&gt;&lt;text&gt;Unbounded&lt;/text&gt;&lt;/select&gt;</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">;<br />        }</span><span style="COLOR: rgb(0,0,255)">else</span><span style="COLOR: rgb(0,0,0)"> </span><span style="COLOR: rgb(0,0,255)">if</span><span style="COLOR: rgb(0,0,0)">(targetId.equalsIgnoreCase(</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">1</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">)){<br />            xml</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&lt;select&gt;&lt;value&gt;1&lt;/value&gt;&lt;text&gt;Mana Burn&lt;/text&gt;&lt;/select&gt;</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">;<br />            xml </span><span style="COLOR: rgb(0,0,0)">+=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&lt;select&gt;&lt;value&gt;2&lt;/value&gt;&lt;text&gt;Death Coil&lt;/text&gt;&lt;/select&gt;</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">;<br />            xml </span><span style="COLOR: rgb(0,0,0)">+=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&lt;select&gt;&lt;value&gt;3&lt;/value&gt;&lt;text&gt;Unholy Aura&lt;/text&gt;&lt;/select&gt;</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">;<br />            xml </span><span style="COLOR: rgb(0,0,0)">+=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&lt;select&gt;&lt;value&gt;4&lt;/value&gt;&lt;text&gt;Unholy Fire&lt;/text&gt;&lt;/select&gt;</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">;<br />        }</span><span style="COLOR: rgb(0,0,255)">else</span><span style="COLOR: rgb(0,0,0)"> </span><span style="COLOR: rgb(0,0,255)">if</span><span style="COLOR: rgb(0,0,0)">(targetId.equalsIgnoreCase(</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">2</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">)){<br />            xml</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&lt;select&gt;&lt;value&gt;1&lt;/value&gt;&lt;text&gt;Corprxplode&lt;/text&gt;&lt;/select&gt;</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">;<br />            xml </span><span style="COLOR: rgb(0,0,0)">+=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&lt;select&gt;&lt;value&gt;2&lt;/value&gt;&lt;text&gt;Raise Dead&lt;/text&gt;&lt;/select&gt;</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">;<br />            xml </span><span style="COLOR: rgb(0,0,0)">+=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&lt;select&gt;&lt;value&gt;3&lt;/value&gt;&lt;text&gt;Brilliance Aura&lt;/text&gt;&lt;/select&gt;</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">;<br />            xml </span><span style="COLOR: rgb(0,0,0)">+=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&lt;select&gt;&lt;value&gt;4&lt;/value&gt;&lt;text&gt;Aim Aura&lt;/text&gt;&lt;/select&gt;</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">;<br />        }</span><span style="COLOR: rgb(0,0,255)">else</span><span style="COLOR: rgb(0,0,0)">{<br />            xml</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&lt;select&gt;&lt;value&gt;1&lt;/value&gt;&lt;text&gt;Rain of Chaos&lt;/text&gt;&lt;/select&gt;</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">;<br />            xml </span><span style="COLOR: rgb(0,0,0)">+=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&lt;select&gt;&lt;value&gt;2&lt;/value&gt;&lt;text&gt;Finger of Death&lt;/text&gt;&lt;/select&gt;</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">;<br />            xml </span><span style="COLOR: rgb(0,0,0)">+=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&lt;select&gt;&lt;value&gt;3&lt;/value&gt;&lt;text&gt;Bash&lt;/text&gt;&lt;/select&gt;</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">;<br />            xml </span><span style="COLOR: rgb(0,0,0)">+=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">&lt;select&gt;&lt;value&gt;4&lt;/value&gt;&lt;text&gt;Summon Doom&lt;/text&gt;&lt;/select&gt;</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">;<br />        }<br />        String last_xml</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">xml_start</span><span style="COLOR: rgb(0,0,0)">+</span><span style="COLOR: rgb(0,0,0)">xml</span><span style="COLOR: rgb(0,0,0)">+</span><span style="COLOR: rgb(0,0,0)">xml_end;<br />        response.getWriter().write(last_xml);<br />    }<br /><br />    </span><span style="COLOR: rgb(0,128,0)">/**</span><span style="COLOR: rgb(0,128,0)"><br />     * The doPost method of the servlet. &lt;br&gt;<br />     *<br />     * This method is called when a form has its tag value method equals to post.<br />     * <br />     * </span><span style="COLOR: rgb(128,128,128)">@param</span><span style="COLOR: rgb(0,128,0)"> request the request send by the client to the server<br />     * </span><span style="COLOR: rgb(128,128,128)">@param</span><span style="COLOR: rgb(0,128,0)"> response the response send by the server to the client<br />     * </span><span style="COLOR: rgb(128,128,128)">@throws</span><span style="COLOR: rgb(0,128,0)"> ServletException if an error occurred<br />     * </span><span style="COLOR: rgb(128,128,128)">@throws</span><span style="COLOR: rgb(0,128,0)"> IOException if an error occurred<br />     </span><span style="COLOR: rgb(0,128,0)">*/</span><span style="COLOR: rgb(0,0,0)"><br />    </span><span style="COLOR: rgb(0,0,255)">public</span><span style="COLOR: rgb(0,0,0)"> </span><span style="COLOR: rgb(0,0,255)">void</span><span style="COLOR: rgb(0,0,0)"> doPost(HttpServletRequest request, HttpServletResponse response)<br />            </span><span style="COLOR: rgb(0,0,255)">throws</span><span style="COLOR: rgb(0,0,0)"> ServletException, IOException {<br /><br />        doGet(request,response);<br />    }<br /><br />    </span><span style="COLOR: rgb(0,128,0)">/**</span><span style="COLOR: rgb(0,128,0)"><br />     * Initialization of the servlet. &lt;br&gt;<br />     *<br />     * </span><span style="COLOR: rgb(128,128,128)">@throws</span><span style="COLOR: rgb(0,128,0)"> ServletException if an error occure<br />     </span><span style="COLOR: rgb(0,128,0)">*/</span><span style="COLOR: rgb(0,0,0)"><br />    </span><span style="COLOR: rgb(0,0,255)">public</span><span style="COLOR: rgb(0,0,0)"> </span><span style="COLOR: rgb(0,0,255)">void</span><span style="COLOR: rgb(0,0,0)"> init() </span><span style="COLOR: rgb(0,0,255)">throws</span><span style="COLOR: rgb(0,0,0)"> ServletException {<br />        </span><span style="COLOR: rgb(0,128,0)">//</span><span style="COLOR: rgb(0,128,0)"> Put your code here</span><span style="COLOR: rgb(0,128,0)"><br /></span><span style="COLOR: rgb(0,0,0)">    }<br /><br />}<br /></span></div><br />web.xml:<br /><div style="BORDER-RIGHT: rgb(204,204,204) 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: rgb(204,204,204) 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 98%; PADDING-TOP: 4px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; BACKGROUND-COLOR: rgb(238,238,238)"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="COLOR: rgb(0,0,0)">&lt;?</span><span style="COLOR: rgb(0,0,0)">xml version</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">1.0</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)"> encoding</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">UTF-8</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">?&gt;</span><span style="COLOR: rgb(0,0,0)"><br /></span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">web</span><span style="COLOR: rgb(0,0,0)">-</span><span style="COLOR: rgb(0,0,0)">app version</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">2.4</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)"> <br />    xmlns</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">http://java.sun.com/xml/ns/j2ee</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)"> <br />    xmlns:xsi</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">http://www.w3.org/2001/XMLSchema-instance</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)"> <br />    xsi:schemaLocation</span><span style="COLOR: rgb(0,0,0)">=</span><span style="COLOR: rgb(0,0,0)">"</span><span style="COLOR: rgb(0,0,0)">http://java.sun.com/xml/ns/j2ee </span><span style="COLOR: rgb(0,0,0)"><br /></span><span style="COLOR: rgb(0,0,0)">    http:</span><span style="COLOR: rgb(0,128,0)">//</span><span style="COLOR: rgb(0,128,0)">java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;</span><span style="COLOR: rgb(0,128,0)"><br /></span><span style="COLOR: rgb(0,0,0)">  </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">servlet</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />    </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">servlet</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)">&gt;</span><span style="COLOR: rgb(0,0,0)">SelectServlet</span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">servlet</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)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />    </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">servlet</span><span style="COLOR: rgb(0,0,0)">-</span><span style="COLOR: rgb(0,0,255)">class</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)">com.SelectServlet</span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">servlet</span><span style="COLOR: rgb(0,0,0)">-</span><span style="COLOR: rgb(0,0,255)">class</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />  </span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">servlet</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br /><br />  </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">servlet</span><span style="COLOR: rgb(0,0,0)">-</span><span style="COLOR: rgb(0,0,0)">mapping</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />    </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">servlet</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)">&gt;</span><span style="COLOR: rgb(0,0,0)">SelectServlet</span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">servlet</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)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />    </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">url</span><span style="COLOR: rgb(0,0,0)">-</span><span style="COLOR: rgb(0,0,0)">pattern</span><span style="COLOR: rgb(0,0,0)">&gt;/</span><span style="COLOR: rgb(0,0,0)">select</span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">url</span><span style="COLOR: rgb(0,0,0)">-</span><span style="COLOR: rgb(0,0,0)">pattern</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />  </span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">servlet</span><span style="COLOR: rgb(0,0,0)">-</span><span style="COLOR: rgb(0,0,0)">mapping</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />    <br />    </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">welcome</span><span style="COLOR: rgb(0,0,0)">-</span><span style="COLOR: rgb(0,0,0)">file</span><span style="COLOR: rgb(0,0,0)">-</span><span style="COLOR: rgb(0,0,0)">list</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />        </span><span style="COLOR: rgb(0,0,0)">&lt;</span><span style="COLOR: rgb(0,0,0)">welcome</span><span style="COLOR: rgb(0,0,0)">-</span><span style="COLOR: rgb(0,0,0)">file</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)">index.jsp</span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">welcome</span><span style="COLOR: rgb(0,0,0)">-</span><span style="COLOR: rgb(0,0,0)">file</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br />    </span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">welcome</span><span style="COLOR: rgb(0,0,0)">-</span><span style="COLOR: rgb(0,0,0)">file</span><span style="COLOR: rgb(0,0,0)">-</span><span style="COLOR: rgb(0,0,0)">list</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br /></span><span style="COLOR: rgb(0,0,0)">&lt;/</span><span style="COLOR: rgb(0,0,0)">web</span><span style="COLOR: rgb(0,0,0)">-</span><span style="COLOR: rgb(0,0,0)">app</span><span style="COLOR: rgb(0,0,0)">&gt;</span><span style="COLOR: rgb(0,0,0)"><br /></span></div><br />运行结果图：<br /><img height="100" alt="option2.jpg" src="http://www.blogjava.net/images/blogjava_net/rickhunter/ajax/option2.jpg" width="470" border="0" /><img src ="http://www.blogjava.net/balajinima/aggbug/146689.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/balajinima/" target="_blank">李云泽</a> 2007-09-20 10:04 <a href="http://www.blogjava.net/balajinima/articles/146689.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ajax原理详细说明</title><link>http://www.blogjava.net/balajinima/articles/145149.html</link><dc:creator>李云泽</dc:creator><author>李云泽</author><pubDate>Fri, 14 Sep 2007 07:26:00 GMT</pubDate><guid>http://www.blogjava.net/balajinima/articles/145149.html</guid><wfw:comment>http://www.blogjava.net/balajinima/comments/145149.html</wfw:comment><comments>http://www.blogjava.net/balajinima/articles/145149.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/balajinima/comments/commentRss/145149.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/balajinima/services/trackbacks/145149.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Ajax 				由				HTML				、				JavaScript™ 				技术、				DHTML 				和				DOM 				组成，这一杰出的方法可以将笨拙的				Web 				界面转化成交互性的				Ajax 				应用程序。本文的作者是一位				Ajax 				专家，他演示了这些技术如何协同工作		...&nbsp;&nbsp;<a href='http://www.blogjava.net/balajinima/articles/145149.html'>阅读全文</a><img src ="http://www.blogjava.net/balajinima/aggbug/145149.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/balajinima/" target="_blank">李云泽</a> 2007-09-14 15:26 <a href="http://www.blogjava.net/balajinima/articles/145149.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>