UIX 2.2.16

oracle.cabo.share.util
Class ContextUtils

java.lang.Object
  |
  +--oracle.cabo.share.util.ContextUtils

public class ContextUtils
extends java.lang.Object

Utility methods relating to the ServletContext API.


Constructor Summary
ContextUtils()
           
 
Method Summary
static java.net.URL getResource(javax.servlet.ServletContext context, java.lang.String url)
          Wrapper for ServletContext.getResource() which is safe to call when running in Servlet 2.0 engines.
static void setAttribute(javax.servlet.ServletContext context, java.lang.String key, java.lang.Object value)
          Wrapper for ServletContext.setAttribute() which is safe to call when running in Servlet 2.0 engines - but those engines will trigger an UnsupportedOperationException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextUtils

public ContextUtils()
Method Detail

getResource

public static java.net.URL getResource(javax.servlet.ServletContext context,
                                       java.lang.String url)
                                throws java.net.MalformedURLException
Wrapper for ServletContext.getResource() which is safe to call when running in Servlet 2.0 engines. Returns the results of ServletContext.getResource() for the specified url, or null if running against the Servlet 2.0 API.

setAttribute

public static void setAttribute(javax.servlet.ServletContext context,
                                java.lang.String key,
                                java.lang.Object value)
Wrapper for ServletContext.setAttribute() which is safe to call when running in Servlet 2.0 engines - but those engines will trigger an UnsupportedOperationException.

UIX 2.2.16