There is an implemetation provided in struts validator frame work to check whether it is email or not. There is an "isEmail()" method available in org.apache.commons.validator.GenericValidator class which is available in commons-validator.jar, can be downloadable from struts.apache.org

Is there a way to check for space inside a String value? I am validating email address in my application and need to make sure I have a some what valid email address

Assuming we are talking about addresses for SMTP, valid SMTP email addresses can have spaces in them.

Also the class InternetAddress packaged with JavaMail will validate an address as part of its constructor, unless you tell it otherwise. So if you are eventually using the address to send mail, then this is a perhaps a more sensible route than including extra 3rd party dependancies. [ November 23, 2004: Message edited by: Paul Sturrock ]