Sandeep,

You should be able to get host and domain names from
java.net.URL class.

 Check out

http://www.rfc-editor.org/rfc/rfc1738.txt
for a complete description of the syntax for various
schemes.

hope it helps,
Venkat



--- Sandeep Yarramreddy <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I have a couple of questions about cookies in jsp
> pages.
>
> 1. When is the cookie flushed from the server to the
> client browser.
> I think it would be part of the header. I have
> written a jsp page
> which generates around 40k html file and i am trying
> to set some
> cookie towards the end of jsp page. This seems to
> have no effect.
> The cookie is not sent to the browser. I tried
> increasing the
> page buffer size to 256Kb, but it did not help.
> is there something that needs to be done.
>
> 2. In general how is the domain of the webserver
> determined.
> One way might be to take the domain upto 2 levels
> from the
> host name, but what happens if the domain ends with
> country
> codes like say .us .uk etc. The host name would be
> something
> like xx.yy.co.uk, in this case we would need to take
> the
> domain upto 3 levels. Is there a generic method for
> this.
>
> Thanks in advance.
>
> Regards,
> Sandeep.
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with
> body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>
>
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

__________________________________________________
Do You Yahoo!?
Send online invitations with Yahoo! Invites.
http://invites.yahoo.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to