Java Doc for ServletHandler.java in  » Sevlet-Container » jetty-modules » org » mortbay » jetty » 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 » Sevlet Container » jetty modules » org.mortbay.jetty.servlet 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.mortbay.jetty.handler.AbstractHandler
   org.mortbay.jetty.servlet.ServletHandler

All known Subclasses:   org.mortbay.jetty.plus.servlet.ServletHandler,
ServletHandler
public class ServletHandler extends AbstractHandler (Code)
Servlet HttpHandler. This handler maps requests to servlets that implement the javax.servlet.http.HttpServlet API.

This handler does not implement the full J2EE features and is intended to be used when a full web application is not required. Specifically filters and request wrapping are not supported. Unless run as part of a Context or derivative, the ServletHandler.initialize() method must be called manually after start().
See Also:   org.mortbay.jetty.webapp.WebAppContext
author:
   Greg Wilkins



Field Summary
final public static  String__DEFAULT_SERVLET
    
final public static  String__J_S_CONTEXT_TEMPDIR
    
final public static  String__J_S_ERROR_EXCEPTION
    
final public static  String__J_S_ERROR_EXCEPTION_TYPE
    
final public static  String__J_S_ERROR_MESSAGE
    
final public static  String__J_S_ERROR_REQUEST_URI
    
final public static  String__J_S_ERROR_SERVLET_NAME
    
final public static  String__J_S_ERROR_STATUS_CODE
    
protected transient  HashMap_chainCache
    
protected transient  HashMap_namedChainCache
    

Constructor Summary
public  ServletHandler()
     Constructor.

Method Summary
public  FilterHolderaddFilter(String className, String pathSpec, int dispatches)
    
public  voidaddFilter(FilterHolder filter, FilterMapping filterMapping)
    
public  voidaddFilter(FilterHolder filter)
    
public  voidaddFilterMapping(FilterMapping mapping)
    
public  FilterHolderaddFilterWithMapping(Class filter, String pathSpec, int dispatches)
     conveniance method to add a filter.
public  FilterHolderaddFilterWithMapping(String className, String pathSpec, int dispatches)
     conveniance method to add a filter.
public  voidaddFilterWithMapping(FilterHolder holder, String pathSpec, int dispatches)
     conveniance method to add a filter.
public  ServletHolderaddServlet(String className, String pathSpec)
     Convenience method to add a servlet with a servlet mapping.
public  voidaddServlet(ServletHolder holder)
     Convenience method to add a pre-constructed ServletHolder.
public  voidaddServletMapping(ServletMapping mapping)
     Convenience method to add a pre-constructed ServletMapping.
public  ServletHolderaddServletWithMapping(String className, String pathSpec)
     conveniance method to add a servlet.
public  ServletHolderaddServletWithMapping(Class servlet, String pathSpec)
     conveniance method to add a servlet.
public  voidaddServletWithMapping(ServletHolder servlet, String pathSpec)
     conveniance method to add a servlet.
public  FiltercustomizeFilter(Filter filter)
     Customize a Filter.
public  FiltercustomizeFilterDestroy(Filter filter)
    
public  ServletcustomizeServlet(Servlet servlet)
     Customize a servlet.
public  ServletcustomizeServletDestroy(Servlet servlet)
    
protected synchronized  voiddoStart()
    
protected synchronized  voiddoStop()
    
public  ObjectgetContextLog()
    
public  FilterHoldergetFilter(String name)
    
public  FilterMapping[]getFilterMappings()
    
public  FilterHolder[]getFilters()
     Get Filters.
public  PathMap.EntrygetHolderEntry(String pathInContext)
     ServletHolder matching path.
Parameters:
  pathInContext - Path within _context.
public  intgetMaxFilterChainsCacheSize()
    
public  RequestDispatchergetRequestDispatcher(String uriInContext)
    
public  ServletHoldergetServlet(String name)
    
public  ServletContextgetServletContext()
    
public  ServletMapping[]getServletMappings()
    
public  ServletHolder[]getServlets()
     Get Servlets.
public  voidhandle(String target, HttpServletRequest request, HttpServletResponse response, int type)
    
public  voidinitialize()
     Initialize filters and load-on-startup servlets.
public  booleanisFilterChainsCached()
    
public  booleanisInitializeAtStart()
    
public  FilterHoldernewFilterHolder(Class filter)
    
public  FilterHoldernewFilterHolder()
    
public  ServletHoldernewServletHolder()
    
public  ServletHoldernewServletHolder(Class servlet)
    
protected  voidnotFound(HttpServletRequest request, HttpServletResponse response)
    
public  voidsetFilterChainsCached(boolean filterChainsCached)
    
public  voidsetFilterMappings(FilterMapping[] filterMappings)
    
public synchronized  voidsetFilters(FilterHolder[] holders)
    
public  voidsetInitializeAtStart(boolean initializeAtStart)
    
public  voidsetMaxFilterChainsCacheSize(int maxFilterChainsCacheSize)
     Set the maximum filter chain cache size. Filter chains are cached if ServletHandler.isFilterChainsCached() is true.
public  voidsetServer(Server server)
    
public  voidsetServletMappings(ServletMapping[] servletMappings)
    
public synchronized  voidsetServlets(ServletHolder[] holders)
     Set Servlets.
protected synchronized  voidupdateMappings()
    
protected synchronized  voidupdateNameMappings()
    

Field Detail
__DEFAULT_SERVLET
final public static String __DEFAULT_SERVLET(Code)



__J_S_CONTEXT_TEMPDIR
final public static String __J_S_CONTEXT_TEMPDIR(Code)



__J_S_ERROR_EXCEPTION
final public static String __J_S_ERROR_EXCEPTION(Code)



__J_S_ERROR_EXCEPTION_TYPE
final public static String __J_S_ERROR_EXCEPTION_TYPE(Code)



__J_S_ERROR_MESSAGE
final public static String __J_S_ERROR_MESSAGE(Code)



__J_S_ERROR_REQUEST_URI
final public static String __J_S_ERROR_REQUEST_URI(Code)



__J_S_ERROR_SERVLET_NAME
final public static String __J_S_ERROR_SERVLET_NAME(Code)



__J_S_ERROR_STATUS_CODE
final public static String __J_S_ERROR_STATUS_CODE(Code)



_chainCache
protected transient HashMap _chainCache(Code)



_namedChainCache
protected transient HashMap _namedChainCache(Code)




Constructor Detail
ServletHandler
public ServletHandler()(Code)
Constructor.




Method Detail
addFilter
public FilterHolder addFilter(String className, String pathSpec, int dispatches)(Code)
Convenience method to add a filter with a mapping
Parameters:
  className -
Parameters:
  pathSpec -
Parameters:
  dispatches -



addFilter
public void addFilter(FilterHolder filter, FilterMapping filterMapping)(Code)
convenience method to add a filter and mapping
Parameters:
  filter -
Parameters:
  filterMapping -



addFilter
public void addFilter(FilterHolder filter)(Code)
Convenience method to add a preconstructed FilterHolder
Parameters:
  filter -



addFilterMapping
public void addFilterMapping(FilterMapping mapping)(Code)
Convenience method to add a preconstructed FilterMapping
Parameters:
  mapping -



addFilterWithMapping
public FilterHolder addFilterWithMapping(Class filter, String pathSpec, int dispatches)(Code)
conveniance method to add a filter.
Parameters:
  name -
Parameters:
  className -
Parameters:
  pathSpec -
Parameters:
  dispatches - see FilterMapping.setDispatches(int) The filter holder.



addFilterWithMapping
public FilterHolder addFilterWithMapping(String className, String pathSpec, int dispatches)(Code)
conveniance method to add a filter.
Parameters:
  name -
Parameters:
  className -
Parameters:
  pathSpec -
Parameters:
  dispatches - see FilterMapping.setDispatches(int) The filter holder.



addFilterWithMapping
public void addFilterWithMapping(FilterHolder holder, String pathSpec, int dispatches)(Code)
conveniance method to add a filter.
Parameters:
  name -
Parameters:
  className -
Parameters:
  pathSpec -
Parameters:
  dispatches - see FilterMapping.setDispatches(int) The filter holder.



addServlet
public ServletHolder addServlet(String className, String pathSpec)(Code)
Convenience method to add a servlet with a servlet mapping.
Parameters:
  className -
Parameters:
  pathSpec -



addServlet
public void addServlet(ServletHolder holder)(Code)
Convenience method to add a pre-constructed ServletHolder.
Parameters:
  holder -



addServletMapping
public void addServletMapping(ServletMapping mapping)(Code)
Convenience method to add a pre-constructed ServletMapping.
Parameters:
  mapping -



addServletWithMapping
public ServletHolder addServletWithMapping(String className, String pathSpec)(Code)
conveniance method to add a servlet. The servlet holder.



addServletWithMapping
public ServletHolder addServletWithMapping(Class servlet, String pathSpec)(Code)
conveniance method to add a servlet. The servlet holder.



addServletWithMapping
public void addServletWithMapping(ServletHolder servlet, String pathSpec)(Code)
conveniance method to add a servlet.
Parameters:
  name -
Parameters:
  className -
Parameters:
  pathSpec - The servlet holder.



customizeFilter
public Filter customizeFilter(Filter filter) throws Exception(Code)
Customize a Filter. Called before the Filter goes into service. Subclasses of ServletHandler should override this method.
Parameters:
  filter -
throws:
  Exception -



customizeFilterDestroy
public Filter customizeFilterDestroy(Filter filter) throws Exception(Code)



customizeServlet
public Servlet customizeServlet(Servlet servlet) throws Exception(Code)
Customize a servlet. Called before the servlet goes into service. Subclasses of ServletHandler should override this method.
Parameters:
  servlet -
throws:
  Exception -



customizeServletDestroy
public Servlet customizeServletDestroy(Servlet servlet) throws Exception(Code)



doStart
protected synchronized void doStart() throws Exception(Code)



doStop
protected synchronized void doStop() throws Exception(Code)



getContextLog
public Object getContextLog()(Code)
Returns the contextLog.



getFilter
public FilterHolder getFilter(String name)(Code)



getFilterMappings
public FilterMapping[] getFilterMappings()(Code)
Returns the filterMappings.



getFilters
public FilterHolder[] getFilters()(Code)
Get Filters. Array of defined servlets



getHolderEntry
public PathMap.Entry getHolderEntry(String pathInContext)(Code)
ServletHolder matching path.
Parameters:
  pathInContext - Path within _context. PathMap Entries pathspec to ServletHolder



getMaxFilterChainsCacheSize
public int getMaxFilterChainsCacheSize()(Code)
The maximum entries in a filter chain cache.



getRequestDispatcher
public RequestDispatcher getRequestDispatcher(String uriInContext)(Code)
A RequestDispatcher dispatcher wrapping the resource at uriInContext,or null if the specified uri cannot be dispatched to.



getServlet
public ServletHolder getServlet(String name)(Code)



getServletContext
public ServletContext getServletContext()(Code)



getServletMappings
public ServletMapping[] getServletMappings()(Code)
Returns the servletMappings.



getServlets
public ServletHolder[] getServlets()(Code)
Get Servlets. Array of defined servlets



handle
public void handle(String target, HttpServletRequest request, HttpServletResponse response, int type) throws IOException, ServletException(Code)



initialize
public void initialize() throws Exception(Code)
Initialize filters and load-on-startup servlets. Called automatically from start if autoInitializeServlet is true.



isFilterChainsCached
public boolean isFilterChainsCached()(Code)
Returns the filterChainsCached.



isInitializeAtStart
public boolean isInitializeAtStart()(Code)
Returns the initializeAtStart.



newFilterHolder
public FilterHolder newFilterHolder(Class filter)(Code)



newFilterHolder
public FilterHolder newFilterHolder()(Code)

See Also:    ServletHandler.newFilterHolder(Class)



newServletHolder
public ServletHolder newServletHolder()(Code)

See Also:   also
See Also:    newServletHolder(Class)



newServletHolder
public ServletHolder newServletHolder(Class servlet)(Code)



notFound
protected void notFound(HttpServletRequest request, HttpServletResponse response) throws IOException(Code)



setFilterChainsCached
public void setFilterChainsCached(boolean filterChainsCached)(Code)

Parameters:
  filterChainsCached - The filterChainsCached to set.



setFilterMappings
public void setFilterMappings(FilterMapping[] filterMappings)(Code)

Parameters:
  filterMappings - The filterMappings to set.



setFilters
public synchronized void setFilters(FilterHolder[] holders)(Code)



setInitializeAtStart
public void setInitializeAtStart(boolean initializeAtStart)(Code)

Parameters:
  initializeAtStart - The initializeAtStart to set.



setMaxFilterChainsCacheSize
public void setMaxFilterChainsCacheSize(int maxFilterChainsCacheSize)(Code)
Set the maximum filter chain cache size. Filter chains are cached if ServletHandler.isFilterChainsCached() is true. If the max cache size is greater than zero, then the cache is flushed whenever it grows to be this size.
Parameters:
  maxFilterChainsCacheSize - the maximum number of entries in a filter chain cache.



setServer
public void setServer(Server server)(Code)



setServletMappings
public void setServletMappings(ServletMapping[] servletMappings)(Code)

Parameters:
  servletMappings - The servletMappings to set.



setServlets
public synchronized void setServlets(ServletHolder[] holders)(Code)
Set Servlets.
Parameters:
  holders - Array of servletsto define



updateMappings
protected synchronized void updateMappings()(Code)



updateNameMappings
protected synchronized void updateNameMappings()(Code)



Fields inherited from org.mortbay.jetty.handler.AbstractHandler
protected String _string(Code)(Java Doc)

Methods inherited from org.mortbay.jetty.handler.AbstractHandler
public void destroy()(Code)(Java Doc)
protected void doStart() throws Exception(Code)(Java Doc)
protected void doStop() throws Exception(Code)(Java Doc)
public Server getServer()(Code)(Java Doc)
public void setServer(Server server)(Code)(Java Doc)
public String toString()(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.