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.
Why?
Explanation:
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).
Solution:
One of those solution can be made: