HstLink link = linkCreator.create(path, getMount(request));
return link.toUrlForm(requestContext, false);
}
Two questions:
Is there a nicer way to do this that someone can think of?
Does this use case present itself enough to expose this on the request context or as a method on the “base” component?
Regards,
Wouter
Ard Schrijvers
unread,
Nov 13, 2013, 10:32:21 AM11/13/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hippo-c...@googlegroups.com
Hey Wouter,
take a look at HstRequestUtils : there are quite some utilities to
recreate the current client request. Only thing you need to really
take into account is whether to show the context path or not, which
you can retrieve from the matched host.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hippo-c...@googlegroups.com
Yeah, the part with the context path is the reason I used the linkcreator:
I really don¹t think the application should have to think about
implementation details like this.
Maybe it could be an addition to the HstRequestUtils as a method
³getBrowserRequestPath(HstRequest request)² or something like that.
Ard Schrijvers
unread,
Nov 13, 2013, 11:24:09 AM11/13/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hippo-c...@googlegroups.com
On Wed, Nov 13, 2013 at 5:13 PM, Wouter Danes <Wouter...@hinttech.com> wrote:
> Yeah, the part with the context path is the reason I used the linkcreator:
> I really don¹t think the application should have to think about
> implementation details like this.
> Maybe it could be an addition to the HstRequestUtils as a method
> ³getBrowserRequestPath(HstRequest request)² or something like that.
Yes, we can easily add that. I am not sure about the name above. The
argument type should be HttpServletRequest. For now, you can very
easily add this util yourself.
Most likely will include a 'remote ip filter' that recreates the
client request in the container before hitting the cms or hst webapp :
After we have that in place, you can always just use
request.getServerName() etc kind of methods without by accident
getting the proxied request server name