Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » jasper » runtime » [javadoc | source]
org.apache.jasper.runtime
public class: JspRuntimeLibrary [javadoc | source]
java.lang.Object
   org.apache.jasper.runtime.JspRuntimeLibrary
Bunch of util methods that are used by code generated for useBean, getProperty and setProperty. The __begin, __end stuff is there so that the JSP engine can actually parse this file and inline them if people don't want runtime dependencies on this class. However, I'm not sure if that works so well right now. It got forgotten at some point. -akv
Nested Class Summary:
protected static class  JspRuntimeLibrary.PrivilegedIntrospectHelper   
Method from org.apache.jasper.runtime.JspRuntimeLibrary Summary:
URLEncode,   coerce,   coerceToBoolean,   coerceToByte,   coerceToChar,   coerceToDouble,   coerceToFloat,   coerceToInt,   coerceToLong,   coerceToShort,   convert,   createTypedArray,   decode,   escapeQueryString,   getContextRelativePath,   getReadMethod,   getThrowable,   getValueFromBeanInfoPropertyEditor,   getValueFromPropertyEditorManager,   getWriteMethod,   handleGetProperty,   handleSetProperty,   handleSetProperty,   handleSetProperty,   handleSetProperty,   handleSetProperty,   handleSetProperty,   handleSetProperty,   handleSetProperty,   handleSetProperty,   handleSetPropertyExpression,   include,   introspect,   introspecthelper,   toString,   toString,   toString,   toString,   toString,   toString,   toString,   toString,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jasper.runtime.JspRuntimeLibrary Detail:
 public static String URLEncode(String s,
    String enc) 
    URL encodes a string, based on the supplied character encoding. This performs the same function as java.next.URLEncode.encode in J2SDK1.4, and should be removed if the only platform supported is 1.4 or higher.
 public static Object coerce(String s,
    Class target) 
 public static boolean coerceToBoolean(String s) 
 public static byte coerceToByte(String s) 
 public static char coerceToChar(String s) 
 public static double coerceToDouble(String s) 
 public static float coerceToFloat(String s) 
 public static int coerceToInt(String s) 
 public static long coerceToLong(String s) 
 public static short coerceToShort(String s) 
 public static Object convert(String propertyName,
    String s,
    Class t,
    Class propertyEditorClass) throws JasperException 
 public static  void createTypedArray(String propertyName,
    Object bean,
    Method method,
    String[] values,
    Class t,
    Class propertyEditorClass) throws JasperException 
    Create a typed array. This is a special case where params are passed through the request and the property is indexed.
 public static String decode(String encoded) 
    Decode an URL formatted string.
 public static String escapeQueryString(String unescString) 
    Escape special shell characters.
 public static String getContextRelativePath(ServletRequest request,
    String relativePath) 
    Convert a possibly relative resource path into a context-relative resource path that starts with a '/'.
 public static Method getReadMethod(Class beanClass,
    String prop) throws JasperException 
 public static Throwable getThrowable(ServletRequest request) 
    Returns the value of the javax.servlet.error.exception request attribute value, if present, otherwise the value of the javax.servlet.jsp.jspException request attribute value. This method is called at the beginning of the generated servlet code for a JSP error page, when the "exception" implicit scripting language variable is initialized.
 public static Object getValueFromBeanInfoPropertyEditor(Class attrClass,
    String attrName,
    String attrValue,
    Class propertyEditorClass) throws JasperException 
 public static Object getValueFromPropertyEditorManager(Class attrClass,
    String attrName,
    String attrValue) throws JasperException 
 public static Method getWriteMethod(Class beanClass,
    String prop) throws JasperException 
 public static Object handleGetProperty(Object o,
    String prop) throws JasperException 
 public static  void handleSetProperty(Object bean,
    String prop,
    Object value) throws JasperException 
 public static  void handleSetProperty(Object bean,
    String prop,
    int value) throws JasperException 
 public static  void handleSetProperty(Object bean,
    String prop,
    short value) throws JasperException 
 public static  void handleSetProperty(Object bean,
    String prop,
    long value) throws JasperException 
 public static  void handleSetProperty(Object bean,
    String prop,
    double value) throws JasperException 
 public static  void handleSetProperty(Object bean,
    String prop,
    float value) throws JasperException 
 public static  void handleSetProperty(Object bean,
    String prop,
    char value) throws JasperException 
 public static  void handleSetProperty(Object bean,
    String prop,
    byte value) throws JasperException 
 public static  void handleSetProperty(Object bean,
    String prop,
    boolean value) throws JasperException 
 public static  void handleSetPropertyExpression(Object bean,
    String prop,
    String expression,
    PageContext pageContext,
    ProtectedFunctionMapper functionMapper) throws JasperException 
    Use proprietaryEvaluate public static void handleSetPropertyExpression(Object bean, String prop, String expression, PageContext pageContext, VariableResolver variableResolver, FunctionMapper functionMapper ) throws JasperException { try { Method method = getWriteMethod(bean.getClass(), prop); method.invoke(bean, new Object[] { pageContext.getExpressionEvaluator().evaluate( expression, method.getParameterTypes()[0], variableResolver, functionMapper, null ) }); } catch (Exception ex) { throw new JasperException(ex); } }
 public static  void include(ServletRequest request,
    ServletResponse response,
    String relativePath,
    JspWriter out,
    boolean flush) throws IOException, ServletException 
    Perform a RequestDispatcher.include() operation, with optional flushing of the response beforehand.
 public static  void introspect(Object bean,
    ServletRequest request) throws JasperException 
 public static  void introspecthelper(Object bean,
    String prop,
    String value,
    ServletRequest request,
    String param,
    boolean ignoreMethodNF) throws JasperException 
 public static String toString(Object o) 
 public static String toString(byte b) 
 public static String toString(boolean b) 
 public static String toString(short s) 
 public static String toString(int i) 
 public static String toString(float f) 
 public static String toString(long l) 
 public static String toString(double d) 
 public static String toString(char c)