tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yangyuexiang <yangy...@comp.nus.edu.sg>
Subject How to process events in jsp?
Date Tue, 05 Sep 2000 06:34:01 GMT
Sorry for my not clear information.

My java bean (designed to do some time consuming work such as
optimization) will call firePropertyChange(...) methods during its
running. In normal java application, there is a PropertyChangeListener
instance.

In the jsp file, the bean is called (However, I donot want the servlet to
extend PropertyChangeListener) . The bean will generate a serial of
events by calling "firePropertyChange" method. I want to send the message
related to these events to the clients.

The difficulty is:
(1) How can the servlet receive these events. I can solve it by adding
one PropertyChangeListener
instance in jsp and let it listen the bean which has session scope. But I
am not sure whether it is the best way.
(2) What is the scope of "out" object? Can I have a "out" object which
has session scope? Does it means I must abandon the implicit out object
and define a new JspWriter instance myself? Then, how can I send the
messages back to the clients because the clients donot know whether there
is a new message generated in the server?

Regards
yangyuexiang


Ralph Einfeldt wrote:

> I think you must supply a bit more info to get helpfull answers.
>
> What do mean with events?
> How are the events realised (Exceptions, AWT Events, JMS, ...)?
> How do the events communicate with the outside world
> (in process, sockets)
>
> > -----Urspr√ľngliche Nachricht-----
> > Von: Yang Yue Xiang [mailto:yangyuex@comp.nus.edu.sg]
> > Gesendet: Dienstag, 5. September 2000 04:50
> > Cc: tomcat-user@jakarta.apache.org
> > Betreff: How to process events in jsp?
> <snip/>
> > I want to call  a java bean in a jsp file.
> > But this java bean will generate events during its running because I
> > used events to communicate with outside world. These events contain
> > the running results. Does it possible for me to output the results
> > dynamically to the clients? How to do? Any suggestions are welcome!
> <snip/>


Mime
View raw message