struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hookom, Jacob" <>
Subject RE: how to solve case sensitive variable into a criteria
Date Fri, 18 Jul 2003 13:29:24 GMT
You can do a couple of things:

Turn off case sensitivity on the server (probably not a good idea)

Crit.addEqualTo("USERNAME", username.toLowerCase());

Jacob Hookom
Senior Analyst/Programmer
McKesson Medical-Surgical
Golden Valley, Minnesota

-----Original Message-----
From: Mario Signorelli []
Sent: Friday, July 18, 2003 5:43 AM
Subject: how to solve case sensitive variable into a criteria

Hi to all

I'have a problem with case sensitive variable into a criteria

Criteria crit = new Criteria();
crit.addEqualTo("USERNAME", username);
crit.addEqualTo("PASSWORD", password);

Query query = new QueryByCriteria(Utenti.class, crit);
Collection lista = broker.getCollectionByQuery(query);

Into the db the username is 'a' and the password 'a' and if I put in the
text login 'A' e password 'A' it doesn't find the user.
Is there any method to solve this case sensitive problem?

Thanks a lot
Mario Signorelli
via Lampugnano, 144
20151 - Milano
Tel. - 02/48206371
Fax. - 02/48206437


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message