xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andres Toussaint <and...@onemileup.com>
Subject Re: Batik and JSP
Date Mon, 24 Jan 2005 15:10:36 GMT
I am doing something similar. I have a WebObjects application in my  
server, that uses Batik to build a properly built and encoded SVG file  
from information stored in a DB (including JavaScripts) and it is then  
served to the client, that in my case are both a Java Client App  
running a Batik JSVGCanvas, and Adobe SVG Viewer over the web.

On the server I create a SVGDocument (not associated to any JSVGCanvas)  
and i assemble my SVG from DB sources using the SVGDocument constraints  
(i.e. adding SVGElements)

Via JavaScript´s getURL i retrieve additional information from the  
server and append it dynamically to my SVG image.

I know this is not JSP, but is a similar server-client environment, and  
also Java based, and using JavaScript allows me to have the same  
functionality on different clients.

On Jan 24, 2005, at 8:52 AM, Thomas DeWeese wrote:

> 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
>>>> (http://www.topxml.com/code/default.asp? 
>>>> p=3&id=v20040618151339&ms=20&l=svg&sw=categ).
>>>   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
>>> display).
>>>   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

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

View raw message