struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gaurav Jain" <gaurav.j...@infobeans.com>
Subject RE: How i can check an string to be a correct web site format?
Date Tue, 28 Mar 2006 10:07:52 GMT

Hi,
You can use a validator rule "url" in validation.xml from
validator-rules.xml.

Or 

You can also use a regular expression as follows in validation.xml:-

<global>
		
  <constant>

    <constant-name>URL</constant-name>
	<constant-value>^http://([\w-]+\.)+[\w-]+(/[\w-
./?%&amp;=]*)?$</constant-value>
  </constant>
		
</global>

-----Original Message-----
From: Legolas Woodland [mailto:legolas.w@gmail.com] 
Sent: Wednesday, March 29, 2006 2:09 AM
To: Struts Users Mailing List
Subject: How i can check an string to be a correct web site format?

Hi
Thank you for reading my post.
i want to check an string to see whether it is a correct web site name 
or not.
I know that i should use regular expression , but i do not know how i 
should do this , can some one help me with this ?

Thanks

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



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


Mime
View raw message