File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Stuts Validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Stuts Validation" Watch "Stuts Validation" New topic

Stuts Validation

charmy jain

Joined: Dec 17, 2005
Posts: 19
Is possible URL Validation into Struts FrameWork ?

java bab

Joined: May 09, 2006
Posts: 2
i think it's not possible.

Joseph Erickson

Joined: May 05, 2006
Posts: 10
If you're using the Validator, you can use the following validation in your validator.xml

url - validates url format. Has four optional variables (allowallschemes, allow2slashes, nofragments and schemes) which can be used to configure this validator.
  • allowallschemes specifies whether all schemes are allowed. Valid values are true or false (default is false). If this is set to true then the schemes variable is ignored.
  • allow2slashes specifies whether double '/' characters are allowed. Valid values are true or false (default is false).
  • nofragments specifies whether fragements are allowed. Valid values are true or false (default is false - i.e. fragments are allowed).
  • schemes - use to specify a comma separated list of valid schemes. If not specified then the defaults are used which are http, https and ftp.

  • <field property="custUrl" depends="url">
    <arg0 key="customer.url"/>

    <field property="custUrl" depends="url">
    <arg0 key="customer.url"/>

    [ May 10, 2006: Message edited by: Joseph Erickson ]
    I agree. Here's the link:
    subject: Stuts Validation
    It's not a secret anymore!