The point is the current request is not using the http port.  The only
thing that tells me the port # I require is in a config file -
struts-config.xml (or potentially tomcat server.xml) 

-----Original Message-----
From: Mark Lowe [mailto:[EMAIL PROTECTED] 
Sent: 09 May 2004 18:41
To: Struts Users Mailing List
Subject: Re: How to get http and https port # from struts-config in
filter?

I see what you mean.. Seeing as you got as far as reading the  
getScheme() bit of the javadoc you could push the boat out and explore  
it further for something more up your street.

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,
>>
>> 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 me
> these
>> parameters.  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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to