Help in URL Redirection between Apache and JBoss

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Parvathy
    New Member
    • Jan 2013
    • 1

    Help in URL Redirection between Apache and JBoss

    Hi..
    I am new to Apache.. I face issues in redirection of pages between Apache and JBOSS.
    The page is working fine when i hit the URL https://example.com/test.
    My requirement is to land in the same page when i hit the URL https://example.com without providing the context root "/test".
    Kindly help in resolving this issue.
  • gutts009
    New Member
    • Dec 2013
    • 10

    #2
    I would give jboss another chance for doing http authentication.
    I'll tell you what files you should modify:

    Code:
    * web.xml: say wich resources should be secured and how
    
     	<security-constraint>
    <display-name>acceso seguro</display-name>
    <web-resource-collection>
    <web-resource-name>fullSite</web-resource-name>
    <url-pattern>*.jsp</url-pattern>
    <url-pattern>*.do</url-pattern>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    </web-resource-collection>
    <auth-constraint>
    <role-name>normalUser</role-name>
    </auth-constraint>
    <user-data-constraint>
    <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
    </security-constraint>
    
    <login-config>
    <auth-method>FORM</auth-method>
    <realm-name>myLogin</realm-name>
    <form-login-config>
    <form-login-page>/logon/logon.jsp</form-login-page>
    <form-error-page>/logon/logonError.html</form-error-page>
    </form-login-config>
    </login-config>
    You should modify this to do http authentication.
    
    <security-role>
    <role-name>normalUser</role-name>
    </security-role>
    
    * jboss-web.xml (located in the same directory as web.xml
    
    <jboss-web>
          <security-domain>java:/jaas/mySecurityDomain</security-domain>	</jboss-web>
    
    * login-config.xml (in your application jboss conf directory)
    
    <application-policy name="mySecurityDomain">
    <authentication>
                <login-module
    code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
    flag="required">
    <module-option name="dsJndiName">java:/genesisDS</module-option>
    <module-option name="principalsQuery">select password from Usuario where userid=?</module-option>
    <module-option name="rolesQuery">select rolId, 'Roles' from Usuario_Rol where userId=?</module-option>
    <module-option name="hashAlgorithm">SHA</module-option>
    <module-option name="hashEncoding">base64</module-option>
    <module-option name="hashCharset">UTF-8</module-option>
    </login-module>
           </authentication>
    </application-policy>
    If you set those files correctly you should get the http login window, managed directly by jboss (tomcat running inside jboss actually).

    Thanks
    Jeff Jones
    Lead -
    Last edited by Rabbit; Dec 17 '13, 04:24 PM. Reason: Signatures are not allowed on Bytes. Please use [CODE] and [/CODE] tags when posting code or formatted data.

    Comment

    Working...