亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 0058.htm

?? JspServlet教程專欄 對javaservlet講述的非常詳細
?? HTM
字號:
<html>

<head>
<title>新時代軟件教程:操作系統 主頁制作 服務器 設計軟件 網絡技術 編程語言 文字編輯</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
body, table {font-size: 9pt; font-family: 宋體}
a {text-decoration:none}
a:hover {color: red;text-decoration:underline}
.1  {background-color: rgb(245,245,245)}
-->
</style>
</head>
<p align="center"><script src="../../1.js"></script></a>
    <p align="center"><big><strong>JSP - FAQ (3)</strong></big></p>

<div align="right">摘自互聯網</div>

<p>
18) What do the differing levels of bean storage (page, session, app) mean? TOC <br>
<br>
<br>
<br>
From: Joe Shevland &lt;J_Shevland@TurnAround.com.au&gt;<br>
<br>
The spec is not clear on what the Application level scope actually means, but the general discussion has it that an Application is a single JSP whose beans persist from call to call - unlike those beans which have the &quot;page&quot; scope. That said, the 0.92 spec still stores &quot;application&quot; beans at the servlet level so they can actually be used by multiple servlets.<br>
<br>
(From Gabriel Wong &lt;gabrielw@EZWEBTOOLS.COM&gt;)<br>
In purely Servlet terms, they mean:<br>
<br>
page - NO storage <br>
session - servletrequest.getSession(true).putValue(&quot;myobjectname&quot;,myobject); <br>
application - getServletConfig().getServletContext().setAttribute(&quot;myobjectname&quot;,myobject); <br>
request - The storage exists for the lifetime of the request, which may be forwarded between jsp's and servlets. <br>
19) Where can I find the mailing list archives? TOC <br>
<br>
<br>
<br>
Archives of the JSP mailing list are available at http://archives.java.sun.com/archives/jsp-interest.html<br>
<br>
These archives are searchable.<br>
<br>
20) What are the important steps in using JDBC in JSP? TOC <br>
<br>
<br>
<br>
1) Instantiate an instance of the JDBC driver you're trying to use (jdbc-odbc bridge name from memory so pls check):<br>
<br>
Class.forName( &quot;sun.jdbc.odbc.JdbcOdbcDriver&quot; ).newInstance();<br>
This determines if the class is available and instantiates a new instance of it, making it available for the next step.<br>
<br>
2) Ask the DriverManager for a Connection object based on the JDBC URL you are using:<br>
<br>
Connection connDB = DriverManager.getConnection( &quot;jdbc:odbc:MyDSN&quot;,<br>
&quot;username&quot;, &quot;password&quot; );<br>
DriverManager searches through any registered drivers (instantiating a new instance above is enough to register a driver with the DriverManager, as each implementation is required to) and, based on the JDBC URL you are using, returns the appropriate implementation of Connection.<br>
<br>
3) Create a Statement object to retrieve a ResultSet<br>
<br>
Statement smentDB = connDB.createStatement();<br>
ResultSet rsDB = connDB.executeQuery( &quot;SELECT * FROM Foo&quot; );<br>
or<br>
rsDB = connDB.executeUpdate( &quot;UPDATE Foo SET Bar = NULL&quot; );<br>
4) Close down connections to free resources:<br>
<br>
rsDB.close();<br>
smentDB.close();<br>
connDB.close();<br>
Note smentDB.close() closes the rsDB object, and connDB will close smentDB, cascading down, so you can really just: connDB.Close(). Also note there's no exception handling given here.<br>
<br>
With the release of the JDBC 2.0 API, there is a CachedResultSet capability which would provide some assistance in making your pages perform better:<br>
<br>
From: DIGNE Marc &lt;jmdigne@MEUDON.NETCABLE.TM.FR&gt;<br>
<br>
I tested the JDBC CachedRowSet http://developer.java.sun.com/developer/earlyAccess/crs/index.html<br>
<br>
&quot;JDBCTM CachedRowSet is an implementation of the Rowset interface. The Rowset interface is part of the JDBC 2.0 Standard Extension API.<br>
<br>
CachedRowSet provides a disconnected, serializable, scrollable container for tabular data. A CachedRowSet object can be thought of as a disconnected set of rows that are being cached outside of a data source.<br>
<br>
Data contained in a CachedRowSet may be updated and then resynchronized with the underlying tabular data source. &quot;<br>
<br>
21) How does variable scope work in JSP? TOC <br>
<br>
<br>
<br>
From: Alexander Yavorskiy &lt;Alexander_Yavorskiy@VANTIVE.COM&gt;<br>
<br>
Hi,<br>
An interesting observation about the variables declared in JSP pages.<br>
<br>
Any variable declared inside &lt;% .... %&gt; is local to the page and is not visible to outside functions, even those declare on the same JSP.<br>
<br>
Example:<br>
<br>
&lt;%<br>
int evilVariable = &quot;666&quot;;<br>
%&gt;<br>
...<br>
function testFunction() {<br>
// do not see evilVariable from here<br>
}<br>
Why? evilVariable eventually becomes a local variable in the service() method of the resulting servlet and so is not accessible by other methods of that servlet.<br>
<br>
Any variable declared inside &lt;%! %&gt; become global for any function declared in the servlet.<br>
<br>
Example:<br>
&lt;%!<br>
int evilVariable = &quot;666&quot;;<br>
%&gt;<br>
...<br>
function testFunction() {<br>
int x = evilVariable; //can get to it<br>
}<br>
Why? evilVariable declared this way becomes a private member variable of the resulting servlet and so is accessible by all other methods of that servlet.<br>
<br>
Conclusion<br>
<br>
It is important to understand this difference because in servlet environment there will only be a single(!!!) instance of the resulting servlet running and serving all requests for a particular page. Thus, potentially all of the member variables of that servlet will be share across the requests as opposed to variables local to the service() method that will be recreated for each request. So, we should be careful about putting none constant variables in &lt;SERVER&gt;&lt;/SERVER&gt;. At the same time, it might be useful to do so in some situations.<br>
<br>
22) How do I forward to an HTML page? TOC <br>
<br>
<br>
<br>
The method forward() in the Servlet API works for JSP pages, but this is only true for resources with _active_ content, like JSP pages.<br>
<br>
If you wish to forward to an HTML page, you have to use a different method:<br>
<br>
From: Volker Stiehl &lt;stiehl@ZNNBG.SIEMENS.DE&gt;<br>
<br>
In order to access HTML files you have to use the new &quot;resource abstraction&quot; feature of 2.1.<br>
Try the following:<br>
<br>
URL url = getServletContext().getResource(&quot;/abc/xyz.html&quot;);<br>
out.println(url.getContent());<br>
23) Are there any white papers or documents explaining how JSP fits? TOC <br>
<br>
<br>
<br>
From: &quot;Craig R. McClanahan&quot; &lt;cmcclanahan@mytownnet.com&gt;<br>
<br>
http://www.software.ibm.com/ebusiness/pm.html<br>
<br>
It is titled &quot;The Web Application Programming Model&quot;, and provides a nice overview of the basic architecture IBM proposes for web applications (essentially the &quot;Model 2&quot; approach from the JSP specification). There are few IBM-specific product references in this document -- simply translate their term &quot;dynamic server pages&quot; into JSP, and generalize &quot;WebSphere&quot; to any useful combination of web server, servlet engine, and app server components. There are more IBM-specific references in several of the other white papers, but they still provide a useful overview of the technology basis for large scale web-based application development and deployment. The white paper index is at:<br>
<br>
http://www.software.ibm.com/ebusiness/library.html<br>
<br>
24) How to I create dynamic GIFs for my JSP? TOC <br>
<br>
<br>
<br>
From: Matti Kotsalainen &lt;matti@RAZORFISH.COM&gt;<br>
<br>
If you want to create GIFs, use ACME labs excellent free gifencoder(http://www.acme.com/), and then do something like this:<br>
<br>
Frame frame = null;<br>
Graphics g = null;<br>
FileOutputStream fileOut = null;<br>
try {<br>
//create an unshown frame<br>
frame = new Frame();<br>
frame.addNotify();<br>
//get a graphics region, using the frame<br>
Image image = frame.createImage(WIDTH, HEIGHT);<br>
g = image.getGraphics();<br>
//manipulate the image<br>
g.drawString(&quot;Hello world&quot;, 0, 0);<br>
//get an ouputstream to a file<br>
fileOut = new FileOutputStream(&quot;test.gif&quot;);<br>
GifEncoder encoder = new GifEncoder(image, fileOut);<br>
encoder.encode();<br>
} catch (Exception e) {<br>
;<br>
} finally {<br>
//clean up<br>
if (g != null) g.dispose();<br>
if (frame != null) frame.removeNotify();<br>
if (fileOut != null) {<br>
try { fileOut.close(); }<br>
catch (IOException ioe) { ; }<br>
}<br>
}<br>
25) Do you know where I could get some code that would encode something to the HTML DTD standard? TOC <br>
<br>
<br>
<br>
As a matter of fact...<br>
<br>
(NB: This is an implementation of the HTMLEncode function that ASP has)<br>
<br>
From: Eric Lunt &lt;elunt@YAHOO.COM&gt;<br>
<br>
Somewhere in my net-travels I picked up this version which performs pretty well:<br>
<br>
/**<br>
* Returns an HTML rendition of the given &lt;code&gt;String&lt;/code&gt;. This was<br>
* written by &lt;a href=mailto:kimbo@biddersedge.com&gt;Kimbo Mundy&lt;/a&gt;.<br>
* @param text A &lt;code&gt;String&lt;/code&gt; to be used in an HTML page.<br>
* @return A &lt;code&gt;String&lt;/code&gt; that quotes any HTML markup<br>
* characters. If no quoting is needed, this will be<br>
* the same as &lt;code&gt;text&lt;/code&gt;.<br>
*/<br>
public static String asHTML(String text) {<br>
if (text == null)<br>
return &quot;&quot;;<br>
StringBuffer results = null;<br>
char[] orig = null;<br>
int beg = 0, len = text.length();<br>
for (int i = 0; i &lt; len; ++i){<br>
char c = text.charAt(i);<br>
switch (c){<br>
case 0:<br>
case '&amp;':<br>
case '&lt;':<br>
case '&gt;':<br>
case '&quot;':<br>
if (results == null){<br>
orig = text.toCharArray();<br>
results = new StringBuffer(len+10);<br>
}<br>
if (i &gt; beg)<br>
results.append(orig, beg, i-beg);<br>
beg = i + 1;<br>
switch (c){<br>
default: // case 0:<br>
continue;<br>
case '&amp;':<br>
results.append(&quot;&amp;&quot;);<br>
break;<br>
case '&lt;':<br>
results.append(&quot;&lt;&quot;);<br>
break;<br>
case '&gt;':<br>
results.append(&quot;&gt;&quot;);<br>
break;<br>
case '&quot;':<br>
results.append(&quot;&quot;&quot;);<br>
break;<br>
}<br>
break;<br>
}<br>
}<br>
if (results == null)<br>
return text;<br>
results.append(orig, beg, len-beg);<br>
return results.toString();<br>
}<br>
26) What is page compilation? TOC <br>
<br>
<br>
<br>
See (30)<br>
<br>
</p>

  </table>
<p align="center"><script src="../../2.js"></script></a>
</body>
</html>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
波多野结衣的一区二区三区| 色94色欧美sute亚洲线路一ni| 欧美午夜精品理论片a级按摩| 亚洲欧美日韩国产中文在线| 色婷婷综合久久久中文字幕| 一区二区三区在线视频免费| 欧美无砖砖区免费| 日韩精品欧美精品| 欧美mv日韩mv国产网站app| 久久超级碰视频| 久久久久久久久久久电影| av网站一区二区三区| 尤物在线观看一区| 91精品国产一区二区人妖| 国产一区视频网站| 亚洲婷婷国产精品电影人久久| 欧美优质美女网站| 美女视频黄久久| 中文字幕欧美区| 欧美亚洲禁片免费| 精东粉嫩av免费一区二区三区| 中文字幕二三区不卡| 欧美日韩在线播放一区| 美国三级日本三级久久99| 国产精品视频一二三区| 日本韩国欧美一区二区三区| 午夜精品久久久久| 久久久91精品国产一区二区三区| 99国产欧美久久久精品| 日韩av不卡一区二区| 国产精品青草综合久久久久99| 欧美日韩在线观看一区二区 | 成人黄动漫网站免费app| 亚洲精品videosex极品| 欧美一区二区三区播放老司机| 成人国产精品视频| 日韩精品乱码免费| 亚洲欧美综合另类在线卡通| 久久亚洲一级片| 国产精品主播直播| 亚洲人吸女人奶水| 欧美不卡123| 91黄色免费观看| 国产一区二三区好的| 亚洲综合无码一区二区| 久久久99免费| 91精品国产综合久久久蜜臀图片 | 国产91色综合久久免费分享| 亚洲综合视频在线| 国产精品女主播在线观看| 制服丝袜中文字幕亚洲| 色呦呦日韩精品| 国产成人av一区二区三区在线| 五月婷婷欧美视频| 亚洲青青青在线视频| 国产午夜精品一区二区三区嫩草 | 亚洲午夜激情网页| 精品对白一区国产伦| 91在线观看一区二区| 久久99精品视频| 亚洲大片在线观看| 亚洲精品日韩专区silk| 欧美极品xxx| 久久一区二区三区四区| 欧美一级日韩免费不卡| 在线观看一区二区精品视频| 成人免费观看视频| 高清久久久久久| 国产精品一区二区91| 极品销魂美女一区二区三区| 麻豆中文一区二区| 日韩精品午夜视频| 首页国产欧美久久| 色综合久久久网| 91福利国产成人精品照片| 国产一区视频在线看| 卡一卡二国产精品| 久久国产精品99久久久久久老狼| 国产在线观看免费一区| 美女免费视频一区二区| 日本美女一区二区三区| 日韩成人dvd| 婷婷开心激情综合| 天堂蜜桃一区二区三区| 日本欧洲一区二区| 麻豆精品在线观看| 国产综合色在线| 成人性生交大片免费看在线播放| 大尺度一区二区| 97精品久久久午夜一区二区三区 | 日本一区二区综合亚洲| 欧美国产精品劲爆| 最新热久久免费视频| 久久久精品蜜桃| 久久午夜电影网| 国产精品久久三| 亚洲欧美色一区| 亚洲va中文字幕| 日韩国产欧美一区二区三区| 男男视频亚洲欧美| 国产黄色精品网站| 色综合色狠狠天天综合色| 欧美亚洲高清一区| 日韩精品中文字幕在线不卡尤物| 精品第一国产综合精品aⅴ| 国产欧美日韩视频在线观看| 亚洲日穴在线视频| 日韩国产在线一| 国产精品夜夜爽| 色婷婷狠狠综合| 日韩欧美国产小视频| 国产精品美女视频| 性做久久久久久久免费看| 国产在线观看免费一区| 色噜噜狠狠一区二区三区果冻| 91精品国模一区二区三区| 国产网站一区二区三区| 亚洲午夜视频在线观看| 国产九色精品成人porny| 色综合天天综合色综合av| 日韩欧美国产不卡| 亚洲视频一区在线观看| 美女视频第一区二区三区免费观看网站| 成人免费看视频| 日韩视频在线你懂得| 中文字幕视频一区| 久久国产精品72免费观看| 91久久精品一区二区三| 久久免费国产精品| 亚洲成人动漫一区| 丁香婷婷综合激情五月色| 91精品国产综合久久精品图片| 国产精品视频你懂的| 麻豆国产精品一区二区三区 | 成人少妇影院yyyy| 欧美一卡2卡3卡4卡| 最新国产の精品合集bt伙计| 久久99国产精品麻豆| 欧美制服丝袜第一页| 中文字幕精品一区二区三区精品 | 国产色91在线| 美女脱光内衣内裤视频久久网站 | 日本欧美大码aⅴ在线播放| 91蜜桃网址入口| 亚洲国产精品成人综合色在线婷婷| 日本强好片久久久久久aaa| 在线看日本不卡| 中文字幕在线观看一区二区| 精品亚洲国产成人av制服丝袜| 欧美巨大另类极品videosbest | 亚洲成国产人片在线观看| www.亚洲色图.com| 国产日韩av一区| 精品写真视频在线观看| 日韩亚洲欧美成人一区| 午夜视频在线观看一区二区 | av亚洲精华国产精华精华 | 日韩视频一区二区| 亚洲h在线观看| 欧美视频精品在线| 亚洲激情成人在线| 一本在线高清不卡dvd| 国产精品亲子伦对白| 国产.欧美.日韩| 中文字幕巨乱亚洲| 色94色欧美sute亚洲线路一久 | 大胆亚洲人体视频| 中文字幕免费不卡在线| 国产福利精品一区二区| 久久美女艺术照精彩视频福利播放| 麻豆91精品视频| 日韩精品中文字幕一区二区三区| 美腿丝袜亚洲三区| 亚洲精品一区二区三区四区高清 | 91丨porny丨蝌蚪视频| 成人免费在线观看入口| 在线影院国内精品| 亚洲一区中文在线| 欧美丰满少妇xxxxx高潮对白| 日韩成人av影视| 日韩欧美国产午夜精品| 国产精品一区一区| 亚洲欧美在线视频| 在线观看国产日韩| 日韩精品久久理论片| www久久精品| 不卡视频免费播放| 一区二区免费看| 欧美一区二区在线视频| 国产一区日韩二区欧美三区| 国产精品女同一区二区三区| 91亚洲精品乱码久久久久久蜜桃| 亚洲资源中文字幕| 欧美一级高清大全免费观看| 国产精品综合二区| 亚洲视频在线一区观看| 欧美精品成人一区二区三区四区| 老司机精品视频导航| 日本一区二区动态图| 欧美亚洲自拍偷拍|