• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hot to get the server name using jsp

 
Santosh Kumar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

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



regards
santosh
 
Sravan Kumar
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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()
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic