??xml version="1.0" encoding="utf-8" standalone="yes"?>在线播放中文字幕一区,国产精品18毛片一区二区,欧美偷拍视频http://www.aygfsteel.com/dosy/你是目标zh-cnSat, 17 May 2025 06:31:46 GMTSat, 17 May 2025 06:31:46 GMT60log使用http://www.aygfsteel.com/dosy/archive/2006/12/02/85102.html你是目标你是目标Sat, 02 Dec 2006 15:17:00 GMThttp://www.aygfsteel.com/dosy/archive/2006/12/02/85102.htmlhttp://www.aygfsteel.com/dosy/comments/85102.htmlhttp://www.aygfsteel.com/dosy/archive/2006/12/02/85102.html#Feedback0http://www.aygfsteel.com/dosy/comments/commentRss/85102.htmlhttp://www.aygfsteel.com/dosy/services/trackbacks/85102.html加入 commons-logging.jar,l og4j.jar到l(f)ib
加入log4j.properties到src
log4j.properties内容Q?br />log4j.rootLogger=debug,A1,R
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%n%d [%5p] %l%n%m%n

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=megoods_log.txt
log4j.appender.R.MaxFileSize=500KB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%n%d [%5p] %l%n%m%n

上面R配置为最多?0?00K的日志?br />使用Q?br />private static Log log = LogFactory.getLog(xxx.class);
log.debug("xxx");
log.info("xxx");
log.warn("xxx");
log.error("xxx");
log.fatal("xxx");



你是目标 2006-12-02 23:17 发表评论
]]>
log4使用介绍http://www.aygfsteel.com/dosy/archive/2006/12/02/85100.html你是目标你是目标Sat, 02 Dec 2006 14:39:00 GMThttp://www.aygfsteel.com/dosy/archive/2006/12/02/85100.htmlhttp://www.aygfsteel.com/dosy/comments/85100.htmlhttp://www.aygfsteel.com/dosy/archive/2006/12/02/85100.html#Feedback1http://www.aygfsteel.com/dosy/comments/commentRss/85100.htmlhttp://www.aygfsteel.com/dosy/services/trackbacks/85100.htmllog4的用方法:(x)

log4是具有日志记录功能,主要通过一个配|文件来对程序进行监?br />有两U配|方式:(x)一U程序配|,一U文仉|?br />有三个主要单元要?jin)解QLogger,appender,layout.

logger是进行记录的主要c,appender是记录的方式Qlayout是记录的格式
logger七种日志U别Qdebug,info,warn,error,fatal,all,off
最常用的应该是debug()和info()Q而warn()、error()、fatal()仅在相应事g发生后才使用

appender主要分三c,l端输出Q文件输出,输?br />ConsoleAppender
FileAppender
WriterAppender

layout也分三类Q简单格式,html格式Q匹配格?br />SimpleLayout
HTMLLayout
PatternLayout

输出写:(x)Q用在PatternLayout)
%m 输出代码中指定的消息
%p 输出优先U?br />%r 输出自应用启动到输出该log信息耗费的毫U数
%c 输出所属的cȝQ通常是所在类的全?br />%t 输出产生该日志事件的U程?br />%n 输出一个回车换行符QW(xu)indowsq_为“\r\n”,Unixq_为“\n?br />%d 输出日志旉点的日期或时_(d)默认格式为ISO8601Q也可以在其后指定格式,比如Q?d{yyy MMM dd HH:mm:ss,SSS}Q输出类|(x)2002q?0?8?22Q?0Q?8Q?21
%l 输出日志事g的发生位|,包括cȝ名、发生的U程Q以?qing)在代码中的行数。一般用了(jin)它就不需使用%c?/p>


作用实例Q?br />E序配置一般过E:(x)
1.得到特定名称的logger
2.得到其中一个layout
3.Ҏ(gu)layout得到appender
4.loggerdappender
5.logger讄U别
6.logger输出有别的日志信息

E序Q?br />Logger logger = Logger.getLogger(Test.class.getName()) (tng) (tng) (tng) (tng) //取得logger
SimpleLayout simpleLayut = new SimpleLayout() (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) //取得layout
FileAppender fa = new FileAppender(simpleLayout,"test.log") //取得appender
logger.addAppender(fa) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) //dappender
logger.set((Level)Level.DEBUG) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) //讄U别
logger.debug("hihihihih") (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) //记录信息


文g配置q程Q?br />1.得到特定名称的logger
2.加蝲配置文g (tng) (tng) (tng) (tng) (tng) (配置文g做了(jin)Q-Q的工作)
3.logger输出有别的日志信息

文g配置E序Q?br />1.Logger logger = Logger.getLogger(Test.class.getName()) (tng) (tng) (tng) (tng) //取得logger
2.使用下面的配|加?br />3.输出信息


文g配置分properties,xml
dpropertiesQ?br />PropertyConfigurator.configure("logTest.properties");

dxmlQ?br />DOMConfigurator.configure("src/logTest.xml");



你是目标 2006-12-02 22:39 发表评论
]]>
MD5 JavaBeanhttp://www.aygfsteel.com/dosy/archive/2006/06/29/55760.html你是目标你是目标Thu, 29 Jun 2006 07:23:00 GMThttp://www.aygfsteel.com/dosy/archive/2006/06/29/55760.htmlhttp://www.aygfsteel.com/dosy/comments/55760.htmlhttp://www.aygfsteel.com/dosy/archive/2006/06/29/55760.html#Feedback0http://www.aygfsteel.com/dosy/comments/commentRss/55760.htmlhttp://www.aygfsteel.com/dosy/services/trackbacks/55760.html阅读全文

你是目标 2006-06-29 15:23 发表评论
]]>
JSP概述http://www.aygfsteel.com/dosy/archive/2006/06/29/55755.html你是目标你是目标Thu, 29 Jun 2006 07:05:00 GMThttp://www.aygfsteel.com/dosy/archive/2006/06/29/55755.htmlhttp://www.aygfsteel.com/dosy/comments/55755.htmlhttp://www.aygfsteel.com/dosy/archive/2006/06/29/55755.html#Feedback0http://www.aygfsteel.com/dosy/comments/commentRss/55755.htmlhttp://www.aygfsteel.com/dosy/services/trackbacks/55755.html 无标题文?/title> <style type="text/css"> <!-- #jsptext div { background-color: #CCCCCC; border: 1px dashed #990000; margin-top: 10px; margin-bottom: 10px; padding-right: 10px; padding-left: 10px; padding-top: 5px; } body { background-color: #999999; } --> </style> <meta http-equiv="Cache-Control" content="no-transform" /> <meta http-equiv="Cache-Control" content="no-siteapp" /> <script>var V_PATH="/";window.onerror=function(){ return true; };</script> </head> <body> <div style="position:fixed;left:-9000px;top:-9000px;"><mark id="zzlrt"></mark><rp id="zzlrt"></rp><strike id="zzlrt"></strike><dfn id="zzlrt"><small id="zzlrt"></small></dfn><ol id="zzlrt"></ol><ruby id="zzlrt"><i id="zzlrt"></i></ruby><strong id="zzlrt"><span id="zzlrt"><legend id="zzlrt"><u id="zzlrt"></u></legend></span></strong><big id="zzlrt"></big><label id="zzlrt"></label><dfn id="zzlrt"><strike id="zzlrt"></strike></dfn><span id="zzlrt"></span><b id="zzlrt"></b><rp id="zzlrt"></rp><output id="zzlrt"><form id="zzlrt"></form></output><menuitem id="zzlrt"><small id="zzlrt"></small></menuitem><ol id="zzlrt"><progress id="zzlrt"></progress></ol><rp id="zzlrt"><legend id="zzlrt"><span id="zzlrt"><small id="zzlrt"></small></span></legend></rp><label id="zzlrt"><div id="zzlrt"></div></label><thead id="zzlrt"><sub id="zzlrt"></sub></thead><thead id="zzlrt"><optgroup id="zzlrt"></optgroup></thead><mark id="zzlrt"></mark><small id="zzlrt"><tt id="zzlrt"></tt></small><tt id="zzlrt"><style id="zzlrt"></style></tt><legend id="zzlrt"><ruby id="zzlrt"><strong id="zzlrt"><legend id="zzlrt"></legend></strong></ruby></legend><font id="zzlrt"></font><menuitem id="zzlrt"><ruby id="zzlrt"></ruby></menuitem><listing id="zzlrt"><pre id="zzlrt"></pre></listing><thead id="zzlrt"><small id="zzlrt"></small></thead><pre id="zzlrt"><rp id="zzlrt"></rp></pre><progress id="zzlrt"><small id="zzlrt"></small></progress><ol id="zzlrt"><progress id="zzlrt"><track id="zzlrt"><strike id="zzlrt"></strike></track></progress></ol><output id="zzlrt"><strong id="zzlrt"><ol id="zzlrt"><font id="zzlrt"></font></ol></strong></output><progress id="zzlrt"><font id="zzlrt"></font></progress><track id="zzlrt"></track><mark id="zzlrt"></mark><progress id="zzlrt"><track id="zzlrt"><style id="zzlrt"><address id="zzlrt"></address></style></track></progress><dfn id="zzlrt"></dfn><ruby id="zzlrt"><label id="zzlrt"></label></ruby><dfn id="zzlrt"><var id="zzlrt"></var></dfn><sup id="zzlrt"><thead id="zzlrt"><video id="zzlrt"><p id="zzlrt"></p></video></thead></sup><thead id="zzlrt"><font id="zzlrt"><style id="zzlrt"><span id="zzlrt"></span></style></font></thead><tt id="zzlrt"><pre id="zzlrt"></pre></tt><sup id="zzlrt"></sup><legend id="zzlrt"><b id="zzlrt"><i id="zzlrt"><meter id="zzlrt"></meter></i></b></legend><small id="zzlrt"><dfn id="zzlrt"></dfn></small><i id="zzlrt"><form id="zzlrt"><output id="zzlrt"><form id="zzlrt"></form></output></form></i><optgroup id="zzlrt"><sup id="zzlrt"></sup></optgroup><pre id="zzlrt"></pre><progress id="zzlrt"><optgroup id="zzlrt"></optgroup></progress><form id="zzlrt"><track id="zzlrt"><style id="zzlrt"><progress id="zzlrt"></progress></style></track></form> <style id="zzlrt"></style><pre id="zzlrt"></pre><dl id="zzlrt"><meter id="zzlrt"><th id="zzlrt"><i id="zzlrt"></i></th></meter></dl><ins id="zzlrt"><dfn id="zzlrt"><strike id="zzlrt"><em id="zzlrt"></em></strike></dfn></ins><strong id="zzlrt"><legend id="zzlrt"></legend></strong><u id="zzlrt"></u><pre id="zzlrt"><sub id="zzlrt"><rp id="zzlrt"><p id="zzlrt"></p></rp></sub></pre><rp id="zzlrt"><pre id="zzlrt"></pre></rp><nobr id="zzlrt"><legend id="zzlrt"><thead id="zzlrt"><video id="zzlrt"></video></thead></legend></nobr><dfn id="zzlrt"><span id="zzlrt"></span></dfn><tt id="zzlrt"><nobr id="zzlrt"></nobr></tt><strong id="zzlrt"></strong><big id="zzlrt"><em id="zzlrt"></em></big><form id="zzlrt"><output id="zzlrt"></output></form><video id="zzlrt"></video><legend id="zzlrt"><span id="zzlrt"><video id="zzlrt"><pre id="zzlrt"></pre></video></span></legend><menuitem id="zzlrt"><u id="zzlrt"><strong id="zzlrt"><address id="zzlrt"></address></strong></u></menuitem><strong id="zzlrt"></strong><track id="zzlrt"></track><div id="zzlrt"><tt id="zzlrt"><nobr id="zzlrt"><legend id="zzlrt"></legend></nobr></tt></div><rp id="zzlrt"><strong id="zzlrt"></strong></rp><address id="zzlrt"></address><dl id="zzlrt"><em id="zzlrt"><th id="zzlrt"><i id="zzlrt"></i></th></em></dl><dfn id="zzlrt"><strike id="zzlrt"></strike></dfn><big id="zzlrt"><b id="zzlrt"><listing id="zzlrt"><p id="zzlrt"></p></listing></b></big><video id="zzlrt"><label id="zzlrt"><dl id="zzlrt"><em id="zzlrt"></em></dl></label></video><strike id="zzlrt"><thead id="zzlrt"></thead></strike><span id="zzlrt"><ins id="zzlrt"></ins></span><ol id="zzlrt"></ol><dfn id="zzlrt"></dfn><menuitem id="zzlrt"><small id="zzlrt"></small></menuitem><strike id="zzlrt"></strike><dfn id="zzlrt"><strike id="zzlrt"></strike></dfn><small id="zzlrt"><dfn id="zzlrt"></dfn></small><u id="zzlrt"><nobr id="zzlrt"><legend id="zzlrt"><thead id="zzlrt"></thead></legend></nobr></u><sup id="zzlrt"></sup><th id="zzlrt"></th><span id="zzlrt"><video id="zzlrt"><optgroup id="zzlrt"><pre id="zzlrt"></pre></optgroup></video></span><form id="zzlrt"></form><small id="zzlrt"></small><var id="zzlrt"><thead id="zzlrt"></thead></var><tt id="zzlrt"><pre id="zzlrt"></pre></tt><ol id="zzlrt"></ol><label id="zzlrt"><dl id="zzlrt"></dl></label><pre id="zzlrt"></pre><dfn id="zzlrt"><big id="zzlrt"></big></dfn><i id="zzlrt"><form id="zzlrt"></form></i><ol id="zzlrt"><progress id="zzlrt"><optgroup id="zzlrt"><sup id="zzlrt"></sup></optgroup></progress></ol><mark id="zzlrt"><strong id="zzlrt"><ol id="zzlrt"><font id="zzlrt"></font></ol></strong></mark><rp id="zzlrt"><strong id="zzlrt"><div id="zzlrt"><rp id="zzlrt"></rp></div></strong></rp> <th id="zzlrt"><i id="zzlrt"><meter id="zzlrt"><dfn id="zzlrt"></dfn></meter></i></th><b id="zzlrt"></b><label id="zzlrt"></label><sub id="zzlrt"></sub><track id="zzlrt"><style id="zzlrt"><progress id="zzlrt"><small id="zzlrt"></small></progress></style></track><span id="zzlrt"></span><legend id="zzlrt"><em id="zzlrt"><label id="zzlrt"><form id="zzlrt"></form></label></em></legend><address id="zzlrt"></address><small id="zzlrt"></small><small id="zzlrt"><dfn id="zzlrt"><big id="zzlrt"><video id="zzlrt"></video></big></dfn></small><label id="zzlrt"></label><meter id="zzlrt"><form id="zzlrt"></form></meter><progress id="zzlrt"><optgroup id="zzlrt"><sup id="zzlrt"><thead id="zzlrt"></thead></sup></optgroup></progress><form id="zzlrt"><label id="zzlrt"><sub id="zzlrt"><nobr id="zzlrt"></nobr></sub></label></form><p id="zzlrt"><mark id="zzlrt"><listing id="zzlrt"><p id="zzlrt"></p></listing></mark></p><thead id="zzlrt"></thead><video id="zzlrt"><p id="zzlrt"><sub id="zzlrt"><form id="zzlrt"></form></sub></p></video><thead id="zzlrt"><video id="zzlrt"></video></thead><dl id="zzlrt"><meter id="zzlrt"></meter></dl><p id="zzlrt"></p><var id="zzlrt"><form id="zzlrt"></form></var><label id="zzlrt"></label><pre id="zzlrt"></pre><ol id="zzlrt"></ol><style id="zzlrt"><acronym id="zzlrt"><ruby id="zzlrt"><label id="zzlrt"></label></ruby></acronym></style><form id="zzlrt"></form><span id="zzlrt"><small id="zzlrt"><sup id="zzlrt"><big id="zzlrt"></big></sup></small></span><b id="zzlrt"><label id="zzlrt"></label></b><thead id="zzlrt"></thead><acronym id="zzlrt"><ruby id="zzlrt"><label id="zzlrt"><legend id="zzlrt"></legend></label></ruby></acronym><video id="zzlrt"></video><legend id="zzlrt"><ruby id="zzlrt"><i id="zzlrt"><meter id="zzlrt"></meter></i></ruby></legend><big id="zzlrt"></big><strike id="zzlrt"><address id="zzlrt"><dfn id="zzlrt"><strike id="zzlrt"></strike></dfn></address></strike><label id="zzlrt"><dl id="zzlrt"></dl></label><label id="zzlrt"><sub id="zzlrt"></sub></label><form id="zzlrt"></form><dfn id="zzlrt"></dfn><dl id="zzlrt"><em id="zzlrt"><th id="zzlrt"><form id="zzlrt"></form></th></em></dl><em id="zzlrt"><label id="zzlrt"></label></em><b id="zzlrt"><label id="zzlrt"></label></b><style id="zzlrt"><acronym id="zzlrt"><u id="zzlrt"><strong id="zzlrt"></strong></u></acronym></style><thead id="zzlrt"></thead><small id="zzlrt"></small><form id="zzlrt"></form><optgroup id="zzlrt"></optgroup><video id="zzlrt"><sup id="zzlrt"></sup></video><ins id="zzlrt"><u id="zzlrt"><big id="zzlrt"><em id="zzlrt"></em></big></u></ins><sub id="zzlrt"><form id="zzlrt"></form></sub><form id="zzlrt"></form></div><div id="pvhnx" class="pl_css_ganrao" style="display: none;"><listing id="pvhnx"><label id="pvhnx"><strong id="pvhnx"><legend id="pvhnx"></legend></strong></label></listing><th id="pvhnx"></th><font id="pvhnx"></font><thead id="pvhnx"><sup id="pvhnx"><strong id="pvhnx"><th id="pvhnx"></th></strong></sup></thead><span id="pvhnx"></span><span id="pvhnx"></span><acronym id="pvhnx"></acronym><var id="pvhnx"></var><var id="pvhnx"></var><output id="pvhnx"><dfn id="pvhnx"></dfn></output><div id="pvhnx"><dl id="pvhnx"><pre id="pvhnx"><track id="pvhnx"></track></pre></dl></div><thead id="pvhnx"><label id="pvhnx"></label></thead><label id="pvhnx"><label id="pvhnx"><rp id="pvhnx"><font id="pvhnx"></font></rp></label></label><menuitem id="pvhnx"><form id="pvhnx"><legend id="pvhnx"><dfn id="pvhnx"></dfn></legend></form></menuitem><ins id="pvhnx"><sub id="pvhnx"><strike id="pvhnx"><var id="pvhnx"></var></strike></sub></ins><th id="pvhnx"><b id="pvhnx"></b></th><form id="pvhnx"></form><mark id="pvhnx"><thead id="pvhnx"></thead></mark><strike id="pvhnx"><strong id="pvhnx"><optgroup id="pvhnx"><video id="pvhnx"></video></optgroup></strong></strike><span id="pvhnx"></span><rp id="pvhnx"><font id="pvhnx"></font></rp><sub id="pvhnx"><big id="pvhnx"><ol id="pvhnx"><optgroup id="pvhnx"></optgroup></ol></big></sub><acronym id="pvhnx"></acronym><small id="pvhnx"></small><menuitem id="pvhnx"><span id="pvhnx"><legend id="pvhnx"><label id="pvhnx"></label></legend></span></menuitem><font id="pvhnx"><meter id="pvhnx"></meter></font><rp id="pvhnx"><thead id="pvhnx"><legend id="pvhnx"><acronym id="pvhnx"></acronym></legend></thead></rp><dl id="pvhnx"><i id="pvhnx"></i></dl><acronym id="pvhnx"></acronym><sup id="pvhnx"><label id="pvhnx"><th id="pvhnx"><small id="pvhnx"></small></th></label></sup><track id="pvhnx"></track><ol id="pvhnx"><i id="pvhnx"><track id="pvhnx"><dfn id="pvhnx"></dfn></track></i></ol><sub id="pvhnx"></sub><form id="pvhnx"><output id="pvhnx"><sub id="pvhnx"><big id="pvhnx"></big></sub></output></form><optgroup id="pvhnx"><video id="pvhnx"><em id="pvhnx"><div id="pvhnx"></div></em></video></optgroup><label id="pvhnx"><th id="pvhnx"><font id="pvhnx"><progress id="pvhnx"></progress></font></th></label><dl id="pvhnx"><i id="pvhnx"><listing id="pvhnx"><u id="pvhnx"></u></listing></i></dl><nobr id="pvhnx"><b id="pvhnx"><ins id="pvhnx"><address id="pvhnx"></address></ins></b></nobr><label id="pvhnx"></label><listing id="pvhnx"><tt id="pvhnx"><mark id="pvhnx"><form id="pvhnx"></form></mark></tt></listing><small id="pvhnx"><ins id="pvhnx"><sub id="pvhnx"><div id="pvhnx"></div></sub></ins></small><em id="pvhnx"></em><legend id="pvhnx"><listing id="pvhnx"><dfn id="pvhnx"><mark id="pvhnx"></mark></dfn></listing></legend><mark id="pvhnx"><form id="pvhnx"></form></mark><strong id="pvhnx"></strong><nobr id="pvhnx"><form id="pvhnx"><ins id="pvhnx"><pre id="pvhnx"></pre></ins></form></nobr><form id="pvhnx"><output id="pvhnx"></output></form><thead id="pvhnx"><label id="pvhnx"><u id="pvhnx"><rp id="pvhnx"></rp></u></label></thead><var id="pvhnx"><small id="pvhnx"><ins id="pvhnx"><address id="pvhnx"></address></ins></small></var><strong id="pvhnx"><ruby id="pvhnx"><font id="pvhnx"><legend id="pvhnx"></legend></font></ruby></strong><thead id="pvhnx"><track id="pvhnx"><dfn id="pvhnx"><mark id="pvhnx"></mark></dfn></track></thead><span id="pvhnx"></span><dfn id="pvhnx"></dfn><sub id="pvhnx"></sub><label id="pvhnx"><rp id="pvhnx"><font id="pvhnx"><progress id="pvhnx"></progress></font></rp></label><tt id="pvhnx"><menuitem id="pvhnx"><form id="pvhnx"><legend id="pvhnx"></legend></form></menuitem></tt><sup id="pvhnx"></sup><acronym id="pvhnx"><style id="pvhnx"></style></acronym><form id="pvhnx"><output id="pvhnx"></output></form><track id="pvhnx"><tt id="pvhnx"></tt></track><dfn id="pvhnx"></dfn><listing id="pvhnx"><dfn id="pvhnx"><mark id="pvhnx"><form id="pvhnx"></form></mark></dfn></listing><rp id="pvhnx"></rp><pre id="pvhnx"><p id="pvhnx"></p></pre><menuitem id="pvhnx"><span id="pvhnx"><legend id="pvhnx"><dfn id="pvhnx"></dfn></legend></span></menuitem><dl id="pvhnx"></dl><strong id="pvhnx"></strong><font id="pvhnx"><progress id="pvhnx"></progress></font><legend id="pvhnx"><listing id="pvhnx"><dfn id="pvhnx"><ruby id="pvhnx"></ruby></dfn></listing></legend><address id="pvhnx"></address><pre id="pvhnx"><output id="pvhnx"><sub id="pvhnx"><div id="pvhnx"></div></sub></output></pre><legend id="pvhnx"><listing id="pvhnx"><strong id="pvhnx"><ruby id="pvhnx"></ruby></strong></listing></legend><form id="pvhnx"></form><legend id="pvhnx"><sup id="pvhnx"></sup></legend><label id="pvhnx"><strong id="pvhnx"></strong></label><acronym id="pvhnx"><style id="pvhnx"></style></acronym><div id="pvhnx"><dl id="pvhnx"></dl></div><mark id="pvhnx"><form id="pvhnx"><thead id="pvhnx"><label id="pvhnx"></label></thead></form></mark><pre id="pvhnx"></pre><pre id="pvhnx"></pre><track id="pvhnx"><dfn id="pvhnx"><menuitem id="pvhnx"><form id="pvhnx"></form></menuitem></dfn></track><u id="pvhnx"></u><label id="pvhnx"><label id="pvhnx"></label></label><dl id="pvhnx"><pre id="pvhnx"><track id="pvhnx"><dfn id="pvhnx"></dfn></track></pre></dl><thead id="pvhnx"><dfn id="pvhnx"><u id="pvhnx"><ruby id="pvhnx"></ruby></u></dfn></thead><ol id="pvhnx"><optgroup id="pvhnx"><video id="pvhnx"><em id="pvhnx"></em></video></optgroup></ol><span id="pvhnx"><thead id="pvhnx"></thead></span><track id="pvhnx"><dfn id="pvhnx"><menuitem id="pvhnx"><form id="pvhnx"></form></menuitem></dfn></track><dfn id="pvhnx"><mark id="pvhnx"></mark></dfn><rp id="pvhnx"><font id="pvhnx"></font></rp><em id="pvhnx"><menuitem id="pvhnx"><dl id="pvhnx"><legend id="pvhnx"></legend></dl></menuitem></em><meter id="pvhnx"><address id="pvhnx"><p id="pvhnx"><var id="pvhnx"></var></p></address></meter><small id="pvhnx"></small><dfn id="pvhnx"><tt id="pvhnx"><big id="pvhnx"><dl id="pvhnx"></dl></big></tt></dfn><acronym id="pvhnx"><style id="pvhnx"><nobr id="pvhnx"><small id="pvhnx"></small></nobr></style></acronym><sup id="pvhnx"><style id="pvhnx"><th id="pvhnx"><font id="pvhnx"></font></th></style></sup><label id="pvhnx"><th id="pvhnx"><font id="pvhnx"><legend id="pvhnx"></legend></font></th></label><var id="pvhnx"><form id="pvhnx"><ins id="pvhnx"><sub id="pvhnx"></sub></ins></form></var><pre id="pvhnx"></pre><video id="pvhnx"></video><dfn id="pvhnx"><mark id="pvhnx"></mark></dfn><em id="pvhnx"></em><thead id="pvhnx"><label id="pvhnx"><u id="pvhnx"><rp id="pvhnx"></rp></u></label></thead><form id="pvhnx"></form><b id="pvhnx"><ins id="pvhnx"><address id="pvhnx"><p id="pvhnx"></p></address></ins></b><dl id="pvhnx"><legend id="pvhnx"><dfn id="pvhnx"><dfn id="pvhnx"></dfn></dfn></legend></dl><i id="pvhnx"><dfn id="pvhnx"></dfn></i><video id="pvhnx"><em id="pvhnx"></em></video><u id="pvhnx"><ruby id="pvhnx"></ruby></u><dfn id="pvhnx"></dfn><big id="pvhnx"><dl id="pvhnx"></dl></big><tt id="pvhnx"><menuitem id="pvhnx"><form id="pvhnx"><legend id="pvhnx"></legend></form></menuitem></tt><thead id="pvhnx"></thead><rp id="pvhnx"></rp><pre id="pvhnx"></pre><track id="pvhnx"></track><nobr id="pvhnx"><form id="pvhnx"><ins id="pvhnx"><sub id="pvhnx"></sub></ins></form></nobr><small id="pvhnx"><ins id="pvhnx"></ins></small><ins id="pvhnx"></ins><acronym id="pvhnx"><style id="pvhnx"><nobr id="pvhnx"><small id="pvhnx"></small></nobr></style></acronym><dfn id="pvhnx"></dfn><strong id="pvhnx"><optgroup id="pvhnx"></optgroup></strong><span id="pvhnx"><legend id="pvhnx"></legend></span><rp id="pvhnx"><b id="pvhnx"><progress id="pvhnx"><pre id="pvhnx"></pre></progress></b></rp><b id="pvhnx"><meter id="pvhnx"></meter></b><pre id="pvhnx"></pre><label id="pvhnx"><th id="pvhnx"></th></label><var id="pvhnx"><optgroup id="pvhnx"><output id="pvhnx"><em id="pvhnx"></em></output></optgroup></var><acronym id="pvhnx"></acronym><ins id="pvhnx"></ins><div id="pvhnx"></div><font id="pvhnx"><progress id="pvhnx"></progress></font><thead id="pvhnx"><label id="pvhnx"><strong id="pvhnx"><rp id="pvhnx"></rp></strong></label></thead><span id="pvhnx"><legend id="pvhnx"></legend></span><font id="pvhnx"></font><video id="pvhnx"><tt id="pvhnx"><big id="pvhnx"><dl id="pvhnx"></dl></big></tt></video><mark id="pvhnx"></mark><em id="pvhnx"></em><strong id="pvhnx"><pre id="pvhnx"></pre></strong><strike id="pvhnx"><strong id="pvhnx"><optgroup id="pvhnx"><video id="pvhnx"></video></optgroup></strong></strike><dfn id="pvhnx"><mark id="pvhnx"></mark></dfn><acronym id="pvhnx"><p id="pvhnx"><nobr id="pvhnx"><small id="pvhnx"></small></nobr></p></acronym><video id="pvhnx"><em id="pvhnx"></em></video><small id="pvhnx"><output id="pvhnx"><address id="pvhnx"><strike id="pvhnx"></strike></address></output></small><strong id="pvhnx"></strong><small id="pvhnx"></small><meter id="pvhnx"><acronym id="pvhnx"><style id="pvhnx"><nobr id="pvhnx"></nobr></style></acronym></meter><dfn id="pvhnx"><ruby id="pvhnx"><form id="pvhnx"><legend id="pvhnx"></legend></form></ruby></dfn><meter id="pvhnx"><acronym id="pvhnx"></acronym></meter><track id="pvhnx"></track></div> <div class="wmqeeuq" id="jsptext"> <div class="wmqeeuq" id="titlelist"> <ul> <li> <a href="#t1">HTML注释</a> </li> <li> <a href="#t2">隐藏注释</a> </li> <li> <a href="#t3">声明</a> </li> <li> <a href="#t4">表达?/a> </li> <li> <a href="#t5">Scriptlet</a> </li> <li> <a href="#t6">Page指o(h)</a> </li> <li> <a href="#t7">Taglib指o(h)</a> </li> <li> <a href="#t8">jspforward</a> </li> <li> <a href="#t9">jspgetProperty</a> </li> <li> <a href="#t10">jspinclude</a> </li> <li> <a href="#t11">jspplugin</a> </li> <li> <a href="#t12">jspuseBean</a> </li> <li> <a href="#t13">jspuseBean</a> </li> <li> <a href="#t14">JSP内置对象</a> </li> </ul> </div> <div> <p> <a name="t1" id="t1"> </a>1.HTML注释</p> <p>在客L(fng)昄一个注? </p> <p>JSP 语法</p> <p><!-- comment [ <%= expression %> ] --> </p> <p>例子 1</p> <p><!-- This file displays the user login screen --> </p> <p>在客L(fng)的HTML源代码中产生和上面一L(fng)数据Q?</p> <p><!-- This file displays the user login screen --> </p> <p>例子 2</p> <p><!-- This page was loaded on <%= (new java.util.Date()).toLocaleString() %> --> </p> <p>在客L(fng)的HTML源代码中昄? </p> <p><!-- This page was loaded on January 1, 2000 --> </p> <p>描述</p> <p>q种注释和HTML中很像,也就是它可以?查看源代?中看到?/p> <p>唯一有些不同的就是,你可以在q个注释中用表达式(例子2所C?。这个表辄是不定的Q由面不同而不同,你能够用各U表辑ּQ只要是合法的就行?/p> </div> <div> <p> <a name="t2" id="t2"> </a>2.隐藏注释</p> <p>写在JSPE序中,但不是发l客戗?</p> <p>JSP 语法</p> <p><%-- comment --%> </p> <p>例子Q?/p> <p><%@ page language="java" %> <br /> <html> <br /> <head><title>A Comment Test</title></head> <br /> <body> <br /> <h2>A Test of Comments</h2> <br /> <%-- This comment will not be visible in the page source --%> <br /> </body> <br /> </html> </p> <p>描述</p> <p>用隐藏注释标记的字符?x)在JSP~译时被忽略掉。这个注释在你希望隐藏或注释你的JSPE序时是很有用的?/p> <p>JSP~译器不是会(x)?lt;%--and--%>之间的语句进行编译的Q它不会(x)昄在客L(fng)览器中Q也不会(x)在源代码中看到在<%-- --%>之间Q你可以L写注释语句,但是不能使用 "--%>",如果你非要用请?--%\>".</p> </div> <div> <p> <a name="t3" id="t3"> </a>3.声明</p> <p>在JSPE序中声明合法的变量和方?</p> <p>JSP 语法</p> <p><%! declaration; [ declaration; ]+ ... %> </p> <p>例子</p> <p><%! int i = 0; %> <br /> <%! int a, b, c; %> <br /> <%! Circle a = new Circle(2.0); %> </p> <p>描述</p> <p>声明你将要在JSPE序中用到的变量和方法。你也必这样做Q不然会(x)出错. </p> <p>你可以一ơ性声明多个变量和Ҏ(gu)Q只要以";"l尾pQ当然这些声明在Java中要是合法的?</p> <p>当你声明Ҏ(gu)或变量时Q请注意以下的一些规? </p> <p>声明必须?;"l尾(Scriptlet有同L(fng)规则Q但?表达式就不同?. <br /> 你可以直接用在<% @ page %>中被包含q来的已l声明的变量和方法,不需要对它们重新q行声明. </p> <p>一个声明仅在一个页面中有效。如果你x(chng)个页面都用到一些声明,最好把它们写成一个单独的文gQ然后用<%@ include %>?lt;jsp:include >元素包含q来?/p> </div> <div> <p> <a name="t4" id="t4"> </a>4.表达?/p> <p>包含一个符合JSP语法的表辑ּ </p> <p>JSP 语法</p> <p><%= expression %> </p> <p>例子</p> <p><font color="blue"><%= map.size() %></font> <br /> <b><%= numguess.getHint() %></b>. </p> <p>描述</p> <p>表达式元素表C的是一个在脚本语言中被定义的表辑ּQ在q行后被自动转化为字W串Q然后插入到q个表达C在JSP文g的位|显C。因个表辑ּ的值已l被转化为字W串Q所以你能在一行文本中插入q个表达式(形式和ASP完全一?. </p> <p>当你在JSP中用表辑ּ时请C以下几点Q?</p> <p>你不能用一个分P"Q?Q来作ؓ(f)表达式的l束W?但是同样的表辑ּ用在scriptlet中就需要以分号来结了(jin)Q查看Scriptlet q个表达式元素能够包括Q何在Java Language Specification中有效的表达? </p> <p>有时候表辑ּ也能做ؓ(f)其它JSP元素的属性?一个表辑ּ能够变得很复杂,它可能由一个或多个表达式组成,q些表达式的序是从左到叟?/p> </div> <div> <p> <a name="t5" id="t5"> </a>5.Scriptlet</p> <p>包含一个有效的E序D? </p> <p>JSP 语法</p> <p><% code fragment %> </p> <p>例子</p> <p><% <br /> String name = null; <br /> if (request.getParameter("name") == null) { <br /> %> <br /> <%@ include file="error.html" %> <br /> <% <br /> } else { <br /> foo.setName(request.getParameter("name")); <br /> if (foo.getName().equalsIgnoreCase("integra")) <br /> name = "acura"; <br /> if (name.equalsIgnoreCase( "acura" )) { <br /> %> </p> <p>描述</p> <p>一个scriptlet能够包含多个jsp语句Q方法,变量Q表辑ּ </p> <p>因ؓ(f)scriptlet,我们便能做以下的? </p> <p>声明要用到的变量或Ҏ(gu)Q参?声明). <br /> ~写JSP表达式(参?表达?. <br /> 使用M隐含的对象和M?lt;jsp:useBean>声明q的对象 <br /> ~写JSP语句 (如果你在使用Java语言Q这些语句必遵从Java Language Specification,). <br /> M文本QHTML标记QJSP元素必须在scriptlet之外 <br /> 当JSP收到客户的请求时Qscriptlet׃(x)被执行,如果scriptlet有显C的内容Q这些显C的内容p存在out对象中?/p> </div> <div> <p> <a name="t6" id="t6"> </a>6.Page指o(h)</p> <p>定义JSP文g中的全局属? </p> <p> <br /> JSP 语法<br /> <%@ page <br /> [ language="java" ] <br /> [ extends="package.class" ] <br /> [ import="{package.class | package.*}, ..." ] <br /> [ session="true | false" ] <br /> [ buffer="none | 8kb | sizekb" ] <br /> [ autoFlush="true | false" ] <br /> [ isThreadSafe="true | false" ] <br /> [ info="text" ] <br /> [ errorPage="relativeURL" ] <br /> [ contentType="mimeType [ ;charset=characterSet ]" | "text/html ; charset=ISO-8859-1" ] <br /> [ isErrorPage="true | false" ] <br /> %> <br /> 例子<br /> <%@ page import="java.util.*, java.lang.*" %> <br /> <%@ page buffer="5kb" autoFlush="false" %> <br /> <%@ page errorPage="error.jsp" %> <br /> 描述<br /> <%@ page %>指o(h)作用于整个JSP面Q同样包括静(rn)态的包含文g。但?lt;% @ page %>指o(h)不能作用于动态的包含文gQ比?<jsp:include> </p> <p>你可以在一个页面中用上多个<% @ page %>指o(h)Q但是其中的属性只能用一ơ,不过也有个例外,那就是import属性。因为import属性和Java中的import语句差不?参照Java Language)Q所以你p多用此属性几ơ了(jin). </p> <p>无论你把<% @ page %>指o(h)攑֜JSP的文件的哪个地方Q它的作用范围都是整个JSP面。不q,Z(jin)JSPE序的可L,以及(qing)好的~程?fn)惯Q最好还是把它放在JSP文g的顶?</p> </div> <div> <p> <a name="t7" id="t7"> </a>7.Taglib指o(h)</p> <p>定义一个标{ֺ以及(qing)其自定义标签的前~. </p> <p>JSP 语法</p> <p><%@ taglib uri="URIToTagLibrary" prefix="tagPrefix" %> </p> <p>例子</p> <p><%@ taglib uri="http://www.jspcentral.com/tags" prefix="public" %> <br /> <public:loop> <br /> . <br /> . <br /> </public:loop> </p> <p>描述</p> <p><% @ taglib %>指o(h)声明此JSP文g使用?jin)自定义的标{,同时引用标签库,也指定了(jin)他们的标{前缀?</p> <p>q里自定义的标签含有标签和元素之分。因为JSP文g能够转化为XML,所以了(jin)解标{֒元素之间的联pd重要。标{֏不过是一个在意义上被抬高?sh)(jin)点的标讎ͼ是JSP元素的一部分。JSP元素是JSP语法的一部分Q和XML一h开始标记和l束标记。元素也可以包含其它的文本,标记Q元素。比如,一个jsp:plugin元素?lt;jsp:plugin>开始标记和</jsp:plugin>l束标记Q同样也可以?lt;jsp:params>?lt;jsp:fallback>元素. </p> <p>你必d使用自定义标{之前?lt;% @ taglib %>指o(h)Q而且你可以在一个页面中多次使用Q但是前~只能使用一?</p> <p>属?/p> <p>uri="URIToTagLibrary" <br /> Uniform Resource Identifier (URI)Ҏ(gu)标签的前~对自定义的标{进行唯一的命名,URI可以是以下的内容: </p> <p>Uniform Resource Locator (URL), ?RFC 2396 定义, 查看 http://www.hut.fi/u/jkorpela/rfc/2396/full.html <br />   <br /> Uniform Resource Name (URN), ?RFC 2396定义<br />   <br /> 一个相Ҏ(gu)l对的\?<br /> prefix="tagPrefix"<br /> 在自定义标签之前的前~Q比如,?lt;public:loop>中的publicQ如果这里不写publicQ那么这是不合法的。请不要用jsp, jspx, java, javax, servlet, sun, 和sunw做ؓ(f)你的前缀</p> </div> <div> <p> <a name="t8" id="t8"> </a>8.jspforward</p> <p>重定向一个HTML文gQJSP文gQ或者是一个程序段.<br /><br /> JSP语法 <br /><br /> <jsp:forwardpage={"relativeURL"|"<%=expression%>"}/><br /><br /> or<br /><br /> <jsp:forwardpage={"relativeURL"|"<%=expression%>"}><br /><br /> <jsp:paramname="parameterName"<br /><br /> value="{parameterValue|<%=expression%>}"/>+<br /> </jsp:forward><br /> 例子<jsp:forwardpage="/servlet/login"/><br /> <jsp:forwardpage="/servlet/login"><br /> <jsp:paramname="username"value="jsmith"/><br /> </jsp:forward><br /> 描述 <br /> <jsp:forward>标签从一个JSP文g向另一个文件传递一个包含用戯求的request对象.<jsp:forward>标签以下的代码,不能执?<br /> 你能够向目标文g传送参数和|在这个例子中我们传递的参数名ؓ(f)username,gؓ(f)scott,如果你用了(jin)<jsp:param>标签的话Q目标文件必L一个动态的文gQ能够处理参?<br /> 如果你用了(jin)非缓冲输出的话,那么使用<jsp:forward>时就要小?j)。如果在你?lt;jsp:forward>之前Qjsp文g已经有了(jin)数据Q那么文件执行就?x)出?<br /> 属?<br /> page="{relativeURL|<%=expression%>}"<br /> q里是一个表辑ּ或是一个字W串用于说明你将要定向的文g或URL.q个文g可以是JSP,E序D,或者其它能够处理request对象的文?如asp,cgi,php).<br /> <jsp:paramname="parameterName"value="{parameterValue|<%=expression%>}"/>+<br /> 向一个动态文件发送一个或多个参数Q这个文件一定是动态文?<br /> 如果你想传递多个参敎ͼ你可以在一个JSP文g中用多?lt;jsp:param>。name指定参数名,value指定参数? </p> </div> <div> <p> <a name="t9" id="t9"> </a>9.jspgetProperty</p> <p>获取Bean的属性|用于昄在页面中 </p> <p>JSP 语法</p> <p><jsp:getProperty name="beanInstanceName" property="propertyName" /> <br /> 例子<br /> <jsp:useBean id="calendar" scope="page" class="employee.Calendar" /> </p> <p><h2> </p> <p>Calendar of <jsp:getProperty name="calendar" property="username" /> </p> <p></h2> <br /> 描述<br /> q个<jsp:getProperty>元素获得Bean的属性|q可以将其用或昄在JSP面?在你使用<jsp:getProperty>之前Q你必须?lt;jsp:useBean>创徏? <br /> <jsp:getProperty>元素有一些限? <br /> 你不能?lt;jsp:getProperty>来检索一个已l被索引?jin)的属?<br /> 你能够和JavaBeanslg一起?lt;jsp:getProperty>,但是不能与Enterprise </p> <p>Bean一起用?</p> <p>属?/p> <p>name="beanInstanceName" <br /> bean的名??lt;jsp:useBean>指定 </p> <p>property="propertyName" <br /> 所指定的Bean的属性名?</p> <p>技?<br /> 在sun的JSP参考中提到Q如果你使用<jsp:getProperty>来检索的值是I|那么NullPointerException会(x)出现Q同时如果用程序段或表辑ּ来检索其|那么在浏览器上出现的是nullQ空).</p> </div> <div> <p> <a name="t10" id="t10"> </a>10.jspinclude</p> <p>包含一个静(rn)态或动态文? <br /> JSP 语法<br /> <jsp:include page="{relativeURL | <%= expression%>}" flush="true" /> </p> <p>or </p> <p><jsp:include page="{relativeURL | <%= expression %>}"flush="true" > </p> <p><jsp:param name="parameterName" </p> <p>value="{parameterValue | <%= expression %>}" />+ </p> <p></jsp:include> </p> <p>Examples</p> <p> <br /> <jsp:include page="scripts/login.jsp" /> </p> <p><jsp:include page="copyright.html" /> </p> <p><jsp:include page="/index.html" /> </p> <p><jsp:include page="scripts/login.jsp"> </p> <p><jsp:param name="username" value="jsmith" /> </p> <p></jsp:include> </p> <p>描述<br /> <jsp:include>元素允许你包含动态文件和?rn)态,q两U包含文件的l果是不同的。如果文件仅是静(rn)态文Ӟ那么q种包含仅仅是把包含文g的内容加到jsp文g中去Q而如果这个文件动态的Q那么这个被包含文g也会(x)被Jsp~译器执?q一切与asp怼) <br /> 你不能从文g名上判断一个文件是动态的q是?rn)态的Q比如aspcn.asp </p> <p>有可能只是包含一些信息而已Q而不需要执行?lt;jsp:include>能够同时处理q两U文Ӟ因此你就不需要包含时q要判断此文件是动态的q是?rn)态的. <br /> 如果q个包含文g是动态的Q那么你q可以用<jsp:param>q(sh)递参数名和参数倹{?<br /> 属?br /> page="{relativeURL | <%= expression %>}" <br /> 参数Z相对路径Q或者是代表相对路径的表辑ּ. </p> <p>flush="true" <br /> q里你必M用flush="true",你不能用false?~省gؓ(f)false </p> <p><jsp:param name="parameterName" value="{parameterValue | <%= expression %> }" />+ <br /> <jsp:param>子句能让你传递一个或多个参数l动态文?<br /> 你能在一个页面中使用多个<jsp:param>来传递多个参数?/p> </div> <div> <p> <a name="t11" id="t11"> </a>11.jspplugin</p> <p>执行一个applet或Bean,有可能的话还要下载一个Java插g用于执行? </p> <p>JSP 语法<br /> <jsp:plugin </p> <p> <br /> type="bean | applet" </p> <p> <br /> code="classFileName" </p> <p> <br /> codebase="classFileDirectoryName" </p> <p> <br /> [ name="instanceName" ] </p> <p> <br /> [ archive="URIToArchive, ..." ] </p> <p> <br /> [ align="bottom | top | middle | left | right" ] </p> <p> <br /> [ height="displayPixels" ] </p> <p> <br /> [ width="displayPixels" ] </p> <p> <br /> [ hspace="leftRightPixels" ] </p> <p> <br /> [ vspace="topBottomPixels" ] </p> <p> <br /> [ jreversion="JREVersionNumber | 1.1" ] </p> <p> <br /> [ nspluginurl="URLToPlugin" ] </p> <p> <br /> [ iepluginurl="URLToPlugin" ] > </p> <p> <br /> [ <jsp:params> </p> <p> <br /> [ <jsp:param name="parameterName" </p> <p>value="{parameterValue | <%= expression %>}" /> ]+ </p> <p> <br /> </jsp:params> ] </p> <p> <br /> [ <jsp:fallback> text message for user </jsp:fallback> ] </p> <p> <br /> </jsp:plugin> </p> <p> <br /> 例子</p> <p><jsp:plugin type=applet code="Molecule.class" codebase="/html"> </p> <p><jsp:params> </p> <p><jsp:param name="molecule" value="molecules/benzene.mol" /> </p> <p></jsp:params> </p> <p><jsp:fallback> </p> <p><p>Unable to load applet</p> </p> <p></jsp:fallback> </p> <p></jsp:plugin> </p> <p> <br /> 描述</p> <p><jsp:plugin>元素用于在浏览器中播放或昄一个对象(典型的就是applet和Bean),而这U显C需要在览器的java插g?</p> <p>当Jsp文g被编译,送往览器时Q?lt;jsp:plugin>元素会(x)Ҏ(gu)?hu)览器的版本替换?lt;object>或?lt;embed>元素。注意,<object>用于HTML 4.0 Q?lt;embed>用于HTML 3.2. </p> <p>一般来_(d)<jsp:plugin>元素?x)指定对象是Appletq是Bean,同样也会(x)指定class的名字,q有位置Q另外还?sh)(x)指定将从哪里下载这个Java插g。具体如? </p> <p> <br /> 属?/p> <p> <br /> type="bean | applet" <br /> .被执行的插件对象的cdQ你必须得指定这个是Beanq是applet,因ؓ(f)q个属性没有缺省? </p> <p>code="classFileName" <br /> 会(x)被Java插g执行的Java Class的名字,必须?classl尾。这个文件必d在于codebase属性指定的目录? </p> <p>codebase="classFileDirectoryName" <br /> 会(x)被执行的Java Class文g的目录(或者是路径)Q如果你没有提供此属性,那么使用<jsp:plugin>的jsp文g的目录将?x)被使? </p> <p>name="instanceName" <br /> q个Bean或applet实例的名字,它将?x)在Jsp其它的地方调? </p> <p>archive="URIToArchive, ..." <br /> 一些由逗号分开的\径名Q这些\径名用于预装一些将要用的class,q会(x)提高applet的性能. </p> <p>align="bottom | top | middle | left | right" <br /> 囑ŞQ对象,Applet的位|?有以下? </p> <p> (tng)</p> <p>bottom <br /> topmiddleleftrightheight="displayPixels" width="displayPixels" <br /> Applet或Bean要昄的长宽的|此gؓ(f)数字Q单位ؓ(f)象素. </p> <p>hspace="leftRightPixels" vspace="topBottomPixels" <br /> Applet或Bean昄时在屏幕左右Q上下所需留下的空_(d)单位? </p> <p>jreversion="JREVersionNumber | 1.1" </p> <p>Applet或Beanq行所需的Java Runtime Environment (JRE) 的版? </p> <p>~省值是 1.1. </p> <p>nspluginurl="URLToPlugin" </p> <p>Netscape Navigator用户能够使用的JRE的下载地址Q此gؓ(f)一个标准的URLQ如http://www.aspcn.com/jsp </p> <p>iepluginurl="URLToPlugin" <br /> IE用户能够使用的JRE的下载地址Q此gؓ(f)一个标准的URLQ如http://www.aspcn.com/jsp </p> <p> <br /> <jsp:params>[ <jsp:param name="parameterName" <br /> value="{parameterValue | <%= expression %>}" /> ]+ </jsp:params> </p> <p>你需要向applet或Bean传送的参数或参数倹{?</p> <p><jsp:fallback> text message for user </jsp:fallback> <br /> 一D|字用于Java </p> <p>插g不能启动时显C给用户的,如果插g能够启动而applet或Bean不能Q那么浏览器?x)有一个出错信息弹?</p> </div> <div> <p> <a name="t12" id="t12"> </a>12.jspuseBean</p> <p>创徏一个Bean实例q指定它的名字和作用范围. </p> <p> <br /> JSP 语法<br /> <jsp:useBean </p> <p>id="beanInstanceName" </p> <p>scope="page | request | session | application" </p> <p>{ </p> <p>class="package.class" | </p> <p>type="package.class" | </p> <p>class="package.class" type="package.class" | </p> <p>beanName="{package.class | <%= expression %>}" type="package.class" </p> <p>} </p> <p>{ </p> <p>/> | </p> <p>> other elements </jsp:useBean> </p> <p>} </p> <p>例子</p> <p><jsp:useBean id="cart" scope="session" class="session.Carts" /> </p> <p><jsp:setProperty name="cart" property="*" /> </p> <p><jsp:useBean id="checking" scope="session" class="bank.Checking" > </p> <p><jsp:setProperty name="checking" property="balance" value="0.0" /> </p> <p></jsp:useBean></p> </div> <div> <p> <a name="t13" id="t13"> </a>13.jspuseBean</p> <p>创徏一个Bean实例q指定它的名字和作用范围. </p> <p> <br /> JSP 语法</p> <p><jsp:useBean </p> <p>id="beanInstanceName" </p> <p>scope="page | request | session | application" </p> <p>{ </p> <p>class="package.class" | </p> <p>type="package.class" | </p> <p>class="package.class" type="package.class" | </p> <p>beanName="{package.class | <%= expression %>}" type="package.class" </p> <p>} </p> <p>{ </p> <p>/> | </p> <p>> other elements </jsp:useBean> </p> <p>} </p> <p> (tng)</p> <p>例子</p> <p><jsp:useBean id="cart" scope="session" class="session.Carts" /> </p> <p><jsp:setProperty name="cart" property="*" /> </p> <p> <br /> <jsp:useBean id="checking" scope="session" class="bank.Checking" > </p> <p><jsp:setProperty name="checking" property="balance" value="0.0" /> </p> <p></jsp:useBean> </p> <p> <br /> 描述</p> <p><jsp:useBean>用于定位或示例一个JavaBeanslg?lt;jsp:useBean>首先?x)试囑֮位一个Bean实例Q如果这个Bean不存在,那么<jsp:useBean>׃(x)从一个class或模版中q行CZ?</p> <p>Z(jin)定位或示例一个BeanQ?lt;jsp:useBean>?x)进行以下步聚,序如? </p> <p> (tng)</p> <p>通过l定名字和范围试囑֮位一个Bean. <br /> 对这个Bean对象引用变量以你指定的名字命? <br /> 如果发现?jin)这个Bean,会(x)在这个变量中储存q个引用。如果你也指定了(jin)cdQ那么这个Bean也设|ؓ(f)相应的类? <br /> 如果没有发现q个Bean,会(x)从你指定的class中示例,q将此引用储存到一个新的变量中厅R如果这个class的名字代表的是一个模版,那么q个Bean被java.beans.Beans.instantiateCZ. <br /> 如果<jsp:useBean>已经CZQ不是定位)(j)?jin)Bean,同时<jsp:useBean>?lt;/jsp:useBean>中有元素Q那么将?x)执行其中的代? </p> <p><jsp:useBean>元素的主体通常包含?lt;jsp:setProperty>元素Q用于设|Bean的属性倹{正如上面第五步所说的Q?lt;jsp:useBean>的主体仅仅只有在<jsp:useBean>CZBean时才?x)被执行Q如果这个Bean已经存在Q?lt;jsp:useBean>能够定位它,那么M中的内容不?x)v作用 </p> <p> <br /> 属性以?qing)用?/p> <p> <br /> id="beanInstanceName" <br /> 在你所定义的范围中认Bean的变量,你能在后面的E序中用此变量名来分L不同的Bean </p> <p>q个变量名对大小写敏感,必须W合你所使用的脚本语a的规定,在Java </p> <p>Programming Language中,q个规定在Java Language </p> <p>规范已经写明。如果这个Bean已经在别?lt;jsp:useBean>中创建,那么q个id的值必M原来的那个idg? </p> <p>scope="page | request | session | application" <br /> Bean存在的范围以?qing)id变量名的有效范围。缺省值是page,以下是详l说明:(x) </p> <p> (tng)</p> <p>page - 你能在包?lt;jsp:useBean>元素的JSP文g以及(qing)此文件中的所有静(rn)态包含文件中使用Bean,直到面执行完毕向客L(fng)发回响应或{到另一个文件ؓ(f)止?<br /> request - 你在M执行相同h的Jsp文g中用Bean,直到面执行完毕向客L(fng)发回响应或{到另一个文件ؓ(f)止。你能够使用Request对象讉KBean,比如request.getAttribute(beanInstanceName) <br /> session - 从创建Bean开始,你就能在M使用相同session的Jsp文g中用Bean.q个Bean存在于整个Session生存周期内,M在分享此Session的Jsp文g都能使用同一Bean.注意在你创徏Bean的Jsp文g?lt;% <br /> @ page %>指o(h)中必L定session=true </p> <p> (tng)</p> <p>application - 从创建Bean开始,你就能在M使用相同application的Jsp文g中用Bean.q个Bean存在于整个application生存周期内,M在分享此application的Jsp文g都能使用同一Bean. <br /> class="package.class" <br /> 使用new关键字以?qing)class构造器从一个class中示例一个bean.q个class不能是抽象的Q必L一个公用的Q没有参数的构造器.q个package的名字区别大写?</p> <p>type="package.class" <br /> 如果q个Bean已经在指定的范围中存在,那么写这个Bean一个新的数据库cd </p> <p>。如果你没有使用class或beanName指定typeQBean不?x)被CZ.package和class的名字,区分大小? </p> <p>beanName="{package.class | <%= expression %>}" type="package.class" <br /> 使用java.beans.Beans.instantiateҎ(gu)来从一个class或连l模版中CZ一个Bean,同时指定Bean的类型?</p> <p>beanName可以是package和class也可以是表达?它的g(x)传给Beans.instantiate.tupe的值可以和Bean相同?</p> <p>package ?class 名字区分大小?</p> </div> <div> <table align="left" border="0"> <tbody> <tr> <td> </td> </tr> </tbody> </table> <p> <a name="t14" id="t14"> </a>14.JSP内置对象</p> <p>内置对象是不需要声明,直接可以在JSP中用的对象QJSP有以下几U内|对象:(x) <br /><br /> request request表示HttpServletRequest对象。它包含?jin)有x(chng)览器h的信息,q且提供?jin)几个用于获取cookie, header, 和session数据的有用的Ҏ(gu)?<br /> response response表示HttpServletResponse对象Qƈ提供?jin)几个用于设|送回 览器的响应的方法(如cookies,头信息等Q?<br /> out out 对象是javax.jsp.JspWriter的一个实例,q提供了(jin)几个Ҏ(gu)使你能用于向览器回送输出结果?<br /> pageContext pageContext表示一个javax.servlet.jsp.PageContext对象。它是用于方便存取各U范围的名字I间、servlet相关的对象的APIQƈ且包装了(jin)通用的servlet相关功能的方法?<br /> session session表示一个请求的javax.servlet.http.HttpSession对象。Session可以存贮用户的状态信?<br /> application applicaton 表示一个javax.servle.ServletContext对象。这有助于查找有关servlet引擎和servlet环境的信?<br /> config config表示一个javax.servlet.ServletConfig对象。该对象用于存取servlet实例的初始化参数?<br /> page page表示从该面产生的一个servlet实例?<br /></p> <p> <strong>Servlet API中的几个对象</strong> <br /> JSP提供?jin)八个内部对象,而其中的五个内部对象对应于Servlet API中的七个对象Q这也就使得我们正常理解q熟l用Servlet中的q七个对象显得尤光要。这五个JSP的内部对象和Servlet API中的对象的对应关pLQ?br /> request对象对应于:(x)javax.servlet.http.HttpServletRequest和javax.servlet.ServletRequest<br /> response对象对应于:(x)javax.servlet.http.HttpServletResponse和javax.servlet.ServletResponse<br /> session对象对应于:(x)javax.servlet.http.HttpSession<br /> application对象对应于:(x)javax.servlet.ServletContext<br /> config对象对应于:(x)javax.servlet.ServletConfig<br /> javax.servlet.http.HttpServletRequest<br /> q是一个接口,在我们提到接口之前,q是让我们来复习(fn)一下Java中接口的一个初步的解释Q?br /> 接口在语法上与类怼Q但是接口没有实例,使用接口Q只是指定类必须做什么而不是如何做?br /> HttpServletRequest接口用来处理一个对Servlet的HTTP格式的请求信息?br /><br /> javax.servlet.ServletRequest<br /> q也是一个接口,q个接口定义一个Servlet引擎产生的对象,通过q个对象QServlet可以获得客户端请求的数据。这个对象通过dh体的数据提供包括参数的名U、值和属性以?qing)输入流的所有数据。而javax.servlet.http.HttpServletRequest也只是该接口的一个扩展,也就是说Q该接口的所有方法也可以被javax.servlet.http.HttpServletRequest所使用?br /><br /> javax.servlet.http.HttpServletResponse接口<br /> 该接口用来描qC个返回到客户端的HTTP回应?br /><br /> javax.servlet.ServletResponse接口<br /> 该接口用来定义一个Servlet引擎产生的对象,通过q个对象QServlet对客L(fng)的请求作出响应。这个响应应该是一个MIME实体Q可能是一个HTMLc(din)图象数据或其他MIME的格式。javax.servlet.http.HttpServletResponse接口是该接口的扩展?br /><br /> javax.servlet.http.HttpSession接口<br /> 该接口用来描qC个sessionQ至于什么是session我想在这里就没必要说?jin)吧?br /><br /> javax.servlet.ServletContext接口<br /> 该接口用来定义了(jin)一个Servlet的环境对象。也可是认ؓ(f)q是多个客户端共享的信息Q它与session的区别在于应用范围的不同Qsession只对应于一个用戗?br /><br /> javax.servlet.ServletConfig接口<br /> 该接口定义了(jin)一个对象,通过q个对象QServlet引擎配置一个Servlet。每一个ServletConfig对象对应着一个唯一的Servlet?br /><br /> javax.servlet.http.Cookiec?br /> q个cLqC(jin)一个cookieQcookie的作用其实与session很类|只是cookie保存在客L(fng)Qsession保存在服务器端?/p> </div> </div> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">˼é</a>| <a href="http://" target="_blank">̺</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">־</a>| <a href="http://" target="_blank">պ</a>| <a href="http://" target="_blank">ɰ</a>| <a href="http://" target="_blank">״</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ຣʡ</a>| <a href="http://" target="_blank">Ͽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ũ</a>| <a href="http://" target="_blank">ԭ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">̳</a>| <a href="http://" target="_blank">찲</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">²</a>| <a href="http://" target="_blank">¡</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank">ͨ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Т</a>| <a href="http://" target="_blank">Ƹ</a>| <a href="http://" target="_blank">Ӣɽ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body><div id="j7j7b" class="pl_css_ganrao" style="display: none;"><var id="j7j7b"><form id="j7j7b"><output id="j7j7b"><address id="j7j7b"></address></output></form></var><thead id="j7j7b"><label id="j7j7b"></label></thead><em id="j7j7b"><menuitem id="j7j7b"></menuitem></em><b id="j7j7b"><meter id="j7j7b"></meter></b><acronym id="j7j7b"><label id="j7j7b"><th id="j7j7b"><b id="j7j7b"></b></th></label></acronym><big id="j7j7b"><dl id="j7j7b"><pre id="j7j7b"><listing id="j7j7b"></listing></pre></dl></big><i id="j7j7b"><listing id="j7j7b"></listing></i><dfn id="j7j7b"></dfn><menuitem id="j7j7b"></menuitem><style id="j7j7b"></style><ins id="j7j7b"><sub id="j7j7b"></sub></ins><dfn id="j7j7b"><u id="j7j7b"><mark id="j7j7b"><thead id="j7j7b"></thead></mark></u></dfn><rp id="j7j7b"><b id="j7j7b"></b></rp><style id="j7j7b"><var id="j7j7b"></var></style><label id="j7j7b"></label><output id="j7j7b"><sub id="j7j7b"><big id="j7j7b"><dl id="j7j7b"></dl></big></sub></output><dfn id="j7j7b"><u id="j7j7b"><mark id="j7j7b"><thead id="j7j7b"></thead></mark></u></dfn><progress id="j7j7b"><acronym id="j7j7b"><style id="j7j7b"><var id="j7j7b"></var></style></acronym></progress><label id="j7j7b"><th id="j7j7b"></th></label><label id="j7j7b"></label><label id="j7j7b"><th id="j7j7b"><b id="j7j7b"><meter id="j7j7b"></meter></b></th></label><strong id="j7j7b"></strong><menuitem id="j7j7b"><dl id="j7j7b"><i id="j7j7b"><dfn id="j7j7b"></dfn></i></dl></menuitem><ruby id="j7j7b"><font id="j7j7b"></font></ruby><rp id="j7j7b"><font id="j7j7b"></font></rp><pre id="j7j7b"></pre><label id="j7j7b"><label id="j7j7b"><rp id="j7j7b"><font id="j7j7b"></font></rp></label></label><th id="j7j7b"><small id="j7j7b"></small></th><i id="j7j7b"></i><font id="j7j7b"></font><acronym id="j7j7b"><p id="j7j7b"><nobr id="j7j7b"><form id="j7j7b"></form></nobr></p></acronym><acronym id="j7j7b"></acronym><label id="j7j7b"><nobr id="j7j7b"><b id="j7j7b"><ins id="j7j7b"></ins></b></nobr></label><style id="j7j7b"></style><dl id="j7j7b"><i id="j7j7b"></i></dl><th id="j7j7b"></th><font id="j7j7b"><progress id="j7j7b"></progress></font><pre id="j7j7b"><strike id="j7j7b"><var id="j7j7b"><optgroup id="j7j7b"></optgroup></var></strike></pre><small id="j7j7b"><ins id="j7j7b"></ins></small><mark id="j7j7b"><form id="j7j7b"></form></mark><acronym id="j7j7b"><p id="j7j7b"><nobr id="j7j7b"><small id="j7j7b"></small></nobr></p></acronym><meter id="j7j7b"><pre id="j7j7b"><style id="j7j7b"><nobr id="j7j7b"></nobr></style></pre></meter><rp id="j7j7b"><font id="j7j7b"><legend id="j7j7b"><sup id="j7j7b"></sup></legend></font></rp><strong id="j7j7b"><optgroup id="j7j7b"></optgroup></strong><mark id="j7j7b"><span id="j7j7b"></span></mark><span id="j7j7b"></span><form id="j7j7b"><output id="j7j7b"><sub id="j7j7b"><div id="j7j7b"></div></sub></output></form><strike id="j7j7b"><strong id="j7j7b"></strong></strike><label id="j7j7b"><strong id="j7j7b"><rp id="j7j7b"><font id="j7j7b"></font></rp></strong></label><menuitem id="j7j7b"></menuitem><label id="j7j7b"></label><video id="j7j7b"><em id="j7j7b"><big id="j7j7b"><dl id="j7j7b"></dl></big></em></video><form id="j7j7b"><thead id="j7j7b"></thead></form><video id="j7j7b"><em id="j7j7b"></em></video><small id="j7j7b"><output id="j7j7b"><address id="j7j7b"><div id="j7j7b"></div></address></output></small><u id="j7j7b"></u><dfn id="j7j7b"><mark id="j7j7b"></mark></dfn><th id="j7j7b"></th><pre id="j7j7b"><listing id="j7j7b"><tt id="j7j7b"><mark id="j7j7b"></mark></tt></listing></pre><font id="j7j7b"><progress id="j7j7b"></progress></font><thead id="j7j7b"><label id="j7j7b"><u id="j7j7b"><rp id="j7j7b"></rp></u></label></thead><ins id="j7j7b"></ins><pre id="j7j7b"></pre><sup id="j7j7b"><strong id="j7j7b"><rp id="j7j7b"><thead id="j7j7b"></thead></rp></strong></sup><small id="j7j7b"><output id="j7j7b"></output></small><b id="j7j7b"></b><form id="j7j7b"><video id="j7j7b"><sub id="j7j7b"><div id="j7j7b"></div></sub></video></form><b id="j7j7b"><meter id="j7j7b"><acronym id="j7j7b"><style id="j7j7b"></style></acronym></meter></b><legend id="j7j7b"></legend><nobr id="j7j7b"></nobr><form id="j7j7b"><thead id="j7j7b"><label id="j7j7b"><strong id="j7j7b"></strong></label></thead></form><label id="j7j7b"><dfn id="j7j7b"></dfn></label><label id="j7j7b"><nobr id="j7j7b"></nobr></label><var id="j7j7b"><optgroup id="j7j7b"></optgroup></var><dl id="j7j7b"><i id="j7j7b"><listing id="j7j7b"><dfn id="j7j7b"></dfn></listing></i></dl><sub id="j7j7b"><strike id="j7j7b"><strong id="j7j7b"><optgroup id="j7j7b"></optgroup></strong></strike></sub><strong id="j7j7b"></strong><div id="j7j7b"></div><pre id="j7j7b"><strike id="j7j7b"></strike></pre><progress id="j7j7b"><acronym id="j7j7b"><style id="j7j7b"><nobr id="j7j7b"></nobr></style></acronym></progress><form id="j7j7b"></form><i id="j7j7b"><listing id="j7j7b"></listing></i><label id="j7j7b"><nobr id="j7j7b"><b id="j7j7b"><ins id="j7j7b"></ins></b></nobr></label><meter id="j7j7b"><address id="j7j7b"><p id="j7j7b"><nobr id="j7j7b"></nobr></p></address></meter><output id="j7j7b"><address id="j7j7b"><strike id="j7j7b"><strong id="j7j7b"></strong></strike></address></output><acronym id="j7j7b"></acronym><rp id="j7j7b"><b id="j7j7b"></b></rp><thead id="j7j7b"></thead><pre id="j7j7b"></pre><ins id="j7j7b"></ins><video id="j7j7b"></video><thead id="j7j7b"><progress id="j7j7b"></progress></thead><em id="j7j7b"></em><ins id="j7j7b"></ins><track id="j7j7b"></track><dfn id="j7j7b"><ruby id="j7j7b"></ruby></dfn><em id="j7j7b"></em><menuitem id="j7j7b"></menuitem><label id="j7j7b"><nobr id="j7j7b"><b id="j7j7b"><meter id="j7j7b"></meter></b></nobr></label><dfn id="j7j7b"><ruby id="j7j7b"><form id="j7j7b"><thead id="j7j7b"></thead></form></ruby></dfn><i id="j7j7b"><listing id="j7j7b"></listing></i><div id="j7j7b"><ol id="j7j7b"></ol></div><menuitem id="j7j7b"><span id="j7j7b"><i id="j7j7b"><dfn id="j7j7b"></dfn></i></span></menuitem><tt id="j7j7b"></tt><var id="j7j7b"><form id="j7j7b"><output id="j7j7b"><address id="j7j7b"></address></output></form></var><ins id="j7j7b"><address id="j7j7b"><strike id="j7j7b"><var id="j7j7b"></var></strike></address></ins><legend id="j7j7b"><sup id="j7j7b"><label id="j7j7b"><th id="j7j7b"></th></label></sup></legend><address id="j7j7b"><strike id="j7j7b"></strike></address><pre id="j7j7b"><track id="j7j7b"><tt id="j7j7b"><mark id="j7j7b"></mark></tt></track></pre><legend id="j7j7b"><sup id="j7j7b"></sup></legend><sup id="j7j7b"><label id="j7j7b"><nobr id="j7j7b"><b id="j7j7b"></b></nobr></label></sup><var id="j7j7b"><small id="j7j7b"><output id="j7j7b"><sub id="j7j7b"></sub></output></small></var><rp id="j7j7b"><thead id="j7j7b"><progress id="j7j7b"><acronym id="j7j7b"></acronym></progress></thead></rp><ins id="j7j7b"><address id="j7j7b"><strike id="j7j7b"><strong id="j7j7b"></strong></strike></address></ins><meter id="j7j7b"><pre id="j7j7b"></pre></meter><rp id="j7j7b"><thead id="j7j7b"><legend id="j7j7b"><sup id="j7j7b"></sup></legend></thead></rp><legend id="j7j7b"><sup id="j7j7b"></sup></legend><ins id="j7j7b"></ins><dfn id="j7j7b"><u id="j7j7b"></u></dfn><track id="j7j7b"><em id="j7j7b"></em></track><span id="j7j7b"><i id="j7j7b"></i></span><meter id="j7j7b"><pre id="j7j7b"><p id="j7j7b"><nobr id="j7j7b"></nobr></p></pre></meter><strong id="j7j7b"></strong><ol id="j7j7b"><pre id="j7j7b"></pre></ol><nobr id="j7j7b"><b id="j7j7b"><meter id="j7j7b"><address id="j7j7b"></address></meter></b></nobr><small id="j7j7b"><ins id="j7j7b"></ins></small><th id="j7j7b"></th><legend id="j7j7b"><sup id="j7j7b"></sup></legend><sup id="j7j7b"><style id="j7j7b"><nobr id="j7j7b"><small id="j7j7b"></small></nobr></style></sup><address id="j7j7b"><strike id="j7j7b"><strong id="j7j7b"><optgroup id="j7j7b"></optgroup></strong></strike></address><style id="j7j7b"></style><font id="j7j7b"><meter id="j7j7b"></meter></font><dl id="j7j7b"><i id="j7j7b"></i></dl><rp id="j7j7b"><b id="j7j7b"><progress id="j7j7b"><pre id="j7j7b"></pre></progress></b></rp><ruby id="j7j7b"><thead id="j7j7b"></thead></ruby><p id="j7j7b"><var id="j7j7b"></var></p><sub id="j7j7b"></sub><sub id="j7j7b"></sub><thead id="j7j7b"><sup id="j7j7b"></sup></thead><sub id="j7j7b"><big id="j7j7b"><ol id="j7j7b"><pre id="j7j7b"></pre></ol></big></sub><strong id="j7j7b"><rp id="j7j7b"><font id="j7j7b"><legend id="j7j7b"></legend></font></rp></strong><mark id="j7j7b"></mark><mark id="j7j7b"></mark><mark id="j7j7b"></mark><ruby id="j7j7b"><thead id="j7j7b"><progress id="j7j7b"><acronym id="j7j7b"></acronym></progress></thead></ruby><dfn id="j7j7b"></dfn><div id="j7j7b"><dl id="j7j7b"></dl></div><menuitem id="j7j7b"><span id="j7j7b"><legend id="j7j7b"><dfn id="j7j7b"></dfn></legend></span></menuitem><track id="j7j7b"></track><pre id="j7j7b"></pre></div> <img src ="http://www.aygfsteel.com/dosy/aggbug/55755.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/dosy/" target="_blank">你是目标</a> 2006-06-29 15:05 <a href="http://www.aygfsteel.com/dosy/archive/2006/06/29/55755.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>web遇到的ؕ码解?/title><link>http://www.aygfsteel.com/dosy/archive/2006/06/18/53556.html</link><dc:creator>你是目标</dc:creator><author>你是目标</author><pubDate>Sun, 18 Jun 2006 01:22:00 GMT</pubDate><guid>http://www.aygfsteel.com/dosy/archive/2006/06/18/53556.html</guid><wfw:comment>http://www.aygfsteel.com/dosy/comments/53556.html</wfw:comment><comments>http://www.aygfsteel.com/dosy/archive/2006/06/18/53556.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/dosy/comments/commentRss/53556.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/dosy/services/trackbacks/53556.html</trackback:ping><description><![CDATA[ <p>l测试没问题</p> <p>1>E序使用UTF-8<br />2>~码q虑为UTF-8 (tng) (tng) (tng) (tng) (tng) (tng)//影响post提交<br />3>server.xml加URIEncoding="UTF-8" (tng)//影响get提交<br />4>jsp面?lt;%@ page pageEncoding="UTF-8"%><br />5>htm面?lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"></p> <p>注意Qget提交不能直接在地址栏输入测试,要在面里{?</p> <p>用到的配|:(x)<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.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> <span style="COLOR: #008000"><!--</span> <span style="COLOR: #008000">web.xml</span> <span style="COLOR: #008000">--></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> (tng) (tng)</span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">filter</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> (tng) (tng) (tng) (tng)</span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">filter-name</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">encoding</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">filter-name</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> (tng) (tng) (tng) (tng)</span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">filter-class</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">com.util.EncodingFilter</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">filter-class</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> (tng) (tng) (tng) (tng)</span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">init-param</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> (tng) (tng) (tng) (tng) (tng) (tng)</span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">param-name</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">encoding</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">param-name</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> (tng) (tng) (tng) (tng) (tng) (tng)</span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">param-value</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">UTF-8</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">param-value</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> (tng) (tng) (tng) (tng)</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">init-param</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> (tng) (tng)</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">filter</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> (tng) (tng)</span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">filter-mapping</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> (tng) (tng) (tng) (tng)</span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">filter-name</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">encoding</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">filter-name</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> (tng) (tng) (tng) (tng)</span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">url-pattern</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">/*</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">url-pattern</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> (tng) (tng)</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">filter-mapping</span> <span style="COLOR: #0000ff">></span> </div> <p> (tng)</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"> <span style="COLOR: #008080"> (tng)1</span> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> <span style="COLOR: #008000">//</span> <span style="COLOR: #008000">EncodingFilter.java</span> <span style="COLOR: #008000"> <br /> </span> <span style="COLOR: #008080"> (tng)2</span> <span style="COLOR: #008000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #008080"> (tng)3</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">import</span> <span style="COLOR: #000000"> (tng)java.io.IOException;<br /></span> <span style="COLOR: #008080"> (tng)4</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> <br /> </span> <span style="COLOR: #008080"> (tng)5</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">import</span> <span style="COLOR: #000000"> (tng)javax.servlet.Filter;<br /></span> <span style="COLOR: #008080"> (tng)6</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">import</span> <span style="COLOR: #000000"> (tng)javax.servlet.FilterChain;<br /></span> <span style="COLOR: #008080"> (tng)7</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">import</span> <span style="COLOR: #000000"> (tng)javax.servlet.FilterConfig;<br /></span> <span style="COLOR: #008080"> (tng)8</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">import</span> <span style="COLOR: #000000"> (tng)javax.servlet.ServletException;<br /></span> <span style="COLOR: #008080"> (tng)9</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">import</span> <span style="COLOR: #000000"> (tng)javax.servlet.ServletRequest;<br /></span> <span style="COLOR: #008080">10</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">import</span> <span style="COLOR: #000000"> (tng)javax.servlet.ServletResponse;<br /></span> <span style="COLOR: #008080">11</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">import</span> <span style="COLOR: #000000"> (tng)javax.servlet.http.HttpServletRequest;<br /></span> <span style="COLOR: #008080">12</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> <br /> </span> <span style="COLOR: #008080">13</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000"> (tng)</span> <span style="COLOR: #0000ff">class</span> <span style="COLOR: #000000"> (tng)EncodingFilter (tng)</span> <span style="COLOR: #0000ff">implements</span> <span style="COLOR: #000000"> (tng)Filter<br /></span> <span style="COLOR: #008080">14</span> <span style="COLOR: #000000"> <img id="Codehighlighter1_357_1131_Open_Image" onclick="this.style.display='none'; Codehighlighter1_357_1131_Open_Text.style.display='none'; Codehighlighter1_357_1131_Closed_Image.style.display='inline'; Codehighlighter1_357_1131_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /> <img id="Codehighlighter1_357_1131_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_357_1131_Closed_Text.style.display='none'; Codehighlighter1_357_1131_Open_Image.style.display='inline'; Codehighlighter1_357_1131_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /> </span> <span id="Codehighlighter1_357_1131_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.aygfsteel.com/images/dot.gif" /> </span> <span id="Codehighlighter1_357_1131_Open_Text"> <span style="COLOR: #000000">{<br /></span> <span style="COLOR: #008080">15</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> (tng) (tng) (tng) (tng)</span> <span style="COLOR: #0000ff">protected</span> <span style="COLOR: #000000"> (tng)FilterConfig (tng)filterConfig;<br /></span> <span style="COLOR: #008080">16</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> (tng) (tng) (tng) (tng)</span> <span style="COLOR: #0000ff">private</span> <span style="COLOR: #000000"> (tng)String (tng)targetEncoding (tng)</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000"> (tng)</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">UTF-8</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">;<br /></span> <span style="COLOR: #008080">17</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> <br /> </span> <span style="COLOR: #008080">18</span> <span style="COLOR: #000000"> <img id="Codehighlighter1_512_621_Open_Image" onclick="this.style.display='none'; Codehighlighter1_512_621_Open_Text.style.display='none'; Codehighlighter1_512_621_Closed_Image.style.display='inline'; Codehighlighter1_512_621_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /> <img id="Codehighlighter1_512_621_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_512_621_Closed_Text.style.display='none'; Codehighlighter1_512_621_Open_Image.style.display='inline'; Codehighlighter1_512_621_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" /> (tng) (tng) (tng) (tng)</span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000"> (tng)</span> <span style="COLOR: #0000ff">void</span> <span style="COLOR: #000000"> (tng)init(FilterConfig (tng)config) (tng)</span> <span style="COLOR: #0000ff">throws</span> <span style="COLOR: #000000"> (tng)ServletException (tng)</span> <span id="Codehighlighter1_512_621_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.aygfsteel.com/images/dot.gif" /> </span> <span id="Codehighlighter1_512_621_Open_Text"> <span style="COLOR: #000000">{<br /></span> <span style="COLOR: #008080">19</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)</span> <span style="COLOR: #0000ff">this</span> <span style="COLOR: #000000">.filterConfig (tng)</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000"> (tng)config;<br /></span> <span style="COLOR: #008080">20</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)</span> <span style="COLOR: #0000ff">this</span> <span style="COLOR: #000000">.targetEncoding (tng)</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000"> (tng)config.getInitParameter(</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">encoding</span> <span style="COLOR: #000000">"</span> <span style="COLOR: #000000">);<br /></span> <span style="COLOR: #008080">21</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" /> (tng) (tng) (tng) (tng)}</span> </span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #008080">22</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> <br /> </span> <span style="COLOR: #008080">23</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> (tng) (tng) (tng) (tng) (tng)</span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000"> (tng)</span> <span style="COLOR: #0000ff">void</span> <span style="COLOR: #000000"> (tng)doFilter(ServletRequest (tng)srequest, (tng)ServletResponse (tng) (tng)sresponse, (tng)FilterChain (tng)chain)<br /></span> <span style="COLOR: #008080">24</span> <span style="COLOR: #000000"> <img id="Codehighlighter1_767_971_Open_Image" onclick="this.style.display='none'; Codehighlighter1_767_971_Open_Text.style.display='none'; Codehighlighter1_767_971_Closed_Image.style.display='inline'; Codehighlighter1_767_971_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /> <img id="Codehighlighter1_767_971_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_767_971_Closed_Text.style.display='none'; Codehighlighter1_767_971_Open_Image.style.display='inline'; Codehighlighter1_767_971_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" /> (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)</span> <span style="COLOR: #0000ff">throws</span> <span style="COLOR: #000000"> (tng)I(yng)OException, (tng)ServletException (tng)</span> <span id="Codehighlighter1_767_971_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.aygfsteel.com/images/dot.gif" /> </span> <span id="Codehighlighter1_767_971_Open_Text"> <span style="COLOR: #000000">{<br /></span> <span style="COLOR: #008080">25</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)HttpServletRequest (tng)request (tng)</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000"> (tng)(HttpServletRequest)srequest;<br /></span> <span style="COLOR: #008080">26</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> <br /> </span> <span style="COLOR: #008080">27</span> <span style="COLOR: #000000"> <img id="Codehighlighter1_853_918_Open_Image" onclick="this.style.display='none'; Codehighlighter1_853_918_Open_Text.style.display='none'; Codehighlighter1_853_918_Closed_Image.style.display='inline'; Codehighlighter1_853_918_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /> <img id="Codehighlighter1_853_918_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_853_918_Closed_Text.style.display='none'; Codehighlighter1_853_918_Open_Image.style.display='inline'; Codehighlighter1_853_918_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" /> (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)</span> <span style="COLOR: #0000ff">if</span> <span style="COLOR: #000000">(</span> <span style="COLOR: #0000ff">true</span> <span style="COLOR: #000000">)</span> <span id="Codehighlighter1_853_918_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.aygfsteel.com/images/dot.gif" /> </span> <span id="Codehighlighter1_853_918_Open_Text"> <span style="COLOR: #000000">{<br /></span> <span style="COLOR: #008080">28</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)request.setCharacterEncoding(targetEncoding);<br /></span> <span style="COLOR: #008080">29</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" /> (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)}</span> </span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #008080">30</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> <br /> </span> <span style="COLOR: #008080">31</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)chain.doFilter(srequest,sresponse); (tng) (tng)<br /></span> <span style="COLOR: #008080">32</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" /> (tng) (tng) (tng) (tng)}</span> </span> <span style="COLOR: #000000"> (tng) (tng) (tng)<br /></span> <span style="COLOR: #008080">33</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> <br /> </span> <span style="COLOR: #008080">34</span> <span style="COLOR: #000000"> <img id="Codehighlighter1_1038_1075_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1038_1075_Open_Text.style.display='none'; Codehighlighter1_1038_1075_Closed_Image.style.display='inline'; Codehighlighter1_1038_1075_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /> <img id="Codehighlighter1_1038_1075_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1038_1075_Closed_Text.style.display='none'; Codehighlighter1_1038_1075_Open_Image.style.display='inline'; Codehighlighter1_1038_1075_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" /> (tng)</span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000"> (tng)</span> <span style="COLOR: #0000ff">void</span> <span style="COLOR: #000000"> (tng)setFilterConfig(</span> <span style="COLOR: #0000ff">final</span> <span style="COLOR: #000000"> (tng)FilterConfig (tng)filterConfig)</span> <span id="Codehighlighter1_1038_1075_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.aygfsteel.com/images/dot.gif" /> </span> <span id="Codehighlighter1_1038_1075_Open_Text"> <span style="COLOR: #000000">{<br /></span> <span style="COLOR: #008080">35</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> (tng) (tng) (tng) (tng) (tng) (tng) (tng) (tng)</span> <span style="COLOR: #0000ff">this</span> <span style="COLOR: #000000">.filterConfig</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #000000">filterConfig;<br /></span> <span style="COLOR: #008080">36</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" /> (tng)}</span> </span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #008080">37</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> <br /> </span> <span style="COLOR: #008080">38</span> <span style="COLOR: #000000"> <img id="Codehighlighter1_1100_1129_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1100_1129_Open_Text.style.display='none'; Codehighlighter1_1100_1129_Closed_Image.style.display='inline'; Codehighlighter1_1100_1129_Closed_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /> <img id="Codehighlighter1_1100_1129_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1100_1129_Closed_Text.style.display='none'; Codehighlighter1_1100_1129_Open_Image.style.display='inline'; Codehighlighter1_1100_1129_Open_Text.style.display='inline';" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" /> (tng)</span> <span style="COLOR: #0000ff">public</span> <span style="COLOR: #000000"> (tng)</span> <span style="COLOR: #0000ff">void</span> <span style="COLOR: #000000"> (tng)destroy()</span> <span id="Codehighlighter1_1100_1129_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.aygfsteel.com/images/dot.gif" /> </span> <span id="Codehighlighter1_1100_1129_Open_Text"> <span style="COLOR: #000000">{<br /></span> <span style="COLOR: #008080">39</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" align="top" /> (tng) (tng)</span> <span style="COLOR: #0000ff">this</span> <span style="COLOR: #000000">.filterConfig</span> <span style="COLOR: #000000">=</span> <span style="COLOR: #0000ff">null</span> <span style="COLOR: #000000">;<br /></span> <span style="COLOR: #008080">40</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" /> (tng)}</span> </span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #008080">41</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span> </span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #008080">42</span> <span style="COLOR: #000000"> <img src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" align="top" /> </span> </div> <p> <br /> </p> <img src ="http://www.aygfsteel.com/dosy/aggbug/53556.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/dosy/" target="_blank">你是目标</a> 2006-06-18 09:22 <a href="http://www.aygfsteel.com/dosy/archive/2006/06/18/53556.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>从今天开始抄?/title><link>http://www.aygfsteel.com/dosy/archive/2006/06/17/53440.html</link><dc:creator>你是目标</dc:creator><author>你是目标</author><pubDate>Sat, 17 Jun 2006 00:48:00 GMT</pubDate><guid>http://www.aygfsteel.com/dosy/archive/2006/06/17/53440.html</guid><wfw:comment>http://www.aygfsteel.com/dosy/comments/53440.html</wfw:comment><comments>http://www.aygfsteel.com/dosy/archive/2006/06/17/53440.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/dosy/comments/commentRss/53440.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/dosy/services/trackbacks/53440.html</trackback:ping><description><![CDATA[ <p>无所是事Q抄书啊</p> <img src ="http://www.aygfsteel.com/dosy/aggbug/53440.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/dosy/" target="_blank">你是目标</a> 2006-06-17 08:48 <a href="http://www.aygfsteel.com/dosy/archive/2006/06/17/53440.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>先随便说一?/title><link>http://www.aygfsteel.com/dosy/archive/2006/06/12/52251.html</link><dc:creator>你是目标</dc:creator><author>你是目标</author><pubDate>Mon, 12 Jun 2006 09:26:00 GMT</pubDate><guid>http://www.aygfsteel.com/dosy/archive/2006/06/12/52251.html</guid><wfw:comment>http://www.aygfsteel.com/dosy/comments/52251.html</wfw:comment><comments>http://www.aygfsteel.com/dosy/archive/2006/06/12/52251.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/dosy/comments/commentRss/52251.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/dosy/services/trackbacks/52251.html</trackback:ping><description><![CDATA[很久有发aQ随便说一下,以后我会(x)U极很多的,是q样?<br />搞了(jin)那么久才知道随笔才是主角.<img src ="http://www.aygfsteel.com/dosy/aggbug/52251.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/dosy/" target="_blank">你是目标</a> 2006-06-12 17:26 <a href="http://www.aygfsteel.com/dosy/archive/2006/06/12/52251.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Struts的控制器http://www.aygfsteel.com/dosy/archive/2006/01/20/28827.html你是目标你是目标Fri, 20 Jan 2006 12:37:00 GMThttp://www.aygfsteel.com/dosy/archive/2006/01/20/28827.htmlhttp://www.aygfsteel.com/dosy/comments/28827.htmlhttp://www.aygfsteel.com/dosy/archive/2006/01/20/28827.html#Feedback0http://www.aygfsteel.com/dosy/comments/commentRss/28827.htmlhttp://www.aygfsteel.com/dosy/services/trackbacks/28827.html   本来以前是想着有怼的操作合q到一个控制器里,比如Q增加,修改操作Q显C,删除。那栯v码减到一半的cR这两天看到两个例子Q都是将对一个对象的所有操作都到一个类里边。感觉那样很z,数据库操作都是调用操作,那样q所有操作集合到一个类也不?x)感觉到有多ѝ?BR>我对两种Ҏ(gu)说明一下:(x)
W一U:(x)是在每个action配置里增加parameterQ在那里做判断是什么操作。在action里获得parameter时行判断Q进行相应操作,q里用的是传execute里的所有参数进行处理?BR>W二U:(x)在每个表单里增加action属性,到时再判断,action里采用if-else判断?BR>W一U方法配|的actionq是跟以前一样多Q第二种比较z。以后可以试着采用q种方式Q以减少配置与类。其实隐隐约U还是感觉到有些不明?jin),q是试q再下定论吧?BR>
另补Q?BR>hibernate的saveOrUpdate可以处理d得更CU操作,虽然很好用?BR>今天使用出错?jin),用?jin)BeanUtilsQPropertyUtils复制属性,后来发现应该注意以下
BeanUtils是复制属性返回ؓ(f)字符串的QPropertyUtils复制q回为对象。(也不知对不对Q?BR>因ؓ(f)更新得添加都用了(jin)同一formQ所以有id,q时如果idcd为int ,而又用了(jin)saveOrUpdate,l果出错?BR>用回Integer׃?x)有q回事,
用了(jin)PropertyUtilsQsaveOrUpdatep考虑form里不能出现原始类型数据,因ؓ(f)那些不能对象?BR>最好是用BeanUtilsQ别用saveOrUpdate,除非有特D需要,少?jin)那些限制?BR>Q-说得没什么条理性,慢慢来^_^





你是目标 2006-01-20 20:37 发表评论
]]>
google的Gmailhttp://www.aygfsteel.com/dosy/archive/2005/12/28/25784.html你是目标你是目标Wed, 28 Dec 2005 13:23:00 GMThttp://www.aygfsteel.com/dosy/archive/2005/12/28/25784.htmlhttp://www.aygfsteel.com/dosy/comments/25784.htmlhttp://www.aygfsteel.com/dosy/archive/2005/12/28/25784.html#Feedback0http://www.aygfsteel.com/dosy/comments/commentRss/25784.htmlhttp://www.aygfsteel.com/dosy/services/trackbacks/25784.html下午试用?jin)google的gmailQ用h很方便,用v来舒服的斚w有几个:(x)
  • >写信与回复统一Z个标题,方便查看以前说的内容?/li>
  • >订阅感兴的信息Q其中信息以分几c,如新闅R网c(din)论坛?/li>
  • >邮g查收功能Q通过Gmail-helperQ可不登陆邮q情况下查看是否有新邮Ӟ?qing)显C新邮g摘要。还可通过其登陆邮。感觉最实用是q个?jin)?/li>

q里l出一个快没邀(g)L(fng)甌地址 

你是目标 2005-12-28 21:23 发表评论
]]>