This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get first part of URL ?

 
Nakata kokuyo
Ranch Hand
Posts: 465
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, good day, if i would like to get the first part(don't know what it call) of URL http://myservername/app/index.jsp in jsp page

is there any method we can use ?

meaning i need to get the result with "myservername" , not other part ..any idea ? thank you for guidance
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64186
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you explored the methods on HttpServletRequest?
 
Nakata kokuyo
Ranch Hand
Posts: 465
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, bear , i have try on getContextpath and getPathInfo() ....now only realize is actually request.getLocalName(); ...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic