struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hookom, Jacob" <Jacob.Hoo...@redline.mckhboc.com>
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
http://www.mckesson.com

-----Original Message-----
From: Mario Signorelli [mailto:mario.signorelli@pimm.it]
Sent: Friday, July 18, 2003 5:43 AM
To: struts-user@jakarta.apache.org
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
PIMM S.R.L.
via Lampugnano, 144
20151 - Milano
Tel. - 02/48206371
Fax. - 02/48206437

     

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message