﻿<?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-甘先生Blog-文章分类-Oracle</title><link>http://www.blogjava.net/gump/category/5128.html</link><description>生活就像一盒巧克力，你永远不知道你会得到什么</description><language>zh-cn</language><lastBuildDate>Tue, 27 Feb 2007 11:54:59 GMT</lastBuildDate><pubDate>Tue, 27 Feb 2007 11:54:59 GMT</pubDate><ttl>60</ttl><item><title>一步一步学习在windows下安装oracle</title><link>http://www.blogjava.net/gump/articles/39130.html</link><dc:creator>甘先生</dc:creator><author>甘先生</author><pubDate>Tue, 04 Apr 2006 05:14:00 GMT</pubDate><guid>http://www.blogjava.net/gump/articles/39130.html</guid><wfw:comment>http://www.blogjava.net/gump/comments/39130.html</wfw:comment><comments>http://www.blogjava.net/gump/articles/39130.html#Feedback</comments><slash:comments>11</slash:comments><wfw:commentRss>http://www.blogjava.net/gump/comments/commentRss/39130.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/gump/services/trackbacks/39130.html</trackback:ping><description><![CDATA[<span class="text">
				<font style="FONT-SIZE: 9pt" color="#0000ff">
						<p>
								<span class="text">
										<font style="FONT-SIZE: 9pt" color="#0000ff">
												<strong>一。预备步骤</strong>
										</font>
								</span>
						</p>
						<p>
								<span class="text">
										<font style="FONT-SIZE: 9pt">
												<font color="#000000">取得 Oracle 10g 安装程序，或从 Oracle 技术网（OTN）下载</font>
												<font color="#000000">光盘映像。在评估阶段您可以免费下载和使用无技术限制的全功能 Oracle，但在正式的商业场合应用时需要购买法律授权。</font>
												<font color="#000000">下载地址: http://www.oracle.com/technology/software/products/database/oracle10g/index.html</font>
												<br />
										</font>
								</span>
						</p>
						<p>
								<span class="text">
										<font style="FONT-SIZE: 9pt" color="#000000">您需要约 1.2GB 磁盘空间用于下载及解压缩，并需要 2GB 以上的磁盘空间用于安装。</font>
								</span>
						</p>
						<p>
								<a name="Oracle_10g_安装步骤">
										<br />
										<br />
										<strong>二。Oracle 10g 安装步骤</strong>
								</a>
						</p>
				</font>
		</span>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_01.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">运行解压缩出的 Oracle 10g 安装程序</font>
				</span>
		</p>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_02.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">选择<b>高级安装</b>，并按<b>下一步</b>按钮</font>
				</span>
		</p>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_03.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">选择<b>标准版</b>，并按<b>下一步</b>按钮</font>
				</span>
		</p>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_04.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">指定主目录的目标名称与目标路径（一般无需更改），并按<b>下一步</b>按钮</font>
				</span>
		</p>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_05.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">产品特定的先决条件检查通过（如果总体结果不是“通过”，请检查您的先决配置），按<b>下一步</b>按钮</font>
				</span>
		</p>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_06.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<span style="FONT-SIZE: 9pt">选择<b>创建数据库</b>，并按<b>下一步</b>按钮</span>
				</span>
		</p>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_07.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">选择<b>一般用途</b>，并按<b>下一步</b>按钮</font>
				</span>
		</p>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_08.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<span style="FONT-SIZE: 9pt">填写</span>
						<font style="FONT-SIZE: 9pt">
								<b>全局数据库名</b>：</font>
				</span>
		</p>
		<ul>
				<li>
						<span class="text">
								<font style="FONT-SIZE: 9pt">对于未使用目录服务 （如 Active Directory）的独立服务器，全局数据库名不必包含域名后缀（默认为 orcl）</font>
						</span>
				</li>
				<li>
						<span class="text">
								<span style="FONT-SIZE: 9pt">对于使用了目录服务（如 Active Directory）的域服务器，全局数据库名需要包含域名后缀（</span>
								<font style="FONT-SIZE: 9pt">如 orcl.compieretraining.org）</font>
						</span>
				</li>
		</ul>
		<p>
		</p>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">
						</font>
				</span>
		</p>
		<span class="text">
				<span style="FONT-SIZE: 9pt">根据上述要求设置</span>
				<font style="FONT-SIZE: 9pt">妥当后，按<b>下一步</b>按钮</font>
		</span>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_09.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">按<b>下一步</b>按钮</font>
				</span>
		</p>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_10.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">指定数据库存储选项（使用默认选项<b>文件系统</b>即可），按<b>下一步</b>按钮</font>
				</span>
		</p>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_11.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">指定备份和恢复选项（使用默认选项<b>不启用自动备份</b>即可），按<b>下一步</b>按钮</font>
				</span>
		</p>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_12.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">为简化评估用数据库的密码设定，选择<b>所有的帐户都使用同一个口令</b>，输入 SYSTEM 等用户的口令（口令不要以数字开头</font>
						<span style="FONT-SIZE: 9pt">），并</span>
						<font style="FONT-SIZE: 9pt">按<b>下一步</b>按钮</font>
				</span>
		</p>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_13.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">这是安装配置后的摘要信息，按<b>安装</b>按钮开始安装</font>
				</span>
		</p>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_14.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<span style="FONT-SIZE: 9pt">经</span>
						<font style="FONT-SIZE: 9pt">过数分钟的文件安装过程之后，开始执行数据库配置助手</font>
				</span>
		</p>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_15.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<span style="FONT-SIZE: 9pt">数据</span>
						<font style="FONT-SIZE: 9pt">库创建完毕，按<b>确定</b>按钮</font>
				</span>
		</p>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_16.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<span style="FONT-SIZE: 9pt">配置</span>
						<font style="FONT-SIZE: 9pt">助手运行完毕</font>
				</span>
		</p>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_17.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">安装结束，按<b>退出</b>按钮</font>
				</span>
		</p>
		<p>
				<span style="FONT-SIZE: 9pt">
						<img height="435" src="http://www.compiere-china.com/images/orains_18.png" width="580" border="0" />
				</span>
		</p>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">完成！按<b>是</b>按钮，退出安装程序<br /><br /></font>
				</span>
		</p>
		<p>
				<b>
						<span class="text">
								<font style="FONT-SIZE: 9pt" color="#0000ff">三。<a name="测试安装是否成功">测试安装是否成功</a></font>
						</span>
				</b>
		</p>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">要测试数据安装是否成功，可<b>按顺序</b>执行以下两个步骤：</font>
				</span>
		</p>
		<p>
				<span class="text">
						<b>
								<span style="FONT-SIZE: 9pt">
										<font color="#008000">测试步骤</font>
								</span>
						</b>
						<font style="FONT-SIZE: 9pt">
								<b>
										<font color="#008000">1：</font>
								</b>请执行操作系统级的命令：<b>tnsping orcl</b></font>
				</span>
		</p>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">上述命令假定全局数据库名是 orcl。以下是命令执行后的示例：</font>
				</span>
		</p>
		<p>
		</p>
		<table id="table2" width="100%" border="0">
				<tbody>
						<tr>
								<td bgcolor="#000000">
										<font style="FONT-SIZE: 9pt" face="Tahoma" color="#ffffff">C:\&gt;tnsping orcl<br /><br />TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 10-11月-2005 10:09:58<br /><br />Copyright (c) 1997, 2005, Oracle. All rights reserved.<br /><br />已使用的参数文件:<br />C:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora<br /><br /><br />已使用 TNSNAMES 适配器来解析别名<br />Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dbserver<br />)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))<br /></font>
										<font style="FONT-SIZE: 9pt" face="Tahoma" color="#ff0000">
												<b>OK</b>
										</font>
										<font style="FONT-SIZE: 9pt" face="Tahoma" color="#ffffff">(50 毫秒)</font>
								</td>
						</tr>
				</tbody>
		</table>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">其中，结果<b> OK</b> 至关重要。</font>
						<span style="FONT-SIZE: 9pt">上述结果如果正确，表明侦听器配置无误。</span>
				</span>
		</p>
		<p>
				<span class="text">
						<font style="FONT-SIZE: 9pt">如果没有看到此结果，不要继续进行下一步。请检查：</font>
				</span>
		</p>
		<ul>
				<li>
						<span class="text">
								<font style="FONT-SIZE: 9pt">使用 Oracle Net Configuration Assistant 检查网络配置（netca 命令）</font>
						</span>
				</li>
				<li>
						<span class="text">
								<span style="FONT-SIZE: 9pt">使用 Database Configuration Assistant 检查数据库配置（dbca 命令）</span>
						</span>
				</li>
		</ul>
		<p>
				<span class="text">
						<span style="FONT-SIZE: 9pt">
								<b>
										<font color="#008000">测试步骤 2：</font>
								</b>请执行操作系统级的命令：<b>sqlplus system/password@orcl</b></span>
				</span>
		</p>
		<p>
				<span class="text">
						<span style="FONT-SIZE: 9pt">上述命令假定 SYSTEM 用户对应的口令是 password，假定全局数据库名是 orcl。</span>
				</span>
		</p>
		<p>
				<span class="text">
						<span style="FONT-SIZE: 9pt">以下是命令执行后的示例（请手工输入红色部分文字）：</span>
				</span>
		</p>
		<p>
		</p>
		<table id="table3" width="100%" border="0">
				<tbody>
						<tr>
								<td bgcolor="#000000">
										<font style="FONT-SIZE: 9pt" face="Tahoma" color="#ffffff">C:\&gt;sqlplus system/password@orcl<br /><br />SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 11月 10 10:15:25 2005<br /><br />Copyright (c) 1982, 2005, Oracle. All rights reserved.<br /><br /><br />连接到:<br />Oracle Database 10g Release 10.2.0.1.0 - Production<br /><br />SQL&gt; </font>
										<font style="FONT-SIZE: 9pt" face="Tahoma" color="#ff0000">SELECT 1+2+3+4 测试结果 FROM DUAL;</font>
										<font style="FONT-SIZE: 9pt" face="Tahoma" color="#ffffff">
												<br />
												<br />测试结果<br />----------<br />10</font>
								</td>
						</tr>
				</tbody>
		</table>
		<p>
				<span class="text">
						<span style="FONT-SIZE: 9pt">上述结果如果正确，表明数据库例程安装和启动正常。</span>
				</span>
		</p><img src ="http://www.blogjava.net/gump/aggbug/39130.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/gump/" target="_blank">甘先生</a> 2006-04-04 13:14 <a href="http://www.blogjava.net/gump/articles/39130.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在C4-1.7G 256M配置上安装Redhat Linux EL3安装Oracle 10G R2  </title><link>http://www.blogjava.net/gump/articles/34529.html</link><dc:creator>甘先生</dc:creator><author>甘先生</author><pubDate>Thu, 09 Mar 2006 10:53:00 GMT</pubDate><guid>http://www.blogjava.net/gump/articles/34529.html</guid><wfw:comment>http://www.blogjava.net/gump/comments/34529.html</wfw:comment><comments>http://www.blogjava.net/gump/articles/34529.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/gump/comments/commentRss/34529.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/gump/services/trackbacks/34529.html</trackback:ping><description><![CDATA[硬件配置：<br>CPU: C4-1.7G<br>内存:256M<br>硬盘:40G空了10G给Linux<br><br>OS： Redhat Linux EL3<br>Broswer: FireFox+Opera<br>QQ: LumaQQ<br>JDK: Sun JDK 1.5<br><a title="java" HREF="/gump" target="_blank">java</a> IDE: Eclipse3.12+MyEclipse4.<br>Media Player: XMMS+ Realplayer<br>Input Mothod: Fcitx<br>Database: Oracle10G2R+Mysql5<br>Webserver: Apache<br>Other: PHP,Tomcat5<br><br>安装Oracle最麻烦，我参考了OTN的一篇文章。<br><a href="http://www.oracle.com/technology/global/cn/pub/articles/smiley_10gdb_install.html">http://www.oracle.com/technology/global/cn/pub/articles/smiley_10gdb_install.html</a><br><br>下面是部分截图：<br><a href="http://static.flickr.com/45/110041704_8be590219d_o.png"><img src="http://static.flickr.com/45/110041704_8be590219d.jpg?v=0"></a><br><a href="http://static.flickr.com/39/110035557_e0bb4f1658_o.png"><img src="http://static.flickr.com/39/110035557_e0bb4f1658.jpg?v=0"></a><br>点击图片查看原图。<br><br><br><img src ="http://www.blogjava.net/gump/aggbug/34529.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/gump/" target="_blank">甘先生</a> 2006-03-09 18:53 <a href="http://www.blogjava.net/gump/articles/34529.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>(转)关于上个Flex-Jsp-DB例子中Flex和Jsp传递中文参数问题的解决方法！（Tomcat服务器）</title><link>http://www.blogjava.net/gump/articles/21285.html</link><dc:creator>甘先生</dc:creator><author>甘先生</author><pubDate>Thu, 24 Nov 2005 06:52:00 GMT</pubDate><guid>http://www.blogjava.net/gump/articles/21285.html</guid><wfw:comment>http://www.blogjava.net/gump/comments/21285.html</wfw:comment><comments>http://www.blogjava.net/gump/articles/21285.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/gump/comments/commentRss/21285.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/gump/services/trackbacks/21285.html</trackback:ping><description><![CDATA[<H1 class=block_title><A id=viewpost1_TitleUrl href="http://dannyr.cnblogs.com/archive/2004/11/24/68026.html"></A>&nbsp;</H1>
<DIV class=post>
<DIV class=postcontent>
<DIV class=comment_title><STRONG>情况：</STRONG> <BR>Flex默认使用的都是utf-8编码，包括Get，Post等方法。而Tomcat服务器端接收request对象默认是<SPAN style="COLOR: #ff0000">8859_1</SPAN>编码，添加Tomcat的request Filter用<SPAN style="COLOR: red">request.setCharacterEncoding("utf-8"); <SPAN style="COLOR: #000000">来设置，这个方法属于Tomcat设置和Flex无关，暂不讨论！ <BR><BR><A title=flex href="http://dannyr.cnblogs.com/dannyr/"></A><A title=flex href="http://dannyr.cnblogs.com/dannyr/"></A><A title=flex href="http://dannyr.cnblogs.com/dannyr/"></A><A title=flex href="http://dannyr.cnblogs.com/dannyr/"></A><A title=flex href="http://dannyr.cnblogs.com/dannyr/"><FONT color=#355ea0>flex</FONT></A>-&gt;Jsp： <BR><STRONG>有2种情况</STRONG> <BR><STRONG>情况一、MXML源代码文件中写入的中文字符：</STRONG> <BR>Flex使用 <SPAN style="COLOR: #ff0000">System.useCodepage = true;即使用本地操作系统编码（GBK）</SPAN> 设置Flex的处理编码。Jsp中用依然用<SPAN style="COLOR: #ff0000">ISO_8859_1</SPAN>编码来处理，并转化为<SPAN style="COLOR: red">GBK</SPAN>。这样Jsp可以正确解释Flex传递的中文字符。 这个时候可以认为Flex对mxml源代码文件进行编译时候，源代码中的中文字符已经混乱了，所以要加上<SPAN style="COLOR: #ff0000">System.useCodepage = true;语句，</SPAN>按GBK编码将中文字符从Flex发送到Tomcat。 <BR>同时Tomcat中Jsp应该按<SPAN style="COLOR: red">GBK</SPAN>重新编码 <BR>String categoryID = request.getParameter("categoryID"); <BR>String strOut = new String(categoryID.getBytes("<SPAN style="COLOR: red">ISO8859-1</SPAN>"), "<FONT color=#ff0000>GBK</FONT>"); <BR>System.out.println("categoryID="+categoryID); <BR>System.out.println("categoryID="+strOut); <BR><BR><BR><STRONG>情况二、Flex运行时候由输入框输入的中文字符 <BR></STRONG>这个时候输入框输入的中文字符是一定为UTF-8编码的，所以Flex中<SPAN style="COLOR: #ff0000">System.useCodepage = false;<SPAN style="COLOR: #000000">或者不设置，就默认utf-8编码格式传递数据，而Tomcat中Jsp使用下面语句按UTF-8来重新编码 <BR></SPAN></SPAN>String categoryID = request.getParameter("categoryID"); <BR>String strOut = new String(categoryID.getBytes("<SPAN style="COLOR: red">ISO8859-1</SPAN>"), "<SPAN style="COLOR: red">utf-8</SPAN>"); <BR>System.out.println("categoryID="+categoryID); <BR>System.out.println("categoryID="+strOut); <BR><BR>Jsp-&gt;Flex： <BR>Jsp页面用页面指令<SPAN style="COLOR: #ff0000">&lt;%@ page contentType="text/html;charset=utf-8"%&gt;</SPAN>设置，返回结果是utf-8编码，Flex接收后成功解释并正确显示。 <BR><BR><STRONG>测试环境：</STRONG> <BR>Windows2000 Server&nbsp;&nbsp;&nbsp; （字符集为GBK） <BR>Tomcat 5.0.28&nbsp;&nbsp;&nbsp; （默认设置） <BR>JDK1.5.0 <BR><A title=flex href="http://dannyr.cnblogs.com/dannyr/"></A><A title=flex href="http://dannyr.cnblogs.com/dannyr/"></A><A title=flex href="http://dannyr.cnblogs.com/dannyr/"></A><A title=flex href="http://dannyr.cnblogs.com/dannyr/"></A><A title=flex href="http://dannyr.cnblogs.com/dannyr/"><FONT color=#355ea0>flex</FONT></A> 1.5&nbsp;&nbsp;&nbsp; （默认设置） <BR>SqlServer2000 Sp3 <BR><BR><BR><STRONG>测试代码：</STRONG> （<STRONG style="COLOR: red">仅仅为第二种情况，第一种情况酌情修改即可</STRONG>） <BR>表结构 <BR>其中categoryid使用中文内容 <BR>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top><SPAN style="COLOR: #0000ff">create</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">table</SPAN><SPAN style="COLOR: #000000">&nbsp;tblMobile&nbsp;(id&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">int</SPAN><SPAN style="COLOR: #000000">,&nbsp;name&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">varchar</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">20</SPAN><SPAN style="COLOR: #000000">),&nbsp;price&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">decimal</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">10</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">2</SPAN><SPAN style="COLOR: #000000">),&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">image</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">varchar</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">50</SPAN><SPAN style="COLOR: #000000">),&nbsp;categoryid&nbsp;</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #000000">varchar</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">20</SPAN><SPAN style="COLOR: #000000">))</SPAN> </DIV></DIV><BR>phonelist.jsp <BR>这里数据库连接是<SPAN style="COLOR: #ff0000">SqlServer2000</SPAN> <BR>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">?xml&nbsp;version</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">1.0</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;encoding</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">utf-8</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">?</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top></SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">%@&nbsp;page&nbsp;contentType</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">text/html;charset=utf-8</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">%</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top></SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">%@&nbsp;page&nbsp;import</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">java.sql.*</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">%</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top></SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">phonelist</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top></SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">% <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">String</SPAN><SPAN style="COLOR: #000000">&nbsp;sql&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">""</SPAN><SPAN style="COLOR: #000000">; <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">String</SPAN><SPAN style="COLOR: #000000">&nbsp;url&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">""</SPAN><SPAN style="COLOR: #000000">; <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">String</SPAN><SPAN style="COLOR: #000000">&nbsp;categoryID&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;request.getParameter(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">categoryID</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">try</SPAN><SPAN style="COLOR: #000000">&nbsp;{ <BR><IMG id=Codehighlighter1_256_1403_Open_Image onclick="this.style.display='none'; Codehighlighter1_256_1403_Open_Text.style.display='none'; Codehighlighter1_256_1403_Closed_Image.style.display='inline'; Codehighlighter1_256_1403_Closed_Text.style.display='inline';" height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" width=11 align=top><IMG id=Codehighlighter1_256_1403_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_256_1403_Closed_Text.style.display='none'; Codehighlighter1_256_1403_Open_Image.style.display='inline'; Codehighlighter1_256_1403_Open_Text.style.display='inline';" height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_256_1403_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">Class&nbsp;.</SPAN><SPAN id=Codehighlighter1_256_1403_Open_Text><SPAN style="COLOR: #0000ff">Class</SPAN><SPAN style="COLOR: #000000">.forName(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">com.microsoft.jdbc.sqlserver.SQLServerDriver</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">).newInstance(); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">jdbc:microsoft:sqlserver://myserver:1433;DatabaseName=flex;User=flex;Password=flex;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">; <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Connection&nbsp;conn&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;DriverManager.getConnection(url); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Statement&nbsp;stmt&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;conn.createStatement(); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">String</SPAN><SPAN style="COLOR: #000000">&nbsp;strOut&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">String</SPAN><SPAN style="COLOR: #000000">(categoryID.getBytes(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">ISO8859-1</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">),&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">GBK</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);&nbsp; <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">categoryID=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">categoryID); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">categoryID=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">strOut); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sql&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">select&nbsp;id,&nbsp;name,&nbsp;price,&nbsp;image&nbsp;from&nbsp;tblMobile&nbsp;where&nbsp;categoryid='</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;strOut&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">'</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">; <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ResultSet&nbsp;rs&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;stmt.executeQuery(sql); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000">&nbsp;(rs.</SPAN><SPAN style="COLOR: #0000ff">next</SPAN><SPAN style="COLOR: #000000">()){ <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;out.println(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;phone&nbsp;id=\""&nbsp;+&nbsp;rs.getString(1)&nbsp;+&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;out.println(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;id&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;rs.getString(</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;/id&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;out.println(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;name&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;rs.getString(</SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;/name&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;out.println(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;price&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;rs.getString(</SPAN><SPAN style="COLOR: #000000">3</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;/price&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;out.println(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;image&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;rs.getString(</SPAN><SPAN style="COLOR: #000000">4</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;/image&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;out.println(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;/phone&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rs.close(); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stmt.close(); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;conn.close(); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</SPAN><SPAN style="COLOR: #0000ff">catch</SPAN><SPAN style="COLOR: #000000">&nbsp;(Exception&nbsp;e)&nbsp;{ <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;out.println(e); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;} <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top>%</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top></SPAN><SPAN style="COLOR: #000000">&lt;/</SPAN><SPAN style="COLOR: #000000">phonelist</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/InBlock.gif" width=11 align=top></SPAN></SPAN> </DIV></DIV><BR>test.mxml <BR>其中<SPAN style="COLOR: #ff0000">HTTPService</SPAN>使用自定义<SPAN style="COLOR: #ff0000">request</SPAN>对象传递数据，注意前面的<SPAN style="COLOR: #ff0000">System.useCodepage = true;</SPAN>语句 <BR>
<DIV style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
<DIV><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top><SPAN style="COLOR: #0000ff">&lt;?</SPAN><SPAN style="COLOR: #ff00ff">xml&nbsp;version="1.0"&nbsp;encoding="utf-8"</SPAN><SPAN style="COLOR: #0000ff">?&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:Application&nbsp;</SPAN><SPAN style="COLOR: #ff0000">xmlns:mx</SPAN><SPAN style="COLOR: #0000ff">="http://www.macromedia.com/2003/mxml"</SPAN><SPAN style="COLOR: #ff0000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;verticalGap</SPAN><SPAN style="COLOR: #0000ff">="10"</SPAN><SPAN style="COLOR: #ff0000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;backgroundColor</SPAN><SPAN style="COLOR: #0000ff">="#FFFFFF"</SPAN><SPAN style="COLOR: #ff0000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;pageTitle</SPAN><SPAN style="COLOR: #0000ff">="手机"</SPAN><SPAN style="COLOR: #ff0000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;initialize</SPAN><SPAN style="COLOR: #0000ff">="initApp()"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp; <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:HTTPService&nbsp;</SPAN><SPAN style="COLOR: #ff0000">id</SPAN><SPAN style="COLOR: #0000ff">="phoneService"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;url</SPAN><SPAN style="COLOR: #0000ff">="phonelist.jsp"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;fault</SPAN><SPAN style="COLOR: #0000ff">="alert(event.fault.faultstring)"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:Model&nbsp;</SPAN><SPAN style="COLOR: #ff0000">id</SPAN><SPAN style="COLOR: #0000ff">="phonelist"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{phoneService.result.phonelist.phone} <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">mx:Model</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:Script</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;![CDATA[</SPAN><SPAN style="COLOR: #808080"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;categoryId&nbsp;=&nbsp;1; <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;categoryName&nbsp;=&nbsp;"Moto"; <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp; <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;initApp()&nbsp;{ <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.useCodepage&nbsp;=&nbsp;true; <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;categoryId&nbsp;=&nbsp;"目录1"; <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;obj&nbsp;=&nbsp;new&nbsp;Object(); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;obj["categoryID"]&nbsp;=&nbsp;categoryId; <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;phoneService.send(obj); <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">]]&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">mx:Script</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:HBox</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:LinkBar&nbsp;</SPAN><SPAN style="COLOR: #ff0000">styleName</SPAN><SPAN style="COLOR: #0000ff">="title"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;width</SPAN><SPAN style="COLOR: #0000ff">="500"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;click</SPAN><SPAN style="COLOR: #0000ff">=""</SPAN><SPAN style="COLOR: #ff0000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:dataProvider</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:Array</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:Object&nbsp;</SPAN><SPAN style="COLOR: #ff0000">label</SPAN><SPAN style="COLOR: #0000ff">="首&nbsp;页"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;link</SPAN><SPAN style="COLOR: #0000ff">="main"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:Object&nbsp;</SPAN><SPAN style="COLOR: #ff0000">label</SPAN><SPAN style="COLOR: #0000ff">="手机分类"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;link</SPAN><SPAN style="COLOR: #0000ff">="catagory"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:Object&nbsp;</SPAN><SPAN style="COLOR: #ff0000">label</SPAN><SPAN style="COLOR: #0000ff">="论&nbsp;坛"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;link</SPAN><SPAN style="COLOR: #0000ff">="forum"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:Object&nbsp;</SPAN><SPAN style="COLOR: #ff0000">label</SPAN><SPAN style="COLOR: #0000ff">="关&nbsp;于"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;link</SPAN><SPAN style="COLOR: #0000ff">="about"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">mx:Array</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">mx:dataProvider</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">mx:LinkBar</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:Label&nbsp;</SPAN><SPAN style="COLOR: #ff0000">text</SPAN><SPAN style="COLOR: #0000ff">="搜索"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:TextInput&nbsp;</SPAN><SPAN style="COLOR: #ff0000">id</SPAN><SPAN style="COLOR: #0000ff">="key"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;width</SPAN><SPAN style="COLOR: #0000ff">="120"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:Button&nbsp;</SPAN><SPAN style="COLOR: #ff0000">label</SPAN><SPAN style="COLOR: #0000ff">="Go"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;click</SPAN><SPAN style="COLOR: #0000ff">="initApp();"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">mx:HBox</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp; <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:DataGrid&nbsp;</SPAN><SPAN style="COLOR: #ff0000">dataProvider</SPAN><SPAN style="COLOR: #0000ff">="{phonelist}"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:columns</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:Array</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:DataGridColumn&nbsp;</SPAN><SPAN style="COLOR: #ff0000">columnName</SPAN><SPAN style="COLOR: #0000ff">="id"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;headerText</SPAN><SPAN style="COLOR: #0000ff">="ID"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:DataGridColumn&nbsp;</SPAN><SPAN style="COLOR: #ff0000">columnName</SPAN><SPAN style="COLOR: #0000ff">="name"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;&nbsp;headerText</SPAN><SPAN style="COLOR: #0000ff">="Name"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:DataGridColumn&nbsp;</SPAN><SPAN style="COLOR: #ff0000">columnName</SPAN><SPAN style="COLOR: #0000ff">="image"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;&nbsp;headerText</SPAN><SPAN style="COLOR: #0000ff">="Image"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">mx:Array</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">mx:columns</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">mx:DataGrid</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:HBox&nbsp;</SPAN><SPAN style="COLOR: #ff0000">horizontalAlign</SPAN><SPAN style="COLOR: #0000ff">="center"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">mx:Label&nbsp;</SPAN><SPAN style="COLOR: #ff0000">text</SPAN><SPAN style="COLOR: #0000ff">="Copy&nbsp;Right&nbsp;2004&nbsp;&nbsp;dannyr's&nbsp;Studio&nbsp;"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">mx:HBox</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">mx:Application</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"> <BR><IMG height=16 src="http://dannyr.cnblogs.com/Images/OutliningIndicators/None.gif" width=11 align=top></SPAN> </DIV></DIV><BR><STRONG>结果：</STRONG> <BR>在Jsp页面里按<SPAN style="COLOR: red">8859_1</SPAN>编码可以成功获取Flex传递的中文内容。 <BR><BR><STRONG>备注：</STRONG> <BR>这个方法是对<SPAN style="COLOR: red">Tomcat</SPAN>的，其他的Java应用服务器的<SPAN style="COLOR: red">Request</SPAN>处理方式可能不同，应区分对待！ <BR><BR><STRONG>引用：</STRONG> <BR>以下是Flex文档关于<SPAN style="COLOR: #ff0000">System.useCodepage</SPAN>的说明：（比较简单，就不翻译了） <BR>
<H1>System.useCodepage </H1>
<H4><A name=wp4006245></A>Availability</H4>
<P><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"><A title="" href="http://www.cnblogs.com/dannyr/"><FONT color=#355ea0>flash</FONT></A></A> Player 6. </P>
<H4><A name=wp4006247></A>Usage</H4><PRE>System.useCodepage<CODE><I>:Boolean</I></CODE>
</PRE>
<H4><A name=wp4014240></A>Description</H4>
<P>Property; a Boolean value that tells <A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"><A title="" href="http://www.cnblogs.com/dannyr/"><FONT color=#355ea0>flash</FONT></A></A> Player whether to use Unicode or the traditional code page of the operating system running the player to interpret external text files. The default value of System.useCodepage is <CODE>false</CODE>. </P>
<UL>
<LI>When the property is set to <CODE>false</CODE>, <A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"><A title="" href="http://www.cnblogs.com/dannyr/"><FONT color=#355ea0>flash</FONT></A></A> Player interprets external text files as Unicode. (These files must be encoded as Unicode when you save them.) 
<LI>When the property is set to <CODE>true</CODE>, <A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"></A><A href="http://www.cnblogs.com/dannyr/"><A title="" href="http://www.cnblogs.com/dannyr/"><FONT color=#355ea0>flash</FONT></A></A> Player interprets external text files using the traditional code page of the operating system running the player. </LI></UL></SPAN></SPAN></DIV></DIV></DIV><img src ="http://www.blogjava.net/gump/aggbug/21285.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/gump/" target="_blank">甘先生</a> 2005-11-24 14:52 <a href="http://www.blogjava.net/gump/articles/21285.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>(转)一个Flex-Jsp-Mysql简单结合例子(Flex经过jsp连接数据库)</title><link>http://www.blogjava.net/gump/articles/21284.html</link><dc:creator>甘先生</dc:creator><author>甘先生</author><pubDate>Thu, 24 Nov 2005 06:51:00 GMT</pubDate><guid>http://www.blogjava.net/gump/articles/21284.html</guid><wfw:comment>http://www.blogjava.net/gump/comments/21284.html</wfw:comment><comments>http://www.blogjava.net/gump/articles/21284.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/gump/comments/commentRss/21284.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/gump/services/trackbacks/21284.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;数据库表这个sql是用pd生成的，具体内容大家自己看一下好了，很简单，数据也自己填充一下。标题上说是用mysql，其实无所谓用啥数据库了，这里我推荐Postgresql，现在有for win平台了，不用cygwin来模拟unix环境，这个Postgresql一来小巧，二来功能齐全，看起来有点象Oracle，当然速度也很快了。/**//*===============...&nbsp;&nbsp;<a href='http://www.blogjava.net/gump/articles/21284.html'>阅读全文</a><img src ="http://www.blogjava.net/gump/aggbug/21284.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/gump/" target="_blank">甘先生</a> 2005-11-24 14:51 <a href="http://www.blogjava.net/gump/articles/21284.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>一个JSP从数据库中生成XML文件的例子</title><link>http://www.blogjava.net/gump/articles/21258.html</link><dc:creator>甘先生</dc:creator><author>甘先生</author><pubDate>Thu, 24 Nov 2005 04:37:00 GMT</pubDate><guid>http://www.blogjava.net/gump/articles/21258.html</guid><wfw:comment>http://www.blogjava.net/gump/comments/21258.html</wfw:comment><comments>http://www.blogjava.net/gump/articles/21258.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/gump/comments/commentRss/21258.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/gump/services/trackbacks/21258.html</trackback:ping><description><![CDATA[<P>一个JSP从数据库生成XML文件的例子：<BR><BR><BR><BR>getTable.jsp <BR></P>
<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 src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">&lt;%</SPAN><SPAN style="COLOR: #000000">@&nbsp;page&nbsp;contentType</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">text/xml;&nbsp;charset=gb2312</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">%&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&lt;%</SPAN><SPAN style="COLOR: #000000">@&nbsp;page&nbsp;</SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">java.io.*</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">%&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&lt;%</SPAN><SPAN style="COLOR: #000000">@&nbsp;page&nbsp;</SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">java.sql.*,&nbsp;javax.sql.*</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">%&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&lt;%</SPAN><SPAN style="COLOR: #000000">@&nbsp;page&nbsp;</SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">java.util.*</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">%&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&lt;%</SPAN><SPAN style="COLOR: #000000">@&nbsp;page&nbsp;</SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">java.math.*</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">%&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">&lt;%</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>Connection&nbsp;conn;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>Statement&nbsp;stmt;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>ResultSet&nbsp;rs;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG id=Codehighlighter1_246_1657_Open_Image onclick="this.style.display='none'; Codehighlighter1_246_1657_Open_Text.style.display='none'; Codehighlighter1_246_1657_Closed_Image.style.display='inline'; Codehighlighter1_246_1657_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_246_1657_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_246_1657_Closed_Text.style.display='none'; Codehighlighter1_246_1657_Open_Image.style.display='inline'; Codehighlighter1_246_1657_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">try</SPAN><SPAN id=Codehighlighter1_246_1657_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_246_1657_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;String&nbsp;table_name&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;request.getParameter(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">tableName</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">mysql连接&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">Class.forName("com.mysql.jdbc.Driver").newInstance();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">String&nbsp;URL="jdbc:mysql:</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">localhost:3306/job?user=root&amp;password=111111";<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">Connection&nbsp;con&nbsp;=&nbsp;DriverManager.getConnection(URL);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">oracle连接&nbsp;</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;Class.forName(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">oracle.jdbc.driver.OracleDriver</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">).newInstance();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;String&nbsp;URL</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">jdbc:oracle:thin:@10.88.3.230:1521:cust</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;String&nbsp;user</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">vincent</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;String&nbsp;password</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">123456</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;conn&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;DriverManager.getConnection(URL,user,password);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;stmt&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;conn.createStatement();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;String&nbsp;sql&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;SELECT&nbsp;*&nbsp;FROM&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">table_name;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;rs&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;stmt.executeQuery(sql);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;设置表格的名字</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;String&nbsp;tableName&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;table_name.toUpperCase();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">得到列的名字</SPAN><SPAN style="COLOR: #008000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;ResultSetMetaData&nbsp;rsmd&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;rs.getMetaData();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;numColumns&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;rsmd.getColumnCount();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;String[]&nbsp;columnNames&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;String[numColumns];<BR><IMG id=Codehighlighter1_1096_1145_Open_Image onclick="this.style.display='none'; Codehighlighter1_1096_1145_Open_Text.style.display='none'; Codehighlighter1_1096_1145_Closed_Image.style.display='inline'; Codehighlighter1_1096_1145_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1096_1145_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1096_1145_Closed_Text.style.display='none'; Codehighlighter1_1096_1145_Open_Image.style.display='inline'; Codehighlighter1_1096_1145_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">&nbsp;(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">&nbsp;numColumns;&nbsp;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN id=Codehighlighter1_1096_1145_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1096_1145_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;columnNames[i]&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;rsmd.getColumnName(i&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;response.setContentType(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">text/xml</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);&nbsp;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;out.write(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;?xml&nbsp;version=\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">1.0</SPAN><SPAN style="COLOR: #000000">\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;encoding=\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">UTF</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">8</SPAN><SPAN style="COLOR: #000000">\</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">?&gt;\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;out.write(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;tableName&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">s&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">循环写入数据</SPAN><SPAN style="COLOR: #008000"><BR><IMG id=Codehighlighter1_1319_1586_Open_Image onclick="this.style.display='none'; Codehighlighter1_1319_1586_Open_Text.style.display='none'; Codehighlighter1_1319_1586_Closed_Image.style.display='inline'; Codehighlighter1_1319_1586_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1319_1586_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1319_1586_Closed_Text.style.display='none'; Codehighlighter1_1319_1586_Open_Image.style.display='inline'; Codehighlighter1_1319_1586_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000">&nbsp;(rs.next())&nbsp;</SPAN><SPAN id=Codehighlighter1_1319_1586_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1319_1586_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;out.write(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;tableName&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">每一行</SPAN><SPAN style="COLOR: #008000"><BR><IMG id=Codehighlighter1_1404_1547_Open_Image onclick="this.style.display='none'; Codehighlighter1_1404_1547_Open_Text.style.display='none'; Codehighlighter1_1404_1547_Closed_Image.style.display='inline'; Codehighlighter1_1404_1547_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1404_1547_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1404_1547_Closed_Text.style.display='none'; Codehighlighter1_1404_1547_Open_Image.style.display='inline'; Codehighlighter1_1404_1547_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">&nbsp;(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">&nbsp;numColumns;&nbsp;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN id=Codehighlighter1_1404_1547_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1404_1547_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;out.write(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;columnNames[i]&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;out.write(String.valueOf(rs.getObject(i&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">)));<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;out.write(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;/</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;columnNames[i]&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&gt;\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;out.write(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;/</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;tableName&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;out.write(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;/</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;tableName&nbsp;</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">s&gt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;rs.close();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;conn.close();<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG id=Codehighlighter1_1667_1673_Open_Image onclick="this.style.display='none'; Codehighlighter1_1667_1673_Open_Text.style.display='none'; Codehighlighter1_1667_1673_Closed_Image.style.display='inline'; Codehighlighter1_1667_1673_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_1667_1673_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1667_1673_Closed_Text.style.display='none'; Codehighlighter1_1667_1673_Open_Image.style.display='inline'; Codehighlighter1_1667_1673_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">finally</SPAN><SPAN id=Codehighlighter1_1667_1673_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1667_1673_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #000000">%&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN></DIV>
<P><BR><BR><BR>//结束<BR>通过地址就可以访问了:<BR><BR><A href="http://127.0.0.1:7001/getTable.jsp?tableName=emp">http://127.0.0.1:7001/getTable.jsp?tableName=emp</A></P><img src ="http://www.blogjava.net/gump/aggbug/21258.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/gump/" target="_blank">甘先生</a> 2005-11-24 12:37 <a href="http://www.blogjava.net/gump/articles/21258.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>