| java.lang.Object com.lutris.appserver.server.StandardAppUtil
StandardAppUtil | public class StandardAppUtil (Code) | | Static methods used by StandardApplication . These mostly are
used to manage sessions.
version: $Revision: 1.4 $ author: Mark Diekhans author: Richard Kunze |
ENHYDRA_SESSION_ID_COOKIE | final public static String ENHYDRA_SESSION_ID_COOKIE(Code) | | |
ENHYDRA_SESSION_ID_URL | final public static String ENHYDRA_SESSION_ID_URL(Code) | | |
bindSessionToClient | public static void bindSessionToClient(HttpPresentationComms comms) throws ApplicationException(Code) | | Associate a new StandardSession to a client cookie.
Parameters: comms - The presentations manager comms object with allrequest/response information in it. exception: ApplicationException - If address can't be obtained. |
encodeUrl | public static String encodeUrl(String url, String id)(Code) | | Encode a URL with a session identifier.
Parameters: url - The url to encode. Parameters: id - The session identifier to encode with the url. |
getRequestSession | public static Session getRequestSession(HttpPresentationComms comms) throws ApplicationException(Code) | | Determine if a session exists for this request. Does not validate that a
session is logged in.
Parameters: comms - The presentations manager comms object with allrequest/response information in it. The session object or null if a session cookie or matchingsession is not found. exception: ApplicationException - If address can't be obtained. |
getRequestSession | public static Session getRequestSession(ServletRequest request, Application application) throws ApplicationException(Code) | | This is a rarely used utility function. Give a raw ServletRequest, the
session cookie used to look up the session object that would be used with
the request if it were passed into the Enhydra framework. Returns null if
no cookie or session is found; a new session will not be created.
Currently this is only used to support the debugger.
Parameters: request - The raw request. Parameters: application - The application that will be servicing the request. The session object that would be used if the request were passedinto the Enhydra framework, or null if not found (no new sessionwill be created). |
pointsToPO | public static boolean pointsToPO(String url)(Code) | | Determine if a URL references a presentation object. Used for URL
rewriting to test if a session ID should be appended to a given URL.
Takes the cheap way out at the moment in that it simply returns true iff
(if and only if, for the non-mathematicians :-) the URL contains the
character sequence .po .
TODO: Implement a better check A safety check has been added by Petr
Stehlik on 2002/11/05 First, it strips a query and fragment parts of the
URL, since both the query and the fragment may contain ".po" that
confuses the original algorithm.
Example: http://www.server.org/path/file.html?query=page.po
The function now correctly returns false for the URL above.
Parameters: url - The url to check True if the URL points to a PO, false otherwise |
|
|