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

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 PortalServiceManager 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.


Fields inherited from class com.beasys.commerce.axiom.jsp.JspBase
DESTINATION_TAG
 
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.
 
Methods inherited from class com.beasys.commerce.axiom.jsp.JspBase
cnvrtSC, createURL, escapeQuotes, getCurrentPage, getDefaultDestination, getDefaultSuccessor, getHomePage, getLoggedIn, getRepositoryDirectory, getRequestURI, getSessionValue, getTrafficURI, 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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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)
Check to see if the file exists in the working directory. 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.
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