1 / 14
文档名称:

关于审理涉及金融不良债权转让案件工作座谈会纪要.pdf

格式:pdf   页数:14页
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

关于审理涉及金融不良债权转让案件工作座谈会纪要.pdf

上传人:管理资源吧 2011/9/15 文件大小:0 KB

下载得到文件列表

关于审理涉及金融不良债权转让案件工作座谈会纪要.pdf

文档介绍

文档介绍:作者:blackwhites
日期:2000-11-13 17:50:11
以下是几种常调用的方法
Servlet to munication
Listing 1: ServletBase
public class ServletBase extends HttpServlet{
static Connection databaseConnection = null;
public void init(ServletConfig _config) throws ServletException{
(_config);
if ( databaseConnection == null )
//- Open up the database connection
}
protected boolean isLoggedOn( String _username ){
return true;
}
protected boolean logUserOn( String _username ){
return true;
}
}
Listing 2: Using the NewSerletBase Class
public class logonServlet extends ServletBase{
public void service(HttpServletRequest _req, HttpServletRe-
sponse _res) throws ServletException{
if ( isLoggedOn( (襏SERNAME? ){
//- Display a message indicating they are already logged on
}else{
logUserOn( (襏SERNAME? );
}
}
}
Listing 3: Storing an Object
public class logonServlet extends HttpServlet{
public void service(HttpServletRequest _req, HttpServletRe-
sponse _res) throws ServletException{
ServletContext thisContext = getServletContext();
//-- Assume some method creates a new connection class
Connection newConnection = createConnection();
( ? newConnection );
//-- Return some output to the client
}
}
Listing 4: retrieving an Object
public class logoffServlet extends HttpServlet{
public void service(HttpServletRequest _req, HttpServletRe-
sponse _res) throws ServletException{
ServletContext thisContext = getServletContext();
//-- Assume some method creates a new connection class
Connection newConnection = (
?;
if ( newConnection == null )
//- Database has not been opened yet
//-- Return some output to the client
}
}
Listing 5: Looking at All the Objects
public class allServlet extends HttpServlet{
public void service(HttpServletRequest _req, HttpServletRe-
sponse _res) throws ServletException{
ServletContext thisContext = getServlet