File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes hot to get the server name using jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "hot to get the server name using jsp" Watch "hot to get the server name using jsp" New topic

hot to get the server name using jsp

Santosh Kumar
Ranch Hand

Joined: May 25, 2005
Posts: 30

i wanted to get the file path along with the server name using jsp
can i get he server name using jsp
how can this be done

waiting for your reply

Sravan Kumar
Ranch Hand

Joined: Sep 11, 2005
Posts: 121
I am not sure if you really need the server name but this is the way you get it. Use request.getServerName().

If you need the context path to be appended to your file, then usen request.getContextPath()

keep smilin :: sravan<br /><a href="" target="_blank" rel="nofollow">I scribble here</a>
wood burning stoves
subject: hot to get the server name using jsp
Similar Threads
How to get environment variable?
Image display problem
How to get client's IP address, Domain using Java
forwarding request to some other server
Get server host name