java.net.URL Question

Discussion in 'Java' started by Lee H, Sep 9, 2004.

  1. Lee H

    Lee H Guest

    Hi,
    Is there an easy way of verifying that a given string is a valid URL/URI
    (In other words, that it is according to the syntax specified in
    rfc2396. I don't mean to check if the resource exists, or even if the
    host exist, just that it is syntactically valid).

    (Constructors of java.net.URL throw MalformedURLException only if the
    protocol is unknown).
     
    Lee H, Sep 9, 2004
    #1
    1. Advertising

  2. Lee H

    Real Gagnon Guest

    > Is there an easy way of verifying that a given string is a valid URL/URI
    > (In other words, that it is according to the syntax specified in
    > rfc2396. I don't mean to check if the resource exists, or even if the
    > host exist, just that it is syntactically valid).


    See (long url)
    <http://jakarta.apache.org/commons/validator/xref/org/apache/commons/validator/UrlValidator.html>

    Bye
    --
    Real Gagnon from Quebec, Canada
    * Looking for Java or PB snippets ? Visit Real's How-to
    * http://www.rgagnon.com/howto.html
     
    Real Gagnon, Sep 9, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Doug
    Replies:
    0
    Views:
    479
  2. Jon paugh
    Replies:
    1
    Views:
    759
  3. wl
    Replies:
    1
    Views:
    4,430
  4. anonymous
    Replies:
    1
    Views:
    4,603
    Francisco Padron
    May 8, 2005
  5. Just D.
    Replies:
    0
    Views:
    446
    Just D.
    Aug 11, 2004
Loading...

Share This Page