Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Tomcat and the fly likes SSL & relative urls. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "SSL & relative urls." Watch "SSL & relative urls." New topic

SSL & relative urls.

Dave Brown
Ranch Hand

Joined: Mar 08, 2005
Posts: 301
Hi all, I've got a webapp running with apache 2/ mod jk2 and tomcat 5.5

I'm just starting to implement some security in the site, so when for example a user registers, the form post will (my intention) go to a HTTPS address..

The question I have is , is there anyway to still keep a relative URL for the post, at the moment, it goes to "/ValidateRegistration".. If I can, I'd like to avoid a fully qualified URL.


Regards, Dave Brown
SCJP 6 - [url][/url] - Check out Grails Forum
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Yes, the HttpServletRequest object has all the methods you need for this:

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Dave Brown
Ranch Hand

Joined: Mar 08, 2005
Posts: 301
Thanks Ben
I agree. Here's the link:
subject: SSL & relative urls.