planetj.dataengine
Class DataEngineServlet

java.lang.Object
  extended byHttpServlet
      extended byplanetj.dataengine.DataEngineServlet
All Implemented Interfaces:
IApplicationJSPs, IDataEngine, IJSPPages, INavigation, IServletParameters, IWOWJSPs
Direct Known Subclasses:
DataEngineAdminServlet, DataEngineApplicationBuilderServlet, DataEngineApplicationServlet, DataExplorerServlet, FDManagerServlet, SignOnAndRegistrationServlet

public abstract class DataEngineServlet
extends HttpServlet
implements IDataEngine

Handle general services such as sorting, subrowing, summing, navigating Creation date: (12/1/2001 2:57:18 PM)

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface planetj.dataengine.IDataEngine
ACTION, ADMIN_MAGIC_REQUEST, ALL_SERVLET_PATHS, ALLOW_MULTIPLE_DELETES, ALLOW_MULTIPLE_SELECTION, APPLICATION, COMPANY, CONTEXT, CONTEXT_KEY, CONTROLLER_SERVLET_PATH, CONTROLLER_SERVLET_URI, CURRENT_SQL_CONTEXT, CURRENT_SQL_RECORD_COUNT, CURRENT_SQL_STRING, CURRENT_TOC, DATA_ENGINE_MESSAGE, DATAENGINE_ADMIN_SERVLET_PATH, DATAENGINE_APPLICATION_BUILDER_SERVLET_PATH, DATAENGINE_APPLICATION_SERVLET_PATH, DATAEXPLORER_SERVLET_PATH, DE_ACTION_CATEGORY, DE_ACTION_SIGN_ON, DEFAULT_LAYOUT_DISPLAY_PROPERTIES, DEFAULT_RESULTS_KEY, DETAILS, EDITABLE_OPERATIONS, ENVIRONMENT_MODE_DEVELOPMENT, ENVIRONMENT_MODE_PRODUCTION, ERROR_APPLICATION_INVALID, ERROR_COMPANY_INVALID, ERROR_MESSAGE, ERROR_MESSAGE_NEXT_PAGE, EXCEPTION, EXCEPTION_JSP_KEY, FD_LIBRARY_LIST, FD_TABLE_LIST, FIELD, FIELD_DESCRIPTOR_SERVLET_PATH, FIELD_LIST, FIELD_NAMES, FIELDS, FORM_LIB_TBL_FLD, FUNCTION, HIDDEN_APPLICATION_ID, HIDDEN_APPLICATION_METADATA_ALIAS, HTTP_ATTRIBUTE_LIBRARY_LIST, HTTP_ATTRIBUTE_REPLACEMENT_LIBRARIES, HTTP_ATTRIBUTE_THEME_ID, HTTP_METHOD, HTTP_PARAMETER_LIBRARY_LIST, HTTP_PARAMETER_REPLACEMENT_LIBRARIES, HTTP_PARAMETER_THEME_ID, HTTP_PARAMETER_USER_LIBRARY, HTTP_SAME_NEW_GROUP, IGNORE_MAGIC_REQUEST, KEEP_INSERT_VALUES, LAST_JSP_CALLED, LAUNCHED_FROM_BUILDER, LIBRARY, MAGIC_ACTION_ROW, MODE, MODE_COPY, MODE_DELETE, MODE_EDIT, MODE_INSERT, MODE_INT_COPY, MODE_INT_DELETE, MODE_INT_EDIT, MODE_INT_INSERT, MODE_INT_SEARCH, MODE_INT_UNKNOWN, MODE_INT_VIEW, MODE_SEARCH, MODE_UNKNOWN, MODE_VIEW, MULTIPLESELECTION, NEW_ROW, NEW_WINDOW_FOR_RESULTS, NEXT_PAGE, NO_COOKIES_FLAG, NO_COOKIES_JSP, NOSELECTION, OPERATION, OPERATION_KEY, OWNER_ID, PAGE, PAGE_REQUEST_EXECUTED, PAGE_VALIDATION_REQUIRED, PARAMETER_VALUE_PREFIX, PREVIOUS_PAGE, READ_ONLY_VALUE, RESERVED_PARAMETERS, RETRIEVE_ALL_COLUMNS_ON_COPY, RETRIEVE_ALL_COLUMNS_ON_EDIT, RETRIEVE_ALL_COLUMNS_ON_VIEW, RETRIEVE_FIELDS, RETRIEVE_TABLES, RETURN_URI, ROW, ROW_ALTERNATE_KEY, ROW_COLLECTION, ROW_COLLECTION_KEY, ROW_KEY, ROW_KEY_FOR_DETAILS, ROW_SELECTION_JS_INCLUDED, ROWS_ALTERED_COUNT, SAVED_HTML, SAVED_HTML_KEY, SELECTED_ROW, SELECTED_ROW_COLLECTION, SELECTEDOBJECTS, SERVLET_CONTEXT, SESSION_RANDOM_NUMBER, SESSION_SIGNED_OFF, SESSION_SIGNON_RECEIPT_KEY, SESSION_TIMED_OUT, SHOW_FD_QUICK_LINKS, SHOW_UPDATABLE_TABLES, SHOW_UPDATEABLE_ROW, SIGN_ON_CALLER, SIGNON, SIGNON_AND_REGISTRATION_SERVLET_PATH, SINGLESELECTION, STATEMENT, SYSTEM, SYSTEMS_LIST, TAB_PARENT_ROW_KEY, TABLE, TRANSIENT, UNSUPPORTED, URI_PREFIX, USER_LIBRARY_HTTP_PARAMETER, USER_LIBRARY_HTTP_SESSION_KEY, USER_MESSAGE, USER_PREFERENCES, VALID_SIGNON, WAITING_MAGIC_REQUEST, WAITING_SERVLET, WINDOW_CLOSE, WINDOW_NORMAL, WINDOW_POPUP, WINDOW_TYPE_PARAM
 
Fields inherited from interface planetj.dataengine.INavigation
CHILD_PREFIX, GROUP_ATTRIBUTES, GROUP_ID, INITIAL_GROUP_ID, INITIAL_PAGE_ID, INITIAL_REQUEST_ID, NAVIGATION_CHECKED, NAVIGATION_OBJECT_LIST_PREFIX, NEW_GROUP_ID, NEW_REQUEST_ID, NEW_SESSION_ID, PAGE_ATTRIBUTES, PAGE_ID, PARENT_PREFIX, PERSISTENT_ATTRIBUTES, PREVIOUS_ATTRIBUTES, PREVIOUS_GROUP_ID, PREVIOUS_PAGE_ID, PREVIOUS_REQUEST_ID, REQUEST_ID, RESET_GROUP_ID, RESET_NAVIGATION_IDS, RESET_NAVIGATION_IDS_COMPLETED, RESET_PAGE_ID, RESET_REQUEST_ID, RESET_SESSION_ID, SESSION_ID
 
Fields inherited from interface planetj.dataengine.IServletParameters
ALL, AUTO_RUN, BASE_URL, CACHE_TRACK_ON, CACHE_TRACK_WRITE_TO_FILE, CLEAN_UP_TIME, DATA_ACCESS_TRACKING, DATABASE, DRIVER, ENVIRONMENT_MODE, JDBC_OPTIMIZATIONS, LIBRARY_LIST, MAX_CONNECTIONS, METADATA_LIBRARY, METADATA_USER_LIBRARY, MIN_CONNECTIONS, ORPHAN_TIMEOUT, PASSWORD, PORT, REPLACEMENT_LIBRARIES, SYSTEM_ALIAS, SYSTEM_ALIAS_PARAM, SYSTEM_URL, USER_ID, USER_PASSWORD
 
Fields inherited from interface planetj.dataengine.IJSPPages
CUSTOM_LOG_ON_JSP, DEFAULT_ADD_BODY_JSP, DEFAULT_ADD_BUTTONS_JSP, DEFAULT_EDIT_BODY_JSP, DEFAULT_EDIT_BUTTONS_JSP, DEFAULT_PARAMS_JSP, DEFAULT_PLEASE_WAIT_JSP, DEFAULT_PRINT_PAGE_JSP, DEFAULT_RESULTS_JSP, DEFAULT_ROW_DETAILS, DEFAULT_SQL_OPERATION_RESULTS_JSP, DEFAULT_TAB_CONTAINER_JSP, DEFAULT_TAB_HEADINGS_JSP, DEFAULT_TAB_PARENT_JSP, DEFAULT_VIEW_BODY_JSP, DEFAULT_VIEW_BUTTONS_JSP, DETAILS_JSP, DISPLAY_EXCEPTION_JSP, INITIAL_JSP, PLEASE_WAIT_CONTROLLER_JSP, SIGN_ON_BODY_JSP, SIGN_ON_JSP, SIGNON_PARAMS_JSP
 
Fields inherited from interface planetj.dataengine.application.IApplicationJSPs
APPLICATION_ADD_JSP, APPLICATION_DETAILS_JSP, APPLICATION_EDIT_JSP, APPLICATION_ERROR_JSP, APPLICATION_HEADER_JSP, APPLICATION_INVALID_LICENSE_JSP, APPLICATION_JSP, APPLICATION_MESSAGE_JSP, APPLICATION_OPERATIONS_TOC, APPLICATION_RESULTS_JSP, APPLICATION_SIGN_ON_JSP, APPLICATION_TEMPLATE_JSP, APPLICATION_TOC_JSP, APPLICATION_VIEW_JSP
 
Fields inherited from interface planetj.dataengine.application.IWOWJSPs
WOW_MAIN_EXCEPTION_JSP, WOW_MANAGE_OPERATIONS_JSP, WOW_STEPS_JSP, WOW_TOC, WOW_VIEW_APPLICATIONS_JSP, WOW_VIEW_CONNECTIONS_JSP
 
Constructor Summary
DataEngineServlet()
          DataEngineServlet constructor comment.
 
Method Summary
 void addCookie(HttpServletResponse pResponse, Cookie pCookie)
          Adds the specified Cookie to the HttpServletResponse.
protected  void checkLaunchedFromBuilder(HttpServletRequest req)
          Checks to see if the application was launched from the builder
protected  boolean checkLicense(HttpServletRequest request, HttpServletResponse response)
          Checks to see if the WOW license is valid.
 HttpServletRequest correctRequest(HttpServletRequest request)
          If the given request is a mulitpart request, then it is converted into a multipart request object.
 void destroy()
           
protected static void displayDataEngineException(DataEngineException pDE, HttpServletRequest pReq, HttpServletResponse pRes)
           
 void doGet(HttpServletRequest request, HttpServletResponse response)
          Generically reroute to performRequest method.
 void doPost(HttpServletRequest request, HttpServletResponse response)
          Generically reroute to performRequest method.
static java.lang.String dumpParameters(HttpServletRequest request)
          Returns a String containing a listing of all the request's parameters.
 void forward(java.lang.String uri, HttpServletRequest request, HttpServletResponse response)
          Forward to the specified URI.
protected  void forwardInternal(java.lang.String uri, HttpServletRequest request, HttpServletResponse response)
          Forward to the specified URI.
static void forwardToPage(java.lang.String uri, HttpServletRequest request, HttpServletResponse response)
          Forward to the specified URI.
protected  java.lang.String getAvailableServletNames()
          Return a String which contains the available servlet's within this context.
 Cookie getCookie(HttpServletRequest pRequest, java.lang.String pName, java.lang.String pPath)
          Gets the Cookie with the specified name and path from the HttpServletRequest.
 Cookie[] getCookies(HttpServletRequest pRequest)
          Gets all the Cookies in the HttpServletRequest.
protected static DataEngineException getDataEngineException(java.lang.Throwable t)
           
static java.lang.String getErrorMessage(HttpServletRequest request)
           
static DataEngineInitializationException getInitializationException()
          Gets the initialization exception
 java.lang.String getInitializationParameter(java.lang.String key)
          Gets an initialization parameter for the given key
abstract  java.lang.String getInitialPage(HttpServletRequest req)
          Force subclasses to return an initial jsp/servlet.
 java.lang.String getLastJSPPath(HttpServletRequest req, HttpServletResponse res)
          Deprecated. no longer used
static ILicense getLicense(ExecutingContext context, HttpServletRequest req, HttpServletResponse res)
          Deprecated. replaced with DataEngine.getLicense()
 java.lang.String getLoggingPath()
          Path to initialize the log file.
static java.lang.Object getRequestAttribute(java.lang.String key, HttpServletRequest request)
          Gets the attribute in the request for the given key.
static java.lang.String getRequestParameter(java.lang.String key, HttpServletRequest request)
          Gets the specified parameter from the HTTPRequest.
static java.lang.String[] getRequestParameterValues(java.lang.String key, HttpServletRequest request)
          Gets the specified parameter from the HTTPRequest.
 java.lang.String getRowCollectionJsp()
          Deprecated. didn't know if being used, should this even be here?
 IRowEventListener getRowEventListener(HttpServletRequest req)
          Each Servlet may have its own RowEventListener defined, so they would override this method and return the appropriate Listener Creation date: (7/11/2002 10:30:18 AM)
 java.lang.String getServiceRequestOverride(java.lang.String pServiceReq, HttpServletRequest httpReq, HttpServletResponse httpRes)
          Return a new String used to lookup the magic service request.
static java.lang.String getServletPath(java.lang.String servletName)
          Get the path used to call the Servlet with the given name.
static java.lang.String getServletPath(java.lang.String servletName, boolean includeContextPath, HttpServletRequest request)
          Get the path used to call the Servlet with the given name.
static java.lang.Object getSessionAttribute(java.lang.String key, HttpServletRequest request)
          Gets the specified object in the HTTPSession.
static java.lang.Object getSessionSharedAttribute(java.lang.String key, HttpServletRequest request)
          Gets the specified object in the HttpSession.
static java.lang.String getUserMessage(HttpServletRequest request)
           
 boolean handleError(short wowErrorCode, java.lang.Exception e, ExecutingContext ec)
          This method is called when a navigation error occurs.
 boolean handleMagicRequest(IMagicRequest magicReq, HttpServletRequest httpReq, HttpServletResponse httpRes)
          Handles a dataengine magic requests.
 boolean handleSavedHTML(HttpServletRequest req, HttpServletResponse res)
          Handles the situation where there is saved HTML in the session which should be sent out to the browser.
 boolean handleServiceClassRequest(java.lang.String classToRun, HttpServletRequest request, HttpServletResponse response)
          Handle generic dataengine service requests.
 boolean handleServiceRequest(HttpServletRequest httpReq, HttpServletResponse httpRes)
          Handle generic dataengine service requests.
 void init()
          Initialize the log
protected  void initConnectionPool(ServletConfig config)
          Initialize the servlet's db connection pool used for metaData.
protected  void initDataEngineProperties(ServletConfig config)
           
protected  void initInitParameters(ServletConfig config)
          Initialize the initialization parameters
protected  void initLicense()
          Initialze the license file.
protected  void initMetadataLibraries(ServletConfig config)
          Initialize the metadata library
protected  void initSerlvetPaths(ServletConfig config)
          Initialize the servlet's alias information for runtime servlet to servlet calls.
protected  boolean isAuthorized(HttpServletRequest request)
          !!A WK after a user signs out, all the pages they previously viewed are no longer valid, need implementation and an unauthorized page
 boolean isCookiesAllowed(HttpServletRequest request)
           
 boolean isLicenseValid(java.lang.String pServletRoot, HttpServletRequest req, HttpServletResponse res)
          Deprecated. replaced with DataEngine.isLicenseValid()
static boolean isRunningInVA()
          If we are running in VA or not
static boolean isServletPath(java.lang.String servletName)
          Tests if the String identifies a DataEngine Servlet
protected  boolean isSessionTimeOut(HttpServletRequest request)
           
protected  void navigationError(HttpServletRequest request, HttpServletResponse response)
           
protected  void pageExpired(HttpServletRequest request, HttpServletResponse response)
          This method is called when a page has expired.
 boolean preHandleServiceRequest(HttpServletRequest request, HttpServletResponse response)
           
 void printParameterTrace(HttpServletRequest req)
          Technical support method which prints the HttpServletRequest parms out Creation date: (11/7/2001 3:58:05 PM)
abstract  void processRequest(HttpServletRequest request, HttpServletResponse response)
          Handles servlet actions.
static java.lang.Object removeRequestAttribute(java.lang.String key, HttpServletRequest request)
          Removes the specified object in the HTTPRequest.
 void removeRequestData(HttpServletRequest req, java.lang.String parmKey)
          Deprecated. replaced with removeRequestAttribute(String, HttpServletRequest)
static java.lang.Object removeSessionAttribute(java.lang.String key, HttpServletRequest request)
          Removes the specified object in the HttpSession.
static java.lang.Object removeSessionSharedAttribute(java.lang.String key, HttpServletRequest request)
          Removes the specified object in the HttpSession.
 void removeSharedSessionAttribute(HttpServletRequest pRequest, java.lang.String pKey)
          Deprecated. replaced with removeSessionSharedAttribute(String, HttpServletRequest)
 void service(HttpServletRequest request, HttpServletResponse response)
          This method handles generic DataEngine service requests.
protected  void sessionTimedOut(HttpServletRequest request, HttpServletResponse response)
          This method is called when the user's session timeouts.
static void setErrorMessage(java.lang.String message, boolean nextPage, HttpServletRequest request)
          Sets the error message to display to the user.
static void setErrorMessage(java.lang.String message, HttpServletRequest request)
          Sets the error message to display to the user.
static void setLayoutProperties(LayoutDisplayPropertyGroup layoutProperties, HttpServletRequest request)
          Deprecated.  
static void setMethod(java.lang.String method, HttpServletRequest req)
          Sets the HTTP method to use when sending the form back to the server (e.g.
static void setRequestGroupAttribute(java.lang.String pKey, java.lang.Object pValue, HttpServletRequest pReq)
           
static void setRequestPageAttribute(java.lang.String pKey, java.lang.Object pValue, HttpServletRequest pReq)
          Sets an attribute on the request that is associated with this page.
static void setRequestPersistentAttribute(java.lang.String pKey, java.lang.Object pValue, HttpServletRequest pReq)
          Sets an attribute on the request that will be persisted.
static void setRequestTransientAttribute(java.lang.String key, java.lang.Object value, HttpServletRequest request)
          Sets an attriubte on the request that will not be automatically transferred to another request.
static void setServletPath(java.lang.String servletDefaultName, java.lang.String servletMap)
          Sets a String to use to call a Servlet from another Servlet.
static void setServletURI(HttpServletRequest req, HttpServletResponse res)
          Deprecated. - temporarily to find where called
static void setSessionAttribute(java.lang.String key, java.lang.Object value, HttpServletRequest request)
          Sets the specified object in the HttpSession.
static void setSessionSharedAttribute(java.lang.String key, java.lang.Object value, HttpServletRequest request)
          Sets the specified object in the HttpSession.
static void setUseFullURI(boolean useFull, HttpServletRequest req)
          Sets if the full URI should be used in the HTML when URIs are rendered.
static void setUserMessage(java.lang.String message, HttpServletRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataEngineServlet

public DataEngineServlet()
DataEngineServlet constructor comment.

Method Detail

dumpParameters

public static java.lang.String dumpParameters(HttpServletRequest request)
Returns a String containing a listing of all the request's parameters.


getErrorMessage

public static java.lang.String getErrorMessage(HttpServletRequest request)

getInitializationException

public static DataEngineInitializationException getInitializationException()
Gets the initialization exception


getInitializationParameter

public java.lang.String getInitializationParameter(java.lang.String key)
Gets an initialization parameter for the given key


getLicense

public static ILicense getLicense(ExecutingContext context,
                                  HttpServletRequest req,
                                  HttpServletResponse res)
Deprecated. replaced with DataEngine.getLicense()

Creation date: (4/8/2003 2:37:06 PM)


getRequestAttribute

public static java.lang.Object getRequestAttribute(java.lang.String key,
                                                   HttpServletRequest request)
Gets the attribute in the request for the given key. Provides a single place for potential error logging and programatic debugging.

Parameters:
key -
request - HttpServletRequest

getRequestParameter

public static java.lang.String getRequestParameter(java.lang.String key,
                                                   HttpServletRequest request)
Gets the specified parameter from the HTTPRequest. This provides a single place with potential error logging and programatic debug instead of all users getting their own parameters.


getRequestParameterValues

public static java.lang.String[] getRequestParameterValues(java.lang.String key,
                                                           HttpServletRequest request)
Gets the specified parameter from the HTTPRequest. This provides a single place with potential error logging and programatic debug instead of all users getting their own parameters.


getServletPath

public static java.lang.String getServletPath(java.lang.String servletName)
Get the path used to call the Servlet with the given name. (The context info is not included.) This method does not require the HttpServletRequest to be passed in

Parameters:
servletName - the name of the servlet to get the path needed to call the servlet
Returns:
The name the servlet is mapped to

getServletPath

public static java.lang.String getServletPath(java.lang.String servletName,
                                              boolean includeContextPath,
                                              HttpServletRequest request)
Get the path used to call the Servlet with the given name.

Parameters:
servletName - the name of the servlet to get the path needed to call the servlet
includeContextPath - true if the context path should be included in the path to call the servlet (context path should be include when the servlet will be called from HTML); false otherwise (when the the servlet will be called from another servlet)
request - the HttpServletRequest object that containing the client's request

getSessionAttribute

public static java.lang.Object getSessionAttribute(java.lang.String key,
                                                   HttpServletRequest request)
Gets the specified object in the HTTPSession. This provides a single place with potential error logging and programatic debug instead of all users getting objects from the Session.

Returns:
object from the session

getSessionSharedAttribute

public static java.lang.Object getSessionSharedAttribute(java.lang.String key,
                                                         HttpServletRequest request)
Gets the specified object in the HttpSession. This provides a single place with potential error logging and programatic debug instead of all users getting objects from the Session.

Returns:
object from the session

getUserMessage

public static java.lang.String getUserMessage(HttpServletRequest request)

isRunningInVA

public static final boolean isRunningInVA()
If we are running in VA or not


isServletPath

public static boolean isServletPath(java.lang.String servletName)
Tests if the String identifies a DataEngine Servlet


removeRequestAttribute

public static java.lang.Object removeRequestAttribute(java.lang.String key,
                                                      HttpServletRequest request)
Removes the specified object in the HTTPRequest. This provides a single place with potential error logging and programatic debug instead of all users setting objects into the Request


removeSessionAttribute

public static java.lang.Object removeSessionAttribute(java.lang.String key,
                                                      HttpServletRequest request)
Removes the specified object in the HttpSession. This provides a single place with potential error logging and programatic debug instead of all users setting objects into the Session.


removeSessionSharedAttribute

public static java.lang.Object removeSessionSharedAttribute(java.lang.String key,
                                                            HttpServletRequest request)
Removes the specified object in the HttpSession. This provides a single place with potential error logging and programatic debug instead of all users setting objects into the Session.


setErrorMessage

public static void setErrorMessage(java.lang.String message,
                                   HttpServletRequest request)
Sets the error message to display to the user. The current page is redisplayed with this error message


setErrorMessage

public static void setErrorMessage(java.lang.String message,
                                   boolean nextPage,
                                   HttpServletRequest request)
Sets the error message to display to the user.

Parameters:
nextPage - Should we display the error message on the next page, or stay on this page?

setLayoutProperties

public static void setLayoutProperties(LayoutDisplayPropertyGroup layoutProperties,
                                       HttpServletRequest request)
Deprecated.  

Gets the current layout properties from the session.


setMethod

public static void setMethod(java.lang.String method,
                             HttpServletRequest req)
Sets the HTTP method to use when sending the form back to the server (e.g. GET or POST). This only affects the very next page


setRequestGroupAttribute

public static void setRequestGroupAttribute(java.lang.String pKey,
                                            java.lang.Object pValue,
                                            HttpServletRequest pReq)

setRequestPageAttribute

public static void setRequestPageAttribute(java.lang.String pKey,
                                           java.lang.Object pValue,
                                           HttpServletRequest pReq)
Sets an attribute on the request that is associated with this page. If the user navigates away from the page displayed from this request, and then returns via the "Cancel" button or other backwards navigation, any attributes stored in the request with this method will be restored to the request.


setRequestPersistentAttribute

public static void setRequestPersistentAttribute(java.lang.String pKey,
                                                 java.lang.Object pValue,
                                                 HttpServletRequest pReq)
Sets an attribute on the request that will be persisted. If the user navigates via a MagicRequest, any attribute set via this method will be propagated to the next HttpServletRequest.


setRequestTransientAttribute

public static void setRequestTransientAttribute(java.lang.String key,
                                                java.lang.Object value,
                                                HttpServletRequest request)
Sets an attriubte on the request that will not be automatically transferred to another request. This is how request attributes "normally" work.

Parameters:
key -
value -
request - HttpServletRequest

setServletPath

public static void setServletPath(java.lang.String servletDefaultName,
                                  java.lang.String servletMap)
Sets a String to use to call a Servlet from another Servlet. Example: WebSphere URI config for a servlet may be: /PJ/DataExplorer In this example, the webapplication was configured to use a context path of "/PJ" and has a servlet map of "/DataExplorer". This method should set the path to "/DataExplorer" which is what is needed when calling servlets or jsps from other servlets or jsps. When calling from HTML you need to have the context path.

Returns:
String

setServletURI

public static void setServletURI(HttpServletRequest req,
                                 HttpServletResponse res)
                          throws ServletException
Deprecated. - temporarily to find where called

Set the servlet URI in the request. This is used by JSPs when determining the servlet url to call for Service requests. Problems occur in JSPs if the "hardcode" the servlet url because it changes depending on the web app configuration. author: Paul Holm

Throws:
ServletException

setSessionAttribute

public static void setSessionAttribute(java.lang.String key,
                                       java.lang.Object value,
                                       HttpServletRequest request)
Sets the specified object in the HttpSession. This provides a single place with potential error logging and programatic debug instead of all users setting objects into the Session.


setSessionSharedAttribute

public static void setSessionSharedAttribute(java.lang.String key,
                                             java.lang.Object value,
                                             HttpServletRequest request)
Sets the specified object in the HttpSession. This provides a single place with potential error logging and programatic debug instead of all users setting objects into the Session.


setUseFullURI

public static void setUseFullURI(boolean useFull,
                                 HttpServletRequest req)

Sets if the full URI should be used in the HTML when URIs are rendered. Normally all URIs are assumed to be located in the current webapp, and therefore full URI information is not included.

Example reference when false (default): "dataengine/js/util.js"

Example reference when true: "http://localhost:7080/wow60/dataengine/js/util.js"

Invoking this method only affects the current request. Subsequent requests will revert to the default value


setUserMessage

public static void setUserMessage(java.lang.String message,
                                  HttpServletRequest request)

addCookie

public void addCookie(HttpServletResponse pResponse,
                      Cookie pCookie)
Adds the specified Cookie to the HttpServletResponse.

Parameters:
pResponse -
pCookie - Cookie to set in the HttpServletResponse

checkLaunchedFromBuilder

protected void checkLaunchedFromBuilder(HttpServletRequest req)
Checks to see if the application was launched from the builder


checkLicense

protected boolean checkLicense(HttpServletRequest request,
                               HttpServletResponse response)
Checks to see if the WOW license is valid. If it is not valid, then control is forwarded to an invalid license JSP.


correctRequest

public HttpServletRequest correctRequest(HttpServletRequest request)
If the given request is a mulitpart request, then it is converted into a multipart request object.


displayDataEngineException

protected static void displayDataEngineException(DataEngineException pDE,
                                                 HttpServletRequest pReq,
                                                 HttpServletResponse pRes)

doGet

public void doGet(HttpServletRequest request,
                  HttpServletResponse response)
           throws ServletException,
                  java.io.IOException
Generically reroute to performRequest method.

Throws:
ServletException
java.io.IOException

doPost

public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
            throws ServletException,
                   java.io.IOException
Generically reroute to performRequest method.

Parameters:
request - request
response - response
Throws:
ServletException
java.io.IOException

forward

public void forward(java.lang.String uri,
                    HttpServletRequest request,
                    HttpServletResponse response)
             throws DataEngineException
Forward to the specified URI.

Throws:
DataEngineException

forwardToPage

public static void forwardToPage(java.lang.String uri,
                                 HttpServletRequest request,
                                 HttpServletResponse response)
                          throws DataEngineException
Forward to the specified URI.

Throws:
DataEngineException

forwardInternal

protected final void forwardInternal(java.lang.String uri,
                                     HttpServletRequest request,
                                     HttpServletResponse response)
                              throws DataEngineException
Forward to the specified URI.

Throws:
DataEngineException

getAvailableServletNames

protected java.lang.String getAvailableServletNames()
Return a String which contains the available servlet's within this context. Used for debugging.


getCookie

public Cookie getCookie(HttpServletRequest pRequest,
                        java.lang.String pName,
                        java.lang.String pPath)
Gets the Cookie with the specified name and path from the HttpServletRequest. Null is returned if the Cookie is not found.

Parameters:
pRequest - request
pName - name of the cookie to get
pPath - path of the cookie to get
Returns:
the cookie with the specified name

getCookies

public Cookie[] getCookies(HttpServletRequest pRequest)
Gets all the Cookies in the HttpServletRequest.

Parameters:
pRequest - request
Returns:
all the Cookies in the HttpServletRequest.

getDataEngineException

protected static DataEngineException getDataEngineException(java.lang.Throwable t)

getInitialPage

public abstract java.lang.String getInitialPage(HttpServletRequest req)
                                         throws CMException
Force subclasses to return an initial jsp/servlet. We need this incase potential errors timeout occur while running generic services. For example, the web browser brings up a page and then sits for 5 hours then tries a DataEngineServlet service method such as sorting. The DataEngineServlet session has been lost (invalidated) so we are dead in the water so we'll ask the subclass servlet where we should take the user to resignon.

Throws:
CMException

getLastJSPPath

public java.lang.String getLastJSPPath(HttpServletRequest req,
                                       HttpServletResponse res)
                                throws ServletException,
                                       CMException
Deprecated. no longer used

get the JSP that was last called so that we know how to get back for magic services. author: Paul Holm

Throws:
ServletException
CMException

getLoggingPath

public java.lang.String getLoggingPath()
                                throws ServletException
Path to initialize the log file. The DataEngine default logging conf file is used for logging. Subclasses of DataEngineServlet may override this method to specify another logging config file.

Throws:
ServletException

getRowCollectionJsp

public java.lang.String getRowCollectionJsp()
Deprecated. didn't know if being used, should this even be here?

Gets the JSP that should be used for displaying a RowCollection


getRowEventListener

public IRowEventListener getRowEventListener(HttpServletRequest req)
Each Servlet may have its own RowEventListener defined, so they would override this method and return the appropriate Listener Creation date: (7/11/2002 10:30:18 AM)


getServiceRequestOverride

public java.lang.String getServiceRequestOverride(java.lang.String pServiceReq,
                                                  HttpServletRequest httpReq,
                                                  HttpServletResponse httpRes)
                                           throws ServletException,
                                                  java.io.IOException
Return a new String used to lookup the magic service request. This can be used by subclasses to override the WOW generated value when special processing is needed. For example, when the service_request is "Op24" a MagicRequest object in the session with the key "Op24" will be looked up and ran.

Returns:
String
Throws:
ServletException
java.io.IOException

handleError

public boolean handleError(short wowErrorCode,
                           java.lang.Exception e,
                           ExecutingContext ec)
This method is called when a navigation error occurs. It allows a servlet to override or control logic and flow.


handleMagicRequest

public boolean handleMagicRequest(IMagicRequest magicReq,
                                  HttpServletRequest httpReq,
                                  HttpServletResponse httpRes)
                           throws CMException,
                                  ServletException,
                                  java.io.IOException
Handles a dataengine magic requests.

Returns:
if a MagicRequest was serviced.
Throws:
CMException
ServletException
java.io.IOException

handleSavedHTML

public boolean handleSavedHTML(HttpServletRequest req,
                               HttpServletResponse res)
                        throws ServletException,
                               java.io.IOException
Handles the situation where there is saved HTML in the session which should be sent out to the browser. If there is, then this method will output it, and return true, in which case no further processing should be done for this request. If there is no such saved HTML false is returned

Throws:
ServletException
java.io.IOException

handleServiceClassRequest

public boolean handleServiceClassRequest(java.lang.String classToRun,
                                         HttpServletRequest request,
                                         HttpServletResponse response)
                                  throws ServletException,
                                         java.io.IOException
Handle generic dataengine service requests. Checks to see if there is a DataEngine "Magic" Service request. A DataEngine service is a generated service request such as column sorting. If there is a service request, the service is carried out and controll is returned to the caller.

Returns:
if a MagicRequest was serviced.
Throws:
ServletException
java.io.IOException

handleServiceRequest

public boolean handleServiceRequest(HttpServletRequest httpReq,
                                    HttpServletResponse httpRes)
                             throws ServletException,
                                    java.io.IOException
Handle generic dataengine service requests. Checks to see if there is a DataEngine "Magic" Service request. A DataEngine service is a generated service request such as column sorting. If there is a service request, the service is carried out and controll is returned to the caller.

Returns:
if a MagicRequest was serviced.
Throws:
ServletException
java.io.IOException

init

public void init()
          throws ServletException
Initialize the log

Throws:
ServletException

initConnectionPool

protected void initConnectionPool(ServletConfig config)
Initialize the servlet's db connection pool used for metaData.


initDataEngineProperties

protected void initDataEngineProperties(ServletConfig config)
                                 throws ServletException
Parameters:
config -
Throws:
ServletException

initInitParameters

protected void initInitParameters(ServletConfig config)
                           throws ServletException
Initialize the initialization parameters

Throws:
ServletException

initLicense

protected void initLicense()
                    throws ServletException
Initialze the license file.

Throws:
ServletException

initMetadataLibraries

protected void initMetadataLibraries(ServletConfig config)
                              throws ServletException
Initialize the metadata library

Throws:
ServletException

initSerlvetPaths

protected void initSerlvetPaths(ServletConfig config)
Initialize the servlet's alias information for runtime servlet to servlet calls.


isAuthorized

protected boolean isAuthorized(HttpServletRequest request)
!!A WK after a user signs out, all the pages they previously viewed are no longer valid, need implementation and an unauthorized page


isCookiesAllowed

public boolean isCookiesAllowed(HttpServletRequest request)

isLicenseValid

public boolean isLicenseValid(java.lang.String pServletRoot,
                              HttpServletRequest req,
                              HttpServletResponse res)
Deprecated. replaced with DataEngine.isLicenseValid()

Check the license manager to see is license is valid. Creation date: (4/8/2003 2:37:06 PM)


isSessionTimeOut

protected boolean isSessionTimeOut(HttpServletRequest request)

navigationError

protected void navigationError(HttpServletRequest request,
                               HttpServletResponse response)
                        throws CMException
Throws:
CMException

pageExpired

protected void pageExpired(HttpServletRequest request,
                           HttpServletResponse response)
                    throws CMException
This method is called when a page has expired. Subclasses should override this method if they need to handle page expirations differently.

Throws:
CMException

preHandleServiceRequest

public boolean preHandleServiceRequest(HttpServletRequest request,
                                       HttpServletResponse response)

printParameterTrace

public void printParameterTrace(HttpServletRequest req)
Technical support method which prints the HttpServletRequest parms out Creation date: (11/7/2001 3:58:05 PM)

Parameters:
req - javax.servlet.http.HttpServletRequest

processRequest

public abstract void processRequest(HttpServletRequest request,
                                    HttpServletResponse response)
                             throws ServletException,
                                    java.io.IOException
Handles servlet actions. Subclasses should provide the logic to handle actions. for an example, see DETemplateServlet.

Parameters:
request - request
response - response
Throws:
ServletException
java.io.IOException

removeRequestData

public void removeRequestData(HttpServletRequest req,
                              java.lang.String parmKey)
Deprecated. replaced with removeRequestAttribute(String, HttpServletRequest)

Removes the specified object in the HTTPRequest. This provides a single place with potential error logging and programatic debug instead of all users setting objects into the Request


removeSharedSessionAttribute

public void removeSharedSessionAttribute(HttpServletRequest pRequest,
                                         java.lang.String pKey)
                                  throws DataEngineException
Deprecated. replaced with removeSessionSharedAttribute(String, HttpServletRequest)

Removes the specified object in the HttpSession. This provides a single place with potential error logging and programatic debug instead of all users setting objects into the Session.

Parameters:
pRequest - request containing session to put attribute into
pKey - key used to store the object in the session
Throws:
DataEngineException

service

public void service(HttpServletRequest request,
                    HttpServletResponse response)
             throws ServletException,
                    java.io.IOException
This method handles generic DataEngine service requests. As well as ensures the application being called has its unique session identifier set.

Throws:
ServletException
java.io.IOException

sessionTimedOut

protected void sessionTimedOut(HttpServletRequest request,
                               HttpServletResponse response)
                        throws CMException
This method is called when the user's session timeouts. Subclasses should override this method if they need to handle session timeouts differently. This method sets an error message in the request and forwards to the servlet's initial page.

Parameters:
request -
response -
Throws:
CMException

destroy

public void destroy()