• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to the get the browser url using JSP EL?  RSS feed

 
Kannan Somaiah
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

How to get the browser url using JSP EL?

I need the output to be like..

http://<server>:<port>

Thanks in advance...

Regards,
Somaiah
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the methods in HttpServletRequest.
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html

This will get you the base url.
There are other methods that will return the port, scheme, etc..
${pageContext.request.requestURL}
 
Kannan Somaiah
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Ben.

Regards,
Somaiah
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!