Java Doc for StdServlet.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) 


javax.servlet.http.HttpServlet
   com.jcorporate.expresso.core.servlet.StdServlet

All known Subclasses:   com.jcorporate.expresso.core.servlet.DBServlet,
StdServlet
abstract public class StdServlet extends HttpServlet (Code)
A Servlet base class adding some basic common functionality to the core HttpServlet class.
author:
   Michael Nash
See Also:   com.jcorporate.expresso.core.servlet.DBServlet


Field Summary
protected  StringmySchema
    
final protected static  StringthisClass
    


Method Summary
public  voiddestroy()
    
public  voiddoGet(HttpServletRequest request, HttpServletResponse response)
     Ancestor calls this function (with super.doGet) to handle making database connection, getting user login info and other common tasks.
public  voiddoPost(HttpServletRequest req, HttpServletResponse res)
     Ancestor calls this method via super.doPost to handle standard operations.
protected  StringgetSchema()
    
protected  StringgetServerName(HttpServletRequest request)
    
public  intgetServerPort(HttpServletRequest request)
    
public  StringgetServletPrefix(HttpServletRequest request)
     Return a string to be used as part of the URL to call this servlet.
public  StringgetServletPrefix(HttpServletRequest request, String servlet)
    
public  StringgetString(HttpServletRequest req, String stringCode, Object[] args)
    
public  StringgetString(HttpServletRequest req, String stringCode)
    
public  StringgetTitle()
    
protected  voidhandleParam(HttpServletRequest request, HttpServletResponse response)
    
public  voidinit(ServletConfig sc)
     Servlet initialization.
protected  voidsetSchema(String schemaClass)
     Tell this StdServlet object what Schema it belongs to.
protected  voidshowError(String errorMessage, HttpServletRequest request, HttpServletResponse response)
    
protected  voidshowError(Throwable t, HttpServletRequest request, HttpServletResponse response)
     Display a throwable (like an exception) to the user in a nicely formatted manner.

Field Detail
mySchema
protected String mySchema(Code)



thisClass
final protected static String thisClass(Code)





Method Detail
destroy
public void destroy()(Code)
Called when the web context is destroyed or reloaded



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 occurs while communicating withthe client



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 while communicating withthe client



getSchema
protected String getSchema()(Code)
Return the name of the schema class that this servlet is registered within



getServerName
protected String getServerName(HttpServletRequest request)(Code)
Return the name of the current web server system
Parameters:
  request - String The name of the current web server



getServerPort
public int getServerPort(HttpServletRequest request)(Code)
Return the port number the servlet runtime engine is running on
Parameters:
  request - int The port number for servlets



getServletPrefix
public String getServletPrefix(HttpServletRequest request) throws ServletException(Code)
Return a string to be used as part of the URL to call this servlet. Often used by doGet methods to build the action for a form to call the doPost method of the same servlet.
Parameters:
  request - String The string for building a URL
throws:
  ServletException - If the string cannot be built due tosetup information not being available



getServletPrefix
public String getServletPrefix(HttpServletRequest request, String servlet) throws ServletException(Code)

Parameters:
  request -
Parameters:
  servlet -



getString
public String getString(HttpServletRequest req, String stringCode, Object[] args) throws ServletException(Code)
Pass on a call to retrieve an appropriate localized string from the correct Schema object
Parameters:
  req -
Parameters:
  stringCode -
Parameters:
  args -



getString
public String getString(HttpServletRequest req, String stringCode) throws ServletException(Code)
Convenience method to request a localized message with no parameters
Parameters:
  req -
Parameters:
  stringCode -



getTitle
public String getTitle()(Code)
Ancestors of this class override this method to return a specific title that is used by the security administration Controllers to describe the servlet



handleParam
protected void handleParam(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)
Handle the parameters to this servlet & set up standard information
Parameters:
  request - Standard request object
Parameters:
  response - Standard response object
throws:
  IOException - If an I/O error occurs communicating with the client
throws:
  ServletException - If an uncaught exception occurs



init
public void init(ServletConfig sc) throws ServletException(Code)
Servlet initialization. Checks to make sure ConfigManager has been initialized and starts the configuration process if it hasn't.
Parameters:
  sc - The ServletConfig. Should contain 'configDir' as a contextparameter, and possibly 'logDir'.



setSchema
protected void setSchema(String schemaClass)(Code)
Tell this StdServlet object what Schema it belongs to. This is used when the Controller tries to use it's "getString(String, Object[])" method to prepare internationalized messages - it passes the call along to the appropriate schema which knows how to locate the proper message file
Parameters:
  schemaClass -



showError
protected void showError(String errorMessage, HttpServletRequest request, HttpServletResponse response) throws ServletException(Code)
Display an error to the user in a nicely formatted manner
Parameters:
  errorMessage - Error message
Parameters:
  request -
Parameters:
  response -



showError
protected void showError(Throwable t, HttpServletRequest request, HttpServletResponse response) throws ServletException(Code)
Display a throwable (like an exception) to the user in a nicely formatted manner. Also show the stack trace in an HTML comment
Parameters:
  t - The throwable error
Parameters:
  request -
Parameters:
  response -



Methods inherited from javax.servlet.http.HttpServlet
protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doHead(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected void doTrace(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
protected long getLastModified(HttpServletRequest req)(Code)(Java Doc)
protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)(Java Doc)
public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException(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.