You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by "Carter, Will" <wc...@EnvestNet.com> on 2002/03/14 23:06:12 UTC

Questions from an inexperienced user. Please help.

Hi,

First let me say that I am not a java programmer nor very knowledgable on
how web servers work. I am a web designer and cold fusion programmer and can
realize the usefulness of batik, svg, and FOP.

Here is what I have been successful at doing...

I built a dynamic svg based bar graph that pulls its data from a database
and displays it in a browser.
Realizing that svg is not always viewable in the browser unless you have the
plugin, I needed to figure out a way to convert the svg to jpeg to display
on the web on the fly.  I can do this using batik by directly executing
java.exe on the web server like this from my cold fusion page.

<CFX_execute NAME="java.exe"
   ARGUMENTS="java -jar d:\location_of_batik-rasterizer\batik-rasterizer.jar

   d:\location_of_source_svg\source.svg -d 
   d:\location_of_outputted_jpg\outputjpg.jpg -w 250 -h 165 -m image/jpg -q
.99"
TIMEOUT="10">

by reading through these archives, I realize that this command line
execution of batik is probably the wrong way to do it. I believe the correct
way would be to put the transcoder java into a servlet somehow and then the
server runs the servlet.  Is this correct?

okay here are other questions...
My server is windows 2000 server.  Is it possible for this kind of server to
run a Java Servlet or am I out of luck?

I think that a DLL file is a program the windows 2000 server can run.  And I
think that if the DLL program hangs for some reason, it won't crash the
server.  So, is there some way to run java based functionality from a dll?
I believe this is what I am talking about.
http://java.sun.com/features/2000/03/accessbridge.html  Am I barking up the
wrong tree with this?

okay, my last question is multithreading.  We want to have the svgs and
resulting jpgs generate dynamically.  This is no problem with the svgs, but
I have to keep invoking the batik rasterizer every time an svg needs to be
converted to be displayed.  To test it, I put the above execute command in a
loop that told java.exe to run over 1000 times and it didn't crash the
server.  Does this mean that it is passing the test of multiple requests to
the same program?  Or should I be worried about requests to java.exe from
different clients at the exact same time?  Is this what would crash a
server?

again, I am very inexperienced and would appreciate any help you could
provide.

thank you,
Will Carter

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


Re: Questions from an inexperienced user. Please help.

Posted by "J. David Eisenberg" <ca...@catcode.com>.
On Thu, 14 Mar 2002, Carter, Will wrote:

> Hi,
> 
> First let me say that I am not a java programmer nor very knowledgable on
> how web servers work. I am a web designer and cold fusion programmer and can
> realize the usefulness of batik, svg, and FOP.
> 
> Here is what I have been successful at doing...
> 
> I built a dynamic svg based bar graph that pulls its data from a database
> and displays it in a browser.
> Realizing that svg is not always viewable in the browser unless you have the
> plugin, I needed to figure out a way to convert the svg to jpeg to display
> on the web on the fly.  I can do this using batik by directly executing
> java.exe on the web server like this from my cold fusion page.

[snip]

> by reading through these archives, I realize that this command line
> execution of batik is probably the wrong way to do it. I believe the correct
> way would be to put the transcoder java into a servlet somehow and then the
> server runs the servlet.  Is this correct?

Yes, it might be more efficient in the long run. An example of this
approach is in Chapter 13 of the book "SVG Essentials."

> 
> okay here are other questions...
> My server is windows 2000 server.  Is it possible for this kind of server to
> run a Java Servlet or am I out of luck?

The Jakarta Tomcat servlet container (http://jakarta.apache.org) can be
used as a service on Windows 2000 with IIS. See:

  http://members.ozemail.com.au/~lampante/howto/tomcat/iisnt/index.html

[snip question about multithreading; I'm not sure, but I think Jakarta 
multithreads very nicely.]

-- 
J. David Eisenberg  http://catcode.com/


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