tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vernon Wu" <>
Subject RE: Weird Problems
Date Tue, 10 Feb 2004 16:10:07 GMT
Thanks Yoav for your response. 

>>The first problem is the session counter. It is implemented with the
>>HttpSessionListener. It works fine until recently. Under the TC5.0.X,
>>counter can be a negative figure.
>The problem is obviously in your session counter code: if you posted it,
>we could help more.

I wish I can say the same. It, however, doesn' explain why the problem only occurs recently.
I note it on TC 5.0.x with the same code (I believe). Here is the code segment:

public final class MyListener
		HttpSessionActivationListener {

	private static int activeSessionCount = 0;

	public void contextInitialized(ServletContextEvent evt) {

// ...

	public void contextDestroyed(ServletContextEvent evt) {

// ...

	public void sessionCreated(HttpSessionEvent evt) {

		HttpSession session = evt.getSession();
// ...
			"The session ID: "
				+ session.getId()
				+ ", the total # of active sessions: "
				+ activeSessionCount);

	public void sessionDestroyed(HttpSessionEvent evt) {

		logger.debug("The number of active sessions: " + activeSessionCount);

	public void sessionWillPassivate(HttpSessionEvent evt) {
// ...

	public void sessionDidActivate(HttpSessionEvent evt) {"sessionDidActivate");

	public static int getActiveSessionCount() {
		return activeSessionCount;

>>The second is a quite severe problem. I configure the welcome file to
>map a
>>JSP file. Sometimes, an incoming URL of the default domain leads to the
>>error. After I click the reload button on my browser, the JSP file
>You need to do better than "sometimes" in order to get precise help.
>When does it happen, when does it not happen, and what's in the logs in
>both cases?

If I could pin point the occasion, I might solve it by now. I don't observe any logs from
the container during the time when the error occurs, but I would like to know how set up logging
messages for the problem. I don't know whether it is related with the container configuration.
The tag pool is disable. 

Also, some users report the 404 error on some other use scenario, but we haven't observe the
same. The error rate is above 7-8% of the total hits. If a user follows the action options
on a screen, the error shall never happen. 


Find what you are looking for with the Lycos Yellow Pages

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message