You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Dan Olsen <da...@utah.gov> on 2008/05/01 22:48:40 UTC
The URL path
Is there a way I can grab the URL base path in a JSP? If not can I get it in the doView function for a portlet?
For example. If I am at http://www.example.com/level/three, I want to get the base path or http://www.example.com.
Re: The URL path
Posted by David Sean Taylor <da...@bluesunrise.com>.
On May 1, 2008, at 1:48 PM, Dan Olsen wrote:
> Is there a way I can grab the URL base path in a JSP? If not can I
> get it in the doView function for a portlet?
>
> For example. If I am at http://www.example.com/level/three, I want
> to get the base path or http://www.example.com.
The portlet API gives you most of this information server name,
portl, scheme, context path and request parameters targeted to your
portlet, but not /three (the path):
http://www.bluesunrise.com/portlet-api/javax/portlet/PortletRequest.html
The servlet API can also produce that information
Also, creating a Render URL or Action URL will contain the URL base path
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org