You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by OFFICIAL WEBSITE <di...@technocomsys.com> on 2007/08/31 04:04:27 UTC

HttpSessionListener

1. Aim: To display online the status of each incoming HttpSession
2. Design used: In webapps/myapplication/WEB-INF/web.xml, along with the
servlet application deployed in <servlet> </servlet> section, another
Class is deployed in the <listener></listener> section that implements
HttpSessionListener (and all other listeners too) and feeds data to the
Display Class.
3. Problem. The listener class does not report sessionCreate and
sessionDestroy. It responds perfectly to all other types of event
listeners. The servlet class, of course, reports each HttpRequest as
they come in.

Will be thankful for information of any mistake we have made or any
solution to this requirement. Just to aid diagnosis, web.xml is attached
as a file.

Thank you very much.

Regards,
Ashok Swaminathan


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HttpSessionListener

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ashok,

OFFICIAL WEBSITE wrote:
> I had attached web.xml with th previous mail.

It did not come through.

> Nevertheless, I am attaching source code of listener and the web.xml
> file.

The code looks fine (but strange). Are you even seeing
"CandidateSessionListener instantiated" being printed on stdout?

You can't just stick the <listener> element anywhere you want in
web.xml: it's got to go in the appropriate place.

Consult the DTD for the proper place to put <listener> elements.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG4GUw9CaO5/Lv0PARAivJAJ0cLhbn6brPpI/YVcL1ikEjBieFywCbBgT0
OnvHSGPFm3fy5LPZpZrDwgs=
=5Gph
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: HttpSessionListener

Posted by OFFICIAL WEBSITE <di...@technocomsys.com>.
I had attached web.xml with th previous mail. Nevertheless, I am
attaching source code of listener and the web.xml file. 
Grateful if you can spot and informme of errors.

Thanks
ASW
On Tue, 2007-09-04 at 16:38 -0400, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Ashok,
> 
> OFFICIAL WEBSITE wrote:
> > 3. Problem. The listener class does not report sessionCreate and
> > sessionDestroy. It responds perfectly to all other types of event
> > listeners. The servlet class, of course, reports each HttpRequest as
> > they come in.
> 
> Please post your Listener's code and the configuration you use in
> web.xml. "It doesn't work" doesn't make a good post.
> 
> - -chris
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFG3cJQ9CaO5/Lv0PARAkAbAKCTJ2JpDk1yphNZlHaixWUCVcRSjgCcDyDd
> Te1fOL5ZK2/oZpfl61ihAcA=
> =MPiJ
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

Re: HttpSessionListener

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ashok,

OFFICIAL WEBSITE wrote:
> 3. Problem. The listener class does not report sessionCreate and
> sessionDestroy. It responds perfectly to all other types of event
> listeners. The servlet class, of course, reports each HttpRequest as
> they come in.

Please post your Listener's code and the configuration you use in
web.xml. "It doesn't work" doesn't make a good post.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG3cJQ9CaO5/Lv0PARAkAbAKCTJ2JpDk1yphNZlHaixWUCVcRSjgCcDyDd
Te1fOL5ZK2/oZpfl61ihAcA=
=MPiJ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org