Title: RE: servlet sessions and https URLs

Hello Pankaj,
       
> Hello everybody...!
>
> Two queries, please help me with all the info you know. let
> it be code, links
> to sites.. just anything..!!
>
> 1. I am accessing HTTPS (secure http) resources on the net in
> my servlet. I do
> this using URL and URLConnection objects. This does not work
> with any other
> servlet engine except for the one that comes with Java Web
> Server. When i open
> a "cgi" script as a HTTPS resource i guess the communication
> between my
> servlet and the cgi script is SECURE. am i right in assuming
> this. As far as i
> know.. when i give "https://" request i expect the response
> to be "https" i.e.
> secure and encrypted.
        In communication with Web Server using SSL (https://) you need to use mechanism embedded in Web Browser. You can't open         SSL Connection to https:// in Application (and also Servlet if that Web Server doesn't provide this mechanism). But in applet, you      can (with capability of Web Browser).

> 2. In the same servlet, how can i decide whether the user is still
> available..? i.e. if the user gets disconnected from the net
> or his browser
> crashes what are the possible ways for me to detect this..?
        If you're using Client as plain HTML, I'm afraid that you can't. 'Cos HTTP is connectionless then you can't know whether user is        absent or get crash. Using HttpSession may ease this, but not totally ... if you're not familiar with HttpSession ... check out in any  tutorial about Servlet.

        But if you're using Client as Applet, you have many way to handle this ... depend on how could you communicate Applet with your         Servlet

> Please help me in this. This is urgent. Thank you very much
> for reading
> patiently.
>
> Best regards,
> Pankaj Acharya

        Hope this help !
                Siros

Reply via email to