public class JspRuntimeLibrary extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
JspRuntimeLibrary.PrivilegedIntrospectHelper |
Constructor and Description |
---|
JspRuntimeLibrary() |
Modifier and Type | Method and Description |
---|---|
static Object |
coerce(String s,
Class<?> target) |
static boolean |
coerceToBoolean(String s) |
static byte |
coerceToByte(String s) |
static char |
coerceToChar(String s) |
static double |
coerceToDouble(String s) |
static float |
coerceToFloat(String s) |
static int |
coerceToInt(String s) |
static long |
coerceToLong(String s) |
static short |
coerceToShort(String s) |
static Object |
convert(String propertyName,
String s,
Class<?> t,
Class<?> propertyEditorClass) |
static void |
createTypedArray(String propertyName,
Object bean,
Method method,
String[] values,
Class<?> t,
Class<?> propertyEditorClass)
Create a typed array.
|
static String |
escapeQueryString(String unescString)
Escape special shell characters.
|
static String |
getContextRelativePath(ServletRequest request,
String relativePath)
Convert a possibly relative resource path into a context-relative
resource path that starts with a '/'.
|
static Method |
getReadMethod(Class<?> beanClass,
String prop) |
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.
|
static Object |
getValueFromBeanInfoPropertyEditor(Class<?> attrClass,
String attrName,
String attrValue,
Class<?> propertyEditorClass) |
static Object |
getValueFromPropertyEditorManager(Class<?> attrClass,
String attrName,
String attrValue) |
static Method |
getWriteMethod(Class<?> beanClass,
String prop) |
static Object |
handleGetProperty(Object o,
String prop) |
static void |
handleSetProperty(Object bean,
String prop,
boolean value) |
static void |
handleSetProperty(Object bean,
String prop,
byte value) |
static void |
handleSetProperty(Object bean,
String prop,
char value) |
static void |
handleSetProperty(Object bean,
String prop,
double value) |
static void |
handleSetProperty(Object bean,
String prop,
float value) |
static void |
handleSetProperty(Object bean,
String prop,
int value) |
static void |
handleSetProperty(Object bean,
String prop,
long value) |
static void |
handleSetProperty(Object bean,
String prop,
Object value) |
static void |
handleSetProperty(Object bean,
String prop,
short value) |
static void |
handleSetPropertyExpression(Object bean,
String prop,
String expression,
PageContext pageContext,
ProtectedFunctionMapper functionMapper) |
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.
|
static void |
introspect(Object bean,
ServletRequest request) |
static void |
introspecthelper(Object bean,
String prop,
String value,
ServletRequest request,
String param,
boolean ignoreMethodNF) |
static String |
toString(boolean b) |
static String |
toString(byte b) |
static String |
toString(char c) |
static String |
toString(double d) |
static String |
toString(float f) |
static String |
toString(int i) |
static String |
toString(long l) |
static String |
toString(Object o) |
static String |
toString(short s) |
static String |
URLEncode(String s,
String enc)
URL encodes a string, based on the supplied character encoding.
|
public static Throwable getThrowable(ServletRequest request)
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 short coerceToShort(String s)
public static long coerceToLong(String s)
public static Object convert(String propertyName, String s, Class<?> t, Class<?> propertyEditorClass) throws JasperException
JasperException
public static void introspect(Object bean, ServletRequest request) throws JasperException
JasperException
public static void introspecthelper(Object bean, String prop, String value, ServletRequest request, String param, boolean ignoreMethodNF) throws JasperException
JasperException
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)
public static void createTypedArray(String propertyName, Object bean, Method method, String[] values, Class<?> t, Class<?> propertyEditorClass) throws JasperException
JasperException
public static String escapeQueryString(String unescString)
unescString
- The string to shell-escapepublic static Object handleGetProperty(Object o, String prop) throws JasperException
JasperException
public static void handleSetPropertyExpression(Object bean, String prop, String expression, PageContext pageContext, ProtectedFunctionMapper functionMapper) throws JasperException
JasperException
public static void handleSetProperty(Object bean, String prop, Object value) throws JasperException
JasperException
public static void handleSetProperty(Object bean, String prop, int value) throws JasperException
JasperException
public static void handleSetProperty(Object bean, String prop, short value) throws JasperException
JasperException
public static void handleSetProperty(Object bean, String prop, long value) throws JasperException
JasperException
public static void handleSetProperty(Object bean, String prop, double value) throws JasperException
JasperException
public static void handleSetProperty(Object bean, String prop, float value) throws JasperException
JasperException
public static void handleSetProperty(Object bean, String prop, char value) throws JasperException
JasperException
public static void handleSetProperty(Object bean, String prop, byte value) throws JasperException
JasperException
public static void handleSetProperty(Object bean, String prop, boolean value) throws JasperException
JasperException
public static Method getWriteMethod(Class<?> beanClass, String prop) throws JasperException
JasperException
public static Method getReadMethod(Class<?> beanClass, String prop) throws JasperException
JasperException
public static Object getValueFromBeanInfoPropertyEditor(Class<?> attrClass, String attrName, String attrValue, Class<?> propertyEditorClass) throws JasperException
JasperException
public static Object getValueFromPropertyEditorManager(Class<?> attrClass, String attrName, String attrValue) throws JasperException
JasperException
public static String getContextRelativePath(ServletRequest request, String relativePath)
request
- The servlet request we are processingrelativePath
- The possibly relative resource pathpublic static void include(ServletRequest request, ServletResponse response, String relativePath, JspWriter out, boolean flush) throws IOException, ServletException
request
- The servlet request we are processingresponse
- The servlet response we are processingrelativePath
- The relative path of the resource to be includedout
- The Writer to whom we are currently writingflush
- Should we flush before the include is processed?IOException
- if thrown by the included servletServletException
- if thrown by the included servletpublic static String URLEncode(String s, String enc)
s
- The String to be URL encoded.enc
- The character encodingCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.