下载此文档

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


文档分类:法律/法学 | 页数:约14页 举报非法文档有奖
1/14
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/14 下载此文档
文档列表 文档介绍
作者: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

关于审理涉及金融不良债权转让案件工作座谈会纪要 来自淘豆网www.taodocs.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数14
  • 收藏数0 收藏
  • 顶次数0
  • 上传人管理资源吧
  • 文件大小0 KB
  • 时间2011-09-15