[jboss-user] [JBoss Portal] - Ajax Url

PMN do-not-reply at jboss.com
Sun Dec 16 08:42:39 EST 2007


The ajax feature is not addressing much of it but anyway, the question is how to get an URL that is not pointing at a window or page but at the server itself, allowing to build a servlet url to whatever context is needed.

The only way I found is to compute it

{
  | PortalNodeURL url = response.createRenderURL(request.getPortalNode());
  | url.setRelative(false);
  | String portalURL= url.toString();
  | String context = request.getContextPath();
  | int contextPathIndex = portalURL.indexOf(context);
  | return portalURL.substring(0, contextPathIndex);
  | }

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4113207#4113207

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4113207



More information about the jboss-user mailing list