Re: Information about visitors using my portal

2003-09-05 Thread Stefan Trcko
I have installed clickstream into my portal  and it works. I tested it on many 
computers and works ok. 
But in one computer I get message below. This computer was connected to Internet 
through modem to one company.
Then I connect with my computer to the Internet through modem to the same company and 
I get the same message.
Can anybody explain me what wrong. I have downloaded the code from 
http://www.servlets.com/soapbox/filters.html.

This is the method which throws an error (I think):

 public static String[] botHosts = {inktomi.com, inktomisearch.com, 
googlebot.com, linuxtoday.com.au};
 public static boolean isBot(HttpServletRequest request, Clickstream stream)
 {
  String requestURI = request.getRequestURI();
  // if it requested robots.txt, it's a bot
  if (requestURI.indexOf(robots.txt) = 0)
  {
   return true;
  }
  // it requested a RSS feed from our backend, it's a bot
  if (requestURI.indexOf(/backend/) = 0)
  {
   return true;
  }
  for (int i = 0; i  botHosts.length; i++)
  {
   if (request.getRemoteHost().indexOf(botHosts[i]) = 0)
   {
return true;
   }
  }
  return false;
 }

and this is the error:

HTTP Status 500 - Internal Server Error



type Exception report

message Internal Server Error

description The server encountered an internal error (Internal Server Error) that 
prevented it from fulfilling this request.

exception 

java.lang.NullPointerException
 at opensymphony.clickstream.BotChecker.isBot(BotChecker.java:29)
 at opensymphony.clickstream.Clickstream.addRequest(Clickstream.java:44)
 at opensymphony.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:21)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
 at 
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:98)
 at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:176)
 at java.security.AccessController.doPrivileged(Native Method)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:172)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
 at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:466)
 at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:585)
 at java.lang.Thread.run(Thread.java:536)








- Original Message - 
From: Adolfo Miguelez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 3:22 PM
Subject: RE: Information about visitors using my portal


 http://www.servlets.com/soapbox/filters.html
 
 From: Mark Galbreath [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: RE: Information about visitors using my portal
 Date: Wed, 3 Sep 2003 07:19:07 -0400
 
 Jason Hunter explains how to do this in Java Servlet Programming, 2d ed.
 (O'Reilly 2002): Chapter 7.
 
 Mark
 
 -Original Message-
 From: Stefan Trcko [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, September 03, 2003 5:55 AM
 To: Struts Users Mailing List

Information about visitors using my portal

2003-09-03 Thread Stefan Trcko
Hello

I want to get information of how many visitors is currently using my portal.
When someone open url www.iz-fotelja.com I create a session, so I think that from all 
of the 
currently active sessions I can get this statistic. But I don't know how to implement 
it.

Any suggestions?

Best regards
Stefan

Re: Information about visitors using my portal

2003-09-03 Thread Andrew Kuzmin
hi,

This should help: http://orionsupport.com/archive/clickstream/index.html

--
Andrew Kuzmin
http://www.java201.com/


- Original Message -
From: Stefan Trcko [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 12:54 PM
Subject: Information about visitors using my portal


Hello

I want to get information of how many visitors is currently using my portal.
When someone open url www.iz-fotelja.com I create a session, so I think that
from all of the
currently active sessions I can get this statistic. But I don't know how to
implement it.

Any suggestions?

Best regards
Stefan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Information about visitors using my portal

2003-09-03 Thread Mark Galbreath
Jason Hunter explains how to do this in Java Servlet Programming, 2d ed.
(O'Reilly 2002): Chapter 7.

Mark

-Original Message-
From: Stefan Trcko [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 5:55 AM
To: Struts Users Mailing List
Subject: Information about visitors using my portal


Hello

I want to get information of how many visitors is currently using my portal.
When someone open url www.iz-fotelja.com I create a session, so I think that
from all of the
currently active sessions I can get this statistic. But I don't know how to
implement it.

Any suggestions?

Best regards
Stefan




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Information about visitors using my portal

2003-09-03 Thread Adolfo Miguelez
http://www.servlets.com/soapbox/filters.html

From: Mark Galbreath [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: Information about visitors using my portal
Date: Wed, 3 Sep 2003 07:19:07 -0400
Jason Hunter explains how to do this in Java Servlet Programming, 2d ed.
(O'Reilly 2002): Chapter 7.
Mark

-Original Message-
From: Stefan Trcko [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 03, 2003 5:55 AM
To: Struts Users Mailing List
Subject: Information about visitors using my portal
Hello

I want to get information of how many visitors is currently using my 
portal.
When someone open url www.iz-fotelja.com I create a session, so I think 
that
from all of the
currently active sessions I can get this statistic. But I don't know how to
implement it.

Any suggestions?

Best regards
Stefan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]