Java Doc for VelocityLayoutServlet.java in  » Template-Engine » Velocity » org » apache » velocity » tools » view » 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 » Template Engine » Velocity » org.apache.velocity.tools.view.servlet 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.velocity.tools.view.servlet.VelocityViewServlet
   org.apache.velocity.tools.view.servlet.VelocityLayoutServlet

VelocityLayoutServlet
public class VelocityLayoutServlet extends VelocityViewServlet (Code)
Extension of the VelocityViewServlet to perform "two-pass" layout rendering and allow for a customized error screen. For a brief user-guide to this, i suggest trying to track down the VLS_README.txt file that hopefully made it into the docs somewhere.
author:
   Nathan Bubna
version:
   $Id: VelocityLayoutServlet.java 479724 2006-11-27 18:49:37Z nbubna $


Field Summary
public static  StringDEFAULT_DEFAULT_LAYOUT
    
public static  StringDEFAULT_ERROR_TEMPLATE
     The default error template's filename.
public static  StringDEFAULT_LAYOUT_DIR
    
public static  StringKEY_ERROR_CAUSE
     The context key that holds the Throwable that broke the rendering of the requested screen.
public static  StringKEY_ERROR_INVOCATION_EXCEPTION
     The context key that holds the MethodInvocationException that broke the rendering of the requested screen.
public static  StringKEY_ERROR_STACKTRACE
     The context key that holds the stack trace of the error that broke the rendering of the requested screen.
public static  StringKEY_LAYOUT
     The context/parameter key used to specify an alternate layout to be used for a request instead of the default layout.
public static  StringKEY_SCREEN_CONTENT
     The context key that will hold the content of the screen.
final public static  StringPROPERTY_DEFAULT_LAYOUT
     The velocity.properties key for specifying the servlet's default layout template's filename.
final public static  StringPROPERTY_ERROR_TEMPLATE
     The velocity.properties key for specifying the servlet's error template.
final public static  StringPROPERTY_LAYOUT_DIR
     The velocity.properties key for specifying the relative directory holding layout templates.
protected  StringdefaultLayout
    
protected  StringerrorTemplate
    
protected  StringlayoutDir
    


Method Summary
protected  ContextcreateContext(HttpServletRequest request, HttpServletResponse response)
    
protected  voiderror(HttpServletRequest request, HttpServletResponse response, Exception e)
    
public  voidinit(ServletConfig config)
     Initializes Velocity, the view servlet and checks for changes to the initial layout configuration.
protected  voidmergeTemplate(Template template, Context context, HttpServletResponse response)
    

Field Detail
DEFAULT_DEFAULT_LAYOUT
public static String DEFAULT_DEFAULT_LAYOUT(Code)
The default filename for the servlet's default layout



DEFAULT_ERROR_TEMPLATE
public static String DEFAULT_ERROR_TEMPLATE(Code)
The default error template's filename.



DEFAULT_LAYOUT_DIR
public static String DEFAULT_LAYOUT_DIR(Code)
The default layout directory



KEY_ERROR_CAUSE
public static String KEY_ERROR_CAUSE(Code)
The context key that holds the Throwable that broke the rendering of the requested screen.



KEY_ERROR_INVOCATION_EXCEPTION
public static String KEY_ERROR_INVOCATION_EXCEPTION(Code)
The context key that holds the MethodInvocationException that broke the rendering of the requested screen. If this value is placed in the context, then $error_cause will hold the error that this invocation exception is wrapping.



KEY_ERROR_STACKTRACE
public static String KEY_ERROR_STACKTRACE(Code)
The context key that holds the stack trace of the error that broke the rendering of the requested screen.



KEY_LAYOUT
public static String KEY_LAYOUT(Code)
The context/parameter key used to specify an alternate layout to be used for a request instead of the default layout.



KEY_SCREEN_CONTENT
public static String KEY_SCREEN_CONTENT(Code)
The context key that will hold the content of the screen. This key ($screen_content) must be present in the layout template for the current screen to be rendered.



PROPERTY_DEFAULT_LAYOUT
final public static String PROPERTY_DEFAULT_LAYOUT(Code)
The velocity.properties key for specifying the servlet's default layout template's filename.



PROPERTY_ERROR_TEMPLATE
final public static String PROPERTY_ERROR_TEMPLATE(Code)
The velocity.properties key for specifying the servlet's error template.



PROPERTY_LAYOUT_DIR
final public static String PROPERTY_LAYOUT_DIR(Code)
The velocity.properties key for specifying the relative directory holding layout templates.



defaultLayout
protected String defaultLayout(Code)



errorTemplate
protected String errorTemplate(Code)



layoutDir
protected String layoutDir(Code)





Method Detail
createContext
protected Context createContext(HttpServletRequest request, HttpServletResponse response)(Code)
Overrides VelocityViewServlet to check the request for an alternate layout
Parameters:
  request - client request
Parameters:
  response - client response the Context to fill



error
protected void error(HttpServletRequest request, HttpServletResponse response, Exception e) throws ServletException(Code)
Overrides VelocityViewServlet to display user's custom error template



init
public void init(ServletConfig config) throws ServletException(Code)
Initializes Velocity, the view servlet and checks for changes to the initial layout configuration.
Parameters:
  config - servlet configuration parameters



mergeTemplate
protected void mergeTemplate(Template template, Context context, HttpServletResponse response) throws ResourceNotFoundException, ParseErrorException, MethodInvocationException, IOException, UnsupportedEncodingException, Exception(Code)
Overrides VelocityViewServlet.mergeTemplate to do a two-pass render for handling layouts



Fields inherited from org.apache.velocity.tools.view.servlet.VelocityViewServlet
final public static String CONTENT_TYPE(Code)(Java Doc)
final public static String DEFAULT_CONTENT_TYPE(Code)(Java Doc)
final public static String DEFAULT_OUTPUT_ENCODING(Code)(Java Doc)
final protected static String DEFAULT_PROPERTIES_PATH(Code)(Java Doc)
final protected static String DEFAULT_TOOLBOX_PATH(Code)(Java Doc)
final public static String DEFAULT_TOOLS_PROPERTIES(Code)(Java Doc)
final protected static String INIT_PROPS_KEY(Code)(Java Doc)
final public static String SERVLET_CONTEXT_KEY(Code)(Java Doc)
final protected static String TOOLBOX_KEY(Code)(Java Doc)
protected ToolboxManager toolboxManager(Code)(Java Doc)

Methods inherited from org.apache.velocity.tools.view.servlet.VelocityViewServlet
protected Context createContext(HttpServletRequest request, HttpServletResponse response)(Code)(Java Doc)
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc)
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc)
protected void doRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException(Code)(Java Doc)
protected void error(HttpServletRequest request, HttpServletResponse response, Exception e) throws ServletException(Code)(Java Doc)
protected String findInitParameter(ServletConfig config, String key)(Code)(Java Doc)
protected Writer getResponseWriter(HttpServletResponse response) throws UnsupportedEncodingException, IOException(Code)(Java Doc)
public Template getTemplate(String name) throws ResourceNotFoundException, ParseErrorException, Exception(Code)(Java Doc)
public Template getTemplate(String name, String encoding) throws ResourceNotFoundException, ParseErrorException, Exception(Code)(Java Doc)
protected VelocityEngine getVelocityEngine()(Code)(Java Doc)
protected String getVelocityProperty(String key, String alternate)(Code)(Java Doc)
protected Template handleRequest(HttpServletRequest request, HttpServletResponse response, Context ctx) throws Exception(Code)(Java Doc)
public void init(ServletConfig config) throws ServletException(Code)(Java Doc)
protected void initToolbox(ServletConfig config) throws ServletException(Code)(Java Doc)
protected void initVelocity(ServletConfig config) throws ServletException(Code)(Java Doc)
protected ExtendedProperties loadConfiguration(ServletConfig config) throws IOException(Code)(Java Doc)
protected void mergeTemplate(Template template, Context context, HttpServletResponse response) throws ResourceNotFoundException, ParseErrorException, MethodInvocationException, IOException, UnsupportedEncodingException, Exception(Code)(Java Doc)
protected void performMerge(Template template, Context context, Writer writer) throws ResourceNotFoundException, ParseErrorException, MethodInvocationException, Exception(Code)(Java Doc)
protected void requestCleanup(HttpServletRequest request, HttpServletResponse response, Context context)(Code)(Java Doc)
protected void setContentType(HttpServletRequest request, HttpServletResponse response)(Code)(Java Doc)
protected void setVelocityEngine(VelocityEngine ve)(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.