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

  • SEARCH
  • Home
  • 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 6690769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:40:30+00:00 2026-05-26T05:40:30+00:00

I have developed web app based on Jboss tutorial examples. In result login page

  • 0

I have developed web app based on Jboss tutorial examples. In result login page sending me to login-error page. I use DatabaseServerLoginModule. If replace to UsersRolesLoginModule then login is fine.

Google suggest me post http://community.jboss.org/message/141999#141999 but have not answer there.

Jboss log:

I think problem in 11:37:09,128 DEBUG [[jsp]:debug] Disabling the response for futher output

11:37:08,902 DEBUG [CoyoteAdapter:debug]  Requested cookie session id is 3793E0F8FF02F043D9DCF5D98A85AFC6
11:37:08,903 DEBUG [AuthenticatorBase:debug] Security checking request GET /example2/
11:37:08,903 DEBUG [RealmBase:debug]   Checking constraint 'SecurityConstraint[All resources]' against GET /index.jsp --> true
11:37:08,904 DEBUG [RealmBase:debug]   Checking constraint 'SecurityConstraint[All resources]' against GET /index.jsp --> true
11:37:08,904 DEBUG [AuthenticatorBase:debug]  Calling hasUserDataPermission()
11:37:08,904 DEBUG [RealmBase:debug]   User data constraint has no restrictions
11:37:08,956 DEBUG [JNDIBasedSecurityManagement:debug] Creating SDC for domain=JaasDbRealm
11:37:08,957 DEBUG [JaasDbRealm:debug] CallbackHandler: org.jboss.security.auth.callback.JBossCallbackHandler@4437d3
11:37:08,958 DEBUG [JaasDbRealm:debug] CachePolicy set to: org.jboss.util.TimedCachePolicy@254fb0
11:37:08,959 DEBUG [JNDIBasedSecurityManagement:debug] setCachePolicy, c=org.jboss.util.TimedCachePolicy@254fb0
11:37:09,037 DEBUG [AuthenticatorBase:debug]  Calling authenticate()
11:37:09,039 DEBUG [FormAuthenticator:debug] Save request in session '81BC14FA6517824ADDE56EDAEC9EA0C6'
11:37:09,128 DEBUG [[jsp]:debug]  Disabling the response for futher output
11:37:09,134 DEBUG [AuthenticatorBase:debug]  Failed authenticate() test
11:37:12,885 DEBUG [CoyoteAdapter:debug]  Requested cookie session id is 81BC14FA6517824ADDE56EDAEC9EA0C6
11:37:12,886 DEBUG [AuthenticatorBase:debug] Security checking request POST /example2/j_security_check
11:37:12,887 DEBUG [FormAuthenticator:debug] Authenticating username 'admin'
11:37:13,035 DEBUG [[jsp]:debug]  Disabling the response for futher output
11:37:13,036 DEBUG [AuthenticatorBase:debug]  Failed authenticate() test ??/example2/j_security_check

My conf:

login-config.xml

 <application-policy name = "JaasDbRealm">
        <authentication>
            <login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
             flag = "required">

<module-option name="dsJndiName">jdbc/MysqlDS</module-option>
                <module-option name="principalsQuery">select passwd from Users username where username=?</module-option>
                <module-option name="rolesQuery">select userRoles, 'Roles' from UserRoles where username=?</module-option>
            </login-module>
        </authentication>
    </application-policy>

jboss-web.xml

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
    <security-domain>java:/jaas/JaasDbRealm</security-domain>
</jboss-web>

web.xml

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>All resources</web-resource-name>
            <description>Protects all resources</description>
            <url-pattern>/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>admin</role-name>
        </auth-constraint>
    </security-constraint>
    <login-config>
        <auth-method>FORM</auth-method>
        <form-login-config>
            <form-login-page>/login.jsp</form-login-page>
            <form-error-page>/error.jsp</form-error-page>
        </form-login-config>
    </login-config>
    <security-role>
        <role-name>admin</role-name>
    </security-role>

login.jsp

<form name="loginForm" method="post" action="j_security_check">
            <table>
                <tr>
                    <td>User Name:</td>
                    <td><input type="text" name="j_username"></td>
                </tr>
                <tr>
                    <td>User Password:</td>
                    <td><input type="text" name="j_password"></td>
                </tr>
                <tr colspan="2">
                    <td><input type="submit" value="login"></td>
                </tr>
            </table>
        </form>
  • 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-26T05:40:30+00:00Added an answer on May 26, 2026 at 5:40 am

    Problem has been found. Fail datasource JNDI name jdbc/MysqlDS

    Repaced to java:jdbc/MysqlDS and working OK.

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

Sidebar

Related Questions

I have developed a web app using a webservice. Everything works fine in the
I currently have a form based login in my application which is developed on
I have an already developed web application based on struts 1.2 which contains jsp
We have an in house developed web-based admin console that uses a combination of
I have developed a web app a year ago aimed to work with IIS6.
I have developed a web based application which allows a client/user to upload a
On the Spring-based web app project I'm on now, the developers have written two
Hello I am a Java web app developer I have a problem, I would
I have developed a web application using Netbeans 6.7 and Ant. The webapp works,
Im trying to develop my first ASP.NET MVC web app and have run into

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.