This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • 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