Hi Boby,

The prob is that svg renderer *need* to connect to an
X11 server cause batik relies on AWT. When you run it
via the command line there is no prob (assuming you
actually are connected to some kind of X11 server). I
found a workaround by running servlet container in a
shell where i export correct DISPLAY variable first. I
know it's a little bit dirty but i don't know any
better solution...

--- "Lewis, Bobby" <[EMAIL PROTECTED]> a écrit : > I'm
running the example that comes with fop,
> embedding.fo (in
> examples/svg/). When I do it command line (to
> convert this XSLFO that
> contains SVG into a PDF), it works fine. I open the
> PDF and see a picture of
> a tiger.  
> 
> Now, I try to do it on the web. The JSP (that works
> correctly with examples
> like border.fo that do NOT use SVG) takes an XSLFO
> file, and converts it to
> PDF, then returns the byte stream with a header of
> application/pdf. When I
> try it with the SVG FO file, I get:
> 
> Can't connect to X11 window server using ':0.0' as
> the value of the DISPLAY
> variable.
> 
> 
> It's like it's trying to render the SVG to a display
> on the server side. I'm
> explicitly calling 
> driver.setRenderer(Driver.RENDER_PDF);
> so that it renders PDF and not AWT or Print or
> something else. I get this
> stack trace BEFORE the driver.run method returns
> (it's all happening
> somewhere in the conversion process):
> 
> [02.03.01 10:19:12:344 CST] 46e06145 SystemOut     U
> reading user
> configuration file
> 
> [02.03.01 10:19:12:349 CST] 46e06145 SystemOut     U
> building formatting
> object tree
> 
> [02.03.01 10:19:12:350 CST] 46e06145 SystemOut     U
> setting up fonts
> 
> [02.03.01 10:19:12:475 CST] 46e06145 SystemOut     U
>  [1
> [02.03.01 10:19:13:443 CST] 46e06145 WebGroup      X
> Servlet Error:
> Can't connect to X11 window server using
> ':0.0' as the value of
> the DISPLAY variable.: java.lang.Exception: Can't
> connect to X11 window
> server using ':0.0' as the value of the DISPLAY
> variable.
>         at
> jsp.pdf_jsp_23._jspService(pdf_jsp_23.java:154)
>         at
>
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:139)
>         at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
>
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
> va:286)
>         at
>
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:415)
>         at
>
org.apache.jasper.runtime.JspServlet.service(JspServlet.java:544)
>         at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
>
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
> .java:827)
> 
> Any help is appreciated.
> 
> Bobby Lewis
> Solutions Architect
> Aivia
> 3100 McKinnon Suite 1000
> Dallas, TX 75201 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, email:
> [EMAIL PROTECTED]
>  

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to