BEA Systems, Inc.

com.beasys.commerce.axiom.jsp
Class ToolsJspBase

java.lang.Object
  |
  +--weblogic.servlet.jsp.JspBase
        |
        +--com.beasys.commerce.axiom.jsp.JspBase
              |
              +--com.beasys.commerce.axiom.jsp.ToolsJspBase
Direct Known Subclasses:
JspHierarchyBase

public abstract class ToolsJspBase
extends JspBase

Acts as a base class for all Portal JSP pages. Prescribes methods which faciltate portal run-time operation. Allows access to the Flow Manager URI, the Portal's working directory, the Portal's home page, the Portal's current page, and the PortalProperties PortalManagerinstantiations. Also, facilitates management of the portal run-time session, by providing convenience methods for setting and getting session values, and setting and getting JSP destinations. Implements several constants interface to reduce the burden of constant referencing by JSP pages.


Field Summary
protected static boolean debug
          Whether debug mode is on.
 
Fields inherited from class com.beasys.commerce.axiom.jsp.JspBase
debug, DESTINATION_TAG
 
Fields inherited from class weblogic.servlet.jsp.JspBase
_servletConfig
 
Constructor Summary
ToolsJspBase()
           
 
Method Summary
static java.lang.String fixupRelativeURL(java.lang.String aURL, javax.servlet.http.HttpServletRequest aRequest)
          With the system using jsp:forward the relative directories may not be set employed correctly.
static java.lang.String reconcileFile(javax.servlet.http.HttpServletRequest aRequest, java.lang.String aURL)
          Check to see if the file exists in the working directory of the FlowManager application.
static java.lang.String reconcileFile(javax.servlet.http.HttpServletRequest aRequest, java.lang.String aURL, boolean addWebappContext)
          Call the reconcileFile method specifying whether any webapp context should be included.
 
Methods inherited from class com.beasys.commerce.axiom.jsp.JspBase
cnvrtSC, createURL, escapeQuotes, getCurrentPage, getDefaultDestination, getDefaultSuccessor, getHomePage, getLoggedIn, getRepositoryDirectory, getRequestURI, getServletConfig, getSessionValue, getTrafficURI, getTrafficURINoContext, getWorkingDirectory, pathFromRequest, putSessionValue, removeSessionValue, setAlternateDestination, setLoggedIn, setOverrideDestination, setSessionValue, setSuccessor, setUser, setUserAndSuccessor
 
Methods inherited from class weblogic.servlet.jsp.JspBase
_jspService, destroy, getServletConfig, getServletInfo, init, jspDestroy, jspInit, service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected static final boolean debug
Whether debug mode is on. Facilitates debug output for JSP pages.
Constructor Detail

ToolsJspBase

public ToolsJspBase()
Method Detail

fixupRelativeURL

public static java.lang.String fixupRelativeURL(java.lang.String aURL,
                                                javax.servlet.http.HttpServletRequest aRequest)
With the system using jsp:forward the relative directories may not be set employed correctly. Use this method to fixup relative URLs so that they become fully qualified. For example if you are referring to an image in your JSP page as img src="images/dummy.gif", the system may not be able to find it. Change your code to img="<%=fixupRelativeURL("images/dummy.gif")%>. This will ensure that your URL is correct, and not stop you from moving your directory structures around as you wish.
Parameters:
aURL - the url to fixup.
aRequest - the associated request.
Returns:
String the fixed-up URL.

reconcileFile

public static java.lang.String reconcileFile(javax.servlet.http.HttpServletRequest aRequest,
                                             java.lang.String aURL,
                                             boolean addWebappContext)
Call the reconcileFile method specifying whether any webapp context should be included. If requested, any webapp context available will be prepended to the result. Otherwise, it will be suppressed. Server-side operations do not need the context. Client-side path information does. This method may be used for non-webapps and war/non-war webapps.
Parameters:
aURL - the file to check for. This can be a fully qualified url, in which case nothing happens.
aRequest - the request, because we need the repository directory as well as the hashmap associated to the current servlet.
addWebappContext - a flag indicating whether to add or suppress any available webapp context
Returns:
String the reconciled file name. Will return aURL if it is fully qualified or can be found in the working directory.

reconcileFile

public static java.lang.String reconcileFile(javax.servlet.http.HttpServletRequest aRequest,
                                             java.lang.String aURL)
Check to see if the file exists in the working directory of the FlowManager application. It will only check if it is not a fully qualified url (from the document root). If it is in the working directory it will return the file prepended with the working directory. Otherwise it will force it to point to the repository directory structure. Note: calls to reconcileFile for any browser client-side path information must have the context, but calls for server-side processing (i.e. jsp:include) cannot have the context. For this reason, an assumption is made that the only server-side, reconcileFile() calls will be for ".jsp" files. If this is not true, use the other variant of reconcileFile.
Parameters:
aURL - the file to check for. This can be a fully qualified url, in which case nothing happens.
aRequest - the request, because we need the repository directory as well as the hashmap associated to the current servlet.
Returns:
String the reconciled file name. Will return aURL if it is fully qualified or can be found in the working directory.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved