Re: Session Listener's Session Event session empty?

2003-08-14 Thread Anthony Cunningham

Never did two lines make so much sense:)

I will get a valid ID I suppose..

I now realise why all the examples of the session listener just showed the number of 
sessions and not any data from the sessions.

Is there a mechanism where if you have the a list of session identifiers you can 
access them in turn to get the user data stored in them?

For anyone else looking for a solution to this there is also a 
HttpSessionAttributeListener that will fire when you add/update/remove an attribute to 
a session.  If you have a User class that you add to the session you could watch for 
this and add/remove the username etc. to a static array.   This may be what I'll end 
up using.  If anyone else tries it with success please let me know.

Anthony

"Shapira, Yoav" wrote:

> Howdy,
> When the session is created it has no attributes, that's why it's empty.
> You can't have put attributes there before it was created ;)
>
> Yoav Shapira
> Millennium ChemInformatics
>
> >-Original Message-
> >From: Anthony Cunningham [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, August 05, 2003 2:54 AM
> >To: Tomcat Users List; this
> >Subject: Session Listener's Session Event session empty?
> >
> >Greetings,
> >
> >I am trying to make a page showing all the logged in users and possibly
> >all their details (stored in the session).
> >While searching I came across information about the HttpSessionListener
> >interface and tried implementing that.
> >
> >However in Tomcat 4.0.1 and also 4.0.4 when sessionCreated is called,
> >the session retrieved from from the session event object doesn't appear
> >to contain the attributes I put there.   Has anyone experienced this?
> >
> >Also if anyone has implemented this type of logged in user list in
> >another way I'd be grateful for your advice.
> >
> >
> >thanks in advance,
> >
> >Anthony
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
> This e-mail, including any attachments, is a confidential business communication, 
> and may contain information that is confidential, proprietary and/or privileged.  
> This e-mail is intended only for the individual(s) to whom it is addressed, and may 
> not be saved, copied, printed, disclosed or used by anyone else.  If you are not 
> the(an) intended recipient, please immediately delete this e-mail from your computer 
> system and notify the sender.  Thank you.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



Session Listener's Session Event session empty?

2003-08-14 Thread Anthony Cunningham
Greetings,

I am trying to make a page showing all the logged in users and possibly
all their details (stored in the session).
While searching I came across information about the HttpSessionListener
interface and tried implementing that.

However in Tomcat 4.0.1 and also 4.0.4 when sessionCreated is called,
the session retrieved from from the session event object doesn't appear
to contain the attributes I put there.   Has anyone experienced this?

Also if anyone has implemented this type of logged in user list in
another way I'd be grateful for your advice.


thanks in advance,

Anthony


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



Re: AW: No printers when run as service.

2003-07-24 Thread Anthony Cunningham
The one about PrintService and Tomcat being a previous thread

If you are using NT/2000 in the services list you can select Apache Tomcat.
In NT double clicking the Apache Tomcat service will give you a property
dialog for the service.  Here you can choose a user to run as.  You should
choose one that has access to the printers.

"Hamidene, Anis Ben" wrote:

> Hi,
>  i am having problems too with tomcat when run as a service. Which other
> reply do you mean?
>
> Best regrads
>
> Anis B.H.
>
>
> > -Ursprüngliche Nachricht-
> > Von: Anthony Cunningham [mailto:[EMAIL PROTECTED]
> > Gesendet: Donnerstag, 24. Juli 2003 06:14
> > An: Tomcat Users List
> > Betreff: Re: No printers when run as service.
> >
> >
> > thanks that worked
> > the other reply is correct also
> > Printservice and Tomcat was a previous thread on this issue
> > if anyone else needs more information
> >
> > John Corrigan wrote:
> >
> > > You might try changing the user which tomcat runs as and
> > see if that
> > > helps.
> > >
> > > -Original Message-
> > > From: Anthony Cunningham [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, July 21, 2003 10:46 PM
> > > To: Tomcat Users List
> > > Subject: No printers when run as service.
> > >
> > > I tried searching the archives and google for this but without
> > > success.
> > >
> > > I am running Tomcat 4.0.4 on Windows NT 4.0 Service pack 6
> > (Japanese).
> > > Due to the nature of our application we are using Adobe
> > PDFWriter as a
> > > virtual printer to create a PDF file on the harddrive which is then
> > > streamed to the user and deleted.  When Tomcat is run from
> > the command
> > > line it works ok however when run as a service the error
> > below occurs.
> > > Does anyone know why this might happen and a possible solution?
> > >
> > > thanks for the help,
> > > Anthony Cunningham
> > >
> > > java.awt.print.PrinterException: No printer found.
> > >  at sun.awt.windows.WPrinterJob._startDoc(Native Method)
> > >  at sun.awt.windows.WPrinterJob.startDoc(WPrinterJob.java:680)
> > >  at sun.java2d.RasterPrinterJob.print(RasterPrinterJob.java:315)
> > >  at
> > >
> > ajs.dvr.client.print.PrintReport.printReport(ajs/dvr/client/print/Prin
> > > tReport.java:371)
> > >
> > >  at ajs.dvr.web.servlet.DynamicPDF.createPDF(Unknown Source)  at
> > > ajs.dvr.web.servlet.DynamicPDF.printPDF(Unknown Source)  at
> > > ajs.dvr.web.servlet.DynamicPDF.doGet(Unknown Source)  at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >  at
> > >
> > org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispa
> > > tcher.java:683)
> > >
> > >  at
> > >
> > org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDi
> > > spatcher.java:431)
> > >
> > >  at
> > >
> > org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDisp
> > > atcher.java:355)
> > >
> > >  at ajs.wgfw.ctrl.SubController.gotoPage(SubController.java:1579)
> > >  at ajs.wgfw.ctrl.SubController.execute(SubController.java:323)
> > >  at
> > >
> > ajs.wgfw.ctrl.AbstractMainController.doMain(AbstractMainController.jav
> > > a:657)
> > >
> > >  at
> > >
> > ajs.wgfw.ctrl.AbstractMainController.doGet(AbstractMainController.java
> > > :436)
> > >
> > >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >  at
> > >
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
> > > cationFilterChain.java:247)
> > >
> > >  at
> > >
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
> > > lterChain.java:193)
> > >
> > >  at
> > >
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
> > > lve.java:243)
> > >
> > >  at
> > >
> > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
> > > java:566)
> > >
> > >  at
> > >
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
> > > :472)
> > >
> > >  at
> >

Re: No printers when run as service.

2003-07-23 Thread Anthony Cunningham
thanks that worked
the other reply is correct also
Printservice and Tomcat was a previous thread on this issue if anyone else needs more 
information

John Corrigan wrote:

> You might try changing the user which tomcat runs as and see if that helps.
>
> -Original Message-
> From: Anthony Cunningham [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 21, 2003 10:46 PM
> To: Tomcat Users List
> Subject: No printers when run as service.
>
> I tried searching the archives and google for this but without success.
>
> I am running Tomcat 4.0.4 on Windows NT 4.0 Service pack 6 (Japanese).
> Due to the nature of our application we are using Adobe PDFWriter as a
> virtual printer to create a PDF file on the harddrive which is then
> streamed to the user and deleted.  When Tomcat is run from the command
> line it works ok however when run as a service the error below occurs.
> Does anyone know why this might happen and a possible solution?
>
> thanks for the help,
> Anthony Cunningham
>
> java.awt.print.PrinterException: No printer found.
>  at sun.awt.windows.WPrinterJob._startDoc(Native Method)
>  at sun.awt.windows.WPrinterJob.startDoc(WPrinterJob.java:680)
>  at sun.java2d.RasterPrinterJob.print(RasterPrinterJob.java:315)
>  at
> ajs.dvr.client.print.PrintReport.printReport(ajs/dvr/client/print/PrintReport.java:371)
>
>  at ajs.dvr.web.servlet.DynamicPDF.createPDF(Unknown Source)
>  at ajs.dvr.web.servlet.DynamicPDF.printPDF(Unknown Source)
>  at ajs.dvr.web.servlet.DynamicPDF.doGet(Unknown Source)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
>
>  at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
>
>  at
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
>
>  at ajs.wgfw.ctrl.SubController.gotoPage(SubController.java:1579)
>  at ajs.wgfw.ctrl.SubController.execute(SubController.java:323)
>  at
> ajs.wgfw.ctrl.AbstractMainController.doMain(AbstractMainController.java:657)
>
>  at
> ajs.wgfw.ctrl.AbstractMainController.doGet(AbstractMainController.java:436)
>
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
>
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>
>  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
>
>  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>
>  at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
>
>  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>
>  at
> org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
>
>  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
>
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>
>  at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
>
>  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
>
>  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>
>  at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
>
>  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
>
>  at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
>
>  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
>
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>
>  at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at org.apach
> e.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
>
>  at
> org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>
>  at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>  at
>

No printers when run as service.

2003-07-21 Thread Anthony Cunningham
I tried searching the archives and google for this but without success.

I am running Tomcat 4.0.4 on Windows NT 4.0 Service pack 6 (Japanese).
Due to the nature of our application we are using Adobe PDFWriter as a
virtual printer to create a PDF file on the harddrive which is then
streamed to the user and deleted.  When Tomcat is run from the command
line it works ok however when run as a service the error below occurs.
Does anyone know why this might happen and a possible solution?

thanks for the help,
Anthony Cunningham


java.awt.print.PrinterException: No printer found.
 at sun.awt.windows.WPrinterJob._startDoc(Native Method)
 at sun.awt.windows.WPrinterJob.startDoc(WPrinterJob.java:680)
 at sun.java2d.RasterPrinterJob.print(RasterPrinterJob.java:315)
 at
ajs.dvr.client.print.PrintReport.printReport(ajs/dvr/client/print/PrintReport.java:371)

 at ajs.dvr.web.servlet.DynamicPDF.createPDF(Unknown Source)
 at ajs.dvr.web.servlet.DynamicPDF.printPDF(Unknown Source)
 at ajs.dvr.web.servlet.DynamicPDF.doGet(Unknown Source)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)

 at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)

 at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)

 at ajs.wgfw.ctrl.SubController.gotoPage(SubController.java:1579)
 at ajs.wgfw.ctrl.SubController.execute(SubController.java:323)
 at
ajs.wgfw.ctrl.AbstractMainController.doMain(AbstractMainController.java:657)

 at
ajs.wgfw.ctrl.AbstractMainController.doGet(AbstractMainController.java:436)

 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

 at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)

 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at org.apach
e.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)

 at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)

 at java.lang.Thread.run(Thread.java:484)
java.awt.print.PrinterException: No printer found.
 at sun.awt.windows.WPrinterJob._startDoc(Native Method)
 at sun.awt.windows.WPrinterJob.startDoc(WPrinterJob.java:680)
 at sun.java2d.RasterPrinterJob.print(RasterPrinterJob.java:315)
 at
ajs.dvr.client.print.PrintReport.printReport(ajs/dvr/client/print/PrintReport.java:371)

 at ajs.dvr.web.servlet.DynamicPDF.createPDF(Unknown Source)
 at ajs.dvr.web.servlet.DynamicPDF.printPDF(Unknown Source)
 at ajs.dvr.web.servlet.DynamicPDF.doGet(Unknown Source)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)

 at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java

Re: Someody Help Me out!!!!

2003-07-07 Thread Anthony Cunningham
>
> THIRD PROBLEM:
>  This one is with jakarta-tomcat-4.0.6 and
> jakarta-tomcat-4.1.18
> In this not even the server starts that is i can t
> even get the test page run!
> Whenver i run the start.bat,the server tries to run
> but then i throws some exception and then the DOS
> window closes on its own and i cant see the exception
> as well.
>

I've never used Tomcat 3x but in Tomcat 4 to see the error that happened try opening a 
command prompt and
changing to the tomcat/bin directory.  Then type :
catalina run

if the error appears and its something like :
Catalina.start: LifecycleException:  null.open:  java.net.BindException: Address in 
use: JVM_Bind
LifecycleException:  null.open:  java.net.BindException: Address in use: JVM_Bind
at 
org.apache.catalina.connector.http.HttpConnector.initialize(HttpConnector.java:1116)
at 
org.apache.catalina.core.StandardService.initialize(StandardService.java:454)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:552)
at org.apache.catalina.startup.Catalina.start(Catalina.java:775)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
- Root Cause -
java.net.BindException: Address in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:408)
at java.net.ServerSocket.(ServerSocket.java:173)

then one of the other tomcats or another program is using the same port as Tomcat 4.

Please try this and you may see the error

Anthony

>
> So i am not able to run any of the tomcat server.
>  I guess that i must be doing something wrong as no
> one worked.
> Isn't JDK1.3 sufficient.
> I have made many applications and applet programs in
> JDK1.3 so does tomcat needs some other JVM
>
> with regards
> sharath
>
> 
> Send free SMS using the Yahoo! Messenger. Go to http://in.mobile.yahoo.com/new/pc/
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



Re: Tomcat5 "Tomcat Administration"

2003-06-09 Thread Anthony Cunningham
http://localhost:8080/tomcat-docs/manager-howto.html
it says it here for tomcat 4...

f you have not customized your $CATALINA_HOME/conf/server.xml to select a
different one, Tomcat 4 defaults to an XML-format file stored at
$CATALINA_HOME/conf/tomcat-users.xml, which can be edited with any text editor.
This file contains an XML  for each individual user, which might look
something like this:





which defines the username and password used by this individual to log on, and
the role names he or she is associated with. You can add the manager role to the
comma-delimited roles attriute for one or more existing users, and/or create new
users with that assigned role.

Tim Funk wrote:

> Oddly enough, I just knew it. I think it is the release notes (but not sure).
>
> But I also have it as a todo in adding to the FAQ.
>
> -Tim
>
> David Bo Jensen wrote:
> > Mandag 09 juni 2003 13:24 skrev Tim Funk:
> >
> >>You need to edit conf/tomcat-users.xml and add a user to the manager and
> >>admin role.
> >>
> >>ex:
> >>   
> >>
> >>-Tim
> >>
> >
> >  Thanks, you are right. From where did you have that piece of information?
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



Re: error with tomcat examples

2003-05-29 Thread Anthony Cunningham
jsp files are compiled into servlets when you first request them
on windows they are compiled into the tomcat/work/localhost/ folder


electroteque wrote:

> hi there i am having problems trying to get the source code of the jsp
> examples doesnt seem to work
> http://electroteque.dyndns.org:1025/examples/jsp/index.html
>
> also when i execute them they take forever , where the servlets dont , may i
> ask what the difference is between jsp and servlets ?
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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