You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Antonio Petrelli (JIRA)" <ji...@apache.org> on 2008/07/23 14:26:06 UTC
[jira] Closed: (SB-108) TilesAccess won't set context attributes in
Jetty 5.1.10
[ https://issues.apache.org/struts/browse/SB-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antonio Petrelli closed SB-108.
-------------------------------
Resolution: Not A Problem
Please try to use the latest version of Tiles:
http://tiles.apache.org/download.html
And please, if you still want to open an issue, note your complete environment (JDK, Jetty version, operating system) by creating a new issue at this project:
https://issues.apache.org/struts/browse/TILES
> 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.