0

How do I get SSL to work with relative paths on a JSP page. Regardless of whether I'm calling a servlet in a form or just linking to a separate page, is there a way to guarantee that the paths "/foo.do", or "/foo.jsp" will automatically go to https://www.mydomain.com/foo.do?

The options I see are just hard-coding the path (not desirable) or using a filter to re-write the url in transit. However, I searched online and could not really find an existing servlet for this function, leading me to believe it isn't the best approach.

oberger
  • 1,217
  • 2
  • 16
  • 31
  • Do you mean that you want all URLs to be rewritten with an "https" scheme, without regard to whether the URL appears in a page that was served by http or https? – erickson Dec 16 '12 at 21:28
  • I think I might have a basic misunderstanding of the concept... I don't want to re-write all urls, I just want some pages to be served as https, and I don't know how to do that with relative paths. – oberger Dec 16 '12 at 21:32

0 Answers0