This may or may not tell you much, because most servers let you configure the port
number(s) that they listen to. A more reliable test would be to call
HttpServletRequest.getScheme(), which should return "http" or "https". In the
servlet 2.2 API, there is also a new "isSecure()" method which indicates whether
the communication channel being used is considered secure or not.
Craig McClanahan
"Kirkdorffer, Daniel" wrote:
> You should be able to simply check the SERVER_PORT environment variable.
>
> Dan
>
> > ----------
> > From: Dion Almaer[SMTP:[EMAIL PROTECTED]]
> > Reply To: Dion Almaer
> > Sent: Monday, October 11, 1999 9:16 AM
> > To: [EMAIL PROTECTED]
> > Subject: JSP Getting HTTPS or HTTP
> >
> > Hi all,
> >
> > How can you find out if the JSP page is running under https or http?
> >
> > Like: request.ServerVariables("HTTPS")
> >
> > Thanks,
> >
> > Dion
> >
> > --
> > \\|//
> > (o o)
> > +----oOOo-(_)-oOOo--------------------------------------------------+
> > | [EMAIL PROTECTED] | "There are three kinds of people |
> > | www.almaer.com/dion | those who can count, and those who can't" |
> > +-------------------------------------------------------------------+
> >
> > ==========================================================================
> > =
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > FAQs on JSP can be found at:
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> >
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html