jfun.yan.web
Class WebUtils

java.lang.Object
  extended by jfun.yan.web.WebUtils

public class WebUtils
extends java.lang.Object

Web integration related utilities.

Author:
Ben Yu Jan 17, 2006 1:24:11 PM

Field Summary
static java.lang.String DEFAULT_SERVLET_CONTEXT_PROPERTY
          The default property name for receiving ServletContext instance.
 
Constructor Summary
WebUtils()
           
 
Method Summary
static Component setPossibleServletContext(Component c, java.lang.String name, ArgumentsAndPropertiesNut nut)
          Wrap a Component to set the service object identified by YanLoader.SERVLET_CONTEXT_KEY to the specified property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SERVLET_CONTEXT_PROPERTY

public static final java.lang.String DEFAULT_SERVLET_CONTEXT_PROPERTY
The default property name for receiving ServletContext instance.

See Also:
Constant Field Values
Constructor Detail

WebUtils

public WebUtils()
Method Detail

setPossibleServletContext

public static final Component setPossibleServletContext(Component c,
                                                        java.lang.String name,
                                                        ArgumentsAndPropertiesNut nut)
Wrap a Component to set the service object identified by YanLoader.SERVLET_CONTEXT_KEY to the specified property.

Nothing happens if the property cannot be found, or if the property type doesn't match or if the property is already explicitly specified in the tag or if the property is implied by a wildcard.

Parameters:
c - The Component object to wrap.
name - the property name.
nut - the Nut object.
Returns:
the Component that's responsible for setting the property if any.