Re: [tools, struts1] On an HTTPS page, link to HTTP URL includes port number :443

Mike Kienenberger <[email protected]> Fri, 5 Dec 2014 20:23:25 -0500
Newsgroups gmane.comp.jakarta.velocity.user
Message-ID <CAM1yOjZcHidMEQnT+b=S7gQ9QHx43XXuGxL7kngtJkuoHHtnZQ@mail.gmail.com>
I'm still using struts 1 and velocity on a project I'm actively
working on this month.

I can take a look on Monday morning and see what we're doing.

On Fri, Dec 5, 2014 at 8:20 PM, Christopher Schultz
<[email protected]> wrote:
> All,
>
> I'm using StrutsLinkTool and I have a "forward" defined in
> struts-config.xml that is a complete URL (like
> "http://www.google.com/?q=foo"). In my page, I have this:
>
> <a href="$link.forward('my-link-name')">link text</a>
>
> The page this link is on is served via HTTPS with no port number, so of
> course I'm using the default port number for TLS (:443). In the page
> source, the link looks like this:
>
> <a href="http://www.google.com:443/?q=foo">link text</a>
>
> The link is unfollowable because the server (not actually google.com)
> returns a 400 response because of the HTTP protocol being used on an
> HTTPS port. :(
>
> Is there a way to suppress the port number in this URL? I believe
> [Struts]LinkTool is adding it because of the port number of the current
> request.
>
> Technically speaking, this is a URL that we can simply specify directly
> in the page, but it's nice to have it configured via struts-config.xml
> to have all our "forwards" defined in one place.
>
> Thanks,
> -chris
>
>
>