Java Doc for DBServlet.java in  » J2EE » Expresso » com » jcorporate » expresso » core » servlet » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » Expresso » com.jcorporate.expresso.core.servlet 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.jcorporate.expresso.core.servlet.StdServlet
   com.jcorporate.expresso.core.servlet.DBServlet

All known Subclasses:   com.jcorporate.expresso.core.servlet.Test,  com.jcorporate.expresso.core.servlet.viewhandler.ViewHandler,  com.jcorporate.expresso.core.servlet.InitServlet,  com.jcorporate.expresso.services.servlet.DBCreate,  com.jcorporate.expresso.core.servlet.PathHandler,
DBServlet
abstract public class DBServlet extends StdServlet (Code)
A Servlet set up to have access to a relational database from the server side. This is a base class for all database maintenance and reporting servlets
author:
   Michael Nash


Field Summary
final protected static  StringthisClass
    


Method Summary
public  voiddestroy()
     Implemented for when the context is unloaded.
public  voiddoGet(HttpServletRequest request, HttpServletResponse response)
    
public  voiddoPost(HttpServletRequest req, HttpServletResponse res)
    
protected  StringgetDBName(HttpServletRequest request)
     Return the "alternate" database name, if one is set.
public  voidinit(ServletConfig sc)
    
public  booleanrequireLogin(HttpServletRequest req, HttpServletResponse res, String nextURL)
     Verify that the current user is logged in.
protected  voidsetDBName(String newDBName, HttpServletRequest req)
    
public  voidsetSkipLogin(boolean newSkip)
    
public  voidsetupChannels(HttpServletRequest req)
    

Field Detail
thisClass
final protected static String thisClass(Code)





Method Detail
destroy
public void destroy()(Code)
Implemented for when the context is unloaded.



doGet
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)
Ancestor calls this function (with super.doGet) to handle making database connection, getting user login info and other common tasks
Parameters:
  request - Standard request object
Parameters:
  response - Standard response object
throws:
  ServletException - If an uncaught exception occurs
throws:
  IOException - If an I/O error communicating with the client occurs



doPost
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException(Code)
Ancestor calls this method via super.doPost to handle standard operations
Parameters:
  req - Standard request object
Parameters:
  res - Standard response object
throws:
  ServletException - If an uncaught exception occurs
throws:
  IOException - If an I/O error occurs communicating with the client



getDBName
protected String getDBName(HttpServletRequest request)(Code)
Return the "alternate" database name, if one is set. Else return an empty string
Parameters:
  request - The servlet request The name of the specified alternate database



init
public void init(ServletConfig sc) throws ServletException(Code)
Standard Servlet init() function
Parameters:
  sc - The servlet Configuration passed by the web.xml file



requireLogin
public boolean requireLogin(HttpServletRequest req, HttpServletResponse res, String nextURL) throws IOException, ServletException, DBException, LogException, HtmlException(Code)
Verify that the current user is logged in. If not, try to log in via the stored cookie. If that's not possible, log in as Anonymous
Parameters:
  req - Standard request object
Parameters:
  res - Standard response object
Parameters:
  nextURL - to proceed with when login completed successfully true if login is required
throws:
  IOException - If an I/O error occurs communicating with the client
throws:
  ServletException - If an uncaught exception occurs
throws:
  DBException - If a problem occurs accessing logininformation in the database



setDBName
protected void setDBName(String newDBName, HttpServletRequest req) throws ServletException(Code)
Set the "alternate" database name
Parameters:
  newDBName - The new data context to set the session for
Parameters:
  req - the servlet request object



setSkipLogin
public void setSkipLogin(boolean newSkip)(Code)

Parameters:
  newSkip - set to true if you want login processing skipped



setupChannels
public void setupChannels(HttpServletRequest req) throws ServletException(Code)
Set up the logging channels for all DBServlets
Parameters:
  req - The servlet request object



Fields inherited from com.jcorporate.expresso.core.servlet.StdServlet
protected String mySchema(Code)(Java Doc)
final protected static String thisClass(Code)(Java Doc)

Methods inherited from com.jcorporate.expresso.core.servlet.StdServlet
public void destroy()(Code)(Java Doc)
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc)
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException(Code)(Java Doc)
protected String getSchema()(Code)(Java Doc)
protected String getServerName(HttpServletRequest request)(Code)(Java Doc)
public int getServerPort(HttpServletRequest request)(Code)(Java Doc)
public String getServletPrefix(HttpServletRequest request) throws ServletException(Code)(Java Doc)
public String getServletPrefix(HttpServletRequest request, String servlet) throws ServletException(Code)(Java Doc)
public String getString(HttpServletRequest req, String stringCode, Object[] args) throws ServletException(Code)(Java Doc)
public String getString(HttpServletRequest req, String stringCode) throws ServletException(Code)(Java Doc)
public String getTitle()(Code)(Java Doc)
protected void handleParam(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)(Java Doc)
public void init(ServletConfig sc) throws ServletException(Code)(Java Doc)
protected void setSchema(String schemaClass)(Code)(Java Doc)
protected void showError(String errorMessage, HttpServletRequest request, HttpServletResponse response) throws ServletException(Code)(Java Doc)
protected void showError(Throwable t, HttpServletRequest request, HttpServletResponse response) throws ServletException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.