Error in form login

P

Piotre Ugrumov

Hi,
I created a login form, a user and a role.
When I try to access with the new user I receive a message tells me
that the username or password is wrong.

The form is:

<form method="POST" action="j_security_check">
<p><label>Username: <input type="text" name="j_username"
id="log" value="" size="20" /></label></p>
<p><label>Password: <input type="password" name="j_password"
id="login_password" value="" size="20" /></label></p>
<p>
<p class="submit">
<input type="submit" name="submit" id="submit" value="Login
&raquo;" tabindex="4" />
</p>
</form>



In the server.xml of tomcat I inserted this realm tag:


<Realm
className="org.apache.catalina.realm.JDBCRealm"
driverName="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc:eek:racle:thin:mad:test.test.it:1522:K4COL"
connectionName="test"
connectionPassword="test"
userTable="TPS11_USER"
userNameCol="TPS11_NAME"
userCredCol="TPS11_PASSWORD"
userRoleTable="TPS13_USER_ROLE"
roleNameCol="TPS12_CODE" />


I inserted in web.xml these lines of code:

<auth-constraint>
............
............
<role-name>visualizerreport</role-name>
</auth-constraint>

and

<security-role>
<role-name>visualizerreport</role-name>
</security-role>


The user I inserted is "drm".
I inserted the user in the table TPS11_USER, the role
"visualizerreport" in the table TPS12_ROLE and the mapping user-role
in the table TPS13_USER_ROLE.
The user exist, the role exist but when I try to login I receive the
previous error.
How can I see what is taken from the db?
Do I forget something?
Thanks, bye bye.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top