You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nicholas Blachford <ni...@picopoint.com> on 2001/10/17 16:03:45 UTC

Getting apache environment variables into Tomcat

Hi all,

I've set up Tomcat 4.01 and Apache 1.3.19 and I seem to have them working together.


Only problem is I need to get the environment variable REMOTE_PORT from 
Apache.  This appears to be easy in Perl or PHP but trying it in a 
servlet appears to be another matter.

request.getHeader("REMOTE_PORT"); does not work.

I've been digging around trying to find out how to do this but can't 
find anything (apart from Perl or PHP).

Alternately is there a way to get the remote port directly from Tomcat?
... spose I could ask the developers nicely!



--

Nicholas Blachford
mailto:nicholas.blachford@picopoint.com
Ministar nepretpostavljenih okolnosti
The vast majority of trouble is caused
by the verbal minority of people.


Re: Getting apache environment variables into Tomcat

Posted by Dmitri Colebatch <di...@bigpond.net.au>.
oh, sorry... mis-interpreted the question.  Although I'm not lost as to
what you're trying to do... hope you figure it out though (o:

cheers
dim

On Thu, 18 Oct 2001, Nicholas Blachford wrote:

> Dmitri Colebatch wrote:
> 
> > what's wrong with
> > 
> > request.getServerPort()
> > 
> > from the ServletRequest interface?
> 
> 
> I know the server port, it's the Client port I want.
> 
> 
> 
> 
> --
> 
> Nicholas Blachford
> mailto:nicholas.blachford@picopoint.com
> Ministar nepretpostavljenih okolnosti
> The vast majority of trouble is caused 
> by the verbal minority of people.
> 
> 
> 


Re: Getting apache environment variables into Tomcat

Posted by Nicholas Blachford <ni...@picopoint.com>.
Dmitri Colebatch wrote:

> what's wrong with
> 
> request.getServerPort()
> 
> from the ServletRequest interface?


I know the server port, it's the Client port I want.




--

Nicholas Blachford
mailto:nicholas.blachford@picopoint.com
Ministar nepretpostavljenih okolnosti
The vast majority of trouble is caused 
by the verbal minority of people.



Re: Getting apache environment variables into Tomcat

Posted by Dmitri Colebatch <di...@bigpond.net.au>.
what's wrong with

request.getServerPort()

from the ServletRequest interface?

hth
dim

On Wed, 17 Oct 2001, Han Ming Ong wrote:

> Dear Nicholas,
> 
>   Did you ever get an answer to this? We would love to hear it please?
> 
> Thanks, ohmson
> 
> > Hi all,
> >
> > I've set up Tomcat 4.01 and Apache 1.3.19 and I seem to have them 
> > working together.
> >
> >
> > Only problem is I need to get the environment variable REMOTE_PORT 
> > from Apache.  This appears to be easy in Perl or PHP but trying it in 
> > a servlet appears to be another matter.
> >
> > request.getHeader("REMOTE_PORT"); does not work.
> >
> > I've been digging around trying to find out how to do this but can't 
> > find anything (apart from Perl or PHP).
> >
> > Alternately is there a way to get the remote port directly from Tomcat?
> > ... spose I could ask the developers nicely!
> >
> >
> >
> > -- 
> >
> > Nicholas Blachford
> > mailto:nicholas.blachford@picopoint.com
> > Ministar nepretpostavljenih okolnosti
> > The vast majority of trouble is caused
> > by the verbal minority of people.
> >
> 
> 
> 
> 


Re: Getting apache environment variables into Tomcat

Posted by Han Ming Ong <ha...@chirpyfish.org>.
Dear Nicholas,

  Did you ever get an answer to this? We would love to hear it please?

Thanks, ohmson

> Hi all,
>
> I've set up Tomcat 4.01 and Apache 1.3.19 and I seem to have them 
> working together.
>
>
> Only problem is I need to get the environment variable REMOTE_PORT 
> from Apache.  This appears to be easy in Perl or PHP but trying it in 
> a servlet appears to be another matter.
>
> request.getHeader("REMOTE_PORT"); does not work.
>
> I've been digging around trying to find out how to do this but can't 
> find anything (apart from Perl or PHP).
>
> Alternately is there a way to get the remote port directly from Tomcat?
> ... spose I could ask the developers nicely!
>
>
>
> -- 
>
> Nicholas Blachford
> mailto:nicholas.blachford@picopoint.com
> Ministar nepretpostavljenih okolnosti
> The vast majority of trouble is caused
> by the verbal minority of people.
>