• Post Reply Bookmark Topic Watch Topic
  • New Topic

getServerName with tag

 
Niklas Rosencrantz
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a tag which outputs the server name? Something without the www like

Thank you
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A builtin tag? To do something that specific? Of course not. Or are you asking how to do the above with the EL and JSTL?
[ April 04, 2008: Message edited by: Bear Bibeault ]
 
Niklas Rosencrantz
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes with EL and JSTL please, or any way in which I won't have to write a tag class myself which seems unnecessary.
[ April 05, 2008: Message edited by: Niklas Rosencrantz ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65522
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you can get at the request through the pageContext builtin scoped variable, and the JSTL functions (namespace fn) have string manipulation functions. Given that information, you should be able to string together an EL expression that does what you want.
 
Niklas Rosencrantz
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. Following your good instruction it solved:

Niklas
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!