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

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

?? jsp - faq (3).txt

?? java學習文檔
?? TXT
字號:
作者:jspfuns
日期:2000-8-10 17:50:50
18) What do the differing levels of bean storage (page, session, app) mean? TOC 



From: Joe Shevland <J_Shevland@TurnAround.com.au>

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 "page" scope. That said, the 0.92 spec still stores "application" beans at the servlet level so they can actually be used by multiple servlets.

(From Gabriel Wong <gabrielw@EZWEBTOOLS.COM>)
In purely Servlet terms, they mean:

page - NO storage 
session - servletrequest.getSession(true).putValue("myobjectname",myobject); 
application - getServletConfig().getServletContext().setAttribute("myobjectname",myobject); 
request - The storage exists for the lifetime of the request, which may be forwarded between jsp's and servlets. 
19) Where can I find the mailing list archives? TOC 



Archives of the JSP mailing list are available at http://archives.java.sun.com/archives/jsp-interest.html

These archives are searchable.

20) What are the important steps in using JDBC in JSP? TOC 



1) Instantiate an instance of the JDBC driver you're trying to use (jdbc-odbc bridge name from memory so pls check):

Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" ).newInstance();
This determines if the class is available and instantiates a new instance of it, making it available for the next step.

2) Ask the DriverManager for a Connection object based on the JDBC URL you are using:

Connection connDB = DriverManager.getConnection( "jdbc:odbc:MyDSN",
"username", "password" );
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.

3) Create a Statement object to retrieve a ResultSet

Statement smentDB = connDB.createStatement();
ResultSet rsDB = connDB.executeQuery( "SELECT * FROM Foo" );
or
rsDB = connDB.executeUpdate( "UPDATE Foo SET Bar = NULL" );
4) Close down connections to free resources:

rsDB.close();
smentDB.close();
connDB.close();
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.

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:

From: DIGNE Marc <jmdigne@MEUDON.NETCABLE.TM.FR>

I tested the JDBC CachedRowSet http://developer.java.sun.com/developer/earlyAccess/crs/index.html

"JDBCTM CachedRowSet is an implementation of the Rowset interface. The Rowset interface is part of the JDBC 2.0 Standard Extension API.

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.

Data contained in a CachedRowSet may be updated and then resynchronized with the underlying tabular data source. "

21) How does variable scope work in JSP? TOC 



From: Alexander Yavorskiy <Alexander_Yavorskiy@VANTIVE.COM>

Hi,
An interesting observation about the variables declared in JSP pages.

Any variable declared inside <% .... %> is local to the page and is not visible to outside functions, even those declare on the same JSP.

Example:

<%
int evilVariable = "666";
%>
...
function testFunction() {
// do not see evilVariable from here
}
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.

Any variable declared inside <%! %> become global for any function declared in the servlet.

Example:
<%!
int evilVariable = "666";
%>
...
function testFunction() {
int x = evilVariable; //can get to it
}
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.

Conclusion

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 <SERVER></SERVER>. At the same time, it might be useful to do so in some situations.

22) How do I forward to an HTML page? TOC 



The method forward() in the Servlet API works for JSP pages, but this is only true for resources with _active_ content, like JSP pages.

If you wish to forward to an HTML page, you have to use a different method:

From: Volker Stiehl <stiehl@ZNNBG.SIEMENS.DE>

In order to access HTML files you have to use the new "resource abstraction" feature of 2.1.
Try the following:

URL url = getServletContext().getResource("/abc/xyz.html");
out.println(url.getContent());
23) Are there any white papers or documents explaining how JSP fits? TOC 



From: "Craig R. McClanahan" <cmcclanahan@mytownnet.com>

http://www.software.ibm.com/ebusiness/pm.html

It is titled "The Web Application Programming Model", and provides a nice overview of the basic architecture IBM proposes for web applications (essentially the "Model 2" approach from the JSP specification). There are few IBM-specific product references in this document -- simply translate their term "dynamic server pages" into JSP, and generalize "WebSphere" 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:

http://www.software.ibm.com/ebusiness/library.html

24) How to I create dynamic GIFs for my JSP? TOC 



From: Matti Kotsalainen <matti@RAZORFISH.COM>

If you want to create GIFs, use ACME labs excellent free gifencoder(http://www.acme.com/), and then do something like this:

Frame frame = null;
Graphics g = null;
FileOutputStream fileOut = null;
try {
//create an unshown frame
frame = new Frame();
frame.addNotify();
//get a graphics region, using the frame
Image image = frame.createImage(WIDTH, HEIGHT);
g = image.getGraphics();
//manipulate the image
g.drawString("Hello world", 0, 0);
//get an ouputstream to a file
fileOut = new FileOutputStream("test.gif");
GifEncoder encoder = new GifEncoder(image, fileOut);
encoder.encode();
} catch (Exception e) {
;
} finally {
//clean up
if (g != null) g.dispose();
if (frame != null) frame.removeNotify();
if (fileOut != null) {
try { fileOut.close(); }
catch (IOException ioe) { ; }
}
}
25) Do you know where I could get some code that would encode something to the HTML DTD standard? TOC 



As a matter of fact...

(NB: This is an implementation of the HTMLEncode function that ASP has)

From: Eric Lunt <elunt@YAHOO.COM>

Somewhere in my net-travels I picked up this version which performs pretty well:

/**
* Returns an HTML rendition of the given <code>String</code>. This was
* written by <a href=mailto:kimbo@biddersedge.com>Kimbo Mundy</a>.
* @param text A <code>String</code> to be used in an HTML page.
* @return A <code>String</code> that quotes any HTML markup
* characters. If no quoting is needed, this will be
* the same as <code>text</code>.
*/
public static String asHTML(String text) {
if (text == null)
return "";
StringBuffer results = null;
char[] orig = null;
int beg = 0, len = text.length();
for (int i = 0; i < len; ++i){
char c = text.charAt(i);
switch (c){
case 0:
case '&':
case '<':
case '>':
case '"':
if (results == null){
orig = text.toCharArray();
results = new StringBuffer(len+10);
}
if (i > beg)
results.append(orig, beg, i-beg);
beg = i + 1;
switch (c){
default: // case 0:
continue;
case '&':
results.append("&");
break;
case '<':
results.append("<");
break;
case '>':
results.append(">");
break;
case '"':
results.append(""");
break;
}
break;
}
}
if (results == null)
return text;
results.append(orig, beg, len-beg);
return results.toString();
}
26) What is page compilation? TOC 



See (30)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色婷婷国产精品综合在线观看| 欧美一二区视频| 欧美一级欧美三级在线观看| 中文字幕欧美区| 日本91福利区| 在线亚洲欧美专区二区| 久久精品亚洲精品国产欧美 | 91网址在线看| 欧美大胆一级视频| 亚洲无人区一区| www.亚洲人| 国产情人综合久久777777| 欧美a一区二区| 欧美在线免费观看视频| 亚洲欧洲日本在线| 成人涩涩免费视频| 欧美成人精品福利| 日韩在线观看一区二区| 欧美熟乱第一页| 亚洲色欲色欲www| 成人美女视频在线看| 欧美成人国产一区二区| 日韩中文字幕麻豆| 欧美麻豆精品久久久久久| 亚洲精品五月天| 91首页免费视频| 亚洲免费在线看| 在线观看三级视频欧美| 国产精品第13页| 91视频com| 亚洲乱码国产乱码精品精的特点| 国产91露脸合集magnet| 国产日韩欧美不卡| 成人手机在线视频| 亚洲欧美怡红院| 在线观看一区日韩| 午夜精品免费在线| 欧美一二三在线| 韩国精品免费视频| 欧美激情一区三区| 99re亚洲国产精品| 夜夜嗨av一区二区三区四季av| 91国产福利在线| 天堂一区二区在线| 精品国产免费视频| 成人综合婷婷国产精品久久 | 亚洲乱码国产乱码精品精的特点 | 日韩无一区二区| 久久精品国产999大香线蕉| 日韩欧美电影一区| 国产福利不卡视频| 国产精品久久网站| 91福利国产精品| 日本女优在线视频一区二区| xf在线a精品一区二区视频网站| 国产精品一卡二| 亚洲欧美激情插| 欧美日韩高清不卡| 国产一区二区伦理片| 日韩毛片一二三区| 欧美二区在线观看| 国产成人免费在线视频| 亚洲最大色网站| 欧美成人一区二区| 99re视频精品| 久久99精品国产91久久来源| 中文字幕日韩欧美一区二区三区| 欧美探花视频资源| 国产一区高清在线| 亚洲国产精品一区二区www在线| 精品国精品国产| 色综合久久综合| 久久99热狠狠色一区二区| 国产精品国产三级国产有无不卡| 欧美三级视频在线观看| 国产一区二三区好的| 亚洲自拍与偷拍| 国产亚洲一区字幕| 欧美美女bb生活片| 91香蕉视频黄| 国产成人在线看| 丝袜诱惑亚洲看片| 亚洲品质自拍视频| 国产日韩欧美高清在线| 欧美一卡二卡三卡四卡| 91极品美女在线| 成人手机在线视频| 国产在线国偷精品免费看| 亚洲成人av一区二区三区| 国产精品少妇自拍| 欧美va亚洲va| 欧美日韩中文字幕一区二区| 成人小视频在线| 久久99精品视频| 亚洲chinese男男1069| 亚洲欧美在线高清| 日本一区二区视频在线观看| 在线综合视频播放| 欧美性猛片xxxx免费看久爱 | 国产精品一区二区三区乱码 | 粉嫩av一区二区三区| 美女视频免费一区| 亚洲国产精品一区二区久久 | 久久网这里都是精品| 欧美一区二区三区四区视频 | 色婷婷综合久久久中文一区二区| 国产麻豆91精品| 极品少妇xxxx精品少妇偷拍 | 成人三级伦理片| 国产成人在线影院| 丁香桃色午夜亚洲一区二区三区| 蜜桃av噜噜一区| 男人的j进女人的j一区| 丝袜亚洲另类欧美综合| 视频在线观看一区| 日韩影院在线观看| 免费人成网站在线观看欧美高清| 亚洲18女电影在线观看| 午夜在线成人av| 日韩精品亚洲一区| 裸体一区二区三区| 韩国成人在线视频| 大陆成人av片| 91美女视频网站| 欧美在线三级电影| 6080午夜不卡| 亚洲精品一区二区三区在线观看| 精品国精品国产| 欧美激情一区二区三区全黄| 国产精品人成在线观看免费| 中文字幕一区av| 亚洲福利视频一区| 老司机精品视频一区二区三区| 久久99精品国产麻豆婷婷洗澡| 国产高清亚洲一区| 色婷婷av一区二区三区gif| 欧美午夜影院一区| 精品欧美一区二区在线观看| 久久久亚洲高清| 亚洲欧洲日韩综合一区二区| 亚洲国产精品综合小说图片区| 日本怡春院一区二区| 国产黄色91视频| 欧美自拍偷拍午夜视频| 日韩亚洲欧美一区二区三区| 久久久久久久久久久久电影| 亚洲日本欧美天堂| 免费成人美女在线观看.| 国产成人av电影在线播放| 在线观看精品一区| 欧美不卡一区二区三区| 国产精品乱人伦中文| 亚洲v中文字幕| 国产成人av自拍| 欧美亚洲图片小说| 久久久久国产精品免费免费搜索| 亚洲另类春色校园小说| 狠狠色2019综合网| 欧美视频一区在线观看| 精品久久久久久亚洲综合网 | 国产午夜亚洲精品理论片色戒 | 国产精品视频一区二区三区不卡| 亚洲第一二三四区| 成人综合在线视频| 欧美一区二区女人| 一二三区精品视频| 99视频一区二区| 欧美xxxxxxxxx| 一级特黄大欧美久久久| 成人综合在线观看| 日韩一级免费观看| 一区二区三区资源| www.日韩在线| 精品国产自在久精品国产| 五月婷婷综合网| 91无套直看片红桃| 国产偷v国产偷v亚洲高清| 日韩精品三区四区| 91免费版pro下载短视频| 精品日韩成人av| 免费精品视频在线| 欧美性一区二区| 樱花草国产18久久久久| 国产69精品一区二区亚洲孕妇| 日韩一区二区电影在线| 亚洲成人一区二区在线观看| 99久久综合国产精品| 精品国产乱码久久久久久影片| 天堂蜜桃一区二区三区| 欧美日韩你懂的| 亚洲一区二区三区免费视频| av在线不卡观看免费观看| 国产亚洲精品精华液| 国产自产v一区二区三区c| 欧美一级二级在线观看| 日韩高清不卡一区二区| 宅男在线国产精品| 日本va欧美va精品| 欧美一级国产精品| 狠狠色丁香婷婷综合久久片|