Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

edu.virtualschool.jwaa.xml.JwaaServlet Class Reference

Inheritance diagram for edu.virtualschool.jwaa.xml.JwaaServlet:

edu.virtualschool.jwaa.GenericServlet Collaboration diagram for edu.virtualschool.jwaa.xml.JwaaServlet:

Collaboration graph
[legend]
List of all members.

Detailed Description

The GenericServlet instance for the Jwaa demo application.
See also:
GenericServlet

Definition at line 27 of file JwaaServlet.java.

Public Member Functions

void init (ServletConfig config) throws ServletException
final void doFault (MetaPage meta, HttpServletRequest rq, HttpServletResponse rs, Throwable e)
MetaPage getDefaultPage ()
MetaPage getRefusePage ()
MetaPage getRootPage ()
AccountAbstraction getNullAccount ()
RootDirectory getRoot ()
Connection checkoutConnection () throws Fault
void checkinConnection (Connection c) throws Fault

Package Attributes

DBPool connectionPool
File homeDirectory
File rootDirectory
String servletUrlPrefix
RootDirectory root

Static Package Attributes

final Logger logger = Logger.getLogger(JwaaServlet.class.getName())


Member Function Documentation

final void edu.virtualschool.jwaa.xml.JwaaServlet.doFault MetaPage  meta,
HttpServletRequest  rq,
HttpServletResponse  rs,
Throwable  e
[virtual]
 

The application's fault handler

Parameters:
meta: metapage of object raising the fault
rq: servlet request object
rs: servlet response object
e: the exception

Implements edu.virtualschool.jwaa.GenericServlet.

Definition at line 91 of file JwaaServlet.java.

00096   {
00097     logger.error(e, e);
00098     try
00099     {
00100       PrintWriter pw = rs.getWriter();
00101       pw.println("<h1 align=\"center\">Whups: "+e.getMessage()+"</h1>");
00102       pw.println("<pre>");
00103       e.printStackTrace(pw);
00104       pw.println("</pre>");
00105     }
00106     catch (IOException e2)
00107     {
00108       e2.printStackTrace();
00109     }
00110   }

MetaPage edu.virtualschool.jwaa.xml.JwaaServlet.getDefaultPage  )  [virtual]
 

Override to specify the page to show if a page lookup fails.

Returns:
PageElement

Implements edu.virtualschool.jwaa.GenericServlet.

Definition at line 111 of file JwaaServlet.java.

00112   {
00113     return Controller.meta;
00114   }

AccountAbstraction edu.virtualschool.jwaa.xml.JwaaServlet.getNullAccount  )  [virtual]
 

This method gives the application control over what getAccount returns when no one is logged in. Applications often define their own conventions that are inconsistent with any decision hardcoded at this level.

Returns:
AccountAbstraction

Implements edu.virtualschool.jwaa.GenericServlet.

Definition at line 123 of file JwaaServlet.java.

00124   {
00125     return DemoAccountBean.Null;
00126   }

MetaPage edu.virtualschool.jwaa.xml.JwaaServlet.getRefusePage  )  [virtual]
 

Override with the page to show if a page access is refused.

Returns:
PageElement

Implements edu.virtualschool.jwaa.GenericServlet.

Definition at line 115 of file JwaaServlet.java.

00116   {
00117     return Controller.meta;
00118   }

MetaPage edu.virtualschool.jwaa.xml.JwaaServlet.getRootPage  )  [virtual]
 

Override to return the root page of the page hierarchy. The reference to the root of the hierarchy will cause the classloader to load all other pages in the hierarchy. If you have any pages that are not in the hierarchy, they will not be loaded.

Returns:
PageElement

Implements edu.virtualschool.jwaa.GenericServlet.

Definition at line 119 of file JwaaServlet.java.

00120   {
00121     return Controller.meta;
00122   }


The documentation for this class was generated from the following file: