Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSP
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JSP
how to get first part of URL ?
Nakata kokuyo
Ranch Hand
Posts: 472
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Sheriff
Posts: 67746
173
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Have you explored the methods on HttpServletRequest?
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Nakata kokuyo
Ranch Hand
Posts: 472
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
thanks, bear , i have try on getContextpath and getPathInfo() ....now only realize is actually request.getLocalName(); ...
That's a very big dog. I think I want to go home now and hug this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Problem with Params
Servlet Mapping, HTTP requests, and Error Handling
applet-to-servlet : making it work ...
GlassFish Virtual Server
What's going on? Servlet mapped: "/" now can't find any images/stylesheets!
More...