| java.lang.Object org.apache.jasper.runtime.JspRuntimeLibrary
JspRuntimeLibrary | public class JspRuntimeLibrary (Code) | | 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
author: Mandar Raje author: Shawn Bayern |
Method Summary | |
public static String | URLEncode(String s, String enc) URL encodes a string, based on the supplied character encoding. | 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) | public static void | createTypedArray(String propertyName, Object bean, Method method, String[] values, Class t, Class propertyEditorClass) Create a typed array. | public static String | decode(String encoded) Decode an URL formatted string.
Parameters: encoded - The string to decode. | 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) | 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. | public static Object | getValueFromBeanInfoPropertyEditor(Class attrClass, String attrName, String attrValue, Class propertyEditorClass) | public static Object | getValueFromPropertyEditorManager(Class attrClass, String attrName, String attrValue) | public static Method | getWriteMethod(Class beanClass, String prop) | public static Object | handleGetProperty(Object o, String prop) | public static void | handleSetProperty(Object bean, String prop, Object value) | public static void | handleSetProperty(Object bean, String prop, int value) | public static void | handleSetProperty(Object bean, String prop, short value) | public static void | handleSetProperty(Object bean, String prop, long value) | public static void | handleSetProperty(Object bean, String prop, double value) | public static void | handleSetProperty(Object bean, String prop, float value) | public static void | handleSetProperty(Object bean, String prop, char value) | public static void | handleSetProperty(Object bean, String prop, byte value) | public static void | handleSetProperty(Object bean, String prop, boolean value) | public static void | handleSetPropertyExpression(Object bean, String prop, String expression, PageContext pageContext, ProtectedFunctionMapper functionMapper) | public static void | include(ServletRequest request, ServletResponse response, String relativePath, JspWriter out, boolean flush) Perform a RequestDispatcher.include() operation, with optional flushing
of the response beforehand. | public static void | introspect(Object bean, ServletRequest request) | public static void | introspecthelper(Object bean, String prop, String value, ServletRequest request, String param, boolean ignoreMethodNF) | 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) |
URLEncode | public static String URLEncode(String s, String enc)(Code) | | 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.
Parameters: s - The String to be URL encoded. Parameters: enc - The character encoding The URL encoded String |
coerceToBoolean | public static boolean coerceToBoolean(String s)(Code) | | |
coerceToDouble | public static double coerceToDouble(String s)(Code) | | |
coerceToFloat | public static float coerceToFloat(String s)(Code) | | |
coerceToShort | public static short coerceToShort(String s)(Code) | | |
createTypedArray | public static void createTypedArray(String propertyName, Object bean, Method method, String[] values, Class t, Class propertyEditorClass) throws JasperException(Code) | | Create a typed array.
This is a special case where params are passed through
the request and the property is indexed.
|
decode | public static String decode(String encoded)(Code) | | Decode an URL formatted string.
Parameters: encoded - The string to decode. The decoded string. |
escapeQueryString | public static String escapeQueryString(String unescString)(Code) | | Escape special shell characters.
Parameters: unescString - The string to shell-escape The escaped shell string. |
getContextRelativePath | public static String getContextRelativePath(ServletRequest request, String relativePath)(Code) | | Convert a possibly relative resource path into a context-relative
resource path that starts with a '/'.
Parameters: request - The servlet request we are processing Parameters: relativePath - The possibly relative resource path |
getThrowable | public static Throwable getThrowable(ServletRequest request)(Code) | | 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.
|
handleSetPropertyExpression | public static void handleSetPropertyExpression(Object bean, String prop, String expression, PageContext pageContext, ProtectedFunctionMapper functionMapper) throws JasperException(Code) | | 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);
}
}
|
include | public static void include(ServletRequest request, ServletResponse response, String relativePath, JspWriter out, boolean flush) throws IOException, ServletException(Code) | | Perform a RequestDispatcher.include() operation, with optional flushing
of the response beforehand.
Parameters: request - The servlet request we are processing Parameters: response - The servlet response we are processing Parameters: relativePath - The relative path of the resource to be included Parameters: out - The Writer to whom we are currently writing Parameters: flush - Should we flush before the include is processed? exception: IOException - if thrown by the included servlet exception: ServletException - if thrown by the included servlet |
|
|