JBoss Community

JBoss-web.xml no longer read after moving root context.

created by Jeffrey Schultz in Beginner's Corner - View the full discussion

I am using JBoss 4.2.3 and have relocated the root context by defining a Context element in the jboss/server/profile/deploy/jboss-web.deployer/server.xml file. This allows me to move the root context into a folder within our application folder, which is managed by end-users. I am trying to setup security on a couple of static files within the root context by creating a web.xml and jboss-web.xml under the WEB-INF folder, but it seems that after I move the root context that the jboss-web.xml is no longer used. Note that this does work before I move the root context.

Is there something extra that I have to do if I move the root context? I also deleted the ROOT.war folder from the jboss-web.deployer folder, since it is now at another location.

 

web.xml

 

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Test</web-resource-name>
            <url-pattern>/status/Test1.html</url-pattern>
            <url-pattern>/status/Test2.html</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
        </web-resource-collection>

        <auth-constraint>
            <role-name>miuser</role-name>
        </auth-constraint>
    </security-constraint>

    <security-role>
        <description>A user </description>
        <role-name>miuser</role-name>
    </security-role>

    <login-config>
        <auth-method>BASIC</auth-method>
    </login-config>

 

jboss-web.xml

<jboss-web>
   
<security-domain>java:/jaas/MyPolicy</security-domain>
</jboss-web>

 

server.xml

<!-- ADD static images DIRECTORY -->
<Context path="/"
    docBase
="../../../app-data"
    reloadable
="true"
    allowLinking
="true">
</Context>

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community