public class OwWebApplication extends Object
Main Application Class, handles Request Response and maps to document view.
Modifier and Type | Field and Description |
---|---|
static String |
BODY_ID
HTML element ID of the body tag
|
static String |
CONTEXT_KEY
session key for the context
|
static String |
LOGIN_VIEW_KEY
target ID for the login view
|
protected OwAppContext |
m_Context
Main Context Object
|
protected Class |
m_ContextClass
class definition for the context class to be created for the web application
|
protected Class |
m_LoginClass
class definition for the login view class to be created for the web application
|
protected OwView |
m_LoginView
Login View Object
|
protected OwView |
m_MainView
Main View Object
|
protected String |
m_strMainJspPage
path the the main view page
|
protected Class |
m_ViewClass
class definition for the view class to be created for the web application
|
static String |
SESSION_KEY_LOGGEDOUT_HEADER
session attribute name for the header of the loggedout.jsp page
|
static String |
SESSION_KEY_LOGGEDOUT_MESSAGE
session attribute name for the message of the loggedout.jsp page
|
Constructor and Description |
---|
OwWebApplication()
Creates a new instance of WdWebApplication
|
Modifier and Type | Method and Description |
---|---|
void |
checkSessionObjects(javax.servlet.ServletContext context_p,
javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p,
javax.servlet.http.HttpSession session_p)
creates the session objects if not done already
optionally set a prefix to distinguish several different applications.
|
OwAppContext |
getContext() |
static OwAppContext |
getContext(javax.servlet.http.HttpSession session_p)
Get the context for current session.
|
static OwView |
getLoginView(javax.servlet.http.HttpSession session_p)
get the login view
|
static OwView |
getMainView(javax.servlet.http.HttpSession session_p)
get the main view
|
void |
handleAjaxRequest(javax.servlet.ServletContext context_p,
javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p)
Main request handler for all AJAX based requests
|
void |
handleRequest(javax.servlet.ServletContext context_p,
javax.servlet.http.HttpServletRequest request_p,
javax.servlet.http.HttpServletResponse response_p)
Main request handler for all JSP based requests
allows only one request at a time
|
protected void |
handleRequestPendingSessionException(javax.servlet.ServletContext srvContext,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Forward to serverBusy.jsp in case of an concurrent session.
Invoked by . |
static void |
invalidateSessionObjects(javax.servlet.http.HttpServletRequest request_p)
invalidates the session objects, recreates all
|
void |
logSessionInfo(javax.servlet.http.HttpServletRequest request_p,
boolean fAllSessions_p)
log a session info for analysis
|
protected void |
printHandleRequestException(PrintWriter out_p,
String resetUri_p,
Throwable t_p)
Prints the error page in case of an Exception to the given
PrintWriter .Invoked by . |
protected void |
printHandleRequestException(PrintWriter out_p,
String resetUri_p,
Throwable t_p,
javax.servlet.ServletContext context_p)
Prints the error page in case of an Exception to the given
PrintWriter .Invoked by . |
protected void |
printHandleRequestPendingSessionException(PrintWriter out_p,
OwAppContext context_p)
Deprecated.
since 4.1.1.0 replaced with
|
void |
setContextClass(Class docClass_p)
sets the Context class
|
void |
setJspPath(String strJspPath_p)
sets the path to the main JSP page
|
void |
setLoginClass(Class loginClass_p)
sets the login view class
|
void |
setViewClass(Class viewClass_p)
sets the view class
|
public static final String LOGIN_VIEW_KEY
public static final String CONTEXT_KEY
public static final String BODY_ID
public static final String SESSION_KEY_LOGGEDOUT_HEADER
public static final String SESSION_KEY_LOGGEDOUT_MESSAGE
protected Class m_LoginClass
protected Class m_ContextClass
protected Class m_ViewClass
protected String m_strMainJspPage
protected OwView m_MainView
protected OwView m_LoginView
protected OwAppContext m_Context
public OwWebApplication()
public void setContextClass(Class docClass_p)
docClass_p
- Class of the Contextpublic void setViewClass(Class viewClass_p)
viewClass_p
- Class of the viewpublic void setLoginClass(Class loginClass_p)
loginClass_p
- Class of the login viewpublic void setJspPath(String strJspPath_p)
strJspPath_p
- public static OwView getMainView(javax.servlet.http.HttpSession session_p)
public static OwView getLoginView(javax.servlet.http.HttpSession session_p)
public static OwAppContext getContext(javax.servlet.http.HttpSession session_p)
public static void invalidateSessionObjects(javax.servlet.http.HttpServletRequest request_p)
public void logSessionInfo(javax.servlet.http.HttpServletRequest request_p, boolean fAllSessions_p)
request_p
- HttpServletRequestfAllSessions_p
- true = all sessions, false = only newly created sessionspublic void checkSessionObjects(javax.servlet.ServletContext context_p, javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p, javax.servlet.http.HttpSession session_p) throws Exception
context_p
- ServletContextrequest_p
- HttpServletRequestresponse_p
- HttpServletResponseException
public void handleAjaxRequest(javax.servlet.ServletContext context_p, javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p) throws Exception
context_p
- ServletContextrequest_p
- HttpServletRequestresponse_p
- HttpServletResponseException
- If any errors occurredpublic void handleRequest(javax.servlet.ServletContext context_p, javax.servlet.http.HttpServletRequest request_p, javax.servlet.http.HttpServletResponse response_p) throws Exception
context_p
- ServletContextrequest_p
- HttpServletRequestresponse_p
- HttpServletResponseException
- If any errors occurredprotected void printHandleRequestPendingSessionException(PrintWriter out_p, OwAppContext context_p)
handleRequestPendingSessionException(ServletContext, HttpServletRequest, HttpServletResponse)
PrintWriter
.handleRequest(ServletContext, HttpServletRequest, HttpServletResponse)
.out_p
- the PrintWriter
to write the error page toprotected void handleRequestPendingSessionException(javax.servlet.ServletContext srvContext, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
handleRequest(ServletContext, HttpServletRequest, HttpServletResponse)
.srvContext
- ServletContextrequest
- HttpServletRequestresponse
- HttpServletResponseException
protected void printHandleRequestException(PrintWriter out_p, String resetUri_p, Throwable t_p) throws IOException
PrintWriter
.handleRequest(ServletContext, HttpServletRequest, HttpServletResponse)
.out_p
- the PrintWriter
to write the error page toresetUri_p
- URL where to jump for resett_p
- Exception to print outIOException
- write errorprotected void printHandleRequestException(PrintWriter out_p, String resetUri_p, Throwable t_p, javax.servlet.ServletContext context_p) throws IOException
PrintWriter
.handleRequest(ServletContext, HttpServletRequest, HttpServletResponse)
.out_p
- the PrintWriter
to write the error page toresetUri_p
- URL where to jump for resett_p
- Exception to print outcontext_p
- ServletContextIOException
- write errorpublic OwAppContext getContext()
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.