﻿<?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-Flyingis-文章分类-Recycle Bin</title><link>http://www.blogjava.net/flyingis/category/12907.html</link><description>Talking and thinking freely !&lt;br&gt;
Flying in the world of Java and GIS !</description><language>zh-cn</language><lastBuildDate>Tue, 27 Feb 2007 08:43:08 GMT</lastBuildDate><pubDate>Tue, 27 Feb 2007 08:43:08 GMT</pubDate><ttl>60</ttl><item><title>Nokia 3230 FAQ</title><link>http://www.blogjava.net/flyingis/articles/35259.html</link><dc:creator>Flyingis</dc:creator><author>Flyingis</author><pubDate>Tue, 14 Mar 2006 08:56:00 GMT</pubDate><guid>http://www.blogjava.net/flyingis/articles/35259.html</guid><wfw:comment>http://www.blogjava.net/flyingis/comments/35259.html</wfw:comment><comments>http://www.blogjava.net/flyingis/articles/35259.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/flyingis/comments/commentRss/35259.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/flyingis/services/trackbacks/35259.html</trackback:ping><description><![CDATA[
		<h3 class="title">
				<font size="3">Nokia 3230 FAQ</font>
		</h3>
		<p>
				<font size="2">原文作者：tombkeeper[0x40]xfocus.org<br />原文链接：<a href="http://blog.xfocus.net/index.php?op=Default&amp;postCategoryId=118&amp;blogId=9"><font color="#000080">http://blog.xfocus.net/index.php?op=Default&amp;postCategoryId=118&amp;blogId=9</font></a></font>
		</p>
		<p>
				<font size="2">创建时间：2005.06.01 21:00<br />更新时间：2005.07.11 22:20</font>
		</p>
		<p>
				<font size="2">[本文严禁转载]</font>
		</p>
		<p>
				<font size="2">Nokia 今年新出的机器中，要数这款3230身材比较好。苗条而不纤细，匀称又玲珑有致。6600就是因为身材差，而被人称之为“肥6”，这也是我坚决不买 6600的原因。3230出来之后，人们很快就把原来3650的“小3”这个昵称给了3230。“从来只见新人笑”这个道理由此可见一斑。</font>
		</p>
		<p>
				<font size="2">我周一（就是北京下雹子砸死了牛的那个周一）晚上跑到西单，买了一部回来。</font>
		</p>
		<p>
				<font size="2">下面本来是一份自己写给自己看的备忘录性质的文档，没想到越写越多，就考虑应该共享出来，也许对别人有用。这并不是一份Symbian手机入门教程，所以里面不会涉及“如何安装软件”这样的知识。另外，如果你凑巧看到了这份文档，并打算按照里面说的做，那么一定要明白，这里面的内容可能给你带来帮助，也可能带来困扰和麻烦，痛苦和不幸。所以我并不鼓励或者暗示你按照本文所述的内容进行任何实际操作，也不对这份文档可能导致的任何后果负责。如果你依照自己的意愿对手机进行了某些操作，导致无法正常使用，请致电Nokia客服：4008800123。</font>
		</p>
		<p>
				<font size="2">这份文档中大多数内容也适用于6600/6670/7610等Nokia的Symbian 70机型。</font>
		</p>
		<p>
				<font size="2">1、买水货还是买行货？</font>
		</p>
		<p>
				<font size="2">我从来就不反对买水货。不过要衡量的是，买水货省下来的钱和增加的风险成本相比哪一个更高。我的IBM T30维修过两次，第一次是因为我把USB鼠标插到网口里，导致换了一块主板，第二次是换了个CPU风扇。如果要花钱维修的话，估计不在少数。不过手机和笔记本相比较更加不容易坏，买水货而增加的风险成本也小一些。如果是一个对手机很了解的人，完全可以考虑买水货。</font>
		</p>
		<p>
				<br />
				<font size="2">2、买的时候要注意哪些？</font>
		</p>
		<p>
				<font size="2">买水货，主要是注意机器的外壳有无划痕，屏幕内部有无灰尘。水货机器大多是在没有包装的情况下夹带进来的，这方面很容易出问题。</font>
		</p>
		<p>
				<font size="2">买行货，主要是注意机器按键的手感。有时候个别按键需要格外用力才能按下去，或者感觉比较软，但又不是失灵。因为这不属于故障，所以一旦开票之后是不可能更换的。</font>
		</p>
		<p>
				<font size="2">3230配了耳机，买的时候一定要试好。耳机这类配件一般都是委托其他厂家生产的，质量控制不会有Nokia自己那么严格。</font>
		</p>
		<p>
				<br />
				<font size="2">3、3230有哪些控制码可以用？</font>
		</p>
		<p>
				<font size="2">和其它基于S60的手机一样，下面这些控制码对3230都有效：</font>
		</p>
		<p>
				<font size="2">*#7370# 硬重置系统（俗称“格机”）<br />*#7780# 恢复出厂默认设置<br />*#06# 显示IMEI码<br />*#0000# 查询系统软件版本及更新日期<br />*#2820# 查询蓝牙设备地址</font>
		</p>
		<p>
				<br />
				<font size="2">4、Psiloc系列软件安装并注册之后，用了一段时间又提示注册，输入注册码之后，显示“Application Expired”。如何解决？</font>
		</p>
		<p>
				<font size="2">A、把时间调整到2003年7月之前，譬如说2003年6月。<br />B、删除 C:SystemDataapplications.dat 和 C:SystemDataNITZ.dat。<br />C、注册。<br />D、把系统时间调回正常。</font>
		</p>
		<p>
				<br />
				<font size="2">5、我无法用3230的红外和某些其它红外设备互传文件，这是怎么回事？</font>
		</p>
		<p>
				<font size="2">3230作为新出的机型，在红外兼容性上还有一些问题，只能等以后升级系统。作为替代的解决方案，可以用蓝牙来进行文件传输。3230的蓝牙性能不错。</font>
		</p>
		<p>
				<br />
				<font size="2">6、3230的MP3播放功能怎么样？</font>
		</p>
		<p>
				<font size="2">3230只支持单声道播放音乐，至少内置的RealPlayer只能以单声道播放音乐，而且音质并不好。那些认为买了3230就可以丢掉MP3的人要失望了。</font>
		</p>
		<p>
				<font size="2">如果想追求更好的多媒体表现，推荐购买Moto e680i。价格比3230略高，但是有320×240的屏幕分辨率，回放音质不逊于专业MP3播放器，而且还支持立体声蓝牙耳机！Moto将其称之为“享乐PDA”不是没道理的。</font>
		</p>
		<p>
				<br />
				<font size="2">7、3230的FM收音机功能怎么样？</font>
		</p>
		<p>
				<font size="2">3230的FM收音机是立体声的，音质不错，至少比大多数袖珍FM收音机都要好。可以用中文存储20个频道名称，也就是说，设定好之后，只要点一下“北京文艺台”，就会自动收听87.6兆赫。</font>
		</p>
		<p>
				<font size="2">3230 自带了一个音质不错的扬声器，在广播的时候可以选择用扬声器或者耳机。但是如果耳机不插在手机上，是不能启动收音机功能的，因为要借耳机线当天线用。信号好的时候，天线并不一定是必需的，所以我认为将来一定会有人写程序解除这一限制，甚至可能Nokia就会在下一版本中去除限制——如果限制是在软件里做的话。</font>
		</p>
		<p>
				<font size="2">下面是北京地区部分电台的频率：</font>
		</p>
		<p>
				<font size="2">87.6 北京人民广播电台文艺台<br />88.2 中国国际广播电台EasyFM<br />88.7 中国国际广播电台<br />90.0 中央人民广播电台 第三套节目文艺调频<br />91.5 中国国际广播电台EasyFM<br />96.6 中央人民广播电台 第二套节目经济频道<br />97.4 北京人民广播电台音乐台<br />99.6 中央人民广播电台第二套节目<br />101.8 中央人民广播电台 第四套节目民族广播<br />103.9 北京人民广播电台交通台<br />106.1 中央人民广播电台 第一套节目综合频道</font>
		</p>
		<p>
				<br />
				<font size="2">8、3230的电池能用多长时间？</font>
		</p>
		<p>
				<font size="2">这个不好一概而论，一个人一天能移动多远，得取决于他用什么交通工具；手机电池能用多长时间，得取决于怎么用。3230的电池是BL-5B，比7650的 BLB-2小了60 mAH，但是我个人感觉3230充满电的使用时间至少要比7650长20%~30%——当然也可能是我的错觉。</font>
		</p>
		<p>
				<br />
				<font size="2">9、3230的拍照、摄像性能怎么样？</font>
		</p>
		<p>
				<font size="2">作为一个手机来说，拍照效果相当不错。镜头畸变不大，拍摄出的1280×960的图片如果缩小至1024×768，几乎可以拿来当桌面。事实上，Nokia 手机的拍照效果一直都很好，我曾经用同是30万像素的7650和Dopod 535做比较。结果7650的镜头畸变、色彩还原、白平衡都占了上风。尤其是白平衡和色彩还原，dopod 535的表现只能用“惨”来形容。</font>
		</p>
		<p>
				<font size="2">3230拍照功能比较大的毛病是延迟比较长，超过一秒钟。也就是说，照片记录的是按下快门一秒钟后的事情。可能是因为CPU运算能力不足导致的。</font>
		</p>
		<p>
				<font size="2">自带的摄像软件只能拍摄最大分辨率176×144的影像。作为一个支持存储卡的机器来说，这是很失败的。当然，也可能是因为3230的CPU处理不了更大幅的视频。</font>
		</p>
		<p>
				<br />
				<font size="2">10、3230自带的游戏怎么样？</font>
		</p>
		<p>
				<font size="2">不错。系统自带游戏和存储卡中的几款游戏画面和可玩性都很好。尤其是自带的Agent V，一定要体验一下才知道什么叫新概念。我曾经用语言向几个朋友描述了这个游戏，可是他们看到实际的情形时还是很震撼。</font>
		</p>
		<p>
				<br />
				<font size="2">11、3230能不能更换各种彩壳？</font>
		</p>
		<p>
				<font size="2">Nokia并没有把3230设计成能自己换壳的机器，自然也没有壳可换。但随着3230出货量的增加，一定会有第三方厂家生产相应的彩壳出来。不过你可能需要一把T5的内六角螺丝刀。</font>
		</p>
		<p>
				<br />
				<font size="2">12、3230能收发电子邮件么？</font>
		</p>
		<p>
				<font size="2">可以。3230支持POP和IMAP协议的邮箱。另外，3230还提供了对SSL/TLS/APOP加密协议的支持。我用3230可以成功收发经过SSL加密的Gmail邮件。</font>
		</p>
		<p>
				<br />
				<font size="2">13、3230可以安装红外遥控软件么？</font>
		</p>
		<p>
				<font size="2">可以。但是和7650不同的是，3230的红外口在机器的右侧面而不是顶端，所以并不适合作为遥控器来用。</font>
		</p>
		<p>
				<br />
				<font size="2">14、3230可以插扩展存储卡么？</font>
		</p>
		<p>
				<font size="2">可以。3230支持RS-MMC卡。RS-MMC是Nokia自己力推的一种标准。这种卡只有通常MMC卡的一半大小，并且兼容MMC。</font>
		</p>
		<p>
				<font size="2">3230支持热插拔RS-MMC。“存储卡”这个应用程序里有“取出存储卡”的按钮，按下并确认后，就像于在Windows的“安全删除硬件”里删除一个U盘一样。机器的后盖打开，一个小按钮随之松开，会执行上述同样的操作。</font>
		</p>
		<p>
				<font size="2">我致电Nokia客服，问她们3230最多支持多大的卡，她们是这么说的：Nokia自己只生产最大128M的卡，并且Nokia不推荐使用第三方的卡。我又重复了我的问题，说我想知道机器本身设计支持多大的卡。她们则又重复了刚才的回答。我第三次提出问题，并强调我问的是机器本身支持多大的卡，而不是 Nokia生产多大的卡，她们则忠实地将刚才的回答又作了一便重复。</font>
		</p>
		<p>
				<font size="2">从第三方渠道得到的消息是3230最大支持1 G的RS-MMC卡。我花190买了一张KingMax 256M的卡，在3230上可以很正常地使用。令我吃惊的是格式化非常快，只用了不到10秒钟的时间。以前听别人说，格式化一张卡至少需要数分钟。</font>
		</p>
		<p>
				<font size="2">买了新卡之后，原配的32M卡可以留着用来备份一些重要的个人信息。</font>
		</p>
		<p>
				<br />
				<font size="2">15、7650/3650和6600/6670/7610上的软件可以在3230上正常运行么？</font>
		</p>
		<p>
				<font size="2">根据我的实验，超过三分之二的7650/3650软件可以在3230上正常运行。通常来说，和硬件没什么关系的——譬如说看图、看书的软件，基本都可以运行；而和硬件关系比较大的软件，譬如拍照软件、来电防火墙软件，则通常都不能正常工作。</font>
		</p>
		<p>
				<font size="2">不过很多软件已经推出了针对3230等新款手机的升级版本。在未来三个月内，我们想用的大部分软件应该都可以找到。</font>
		</p>
		<p>
				<font size="2">能在6600/6670/7610上运行的软件基本都可以正常工作于3230。</font>
		</p>
		<p>
				<br />
				<font size="2">16、3230的屏幕怎么样？</font>
		</p>
		<p>
				<font size="2">很不错。3230用了65535色的TFT屏，色彩和对比度都不错。屏幕亮度也很高，以至于我要把亮度调到50%才不觉得刺眼。</font>
		</p>
		<p>
				<br />
				<font size="2">17、我能用3230上QQ和MSN么？</font>
		</p>
		<p>
				<font size="2">腾讯在qq.com上提供了Symbian版本的QQ客户端，不过还没有针对3230的，下面这个链接中的文件是针对7650/3650的，经我测试，工作正常：<br /></font>
				<a href="http://mgame.qq.com/mqq/qq.SIS">
						<font color="#a52a2a" size="2">http://mgame.qq.com/mqq/qq.SIS</font>
				</a>
		</p>
		<p>
				<font size="2">不过我觉得，针对6600/6670/7610的版本应该也可以使用，而且应该更兼容一些，毕竟它们和3230都是基于Symbian 7的机器，而7650/3650是Symbian 6：<br /></font>
				<a href="http://mgame.qq.com/mqq/qq_6600.SIS">
						<font color="#a52a2a" size="2">http://mgame.qq.com/mqq/qq_6600.SIS</font>
				</a>
				<br />
				<a href="http://mgame.qq.com/mqq/qq_6670.SIS">
						<font color="#a52a2a" size="2">http://mgame.qq.com/mqq/qq_6670.SIS</font>
				</a>
				<br />
				<a href="http://mgame.qq.com/mqq/qq_7610.SIS">
						<font color="#a52a2a" size="2">http://mgame.qq.com/mqq/qq_7610.SIS</font>
				</a>
		</p>
		<p>
				<font size="2">以前版本的Agile Messenger等MSN客户端在3230上都不能正常使用，最新的Turbo MSN 1.9已经可以很好地在3230上运行。</font>
		</p>
		<p>
				<br />
				<font size="2">18、3230的闹钟还是只能设定一个闹铃么？</font>
		</p>
		<p>
				<font size="2">是的。也许是Nokia想给写闹铃软件的小公司留点生存空间，这个从7650时代就被人诟病的问题一直保持了下来。不过现在可以自定义闹钟所使用的铃声了。另外，我发现World Clock Pro在3230上不能调铃声大小，好在默认的声音足够响了。</font>
		</p>
		<p>
				<font size="2">小技巧：如果你不想仅仅为了能多定义几个闹铃就额外安装一个闹铃软件的话，可以在3230的“日历”中建立带闹铃的约会提醒，而且可以设定闹铃音乐，设定每天、每周、每月还是每年提醒一次。</font>
		</p>
		<p>
				<br />
				<font size="2">19、除了Java，还有别的运行在3230上的脚本语言么？</font>
		</p>
		<p>
				<font size="2">令人吃惊的是，现在我们竟然可以在Symbian上运行Python：<br /></font>
				<a href="http://www.forum.nokia.com/main/0,,034-821,00.html">
						<font color="#a52a2a" size="2">http://www.forum.nokia.com/main/0,,034-821,00.html</font>
				</a>
		</p>
		<p>
				<br />
				<font size="2">20、3230是否像7650那样，屏幕面板里容易进灰尘？</font>
		</p>
		<p>
				<font size="2">是的，这是个糟糕的问题。我仔细看了一下，应该是屏幕下方的密封海绵不够厚导致的。我已经买了T5的内六角螺丝刀，准备自己来除尘并加厚这块海绵了。</font>
		</p>
		<p>
				<br />
				<font size="2">21、3230能和PC同步么？</font>
		</p>
		<p>
				<font size="2">可以，你需要下载Nokia PC套件：<br /></font>
				<a href="http://nds2.nokia.com/files/support/china/phones/software/Nokia_PC_Suite_641_zh_sc.exe">
						<font color="#a52a2a" size="2">http://nds2.nokia.com/files/support/china/phones/software/Nokia_PC_Suite_641_zh_sc.exe</font>
				</a>
		</p>
		<p>
				<br />
				<font size="2">22、我把随机带的RS-MMC卡中的程序删除了，现在又想用这些程序了，该怎么办？</font>
		</p>
		<p>
				<font size="2">如果你很幸运，认识另一个有3230手机的人，可以从他那里拷贝一份。要不然，就得去找Nokia的客服，我想这个服务应该是免费的。</font>
		</p>
		<p>
				<br />
				<font size="2">23、Nokia网站上提供了3230软件下载么？</font>
		</p>
		<p>
				<font size="2">比较奇怪的是，3230只提供了一些DEMO软件的下载，而没有正式的软件下载页面，不过这没关系，7610和6681等S60机器的软件，3230基本都可以用：</font>
		</p>
		<p>
				<a href="http://www.nokia.com.cn/cn/support/phones/models/n7610/downloads/downloads_game.shtml">
						<font color="#a52a2a" size="2">http://www.nokia.com.cn/cn/support/phones/models/n7610/downloads/downloads_game.shtml</font>
				</a>
				<br />
				<a href="http://www.nokia.com.cn/cn/support/phones/models/n6600/downloads/downloads_game.shtml">
						<font color="#a52a2a" size="2">http://www.nokia.com.cn/cn/support/phones/models/n6600/downloads/downloads_game.shtml</font>
				</a>
				<br />
				<a href="http://www.nokia.com.cn/cn/support/phones/models/n6681/downloads/downloads_game.shtml">
						<font color="#a52a2a" size="2">http://www.nokia.com.cn/cn/support/phones/models/n6681/downloads/downloads_game.shtml</font>
				</a>
				<br />
				<a href="http://www.nokia.com.cn/cn/support/phones/models/n6670/downloads/downloads_game.shtml">
						<font color="#a52a2a" size="2">http://www.nokia.com.cn/cn/support/phones/models/n6670/downloads/downloads_game.shtml</font>
				</a>
				<br />
				<a href="http://www.nokia.com.cn/cn/support/phones/models/n3650/downloads/downloads_game.shtml">
						<font color="#a52a2a" size="2">http://www.nokia.com.cn/cn/support/phones/models/n3650/downloads/downloads_game.shtml</font>
				</a>
		</p>
		<p>
				<font size="2">注意，6681的那个“音乐播放器”虽好，但是3230用不了。因为6681的MP3解码是硬件实现的。</font>
		</p>
		<p>
				<font size="2">我个人觉得下面这些软件还不错：</font>
		</p>
		<p>
				<font size="2">掌上图书：<br /></font>
				<a href="http://nds2.nokia.com/files/support/china/phones/software/ebook_6600.SIS">
						<font color="#a52a2a" size="2">http://nds2.nokia.com/files/support/china/phones/software/ebook_6600.SIS</font>
				</a>
		</p>
		<p>
				<font size="2">掌上图书PC端软件：<br /></font>
				<a href="http://nds2.nokia.com/files/support/china/phones/software/ebook_pc_sw.zip">
						<font color="#a52a2a" size="2">http://nds2.nokia.com/files/support/china/phones/software/ebook_pc_sw.zip</font>
				</a>
		</p>
		<p>
				<font size="2">查号精灵：<br /></font>
				<a href="http://nds2.nokia.com//files/support/china/phones/software/Vois_2011.sis">
						<font color="#a52a2a" size="2">http://nds2.nokia.com//files/support/china/phones/software/Vois_2011.sis</font>
				</a>
		</p>
		<p>
				<font size="2">Quick Word：<br /></font>
				<a href="http://nds2.nokia.com/files/support/china/phones/software/Lara_MMC_Quickword_China_china.SIS">
						<font color="#a52a2a" size="2">http://nds2.nokia.com/files/support/china/phones/software/Lara_MMC_Quickword_China_china.SIS</font>
				</a>
		</p>
		<p>
				<font size="2">Quick Point：<br /></font>
				<a href="http://nds2.nokia.com/files/support/china/phones/software/Lara_MMC_Quickpoint_China_china.SIS">
						<font color="#a52a2a" size="2">http://nds2.nokia.com/files/support/china/phones/software/Lara_MMC_Quickpoint_China_china.SIS</font>
				</a>
		</p>
		<p>
				<font size="2">Quick Sheet：<br /></font>
				<a href="http://nds2.nokia.com/files/support/china/phones/software/Lara_MMC_Quicksheet_China_china.SIS">
						<font color="#a52a2a" size="2">http://nds2.nokia.com/files/support/china/phones/software/Lara_MMC_Quicksheet_China_china.SIS</font>
				</a>
		</p>
		<p>
				<font size="2">Quick Office（包含上述三个软件）：<br /></font>
				<a href="http://nds2.nokia.com/files/support/china/phones/software/Quickoffice.SIS">
						<font color="#a52a2a" size="2">http://nds2.nokia.com/files/support/china/phones/software/Quickoffice.SIS</font>
				</a>
		</p>
		<p>
				<br />
				<font size="2">24、3230怎么锁屏？</font>
		</p>
		<p>
				<font size="2">3230刚出来的时候，有人写文章论述3230的几大缺点，其中一个罪状就是没有“锁屏键”。Nokia的老用户都知道：所有的Nokia直板手机都是先按确认键再按*就锁屏，再次同样操作就开锁。</font>
		</p>
		<p>
				<br />
				<font size="2">25、3230的CPU是什么？</font>
		</p>
		<p>
				<font size="2">ARM4T，主频123MHz。我认为对于一个要处理1280×960大小图片的机器来说，200MHz是比较恰当的——虽然会多耗费一些电力。</font>
		</p>
		<p>
				<br />
				<font size="2">26、听说3230的情景模式中，如果把铃声关了，也就不能使用震动了，是这样么？</font>
		</p>
		<p>
				<font size="2">这是一个误解。如果Nokia的研发人员会犯这种愚蠢错误，如果Nokia的QC部门连这种愚蠢错误都检查不出来，那我们就不会知道Nokia这个名字了。</font>
		</p>
		<p>
				<font size="2">很多人认为在情景模式中关铃声的方法就是将“铃声类型”设置为“无声”。这都是被“铃声类型”这个中文翻译给误导的。这里的英文原文是“Ringing Type”。“Ringing”不应理解为名词“铃声”，而应该是Ring的进行时或者是动名词。“Ringing Type”正确的翻译是“响铃类型”。也就是说，设置的是来电提示（包括铃声和震动）按照什么方式工作。</font>
		</p>
		<p>
				<font size="2">如果设置为“连续响铃”，就意味着所设置的来电提示（包括铃声和震动）都会被循环触发；如果设置为“无声”，自然是连铃声带震动都没有了。</font>
		</p>
		<p>
				<font size="2">如果要设置一个没有铃声但是有震动的情景模式，只需在“来电铃声”中选择“关”，将“铃声类型”设置为“连续响铃”即可。</font>
		</p>
		<p>
				<br />
				<font size="2">27、我希望Nokia在下一个升级Rom中修改掉一些讨厌的Bug，该怎么做？</font>
		</p>
		<p>
				<font size="2">没事干多打客服电话4008800123，把那些问题反复向客服反映。最后这些意见会被统计，如果有很多人次的反映，那么就会优先被考虑解决。</font>
		</p>
		<p>
				<br />
				<font size="2">28、3230这个型号代表什么意思？</font>
		</p>
		<p>
				<font size="2">Nokia手机以型号的第一个数字来划分系列，3230是“3”系列，代表具有独特功能，外观比较奇怪，有特别强化功能的机器。家族成员有3650、3300、3200等。</font>
		</p>
		<p>
				<br />
				<font size="2">29、我听人说3230的操作系统是Symbian 70，可是又看到有人说3230是S60的机器，S60不就是Symbian 6.0吗？</font>
		</p>
		<p>
				<font size="2">S60 是Series60的缩写，不是Symbian 6.0的缩写。Series60指的是手机的操作界面。相应的还有Series40（6230i等机型）、Series80 （9210/9300/9500等9系列机型）。除3230之外，7650/3650/6600/6670/7610等机型使用的也是Series60的界面。</font>
		</p>
		<p>
				<br />
				<font size="2">30、我怎么才能找到离我最近的Nokia服务点？</font>
		</p>
		<p>
				<font size="2">诺基亚客户服务网点查询：</font>
				<a href="http://www1.nokia.com.cn/carecenter">
						<font color="#a52a2a" size="2">http://www1.nokia.com.cn/carecenter</font>
				</a>
		</p>
		<p>
				<font size="2">下面是北京的服务点：</font>
		</p>
		<p>
				<font size="2">名称 地址 电话</font>
		</p>
		<p>
				<font size="2">诺基亚专卖店客户服务部 西城区后半壁街56号（西直门商业大厦5层） 010-66110268<br />诺基亚专卖店客户服务部 东城区东四隆福广场东区D102号 010-84033330<br />诺基亚专卖店客户服务部 海淀区白石桥路友谊宾馆东门北侧中复电讯 010-68948258<br />北京诺基亚客户服务中心-牡丹园 海淀区北土城西路147号 010-82021811<br />北京诺基亚客户服务中心-崇文门 崇文区崇文门西大街6号楼 010-65286529<br />北京诺基亚（腾龙时代）特约服务中心 西城区北三环中路27号宜家家居首层西侧 010-62002278<br />北京电信发展总公司维修中心-蒲黄榆 丰台区永外刘家窑路蒲安西里15号 010-67679696<br />北京诺基亚（长远）特约服务中心-通州 通州区新华大街122号 010-69531248<br />北京诺基亚（凯达隆）特约服务中心-古城 石景山区古城大街5号2门 010-88929560<br />北京诺基亚（凯达隆）特约服务中心-怀柔 怀柔县青春路2号楼3门 010-69695110<br />北京移动通信有限责任公司维修中心 朝阳区霞光里2号B座106室 010-64687588<br />北京诺基亚（京邮通）特约服务中心-王府井 东城区王府井大街45号 010-65262207<br />北京市通信产品质量监督检验站特约服务中心 朝阳区大黄庄苗圃35号 010-85778210<br />北京市诺基亚（中邮通）特约服务中心-公主坟 海淀区城乡贸易中心五楼通信广场 010-68159837<br />北京诺基亚（凯达信）特约服务中心-顺义 顺义区新顺南大街路东（顺中商城北市场1-12号） 010-69469662<br />北京诺基亚（中邮通）特约服务中心-木樨园 台区南木樨园84号 010-67214638<br />北京诺基亚（中复电讯）特约服务中心 丰台区西四环南路88号 010-63817529<br />北京诺基亚（凯达信）特约服务中心-昌平 昌平区政府街13号二层 010-89742294<br />北京诺基亚（中邮通）特约服务中心-真武庙 西城区真武庙2条1号 010-68012943<br />北京诺基亚（先波志远）特约服务中心 东城区东直门内大街4号楼 010-84073301-11<br />北京诺基亚（凯达信）特约服务中心-公主坟 海淀区复兴路甲14号（公主坟华鹰大厦一层） 010-63969698<br />北京电信发展总公司维修中心-西单 西城区西单北大街118号西单商场二楼北侧 010-66089696<br />北京电信发展总公司维修中心-西直门 西城区西直门内葱店胡同2号中宇通讯市场一楼 010-66136877<br />北京电信发展总公司维修中心-五棵松 海淀区复兴路丙65号 010-68214046</font>
		</p>
		<br />
		<font color="#0000ff" size="2">注：文章原作者声明该文严禁转载，个人保存只是处于需要了解Nokia 3230特点的目的，文章并不会发表在blogjava上，了解之后会立即从Flyingis空间里删去该文章。</font>
<img src ="http://www.blogjava.net/flyingis/aggbug/35259.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/flyingis/" target="_blank">Flyingis</a> 2006-03-14 16:56 <a href="http://www.blogjava.net/flyingis/articles/35259.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Sprinkle Some AJAX Magic in Your Struts Web Application(3)</title><link>http://www.blogjava.net/flyingis/articles/17777.html</link><dc:creator>Flyingis</dc:creator><author>Flyingis</author><pubDate>Wed, 02 Nov 2005 03:29:00 GMT</pubDate><guid>http://www.blogjava.net/flyingis/articles/17777.html</guid><wfw:comment>http://www.blogjava.net/flyingis/comments/17777.html</wfw:comment><comments>http://www.blogjava.net/flyingis/articles/17777.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/flyingis/comments/commentRss/17777.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/flyingis/services/trackbacks/17777.html</trackback:ping><description><![CDATA[
		<h2>
				<a id="updating-with-ajax-response" name="updating-with-ajax-response">
				</a>Updating the Web Page with the AJAX Response</h2>
		<p>So far, we have looked at the JavaScript to do the AJAX call (listed above) and the Struts <code>Action</code>, <code>ActionForm</code>, and <code>JSP</code> (mostly the same, with the addition of <code>&lt;span&gt;</code> tags). To complete our understanding of the Struts-AJAX project, we need to look at the three JavaScript functions that are responsible for updating the current web page when the results from the server are received.</p>
		<ul>
				<li>
						<code>processStateChange()</code>: The method name that we set before making the AJAX call. This method is called by the <code>XMLHttpRequest</code>/<code>Microsoft.XMLHTTP</code> object once the server has completed sending back its response. 
</li>
				<li>
						<code>splitTextIntoSpan()</code>: Loops through the response, picking out an array of <code>&lt;span id="someName"&gt;NewContent&lt;/span&gt;</code> elements. 
</li>
				<li>
						<code>replaceExistingWithNewHtml()</code>: Loops through this array of span elements, searching for <code><code>&lt;span&gt;</code></code> elements in the existing page with <code>'someName'</code> and replacing them with the new content from the server. Note that we get the returned content via <code>req.responseText</code> for robustness (since it allows us to manipulate any text response), rather than <code>req.responseXml</code> (which is more powerful, but requires that you return valid XHTML or XML). </li>
		</ul>
		<pre>function processStateChange() {
  
  if (req.readyState == 4) { // Complete
    if (req.status == 200) { // OK response
        
    //Split the text response into Span elements
    spanElements = 
        splitTextIntoSpan(req.responseText);
    
    //Use these span elements to update the page
    replaceExistingWithNewHtml(spanElements);
    
    } else {
      alert("Problem with server response:\n " 
        + req.statusText);
    }
  }
}
</pre>
		<p>
				<code>replaceExistingWithNewHtml()</code> is a "private" method used by the <code>processStateChange()</code> method.</p>
		<pre>  
function replaceExistingWithNewHtml 
        (newTextElements){
 
  //loop through newTextElements
  for(var i=newTextElements.length-1;i&gt;=0;--i){
  
    //check that this begins with &lt;span
    if(newTextElements[i]. 
        indexOf("&lt;span")&gt;-1){
                        
          //get the span name - sits
      // between the 1st and 2nd quote mark
      //Make sure your spans are in the format
      //&lt;span id="someName"&gt;NewContent&lt;/span&gt;
          startNamePos=newTextElements[i]. 
              indexOf('"')+1;
      endNamePos=newTextElements[i]. 
              indexOf('"',startNamePos);
      name=newTextElements[i]. 
              substring(startNamePos,endNamePos);
                        
      //get the content - everything 
      // after the first &gt; mark
      startContentPos=newTextElements[i]. 
               indexOf('&gt;')+1; 
      content=newTextElements[i].
               substring(startContentPos);
                        
     //Now update the existing Document 
     // with this element, checking that 
     // this element exists in the document
     if(document.getElementById(name)){
                document.getElementById(name). 
                innerHTML = content;
     }
  }
}
</pre>
		<p>
				<code>splitTextIntoSpan()</code> is a "private" method used by the <code>processStateChange()</code> method.</p>
		<pre>function splitTextIntoSpan(textToSplit){
 
  //Split the document
  returnElements=textToSplit. 
            split("&lt;/span&gt;")
        
  //Process each of the elements        
  for(var i=returnElements.length-1;i&gt;=0;--i){
                
    //Remove everything before the 1st span
    spanPos = returnElements[i]. 
             indexOf("&lt;span");               
                
    //if we find a match, take out 
    //everything before the span
    if(spanPos&gt;0){
          subString=returnElements[i].
              substring(spanPos);
          returnElements[i]=subString;
    } 
  }
  return returnElements;
}
</pre>
		<h2>
				<a id="new-flow-of-control" name="new-flow-of-control">
				</a>New Flow of Control</h2>
		<p>By adding the above JavaScript code to our application, the following steps now happen on the server and on the browser.</p>
		<ol>
				<li>The page loads as per a normal Struts application. 
</li>
				<li>The user changes a textbox value, triggering an <code>onChange()</code> event, which calls the <code>retrieveURL()</code> JavaScript function. 
</li>
				<li>This JavaScript function makes a (background) call to the Struts <code>Action</code> on the server, passing in all of the form variables in a way that Struts will understand. 
</li>
				<li>This JavaScript function also sets the name of a second JavaScript function, which will be called when the server response is finished. In this case, it is set to the <code>processStateChange()</code> method. 
</li>
				<li>As expected, when the server response is finished, the <code>processStateChange()</code> method is called. 
</li>
				<li>The JavaScript loops through all of the <code>&lt;span&gt;</code>elements in the (new) server response. Where it finds a <code>&lt;span&gt;</code> in the existing page with the same name, it updates it with the new content. </li>
		</ol>
		<h2>
				<a id="designing-ajax" name="designing-ajax">
				</a>Designing AJAX into Your Application</h2>
		<p>The JavaScript outlined above can cope with the way Struts is used in most applications, including those that are much more complex than our simple example. However, you may find that following the points below makes it easier to write and use your code:</p>
		<ul>
				<li>To avoid duplicated code, it can often be better to use the same Struts <code>Action</code> and JSP for the initial request (i.e., show full page) and the AJAX (update part of page) requests. 
</li>
				<li>Within the common <code>Action</code> (controller) class, decide which sections of the JSP page (all of the JSP or only part of it) need to be sent to the browser. By setting flags in either the web server <code>session</code> or <code>ActionForm</code>, the JSP page knows which sections need to be rendered. 
</li>
				<li>Within the JSP, use Struts <code>&lt;logic:equal&gt;</code> or JSTL tags to decide if we need to render a section of HTML or not. </li>
		</ul>
		<p>An updated version of this project, with AJAX enabled, can be downloaded here: <a href="http://sourceforge.net/project/showfiles.php?group_id=99476&amp;package_id=158438">struts-Ajax.zip</a></p>
		<h2>
				<a id="conclusion" name="conclusion">
				</a>Conclusion</h2>
		<p>AJAX techniques promise to completely revolutionize how we build and use web applications. This article showed a simple technique to add AJAX behavior to existing Struts applications. It allows us to reuse our existing investment, not only in code but also in developer skills. As a nice by-product, it also allows us to write cleaner, more reusable, Java Struts applications.</p>
<img src ="http://www.blogjava.net/flyingis/aggbug/17777.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/flyingis/" target="_blank">Flyingis</a> 2005-11-02 11:29 <a href="http://www.blogjava.net/flyingis/articles/17777.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Sprinkle Some AJAX Magic in Your Struts Web Application(2)</title><link>http://www.blogjava.net/flyingis/articles/17776.html</link><dc:creator>Flyingis</dc:creator><author>Flyingis</author><pubDate>Wed, 02 Nov 2005 03:26:00 GMT</pubDate><guid>http://www.blogjava.net/flyingis/articles/17776.html</guid><wfw:comment>http://www.blogjava.net/flyingis/comments/17776.html</wfw:comment><comments>http://www.blogjava.net/flyingis/articles/17776.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/flyingis/comments/commentRss/17776.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/flyingis/services/trackbacks/17776.html</trackback:ping><description><![CDATA[
		<h2>
				<a id="first-struts-ajax-app" name="first-struts-ajax-app">
				</a>Our First Struts AJAX Application</h2>
		<p>Take a look at the Figures 3 and 4 below. At first glance, they seem similar to our previous ones. The difference is that after then screen loads (Figure 3) and the values in the textboxes are changed, the screen <i>automatically</i> updates <i>without</i> the screen going blank, giving the result as per Figure 4. The normal Submit button is also still there, should you choose to use it.</p>
		<p>
				<img alt="AJAX Sample after Page Load" src="http://today.java.net/images/2005/10/ajax-struts-before.gif" height="414" width="413" />
				<br />
				<i>Figure 3. AJAX sample after page load</i>
		</p>
		<p>
				<img alt="AJAX sample after AJAX call" src="http://today.java.net/images/2005/10/ajax-struts-after.gif" height="414" width="413" />
				<br />
				<i>Figure 4. AJAX sample after AJAX call</i>
		</p>
		<p>Adding this AJAX behavior is surprisingly easy. The server-side code is the same as usual: a Struts <code>ActionForm</code> to hold the data, and a Struts <code>Action</code> that performs the tasks required (e.g., database access) and then forwards to the appropriate JSP to display the result.</p>
		<h2>
				<a id="dont-just-sit" name="dont-just-sit">
				</a>Don't Just Sit There</h2>If you wish to stop reading here (and skip the explanation of how this works) then here is all you need to do to convert your Struts application to a Struts-AJAX application in a similar manner: 
<ol><li>Include the <i>Ajax.js</i> JavaScript file on your web page (this file is part of the <a href="http://sourceforge.net/project/showfiles.php?group_id=99476&amp;package_id=158438">struts-ajax.zip</a> sample file). <i>Ajax.js</i> contains all of the JavaScript functions necessary to send and receive AJAX calls. 
</li><li>Ensure the parts of the web page that you wish to update during AJAX calls are surrounded by <code>&lt;span&gt;</code> tags, giving each an <code>id</code>. 
</li><li>When something happens that should update the page (e.g., the <code>onchange()</code> method of a textbox), call the <code>retrieveURL()</code> function, passing in the URL to the Struts <code>Action</code> that will do the necessary server-side processing. 
</li><li>For page display/update, the easiest option is for the Struts <code>Action</code> to <i>forward back to the same JSP</i>. In our sample, we trigger the AJAX call in the <code>onchange()</code> method of the <code>showGreen</code>/<code>showBlue</code> textboxes. </li></ol><p>The JavaScript function <code>retrieveURL()</code> calls Struts on the server (via the URL provided), takes the JSP response, and updates the web page being displayed, where the <code>&lt;span&gt;</code> tags on the existing web page match those on the newly returned JSP. Simple!</p><h2><a id="more-detail" name="more-detail"></a>The AJAX Solution in More Detail</h2>When we converted the previous sample into an AJAX-Struts application we made three changes: 
<ol><li>Added a JavaScript function to do the "behind the scenes" AJAX call to the server. 
</li><li>Added JavaScript code to receive the server response and update the web page. 
</li><li>Added <code>&lt;span&gt;</code> tags to the JSP page, which mark sections that will be updated during AJAX calls. </li></ol><p>We will look at each of these in more detail.</p><h2><a id="ajax-call-to-server" name="ajax-call-to-server"></a>Making the AJAX Call to the Server</h2>There are two functions (listed below) that are used to call the server. 
<ul><li>The <code>retrieveURL()</code> function takes a parameter of the URL of the server and the name of the Struts form. The URL will be called using AJAX and the values of the form passed to the server. 
</li><li><code>getFormAsString()</code> is a function that converts the values on the form named in <code>retrieveURL()</code> into a query string suitable for posting to Struts on the server. </li></ul><p>To use, simply add the <code>retrieveURL()</code> function to the <code>onclick()</code>/<code>onChange()</code> method of the event you wish to trigger the screen update.</p><p>There are some interesting items going on in both methods.</p><p>Within the <code>retrieveURL()</code> method, the line <code>req.onreadystatechange = processStateChange</code> (note: no brackets) tells the browser to call the <code>processStateChange()</code> method (which we talk through later in this article) once the server sends back its response. This method (now standard in AJAX) also determines whether it should use the Internet Explorer (ActiveX) or Netscape/Mozilla (<code>XmlHttpRequest</code>) object to ensure cross-browser compatibility.</p><p>The <code>getFormAsString()</code> method converts the HTML form into a string to be appended to the URL (which allows us to do a HTTP <code>GET</code> request). This string is escaped (spaces are converted to <code>%20</code>, etc.) and is in a format that Struts can use to populate an <code>ActionForm</code> (without Struts being aware of the special AJAX nature of the request). Note that while we use a HTTP <code>GET</code> in this sample, it would be equally possible to use a HTTP <code>POST</code> by looping in a similar manner and adding the form fields to the request.</p><pre><code>
function retrieveURL(url,nameOfFormToPost) {
    
  //convert the url to a string
  url=url+getFormAsString(nameOfFormToPost);
    
  //Do the AJAX call
  if (window.XMLHttpRequest) { 
     
    // Non-IE browsers
    req = new XMLHttpRequest();
    req.onreadystatechange = processStateChange;
    try {
          req.open("GET", url, true); 
    } catch (e) {
      alert("Server Communication Problem\n"+e);
    }
    req.send(null);
  } else if (window.ActiveXObject) {
    // IE
   
    req = new ActiveXObject("Microsoft.XMLHTTP");
    if (req) {
      req.onreadystatechange=processStateChange;
      req.open("GET", url, true);
      req.send();
    }
  }
}
</code></pre><p><code>getFormAsString()</code> is a "private" method used by the <code>retrieveURL()</code> method.</p><pre><code>
function getFormAsString(formName){
        
  //Setup the return String
  returnString ="";
        
  //Get the form values
  formElements=document.forms[formName].elements;
        
  //loop through the array, building up the url
  //in the format '/strutsaction.do&amp;name=value'
 
  for(var i=formElements.length-1;i&gt;=0; --i ){
        //we escape (encode) each value
        returnString+="&amp;" 
        +escape(formElements[i].name)+"=" 
        +escape(formElements[i].value);
 }
        
 //return the values
 return returnString; 
}</code></pre><img src ="http://www.blogjava.net/flyingis/aggbug/17776.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/flyingis/" target="_blank">Flyingis</a> 2005-11-02 11:26 <a href="http://www.blogjava.net/flyingis/articles/17776.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Sprinkle Some AJAX Magic in Your Struts Web Application(1)</title><link>http://www.blogjava.net/flyingis/articles/17775.html</link><dc:creator>Flyingis</dc:creator><author>Flyingis</author><pubDate>Wed, 02 Nov 2005 03:24:00 GMT</pubDate><guid>http://www.blogjava.net/flyingis/articles/17775.html</guid><wfw:comment>http://www.blogjava.net/flyingis/comments/17775.html</wfw:comment><comments>http://www.blogjava.net/flyingis/articles/17775.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/flyingis/comments/commentRss/17775.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/flyingis/services/trackbacks/17775.html</trackback:ping><description><![CDATA[
		<p>AJAX is the latest revolution in web development circles, allowing rich dynamic interfaces deployed within a normal web browser. <a href="http://struts.apache.org/">Struts</a> has been one of the de facto standards for Java-Web development for a number of years, with a large number of applications already deployed. This article will show you how to combine the richness of an AJAX user interface with your existing Struts applications.</p>
		<p>This article shows a simple and elegant way to do this by including a couple of lines of JavaScript on your JavaServer Pages (JSPs). While we show how to reuse existing Struts actions, the techniques are equally applicable to the Java-Web framework of your choice. The method proposed will also allow a move to the next version of Struts (Shale) or JavaServer Faces (JSF) in the future.</p>
		<h2>
				<a id="what-is-ajax" name="what-is-ajax">
				</a>What is AJAX?</h2>
		<p>AJAX stands for "Asynchronous JavaScript and XML." It is a technique, rather than a framework (such as Struts). The reason for the buzz around it is that it allows web pages to behave less like flat documents and more like dynamic GUI apps that users might expect from their desktop environments. AJAX techniques can be used for all recent browsers (including Internet Explorer and Netscape/Mozilla). It is already used by (among others) Microsoft (for its Outlook web client) and Google (for <a href="http://maps.google.com/">Google Maps</a> and <a href="http://mail.google.com/">Gmail</a>).</p>
		<h2>
				<a id="life-before-ajax" name="life-before-ajax">
				</a>Life Before AJAX</h2>
		<p>Most current Struts applications follow the standard "web page as a flat document" structure. If you wanted to mimic the behavior of GUI desktop apps (such as those built using Java Swing, Visual Basic, or Delphi) you had two choices: you could either send all of the information that might possibly required as part the web page with (a lot of) JavaScript to handle the dynamic behavior (a slow and not very enterprise-Java way to do things), or you could do constant form submits back to the server (an effective, if somewhat clunky, method). AJAX gives you the best of both worlds: dynamic web pages, but with most of the application running in Java on your web server.</p>
		<h2>
				<a id="ajax-101" name="ajax-101">
				</a>AJAX 101</h2>
		<p>AJAX is similar to existing Dynamic HTML techniques, with the addition of a "background" call to the server to get new/updated information as required. The mechanics of AJAX have already been covered in detail elsewhere--take a look at the <a href="http://today.java.net/pub/a/today/2005/10/27/sprinkle-ajax-magic-into-struts-webapp.html?page=3#resources">Resources</a> section at the end of this article for some good examples. The minimum you need to know is:</p>
		<ol>
				<li>The <code>XMLHttpRequest</code> (or <code>Microsoft.XMLHTTP</code> ActiveX object if you are using Internet Explorer). These objects can be called from the JavaScript on your web page. They allow you to request content from your web server as a background call (i.e., the screen does not "go blank" as usually happens during a form submit). 
</li>
				<li>The content that the <code>XMLHttpRequest</code> and <code>Microsoft.XMLHTTP</code> objects return can be treated as either XML or plain text. JavaScript (on your web page) can then update the page with this new content as required. 
</li>
				<li>The whole process can be triggered by the usual JavaScript events: <code>onclick</code>, <code>onchange</code>, <code>onblur</code>, etc. </li>
		</ol>
		<h2>
				<a id="using-ajax-in-struts" name="using-ajax-in-struts">
				</a>Using AJAX in Your Struts Application</h2>
		<p>The chances are that if you are reading this article, then you are interested in AJAX's ability to create dynamic web interfaces and would like to know how to add it to a Struts application. What are your options if you want to do this?</p>
		<ul>
				<li>Wait until the next version of Struts (Shale) incorporates AJAX techniques. For Struts developers starting a new application this is probably the best option. The downside is that this will probably require moving to JavaServer Faces--not a bad thing in itself, but this may entail fundamental changes if you have an existing application. 
</li>
				<li>You could move to a new approach, like <a href="https://dwr.dev.java.net/">Direct Web Remoting (DWR)</a> or <a href="http://www.rubyonrails.org/">Ruby on Rails</a>, which are specifically built for AJAX applications. While these are both very impressive frameworks, and are worth taking a look at if you wish to consider web development without Struts, this option would mean rewriting your entire application. 
</li>
				<li>Add AJAX to your existing Struts application. Since AJAX is a technique, not a framework, it is straightforward to add it to Struts. For existing applications where stability (e.g., keeping existing libraries) is important, this option is recommended and is the one we explore in more detail. </li>
		</ul>
		<p>Some other advantages of our preferred option are:</p>
		<ol>
				<li>It should not require any new libraries or server side code; only the Struts libraries and actions already in the application need be used. 
</li>
				<li>All of the parts of the solution--JavaScript, XML, Java and Struts--are already widely understood. 
</li>
				<li>The application can be migrated to AJAX piece by piece; we can identify those parts which will most benefit users, and then choose to upgrade them to dynamic AJAX behavior first. </li>
		</ol>
		<h2>
				<a id="implementing-the-solution" name="implementing-the-solution">
				</a>Implementing the Solution</h2>
		<p>How do we actually implement our chosen solution? We start by reminding ourselves how a "standard" (non-AJAX) Struts application works. In this application, the normal flow of events is as follows:</p>
		<ol>
				<li>The user requests a screen by clicking a hyperlink or form submit button. 
</li>
				<li>The web server runs the requested Struts <code>Action</code>, generating the web page. 
</li>
				<li>The browser displays the page. 
</li>
				<li>When the user presses Save, the information is posted to the server, where it's converted by the Struts framework to an <code>ActionForm</code> class containing the posted data. 
</li>
				<li>The Struts framework then calls the Struts <code>Action</code> that then processes the request (e.g., saves the data to a database). 
</li>
				<li>The page is rendered as per item 2, and the process starts again. </li>
		</ol>
		<h2>
				<a id="existing-struts-application" name="existing-struts-application">
				</a>Existing Struts Application</h2>
		<p>A simple Struts application demonstrating this flow of events can be downloaded here: <a href="http://sourceforge.net/project/showfiles.php?group_id=99476&amp;package_id=158438">struts-non-ajax.zip</a>. This application, based on the sample applications provided with Struts, either hides or displays blue and green tables depending on the values entered by the user. Figure 1 shows the screen on initial page load. Figure 2 shows the screen after the user has entered values and pressed Submit. Although simple, it is enough to demonstrate a Struts application at work.</p>
		<p>
				<img alt="Non-AJAX sample: Initial screen" src="http://today.java.net/images/2005/10/non-ajax-struts-before.gif" height="410" width="424" />
				<br />
				<i>Figure 1. Non-AJAX sample: Initial screen</i>
		</p>
		<p>
				<img alt="Non-AJAX sample: Values entered, Submit pressed" src="http://today.java.net/images/2005/10/non-ajax-struts-after.gif" height="410" width="424" />
				<br />
				<i>Figure 2. Non-AJAX sample: Values entered, Submit pressed</i>
		</p>
		<p>The server-side code is as you would expect: a Struts <code>Action</code> that forwards to the (same) JSP using the values defined in <i>struts-config.xml</i>. Some other points to note in this code sample are:</p>
		<ul>
				<li>The <i>struts-config.xml</i> file is set up to redirect all requests to <code>http://localhost:8080/struts-non-ajax/</code> (or the equivalent in your web server) to <i>index.jsp</i>. 
</li>
				<li>
						<i>index.jsp</i> contains a Struts form with two text boxes (<code>showBlue</code> and <code>showGreen</code>). The page also contains <code><logic:equal></logic:equal></code> tags, but as the values for these text boxes are initially blank, the content within them is not displayed. 
</li>
				<li>The user enters values (true or false) and presses the Submit button, passing control (via the Struts Framework, reading <i>struts-config.xml</i>) to the <code>SampleAction</code> class. 
</li>
				<li>
						<code>SampleAction</code> logs the values, and then forwards back to <i>index.jsp</i>. A more sophisticated Struts application would do more, such as saving to or retrieving from a database. 
</li>
				<li>
						<i>index.jsp</i> now evaluates the request; if <code>showBlue</code> or <code>showGreen</code> are <code>true</code>, the tables will be displayed. </li>
		</ul>
		<p>There is nothing "wrong" with this application. After all, similar Struts projects have been deployed for years. But how do we to add dynamic behavior to this application, without adding complex JavaScript or continual form submits?</p>
<img src ="http://www.blogjava.net/flyingis/aggbug/17775.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/flyingis/" target="_blank">Flyingis</a> 2005-11-02 11:24 <a href="http://www.blogjava.net/flyingis/articles/17775.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>