Java Doc for ChainServlet.java in  » Library » Apache-commons-chain-1.1-src » org » apache » commons » chain » web » 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 » Library » Apache commons chain 1.1 src » org.apache.commons.chain.web 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.servlet.http.HttpServlet
   org.apache.commons.chain.web.ChainServlet

All known Subclasses:   org.apache.commons.chain.web.servlet.ChainProcessor,
ChainServlet
public class ChainServlet extends HttpServlet (Code)

Servlet that automatically scans chain configuration files in the current web application at startup time, and exposes the result in a Catalog under a specified servlet context attribute. The following servlet init parameters are utilized:

  • org.apache.commons.chain.CONFIG_CLASS_RESOURCE - comma-delimited list of chain configuration resources to be loaded via ClassLoader.getResource() calls. If not specified, no class loader resources will be loaded.
  • org.apache.commons.chain.CONFIG_WEB_RESOURCE - comma-delimited list of chain configuration webapp resources to be loaded. If not specified, no web application resources will be loaded.
  • org.apache.commons.chain.CONFIG_ATTR - Name of the servlet context attribute under which the resulting Catalog will be created or updated. If not specified, it is expected that parsed resources will contain <catalog> elements (which will cause registration of the created Catalog s into the CatalogFactory for this application, and no servet context attribute will be created. NOTE - This parameter is deprecated.

  • org.apache.commons.chain.RULE_SET - Fully qualified class name of a Digester RuleSet implementation to use for parsing configuration resources (this class must have a public zero-args constructor). If not defined, the standard RuleSet implementation will be used.

When a web application that has configured this servlet is started, it will acquire the Catalog under the specified servlet context attribute key, creating a new one if there is none already there. This Catalog will then be populated by scanning configuration resources from the following sources (loaded in this order):

  • Resources loaded from specified resource paths from the webapp's class loader (via ClassLoader.getResource()).
  • Resources loaded from specified resource paths in the web application archive (via ServetContext.getResource()).

If no attribute key is specified, on the other hand, parsed configuration resources are expected to contain <catalog> elements, and the catalogs will be registered with the CatalogFactory for this web application.

This class runs on Servlet 2.2 or later. If you are running on a Servlet 2.3 or later system, you should also consider using ChainListener to initialize your Catalog . Note that ChainListener uses parameters of the same names, but they are context init parameters instead of servlet init parameters. Because of this, you can use both facilities in the same application, if desired.


author:
   Matthew J. Sgarlata
author:
   Craig R. McClanahan
author:
   Ted Husted


Field Summary
final public static  StringCONFIG_ATTR
    
final public static  StringCONFIG_CLASS_RESOURCE
    
final public static  StringCONFIG_WEB_RESOURCE
    
final public static  StringRULE_SET
    


Method Summary
public  voiddestroy()
    
public  voidinit()
    
public  voidservice(HttpServletRequest request, HttpServletResponse response)
    

Field Detail
CONFIG_ATTR
final public static String CONFIG_ATTR(Code)

The name of the context init parameter containing the name of the servlet context attribute under which our resulting Catalog will be stored.




CONFIG_CLASS_RESOURCE
final public static String CONFIG_CLASS_RESOURCE(Code)

The name of the context init parameter containing a comma-delimited list of class loader resources to be scanned.




CONFIG_WEB_RESOURCE
final public static String CONFIG_WEB_RESOURCE(Code)

The name of the context init parameter containing a comma-delimited list of web applicaton resources to be scanned.




RULE_SET
final public static String RULE_SET(Code)

The name of the context init parameter containing the fully qualified class name of the RuleSet implementation for configuring our ConfigParser .






Method Detail
destroy
public void destroy()(Code)

Clean up after ourselves as this application shuts down.




init
public void init() throws ServletException(Code)

Create (if necessary) and configure a Catalog from the servlet init parameters that have been specified.


throws:
  ServletException - if the servlet could not be initialized



service
public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)

Does nothing; this servlet's only purpose is to initialize a Chain and store it in the servlet context.


Parameters:
  request - the request issued by the client
Parameters:
  response - the response to be returned to the cliengt
throws:
  javax.servlet.ServletException - (this exception is never thrown)
throws:
  java.io.IOException - (this exception is never thrown)



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.