Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3321724
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:05:51+00:00 2026-05-17T23:05:51+00:00

We are testing using security realms with our web application. In test we will

  • 0

We are testing using security realms with our web application. In test we will be going against Microsoft Active Directory. Production will go against a custom realm. I have the working great in Tomcat, but can’t seem to get this working in WebSphere. I have created a Security Domain (foo-ldap) within WebSphere that can connect to the AD. For now I have applied foo-ldap to the server1 scope. I’m not getting redirected to authenticate.faces when hitting /servlet/LoginServlet.

Web.xml and Tomcat config included below.

Tomcat config:

    <Realm className="org.apache.catalina.realm.JNDIRealm"
        connectionURL="ldap://ActiveDirectorySrv:389"
        connectionName="CN=ldap user,CN=Users,DC=foo,DC=com"
        connectionPassword="Password1"
        referrals="follow"
        userBase="CN=Users,DC=foo,DC=com"
        userSearch="(&amp;(objectCategory=user)(sAMAccountName={0}))"
        userSubtree="true"
        userRoleName="memberOf"
        roleBase="CN=Users,DC=foo,DC=com"  
        roleSubtree="true"  
        roleName="cn"  
        roleSearch="(member={0})"/>

Web.xml

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Protected Area</web-resource-name>
            <url-pattern>/servlet/LoginServlet</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>Developers</role-name>
        </auth-constraint>
    </security-constraint>

    <login-config>
        <auth-method>FORM</auth-method>
        <form-login-config>
            <form-login-page>/authenticate.faces</form-login-page>
            <form-error-page>/loginFailed.faces</form-error-page>
        </form-login-config>
    </login-config>

    <security-role>
        <role-name>Developers</role-name>
    </security-role>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T23:05:51+00:00Added an answer on May 17, 2026 at 11:05 pm

    The issue I was running into was two fold.

    1. The configuration for the security context exists in the web.xml. It must be present the installed war at application install time. We had the config commented out so developers wouldn’t need to give credentials when debugging and I was trying to uncomment after deploying the war.

    2. You must map roles to your security realm at install time. We have a script that deploys the applications and without modification, the roles were not mapped and the ability to map roles after install was not available. Even installing from the ibm console site, you have to select detailed install and map groups at install time or the link to map is not available.

    Once I got the security installed and the redirect to the login page working, we had one other issue. I’m not sure if this is an issue with our JSF code or not, but I could not redirect to a page that used JSF within WebSphere (works fine with Tomcat). Our solution was to just use a jsp page for the authentication page.

    Hope this helps someone else.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been testing an application using my machine as a server, and everything's going
We're using WatiN for testing our UI, but one page (which is unfortunately not
I'm using browser automation for testing web sites but I need to verify HTTP
I'm using browser automation for testing web sites but I need to verify HTTP
I am doing regression testing using NUnit, WatiN and VB.net. What i am doing
I'm new to unit testing using nunit (and Java development in general). When creating
I created a new SharePoint portal for testing purposes using a manually added HOSTS
Where can I find either literature or video demonstration of unit testing applications using
I have started testing my UI using qUnit, so I need to simulate some
Using Visual Studio 2008 / C# / VS Unit Testing. I have a very

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.