request.getServerPort()
The 2.4 servlet spec has some other methods to do the same thing.
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/servletapi/javax/ servlet/ServletRequest.html
On 9 May 2004, at 08:36, Martin Alley wrote:
That doesn't look appropriate.
If the session times out on an https request, I want to redirect to http, and need to know the http port number (it's not necessarily the default 80).
According to the docs, request.getScheme() "Returns the name of the scheme used to make this request, for example, http, https, or ftp."
Martin
-----Original Message----- From: Mark Lowe [mailto:[EMAIL PROTECTED] Sent: 08 May 2004 19:05 To: Struts Users Mailing List Subject: Re: How to get http and https port # from struts-config in filter?
The api you want would be the servlet api
request.getScheme()
On 8 May 2004, at 18:35, Martin Alley wrote:
Hi,these
I have a servlet filter to handle session timeouts.
This filter needs to redirect to an http page so that the new session works in both http and https, so a forward is no good as the old session may have timed out on an https page.
I'm using the sslext struts plugin which is configured with the port numbers for http and https. I would like to read this port numbers in the filter, so I can redirect to the correct absolute url (assuming host name is the same for secure and insecure pages).
How do I do this? Hopefully there's an API that can just give meparameters. I don't want to (nor should I have to) parse the struts-config myself.
Thanks Martin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]