close db connections).
My question. How do I get to the HttpSessionListener from the application
itself? I realise I have to define the listener in the web.xml, but I'd be
quite shocked if this could not be done another way.
Thanks
John Baker
--
John Baker, BSc CS.
Java D
#x27;s what I did, with a static Hashtable to bridge the different instances.
Not perfect, but it works very nicely now!
John
--
John Baker, BSc CS.
Java Developer, TEAM Slb. (http://www.teamenergy.com/)
The views expressed in this mail are my own.
--
To unsubscribe, e-mail: <mailto:[E
"localhost_moron_log.txt" would be a great way to make development even
quicker and businesses happier (ie lower costs).
I'll do some work now ;-)
John
> Mvgr,
> Martin
>
> On Mon, 2002-07-01 at 14:55, John Baker wrote:
> > On Monday 01 July 2002 13:53, Joh
e you've just made many developers very happy with you for providing
such a sensible warning.
John
> -Original Message-
> From: John Baker [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 01, 2002 8:33 AM
> To: Tomcat Developers List
> Subject: Re: That Cookie thin
On Monday 01 July 2002 13:38, peter lin wrote:
> John Baker wrote:
> > Well a reliable source tells me that there is no w3c spec for Cookies,
> > and infact the concept was conjured by Netscape. There is an RFC spec for
> > Cookies, but it's largely ignored.
> >
&
your code is not likely to work?
Of course, normally I'd say "follow the spec", but sadly if your target
audience doesn't, there isn't really much you can do.
>
> John Baker wrote:
> > On Monday 01 July 2002 13:16, peter lin wrote:
> >>that's the
rent context path
would be handy, so the response code could look like this:
public void addCookie(Cookie c)
{
// whatever
if (c.getPath() == null)
c.setPath(getContextPath());
// etc
}
Just a thought :)
> peter
>
> John Baker wrote:
> > On Mond
s currently written in the form:
Set-Cookie: someName=someValue; expires
and due to the lack of a path, every browser ignores it.
>
> peter
>
> John Baker wrote:
> > It appears if you don't set a path on the cookie (setPath), it doesn't
> > default to anything an
It appears if you don't set a path on the cookie (setPath), it doesn't default
to anything and therefore doesn't place anything in the response header.
Browsers then ignore it ;-)
Perhaps Cookie by default should have a path of /.
John
--
John Baker, BSc CS.
Java Developer,
Hi,
Has anyone found that browsers refuse to delete cookies when you do
Cookie.setMaxAge(0); ? I can not get any browser to delete a cookie! Having
looked at the response the Set-Cookie: header appears correctly formed.
John
--
John Baker, BSc CS.
Java Developer, TEAM/Slb. http
t; HttpServletRequest.isRequestSessionIdValid() will return false (see
> implementation of isRequestSessionIdValid()).
Yes, I was thinking this when I read your mail. I'm now putting a valve in
each relevant Context and using a static Hashtable. Sick, I know, but it
seems I have no other c
a valve for all
contexts?
John
On Sunday 30 June 2002 21:38, John Baker wrote:
> On Sunday 30 June 2002 9:35 pm, Craig R. McClanahan wrote:
> > Hmm ... this is baslically how the standard form-based login
> > implementation creates a session, except that it goes on and gets t
so show the session id, but oddly enough calling
HttpServletRequest.SessionIdFromCookie() returns true, but
HttpServletRequest.isRequestSessionIdvalid() returns false!
John
--
John Baker, BSc CS.
Java Developer, TEAM Slb. (http://www.teamenergy.com/)
The views expressed in this mail are my own.
--
To unsubscribe, e-mail: &l
servlet -- that's the one with the getSession() method that operates as
> you need it to.
Yea I know, I copied rather than pasting and mistyped the casting.
The mystery goes on.
John
--
John Baker, BSc CS.
Java Developer, TEAM Slb. (http://www.teamenergy.com/)
The views expressed in th
On Sunday 30 June 2002 7:32 pm, Peter Lin wrote:
> --- John Baker <[EMAIL PROTECTED]> wrote:
> > Hello.
> >
> > I'm am trying to write a Valve, very much like
> > SingleSignOn but for our
> > authetnication system that uses more than just a
> >
e web-inf/lib... etc
Sounds like you want to read up on the structure of webapps.
webapps/myapp/someJspPage.jsp
webapps/myapp/WEB-INF/classes classes go here
webapps/myapp/WEB-INF/lib jars go here
John
--
John Baker, BSc CS.
Java Developer, TEAM Slb. (http://www.teamenergy.com/)
The views ex
Context context)
throws IOException, ServletException
{
System.out.println( ((HttpRequest)request).getSession(true) );
Will always print null.
I assume I can get at the session from this level and I'm obviously doing
something dumb. Are there any obvious things I should check?
17 matches
Mail list logo