This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
We want to set the switch: "Limit to SSL connections only" in WAS V5). I understand that this switch demands that all URLs must start with "HTTPS:\\xxxxxxx". a) ==> Is this correct ? b) The problem is that we also have a couple of hardcoded URLs in our application to link to some official sites at the police and hospitals. In other words what we really want is: Force all URLs to use "HTTPSxxxxxx" except from some hardcoded URLs in the application-code that is allowed to use "HTTPxxxxx". ==> is this possible in any ways ? c) If b) above is not possible, is there another way to solve this ? I would be happy for any respons ! [ September 29, 2003: Message edited by: Eskil Lind ] [ September 29, 2003: Message edited by: Eskil Lind ]
Joined: Apr 05, 2003
Seems like I can solve this by editing the "Virtual host"-setting in WebSphere Application Server. I tried to set the only valid Virtual host to be "*:443". 443 is the SSL-port. ==> This worked fine. All "HTTP:\\xxx" was rejected. Another challenge is that my application will call some static HTML-sites on the internet (new pop-up windows) with an ordinary "HTTP:\\xxxx"-kommand. ==> this was still possible I have now accomplished to only allow HTTPS (SSL) to enter my application, and still my application can reach the outside world with "HTTP".
Rewrite URLs to redirect Suppose you currently have the following statement: response.sendRedirect ("http://myhost/store/catalog"); Change the servlet to call the encodeRedirectURL method before sending the URL to the output stream: response.sendRedirect (response.encodeRedirectURL ("http://myhost/store/catalog")); The encodeURL() and encodeRedirectURL() methods are part of the HttpServletResponse object. These calls check to see if URL rewriting is configured before encoding the URL. If it is not configured, the calls return the original URL. If both cookies and URL rewriting are enabled and response.encodeURL() or encodeRedirectURL() is called, the URL is encoded, even if the browser making the HTTP request processed the session cookie. You can also configure session support to enable protocol switch rewriting. When this option is enabled, the product encodes the URL with the session ID for switching between HTTP and HTTPS protocols. Supply a servlet or JSP file as an entry point The entry point to an application (such as the initial screen presented) may not require the use of sessions. However, if the application in general requires session support (meaning some part of it, such as a servlet, requires session support), then after a session is created, all URLs are encoded to perpetuate the session ID for the servlet (or other application component) requiring the session support. The following example shows how you can embed Java code within a JSP file:
IBM Certified System Administrator - Websphere Application Server 5
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Force HTTPS, but not quite all URLs..........