Thanks.  I had tried to accomplish what you're describing, but I'm new
to Java threading.  I am calling wait() from the main servlet thread. 
At the end of the event listener I call notify().  This doesn't not
seem to work.  Any suggestions?

As for what why I'm using JSVGComponent-  I'm writing a custom
web-based map tool.  By using JSVGComponent I can have the client
click on the map in the web browser, then via the xmlhttprequest
object send the coordinates to the server.  I'm using the
JSVGComponent to generate a GVTTree and checking each path's
contains(Point2D) method to see which geographic region the client
clicked on.

David

On 9/2/05, Thomas DeWeese <[EMAIL PROTECTED]> wrote:
> David Nolen wrote:
> > I using the Batik classes from a Java Servlet.  In the Servlet I'm
> > creating a new JSVGComponent and then calling the loadSVGDocument()
> > method.  However according to the Batik API, the only way to know if
> > the document has finished loading is to set up an event listener,
> > which I've done.
> >
> > However the listener fires after the Servlet has exited.  How can I
> > make the Servlet wait for loadSVGDocument() to truly finish?
> 
>     There are a large number of ways the simplest is probably to
> have the main Servlet thread call 'wait()' and have your callback
> 'notify' the main servlet thread when it is called.
> 
>     BTW it is fairly unusual to be using the JSVGComponent in a
> Servlet.  Can I ask what you are doing?  You may find that the
> Transcoders are more appropriate or that you would find it easier
> to call some of the internal classes directly rather than work
> around the asynchronous nature of the JSVGCanavs (async is good
> for UI, bad for Servlet).
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to