xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas DeWeese <Thomas.DeWe...@Kodak.com>
Subject Re: Batik and JSP
Date Mon, 24 Jan 2005 13:52:38 GMT
Hi Arian,

Arian Hojat wrote:

> Well what i wanted to do was basivally have a dynamic canvas that the
> user can make modifications and i rememeber the Baik SVG canvas
> dynamically updated the image based on the info(froma slider for
> setting alpha pretend or doing a filter effect) very fast, so i wanted
> to see if Batik could be embedded into a JSP page. i guess thats not
> possible? only as an applet not a servlet?

    Servlet's run on the server not on the client and there is
no video rate connection between the servlet and the client so you
can't have the canvas in the JSP and update the client in real time.

    You can still send 'dynamic SVG' - which means an SVG file
with embedded scripting and modify the document on the client.
This requires either an Applet (so the canvas can run on the client)
or that the user has the Adobe SVG Viewer installed.  If you go
the ASV route all the modifications need to be made using JavaScript
(AKA EcmaScript) not Java.

> On Mon, 24 Jan 2005 08:31:34 -0500, Thomas DeWeese
> <Thomas.DeWeese@kodak.com> wrote:
>>Hi Arian,
>>Arian Hojat wrote:
>>>Hello fellow svg enthusiasts,
>>>i used Batik a long time ago in a Java app
>>   That's nice!
>>>gonna start using it again to develop a small web app for my senior project.
>>>i was wondering can i use it(svgcanvas etc) on a jsp page,
>>>Any limitations to this or can be used exactly the same?
>>   Well, I think we have some server/client confusion.  As I
>>understand it a JSP page is a mixed HTML/SVG page with Java code
>>embedded in it.  The Page is 'evaluated' on the server and a result
>>is sent to the client.
>>   So I can think of two things you might do with a JSP:
>>       1) You might have the JSP generate a dynamic SVG document
>>that is sent to the client (which is assumed to have an SVG viewer
>>installed - ASV or Batik).
>>       2) You might have the JSP rasterize a SVG document (dynamically
>>generated) and produce a JPEG of the document (which any browser can
>>   Neither of these would use the JSVGCanvas, the first might not use
>>Batik on the Server at all, the second would use the Transcoder API's.
>>   However, outside the context of a JSP you might want to send an
>>applet to the client which could embed the JSVGCanvas for viewing
>>and/or manipulating the SVG.
>>>And if someone can send me a simple page they have done in jsp with
>>>batik/svg, that would be great!

To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

View raw message