here is what i do in my code.
i have a login html form whose action attribute points to
http://server:portnumber/loginservlet
the servlet gets the date entered by the user using request.getParameter and
queries the database to know the role of the user who has logged on.
after retrieving the role and user id, I redirect the flow to another HTML
using response.Redirect('someMenu.html');
that menu further contains some links which again point to different
servlets.
using <a href 'servlet/someservlet.java'>
what i find is, the session loss occurs when the flow reaches the new
servlet
my application is deploed on Iplanet WebServer 4.1
-----Original Message-----
From: Chetan Hiremath P [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 5:17 PM
To: [EMAIL PROTECTED]
Subject: Re: Session problems
Hi,
Can u please mention the url of the servlet from where u are redirecting and
the url of the servlet to which u are redirecting.
If u could paste some code and mention the servlet container u are using, it
would help us identify the problem.
regards
#########################
Chetan P Hiremath(Software Engineer)
Nuntius Systems(India) Pvt Ltd, Bangalore.
http://www.india.nuntius.com
080-658 0484
> -----Original Message-----
> From: Rohan Shrinivas Desai [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, March 11, 2002 4:45 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Session problems
> Importance: High
>
> Thank you Sean and Chetan for ur response
> but i think there is nothing like, changing the context of the servlet and
> also the change in the port number actually hapening in my application.
>
> but i will be glad to know more in detail about what Sean said.
> Sean, if u dont mind, can u please elaborate ??
>
> thanks and regards,
> Rohan
>
> -----Original Message-----
> From: Sean Burlington [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 11, 2002 3:09 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Session problems
>
>
> On Monday 11 March 2002 8:13 am, Chetan Hiremath P wrote:
> > Hi,
> > This sort of problem occurs if and only if the url to which u are
> > redirecting has a different port or the servlet to which u are
> redirecting
> > is in a different context.
> > If u are redirecting from a servlet whose url is
> > http://localhost:80/customers/servlet/list
> > to a servlet whose url is
> > http://localhost:80/suppliers/servlet/list
> > or
> > https://localhost:443/customers/servlet/list
> > then the session attributes set in the first servlet will not be
> accessible
> > from the next servlet(where it is redirected).
> > U can test it by redirecting to the servlet with the same url path(ie
> port
> > and context).
>
> cookies are only valid for the domain specified when they are sent
>
> so this problem often occurs if you log into the site using a short form
> on
> the machine name - set a cookie and later redirect to the fully qualified
> domain name (also true if there is more thane one fqdn for the server)
>
> (I'm comming to servlets from php,perl - so I'm not sure if you can access
> the same servlet context from these different hostnames...)
>
> --
>
> Sean
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>
> DISCLAIMER: Information contained and transmitted by this E-MAIL is
> proprietary to MASCOT SYSTEMS LTD and is intended for use only by the
> individual or entity to which it is addressed, and may contain information
> that is privileged, confidential or exempt from disclosure under
> applicable
> law. If this is a forwarded message, the content of this E-MAIL may not
> have
> been sent with the authority of the Company. If you are not the intended
> recipient, an agent of the intended recipient or a person responsible for
> delivering the information to the named recipient, you are notified that
> any
> use, distribution, transmission, printing, copying or dissemination of
> this
> information in any way or in any manner is strictly prohibited. If you
> have
> received this communication in error, please delete this mail & notify us
> immediately at [EMAIL PROTECTED] Before opening attachments,
> please scan for viruses
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
DISCLAIMER: Information contained and transmitted by this E-MAIL is
proprietary to MASCOT SYSTEMS LTD and is intended for use only by the
individual or entity to which it is addressed, and may contain information
that is privileged, confidential or exempt from disclosure under applicable
law. If this is a forwarded message, the content of this E-MAIL may not have
been sent with the authority of the Company. If you are not the intended
recipient, an agent of the intended recipient or a person responsible for
delivering the information to the named recipient, you are notified that any
use, distribution, transmission, printing, copying or dissemination of this
information in any way or in any manner is strictly prohibited. If you have
received this communication in error, please delete this mail & notify us
immediately at [EMAIL PROTECTED] Before opening attachments,
please scan for viruses
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html