• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to check if something is url

 
Tomasz Wilk
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any neat way to check in java if something is an url or not? I implemented verifiers which can be used for text-fields... but it seems that simple regex verifier will not do in this case.
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I normally rely on URL class. It may not be a neat solution, but anyway, here's the code

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic