Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between getURI and getURL?

 
avinashguru prasad
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Could anyone explain to me what the difference is between the request.getURI() and request.getURL() methods?

I'm not entirely sure what the difference is between a uri and url?

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65104
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to take the time to compose descriptive subjects for your posts. You will attract people who will can give you better and faster answers when your posts have good, descriptive subjects. For more information, please click this link ⇒ UseAMeaningfulSubjectLine.

Using a title of "servlets" in a forum completely dedicated to questions on Servlets isn't going to attract the attention of those who can best help you.

I have changed the subject to one that's more suitable; please use it as an example for future posts.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65104
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please see the JavaDoc for HttpServletRequest (⇐ that's a link). It will explain what each method does.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic