TilesAccess won't set context attributes in Jetty 5.1.10
--------------------------------------------------------
Key: SB-108
URL: https://issues.apache.org/struts/browse/SB-108
Project: Struts Sandbox
Issue Type: Bug
Components: Tiles
Reporter: Dmitry
The code for setting a context attribute in the TilesAccess class is as follows:
private static void setAttribute(Object context, String name, Object value)
throws TilesException {
try {
Class<?> contextClass = context.getClass();
Method attrMethod = contextClass.getMethod("setAttribute",
String.class, Object.class);
attrMethod.invoke(context, name, value);
} catch (Exception e) {
throw new TilesException("Unable to set attribute for specified
context: '" + context + "'");
}
}
The line
attrMethod.invoke(context, name, value);
throws an IllegalAccessException if Tiles are used inside a Jetty 5.1.10. This
happens because Jetty's implementation of the javax.servlet.ServletContext
interface is an inner class without the public modifier.
The same applies to getAttribute() and removeAttribute() methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.