File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

Stuts Validation

charmy jain
Greenhorn

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



thanks
java bab
Greenhorn

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

thanks.
Joseph Erickson
Greenhorn

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>

    <field property="custUrl" depends="url">
    <arg0 key="customer.url"/>
    <var>
    <var-name>nofragments</var-name>
    <var-value>true</var-value>
    </var>
    <var>
    <var-name>schemes</var-name>
    <var-value>http,https,telnet,file</var-value>
    </var>
    </field>

    http://struts.apache.org/struts-doc-1.2.4/userGuide/dev_validator.html

    [ May 10, 2006: Message edited by: Joseph Erickson ]
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Stuts Validation