|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.servlet.jsp.JspBase | +--com.beasys.commerce.axiom.jsp.JspBase
Acts as a base class for all JSP pages that use a JspServiceManager.
Prescribes methods which faciltate p13n run-time operation. Allows access
to the JspServiceManager
URI, the application's working
directory, the home page, and the current page.
Also, facilitates management of the application's run-time session, by providing
convenience methods for setting and getting session values, and
setting and getting JSP destinations. Implements several constants
interfaces to reduce the burden of constant referencing by JSP pages.
Field Summary | |
static java.lang.String |
DESTINATION_TAG
A property name denoting the destination to be used with form submission. |
Constructor Summary | |
JspBase()
|
Method Summary | |
static java.lang.String |
cnvrtSC(java.lang.String theInpStr)
Given a string, substitute HTML entities for HTML special characters. |
static java.lang.String |
createURL(javax.servlet.http.HttpServletRequest aRequest,
java.lang.String destination,
java.lang.String parameters)
Creates a JspServiceManager application URL from the given request. |
static java.lang.String |
escapeQuotes(java.lang.String input)
Escape single-quotes from a string to make them javascript-friendly (this also runs the string through cnvrtSC) |
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 |
getCurrentPage(javax.servlet.http.HttpServletRequest aRequest)
Returns the currently active JspServiceManager application page. |
static java.lang.String |
getDefaultDestination(javax.servlet.http.HttpServletRequest aRequest)
Get the default destination specified in the registration. |
static java.lang.String |
getDefaultSuccessor(javax.servlet.http.HttpServletRequest aRequest)
Get the default succssor (group) that was specified in the servlet registration. |
static java.lang.String |
getHomePage(javax.servlet.http.HttpServletRequest aRequest)
Retrieves the JspServiceManager application home page specified by the start-up parameters for the p13n app. |
static boolean |
getLoggedIn(javax.servlet.http.HttpServletRequest aRequest)
Indicates whether a user is currently logged into the JspServiceManager app. |
static java.lang.String |
getRepositoryDirectory(javax.servlet.http.HttpServletRequest aRequest)
Get the Portal repository directory specified in the registration. |
static java.lang.String |
getRequestURI(javax.servlet.http.HttpServletRequest aRequest)
Retrieves the request URI. |
static java.lang.Object |
getSessionValue(java.lang.String aName,
javax.servlet.http.HttpServletRequest aRequest)
Retrieves a session value. |
static java.lang.String |
getTrafficURI(javax.servlet.http.HttpServletRequest aRequest)
Retrieves the URI of the JspServiceManager . |
static java.lang.String |
getWorkingDirectory(javax.servlet.http.HttpServletRequest aRequest)
Get the working directory specified in the registration. |
static java.lang.String |
pathFromRequest(javax.servlet.http.HttpServletRequest aRequest)
Get the fully-qualified path of the request URI. |
static void |
putSessionValue(java.lang.String aName,
java.lang.Object aValue,
javax.servlet.http.HttpServletRequest aRequest)
Sets a session value. |
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 JspServiceManager application. |
static void |
removeSessionValue(java.lang.String aName,
javax.servlet.http.HttpServletRequest aRequest)
Removes a session value. |
static void |
setAlternateDestination(javax.servlet.http.HttpServletRequest req,
java.lang.String dest)
Deprecated. use setOverrideDestination |
static void |
setLoggedIn(javax.servlet.http.HttpServletRequest aRequest,
javax.servlet.http.HttpServletResponse aResponse,
boolean aBool)
Sets the logged-in state for this JspServiceManager application. |
static void |
setOverrideDestination(javax.servlet.http.HttpServletRequest req,
java.lang.String dest)
Sets the alternate forward variable. |
static void |
setSessionValue(java.lang.String aName,
java.lang.Object aValue,
javax.servlet.http.HttpServletRequest aRequest)
Sets a session value. |
static void |
setSuccessor(java.lang.String aSuccessor,
javax.servlet.http.HttpServletRequest aRequest)
Takes a group name and puts it into the session as the value of the SERVICEMANAGER_SUCCESSOR |
static void |
setUser(java.lang.String aUser,
javax.servlet.http.HttpServletRequest aRequest)
Takes a user name and puts it into the session as the value of the SERVICEMANAGER_USER |
static void |
setUserAndSuccessor(java.lang.String aUser,
java.lang.String aSuccessor,
javax.servlet.http.HttpServletRequest aRequest)
Takes a user name and a group name and puts them into the session as the values of the SERVICEMANAGER_USER and SERVICEMANAGER_SUCCESSOR, respectively |
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 |
Field Detail |
public static final java.lang.String DESTINATION_TAG
Constructor Detail |
public JspBase()
Method Detail |
public static java.lang.String getTrafficURI(javax.servlet.http.HttpServletRequest aRequest)
JspServiceManager
.aRequest
- the javax.servlet.http.HttpServletRequest
from which
the JspServiceManager
is obtained.String
the URI of the JspServiceManager
.
If you are not using a Service Manager, then this will return null;public static java.lang.String getWorkingDirectory(javax.servlet.http.HttpServletRequest aRequest)
aRequest
- javax.servlet.http.HttpServletRequest
from which
the JspServiceManager
is obtained.String
the value of the working directory of the
current p13n app instantiationpublic static java.lang.String getRepositoryDirectory(javax.servlet.http.HttpServletRequest aRequest)
aRequeset
- javax.servlet.http.HttpServletRequest
from which
the JspServiceManager
is obtained.String
the value of the working directory of the
current portal instantiationpublic static java.lang.String getDefaultDestination(javax.servlet.http.HttpServletRequest aRequest)
the
- javax.servlet.http.HttpServletRequest
corresponding
to the JspServiceManager
String
the default destination of the p13n app instantiationpublic static java.lang.String getRequestURI(javax.servlet.http.HttpServletRequest aRequest)
null
or empty, the request.getRequestURI() method wil be
called.the
- javax.servlet.http.HttpServletRequest
for which the URI
is soughtpublic static java.lang.String pathFromRequest(javax.servlet.http.HttpServletRequest aRequest)
aRequest
- the javax.servlet.http.HttpServletRequest
for which
the fully-qualified path is soughtString
the fully qualified path from the requestpublic static java.lang.String createURL(javax.servlet.http.HttpServletRequest aRequest, java.lang.String destination, java.lang.String parameters)
aRequest
- The javax.servlet.http.HttpServletRequest
used to create the full URL.destination
- The desired destination. If the destination is not fully qualified (assumed relative), it will
query the request to prepend the path. NOTE: do not include a query string in the destination.parameters
- The parameters. These will be appended to the URL.String
the created URLpublic static java.lang.String fixupRelativeURL(java.lang.String aURL, javax.servlet.http.HttpServletRequest aRequest)
aURL
- the url to fixup.aRequest
- the associated request.String
the fixed-up URL.public static java.lang.String reconcileFile(javax.servlet.http.HttpServletRequest aRequest, java.lang.String aURL)
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.public static java.lang.String getHomePage(javax.servlet.http.HttpServletRequest aRequest)
aRequest
- the http.servlet.http.HttpServletRequest
from which
p13n app information is obtainedString
the JspServiceManager home pagepublic static java.lang.String getCurrentPage(javax.servlet.http.HttpServletRequest aRequest)
aRequest
- the http.servlet.http.HttpServletRequest
from which
JspServiceManager information is obtainedString
the current p13n app pagepublic static void setAlternateDestination(javax.servlet.http.HttpServletRequest req, java.lang.String dest)
DESTINATION_TAG
property upon form submission.req
- the javax.servlet.http.HttpServletRequest
associated with
the form submissiondestination
- the JSP page which ultimate processes the requestpublic static void setOverrideDestination(javax.servlet.http.HttpServletRequest req, java.lang.String dest)
DESTINATION_TAG
property upon form submission.req
- the javax.servlet.http.HttpServletRequest
associated with
the form submissiondest
- the JSP page which ultimate processes the requestpublic static void setLoggedIn(javax.servlet.http.HttpServletRequest aRequest, javax.servlet.http.HttpServletResponse aResponse, boolean aBool)
aRequest
- the javax.servlet.http.HttpServletRequest
used
to retrieve the session for updatethe
- corresponding javax.servlet.http.HttpServletResponse
aBool
- designates the true
or false
logged-in valuepublic static boolean getLoggedIn(javax.servlet.http.HttpServletRequest aRequest)
the
- JspServiceManager app javax.servlet.http.HttpServletRequest
boolean
whether a user is logged inpublic static java.lang.Object getSessionValue(java.lang.String aName, javax.servlet.http.HttpServletRequest aRequest)
JspServiceManager
to avoid naming collisions
when multiple JspServiceManager
objects share the same
session.aName
- the name of the session property whose value is soughtaRequest
- the javax.servlet.http.HttpServletRequest
from
which the session is obtainedObject
the new property valuepublic static void setSessionValue(java.lang.String aName, java.lang.Object aValue, javax.servlet.http.HttpServletRequest aRequest)
JspServiceManager
to avoid naming collisions
when multiple JspServiceManager
objects share the same
session.aName
- the name of the session property whose value is to be setaValue
- the new property valueaRequest
- the javax.servlet.http.HttpServletRequest
from
which the session is obtainedpublic static void putSessionValue(java.lang.String aName, java.lang.Object aValue, javax.servlet.http.HttpServletRequest aRequest)
JspServiceManager
to avoid naming collisions
when multiple JspServiceManager
objects share the same
session.aName
- the name of the session property whose value is to be setaValue
- the new property valueaRequest
- the javax.servlet.http.HttpServletRequest
from
which the session is obtainedpublic static void removeSessionValue(java.lang.String aName, javax.servlet.http.HttpServletRequest aRequest)
JspServiceManager
to avoid naming collisions
when multiple JspServiceManager
objects share the same
session.aName
- the name of the session property to be removedaValue
- the new property valueaRequest
- the javax.servlet.http.HttpServletRequest
from
which the session is obtainedpublic static java.lang.String cnvrtSC(java.lang.String theInpStr)
theInpStr
- the string to be convertedString
the string with special chars translatedpublic static void setUser(java.lang.String aUser, javax.servlet.http.HttpServletRequest aRequest)
aUser
- the user nameaRequest
- the javax.servlet.http.HttpServletRequest
from
which the session is obtainedpublic static void setSuccessor(java.lang.String aSuccessor, javax.servlet.http.HttpServletRequest aRequest)
aSuccessor
- the group nameaRequest
- the javax.servlet.http.HttpServletRequest
from
which the session is obtainedpublic static void setUserAndSuccessor(java.lang.String aUser, java.lang.String aSuccessor, javax.servlet.http.HttpServletRequest aRequest)
aUser
- the user nameaSuccessor
- the group nameaRequest
- the javax.servlet.http.HttpServletRequest
from
which the session is obtainedpublic static java.lang.String getDefaultSuccessor(javax.servlet.http.HttpServletRequest aRequest)
aRequest.
- public static java.lang.String escapeQuotes(java.lang.String input)
intput
- the String to escape
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |