JBoss Community

Privileged attribute not supported on JBossweb

created by Boubaker Khanfir in JBoss AS 7 Development - View the full discussion

While attempting to install a software on Jboss EAP 6, I encoutered some problems related to the fact that "context.xml" isn't supported.

I wanted to use the attribute "privileged" in "context.xml" to get the ServletWrapper in my ContainerServlet. But it didn't work.






After reading the method "loadServlet" of the class "org.apache.catalina.core.StandardWrapper", I found this block:


            // Special handling for ContainerServlet instances

            if ((servlet instanceof ContainerServlet) &&

                  (isContainerProvidedServlet(actualClass) ||

                    ((Context)getParent()).getPrivileged() )) {

                ((ContainerServlet) servlet).setWrapper(this);



IMHO, that's a bug, because the new fork of JBoss AS7 from TC7 don't allow to change the "privileged" attribute context (by configuration or any other way), so it's always false, that's why we can't get this work as for TC7 and not in Jboss AS7 (EAP6).




One of those solution can be made:

  1. An alternative to set "privileged" via configuration (Init param or other).
  2. Remove the block "((Context)getParent()).getPrivileged()" from the above test statement.

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community