Java Doc for HttpPresentationServlet.java in  » J2EE » Enhydra-Application-Framework » com » lutris » appserver » server » httpPresentation » 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 » Enhydra Application Framework » com.lutris.appserver.server.httpPresentation.servlet 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.servlet.http.HttpServlet
   com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationServlet

All known Subclasses:   org.enhydra.Servlet,
HttpPresentationServlet
public class HttpPresentationServlet extends HttpServlet (Code)
Presentation server implemented as a servlet. Translates servlet requests into HttpPresentationManager requests. There is a one to one correspondence between an instance of this servlet and an Enhydra application. An instance of the application is created by the servlet. The servlet requires a single init parameter `configFile', that contains the path to the application's configuration file. This file must define the following fields:
  • server.classPath - The class path for the application, as a comma separated list. This should not contain the class path for the Java runtime classes or the Lutris classes.
  • server.appClass - The full class name of the application class. This must implement com.lutris.appserver.server.Application.
  • server.presentationPrefix - This is the path that is used as a prefixed for all URL references within the application. It must use a `/' separator (as with URLs).
  • server.autoReload - A flag to indicate whether or not the application should be automatically reloaded when any class or jar file changes in the application's classpath. NOTE: THIS IS A DEBUGGING OPTION AND MAY SLOW DOWN THE APPLICATION!

This servlet also implements the ListenableServlet interface. This allows other objects to register with this servlet and be notified every time service is called. These remote listeners may ignore the notification, examine the request, or even replace the request and/or response with extended versions. This is used by the debugging and monitoring servlets.
version:
   $Revision: 1.4 $
author:
   Mark Diekhans
author:
   Damir Milovic
author:
   Strahinja Videnovic
author:
   Slobodan Vujasinovic
since:
   1.3



Field Summary
final public static  StringXMLC_DOM_STATS_LOG_LEVEL
     Log level for DOM statistics.
 ConfigappConfig
    
 Applicationapplication
    
 booleanautoReload
    
 booleancacheClasses
    
 booleancacheFiles
    
 StringcharacterEncoding
    
protected  ServletContextcontext
    
 StringlogClassName
    
 HttpPresentationManagerpresentationManager
    
 StringpresentationPrefix
    

Constructor Summary
public  HttpPresentationServlet()
     Create a new HttpPresentationServlet.

Method Summary
public synchronized  voiddestroy()
     Destroys the servlet.
public  voidensureAppIsRunning()
     This method is public for use by the ServletManager to run the application startup() method after init().
protected  ConfiggetAppConfigInitParam()
     Returns the application configuration init parameter.
protected  StringgetAppConfigInitParamName()
     Returns the application configuration init parameter name.
public  ApplicationgetApplication()
     Returns the application being run by this instance of the servlet.
protected  HttpPresentationRequestgetHttpPresentationRequest(HttpServletRequest req, HttpServletResponse resp)
     This method instantiates the HttpPresentationRequest object that the presentation manager expects when servicing a request.
Parameters:
  req - The servlet request object.
Parameters:
  resp - The servlet response object.
protected  HttpPresentationResponsegetHttpPresentationResponse(HttpServletRequest req, HttpServletResponse resp)
     This method instantiates the HttpPresentationResponse object that the presentation manager expects when servicing a request.
Parameters:
  req - The servlet request object.
Parameters:
  resp - The servlet response object.
public  StringgetServletInfo()
     Return information specific to this servlet.
public  SessiongetSession(ServletRequest request)
     Looks up the session object (if any) that would be used to process the request.
public synchronized  voidinit(ServletConfig config)
    
public  voidservice(HttpServletRequest request, HttpServletResponse response)
     Handle a service request.
public  voidserviceDirect(HttpServletRequest req, HttpServletResponse resp)
     This is an HTTP-specific version of the Servlet.service method that translates that request into a request to a presentation manager.

Field Detail
XMLC_DOM_STATS_LOG_LEVEL
final public static String XMLC_DOM_STATS_LOG_LEVEL(Code)
Log level for DOM statistics.



appConfig
Config appConfig(Code)



application
Application application(Code)



autoReload
boolean autoReload(Code)



cacheClasses
boolean cacheClasses(Code)



cacheFiles
boolean cacheFiles(Code)



characterEncoding
String characterEncoding(Code)



context
protected ServletContext context(Code)
Servlet is started under this context



logClassName
String logClassName(Code)



presentationManager
HttpPresentationManager presentationManager(Code)



presentationPrefix
String presentationPrefix(Code)




Constructor Detail
HttpPresentationServlet
public HttpPresentationServlet()(Code)
Create a new HttpPresentationServlet.




Method Detail
destroy
public synchronized void destroy()(Code)
Destroys the servlet. Called by the servlet manager when the servlet is shutdown.



ensureAppIsRunning
public void ensureAppIsRunning() throws ServletException(Code)
This method is public for use by the ServletManager to run the application startup() method after init().
exception:
  ServletException - If any error occurs on startup.



getAppConfigInitParam
protected Config getAppConfigInitParam()(Code)
Returns the application configuration init parameter.



getAppConfigInitParamName
protected String getAppConfigInitParamName()(Code)
Returns the application configuration init parameter name.



getApplication
public Application getApplication()(Code)
Returns the application being run by this instance of the servlet.



getHttpPresentationRequest
protected HttpPresentationRequest getHttpPresentationRequest(HttpServletRequest req, HttpServletResponse resp)(Code)
This method instantiates the HttpPresentationRequest object that the presentation manager expects when servicing a request.
Parameters:
  req - The servlet request object.
Parameters:
  resp - The servlet response object. The HttpPresentationRequest object usedby the presentation manager.



getHttpPresentationResponse
protected HttpPresentationResponse getHttpPresentationResponse(HttpServletRequest req, HttpServletResponse resp)(Code)
This method instantiates the HttpPresentationResponse object that the presentation manager expects when servicing a request.
Parameters:
  req - The servlet request object.
Parameters:
  resp - The servlet response object. The HttpPresentationResponse object usedby the presentation manager.



getServletInfo
public String getServletInfo()(Code)
Return information specific to this servlet.



getSession
public Session getSession(ServletRequest request)(Code)
Looks up the session object (if any) that would be used to process the request. This is will not used normally, because the session is give to the application's preprocessor method and the presentation objects. Also, it is not normal to have a raw ServletRequest. The debugger uses this to examine the session data before and after each request. Consider this an internal use only method.
Parameters:
  request - The (raw) request that would be sent in to this application.The session object that would be associated with the request.Returns null if none is found; a new session is not created.



init
public synchronized void init(ServletConfig config) throws ServletException(Code)



service
public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)
Handle a service request. Use the first filter to wrap the request, response, and servlet (this) objects. This will return new objects. Then use the second filter to wrap those, again returning new objects. Then use the fourth filter to wrap those etc.... Then finally call service() on the outermost results.
Parameters:
  request - The original servlet request object.
Parameters:
  response - The original servlet response object.



serviceDirect
public void serviceDirect(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException(Code)
This is an HTTP-specific version of the Servlet.service method that translates that request into a request to a presentation manager. This object is method is not synchronized, the thread is used to handle to entire request.

As part of implementing the FiterableServlet interface, the real work is done here in serviceDirect(), while calls to service() result in filters being applied and called. The end of the filter chain is a glue servlet that directly calls this method.
Parameters:
  req - encapsulates the request to the servlet
Parameters:
  resp - encapsulates the response from the servlet
exception:
  ServletException - if the request could not be handled
exception:
  IOException - if detected when handling the request




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.