Java Doc for Turbine.java in  » Project-Management » turbine » org » apache » turbine » 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 » Project Management » turbine » org.apache.turbine 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.servlet.http.HttpServlet
   org.apache.turbine.Turbine

Turbine
public class Turbine extends HttpServlet implements TurbineConstants(Code)
Turbine is the main servlet for the entire system. It is final because you should not ever need to subclass this servlet. If you need to perform initialization of a service, then you should implement the Services API and let your code be initialized by it. If you need to override something in the doGet() or doPost() methods, edit the TurbineResources.properties file and specify your own classes there.

Turbine servlet recognizes the following initialization parameters.

  • properties the path to TurbineResources.properties file used by the default implementation of ResourceService, relative to the application root.
  • basedir this parameter is used only if your application server does not support web applications, or the or does not support ServletContext.getRealPath(String) method correctly. You can use this parameter to specify the directory within the server's filesystem, that is the base of your web application.

author:
   Jon S. Stevens
author:
   Brett McLaughlin
author:
   Greg Ritter
author:
   John D. McNally
author:
   Frank Y. Kim
author:
   Rafal Krzewski
author:
   Jason van Zyl
author:
   Sean Legassick
author:
   Martin Poeschl
author:
   Henning P. Schmiedehausen
author:
   Quinton McCombs
author:
   Eric Pugh
version:
   $Id: Turbine.java 264152 2005-08-29 14:50:22Z henning $


Field Summary
final public static  StringBASEDIR_KEY
    
final public static  StringREDIRECTED_PATHINFO_NAME
    


Method Summary
final public  voiddestroy()
     The Servlet destroy method.
final public  voiddoGet(HttpServletRequest req, HttpServletResponse res)
     The primary method invoked when the Turbine servlet is executed.
final public  voiddoPost(HttpServletRequest req, HttpServletResponse res)
     In this application doGet and doPost are the same thing.
final protected static  StringfindInitParameter(ServletContext context, ServletConfig config, String name, String defaultValue)
     Finds the specified servlet configuration/initialization parameter, looking first for a servlet-specific parameter, then for a global parameter, and using the provided default if not found.
public static  StringgetApplicationRoot()
     Get the application root for this Turbine webapp.
public static  ConfigurationgetConfiguration()
    
public static  StringgetContextPath()
     Return the context path.
public static  ServerDatagetDefaultServerData()
     Return all the Turbine Servlet information (Server Name, Port, Scheme in a ServerData structure.
public static  StringgetRealPath(String path)
     Used to get the real path of configuration and resource information.
public static  StringgetScriptName()
     Get the script name.
public static  StringgetServerName()
     Return the server name.
public static  StringgetServerPort()
     Return the server port.
public static  StringgetServerScheme()
     Return the server scheme.
final public  StringgetServletInfo()
     Return the servlet info.
public static  ServletConfiggetTurbineServletConfig()
     Get the servlet config for this turbine webapp.
public static  ServletContextgetTurbineServletContext()
     Get the servlet context for this turbine webapp.
final public  voidinit()
     This init method will load the default resources from a properties file.
final public  voidinit(RunData data)
     Initializes the services which need RunData to initialize themselves (post startup).
public static synchronized  voidsaveServletInfo(RunData data)
     Save some information about this servlet so that it can be utilized by object instances that do not have direct access to RunData.
public static  voidsetApplicationRoot(String val)
     Set the application root for the webapp.
public static  voidsetTurbineServletConfig(ServletConfig config)
     Set the servlet config for this turbine webapp.
public static  voidsetTurbineServletContext(ServletContext context)
     Set the servlet context for this turbine webapp.

Field Detail
BASEDIR_KEY
final public static String BASEDIR_KEY(Code)
The base directory key



REDIRECTED_PATHINFO_NAME
final public static String REDIRECTED_PATHINFO_NAME(Code)
Name of path info parameter used to indicate the redirected stage of a given user's initial Turbine request





Method Detail
destroy
final public void destroy()(Code)
The Servlet destroy method. Invokes ServiceBroker tear down method.



doGet
final public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException(Code)
The primary method invoked when the Turbine servlet is executed.
Parameters:
  req - Servlet request.
Parameters:
  res - Servlet response.
exception:
  IOException - a servlet exception.
exception:
  ServletException - a servlet exception.



doPost
final public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException(Code)
In this application doGet and doPost are the same thing.
Parameters:
  req - Servlet request.
Parameters:
  res - Servlet response.
exception:
  IOException - a servlet exception.
exception:
  ServletException - a servlet exception.



findInitParameter
final protected static String findInitParameter(ServletContext context, ServletConfig config, String name, String defaultValue)(Code)
Finds the specified servlet configuration/initialization parameter, looking first for a servlet-specific parameter, then for a global parameter, and using the provided default if not found.



getApplicationRoot
public static String getApplicationRoot()(Code)
Get the application root for this Turbine webapp. This concept was started in 3.0 and will allow an app to be developed from a standard CVS layout. With a simple switch the app will work fully within the servlet container for deployment. String applicationRoot



getConfiguration
public static Configuration getConfiguration()(Code)
Return the current configuration with all keys included a Configuration Object



getContextPath
public static String getContextPath()(Code)
Return the context path. String context path



getDefaultServerData
public static ServerData getDefaultServerData()(Code)
Return all the Turbine Servlet information (Server Name, Port, Scheme in a ServerData structure. This is generated from the values set when initializing the Turbine and may not be correct if you're running in a clustered structure. This might be used if you need a DataURI and have no RunData object handy- An initialized ServerData object



getRealPath
public static String getRealPath(String path)(Code)
Used to get the real path of configuration and resource information. This can be used by an app being developed in a standard CVS layout.
Parameters:
  path - path translated to the application root the real path



getScriptName
public static String getScriptName()(Code)
Get the script name. This is the initial script name. Actually this is probably not needed any more. I'll check. jvz. String initial script name.



getServerName
public static String getServerName()(Code)
Return the server name. String server name



getServerPort
public static String getServerPort()(Code)
Return the server port. String server port



getServerScheme
public static String getServerScheme()(Code)
Return the server scheme. String server scheme



getServletInfo
final public String getServletInfo()(Code)
Return the servlet info. a string with the servlet information.



getTurbineServletConfig
public static ServletConfig getTurbineServletConfig()(Code)
Get the servlet config for this turbine webapp. ServletConfig



getTurbineServletContext
public static ServletContext getTurbineServletContext()(Code)
Get the servlet context for this turbine webapp. ServletContext



init
final public void init() throws ServletException(Code)
This init method will load the default resources from a properties file. This method is called by init(ServletConfig config)
exception:
  ServletException - a servlet exception.



init
final public void init(RunData data)(Code)
Initializes the services which need RunData to initialize themselves (post startup).
Parameters:
  data - The first GET request.



saveServletInfo
public static synchronized void saveServletInfo(RunData data)(Code)
Save some information about this servlet so that it can be utilized by object instances that do not have direct access to RunData.
Parameters:
  data -



setApplicationRoot
public static void setApplicationRoot(String val)(Code)
Set the application root for the webapp.
Parameters:
  val - New app root.



setTurbineServletConfig
public static void setTurbineServletConfig(ServletConfig config)(Code)
Set the servlet config for this turbine webapp.
Parameters:
  config - New servlet config



setTurbineServletContext
public static void setTurbineServletContext(ServletContext context)(Code)
Set the servlet context for this turbine webapp.
Parameters:
  context - New servlet context.



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.