RE: Fop Servlet Problems

2002-06-19 Thread mike . witt
If it goes white, I would also try: "fo=c:\border.fo&dummy=.pdf".  I
recently was able to resolve a "white screen" problem with ie because it
didn't recognize that its response was pdf without this pdf extension.

-Original Message-
From: gary cor [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 19, 2002 5:41 AM
To: [EMAIL PROTECTED]
Subject: RE: Fop Servlet Problems


Mike,

I haven't access to it right now. But I did try fo=c:\borber.fo and the web 
browser goes white with the FopServlet only but no PDF anywhere. I haven't 
access to it now but I'll try it again later, I think I probably do it with 
escaping next ie.

fo=c%3a\borber.fo

Cheers

G.


>From: [EMAIL PROTECTED]
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: RE: Fop Servlet Problems
>Date: Tue, 18 Jun 2002 18:57:08 -0700
>
>Did you try giving the fo file a path?  For example when I ran this I gave
>it "fo=c:\temp\simple.fo" and it worked (assuming my fo file was found in
>c:\temp".  Of course, an absolute path isn't so good for servlets, but you
>get the idea.
>
>Mike
>
>-Original Message-
>From: gary cor [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, June 18, 2002 6:46 PM
>To: [EMAIL PROTECTED]
>Subject: Fop Servlet Problems
>
>
>Dear All,
>
>I am up and running with my first ever servlets in Tomcat4.03 (although 
>they
>
>only run in the examples folder). So, I put all five of the latest version
>of the jar files as instructed in FOP servlets into the lib directory (
>avalon-framework-4.1.2.jar batik-all-1.5b1.jar fop-0.20.3rc.jar
>logkit-1.0.1.jar and xalan-2.3.1.jar) and complied servlets OK as well.
>However, following this I've tried everything I can think possible to make 
>a
>
>servelt produce a pdf from fo and still no joy and very soar eyes now as
>well!
>
>First I ran them without an fo file but they error as follows:
>http://localhost:8080/examples/servlet/FopPrintServlet?
>or
>http://localhost:8080/examples/servlet/FopServlet?
>Results in:
>"FopServlet Error
>No 'fo' or 'xml/xsl' request param given."
>
>So then I assume I it is just a case of not finding an file.fo but when I
>try to give in one
>
>http://localhost:8080/examples/servlet/FopServlet?fo=border.fo
>
>and it always causes a status 500 internal service error (maybe something 
>to
>
>do with it running only in the examples folder I have no idea!).  I also
>found a mail a while ago from the group saying to put the fo files in the
>C:\Apache-Tomcat\bin file but still I get the same errors.
>
>Please can someone help?
>
>G.
>
>PS. I have also found a servlet in saxon for FOP has anyone tried this out
>is it easier to get working!
>
>
>
>_
>Send and receive Hotmail on your mobile device: http://mobile.msn.com


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


RE: Fop Servlet Problems

2002-06-19 Thread gary cor
Mike,
I haven't access to it right now. But I did try fo=c:\borber.fo and the web 
browser goes white with the FopServlet only but no PDF anywhere. I haven't 
access to it now but I'll try it again later, I think I probably do it with 
escaping next ie.

fo=c%3a\borber.fo
Cheers
G.

From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: Fop Servlet Problems
Date: Tue, 18 Jun 2002 18:57:08 -0700
Did you try giving the fo file a path?  For example when I ran this I gave
it "fo=c:\temp\simple.fo" and it worked (assuming my fo file was found in
c:\temp".  Of course, an absolute path isn't so good for servlets, but you
get the idea.
Mike
-Original Message-
From: gary cor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 18, 2002 6:46 PM
To: [EMAIL PROTECTED]
Subject: Fop Servlet Problems
Dear All,
I am up and running with my first ever servlets in Tomcat4.03 (although 
they

only run in the examples folder). So, I put all five of the latest version
of the jar files as instructed in FOP servlets into the lib directory (
avalon-framework-4.1.2.jar batik-all-1.5b1.jar fop-0.20.3rc.jar
logkit-1.0.1.jar and xalan-2.3.1.jar) and complied servlets OK as well.
However, following this I've tried everything I can think possible to make 
a

servelt produce a pdf from fo and still no joy and very soar eyes now as
well!
First I ran them without an fo file but they error as follows:
http://localhost:8080/examples/servlet/FopPrintServlet?
or
http://localhost:8080/examples/servlet/FopServlet?
Results in:
"FopServlet Error
No 'fo' or 'xml/xsl' request param given."
So then I assume I it is just a case of not finding an file.fo but when I
try to give in one
http://localhost:8080/examples/servlet/FopServlet?fo=border.fo
and it always causes a status 500 internal service error (maybe something 
to

do with it running only in the examples folder I have no idea!).  I also
found a mail a while ago from the group saying to put the fo files in the
C:\Apache-Tomcat\bin file but still I get the same errors.
Please can someone help?
G.
PS. I have also found a servlet in saxon for FOP has anyone tried this out
is it easier to get working!

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


RE: Fop Servlet Problems

2002-06-19 Thread mike . witt
Did you try giving the fo file a path?  For example when I ran this I gave
it "fo=c:\temp\simple.fo" and it worked (assuming my fo file was found in
c:\temp".  Of course, an absolute path isn't so good for servlets, but you
get the idea.

Mike

-Original Message-
From: gary cor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 18, 2002 6:46 PM
To: [EMAIL PROTECTED]
Subject: Fop Servlet Problems


Dear All,

I am up and running with my first ever servlets in Tomcat4.03 (although they

only run in the examples folder). So, I put all five of the latest version 
of the jar files as instructed in FOP servlets into the lib directory ( 
avalon-framework-4.1.2.jar batik-all-1.5b1.jar fop-0.20.3rc.jar 
logkit-1.0.1.jar and xalan-2.3.1.jar) and complied servlets OK as well.  
However, following this I've tried everything I can think possible to make a

servelt produce a pdf from fo and still no joy and very soar eyes now as 
well!

First I ran them without an fo file but they error as follows:
http://localhost:8080/examples/servlet/FopPrintServlet?
or
http://localhost:8080/examples/servlet/FopServlet?
Results in:
"FopServlet Error
No 'fo' or 'xml/xsl' request param given."

So then I assume I it is just a case of not finding an file.fo but when I 
try to give in one

http://localhost:8080/examples/servlet/FopServlet?fo=border.fo

and it always causes a status 500 internal service error (maybe something to

do with it running only in the examples folder I have no idea!).  I also 
found a mail a while ago from the group saying to put the fo files in the 
C:\Apache-Tomcat\bin file but still I get the same errors.

Please can someone help?

G.

PS. I have also found a servlet in saxon for FOP has anyone tried this out 
is it easier to get working!



_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


Re: Fop Servlet Problems

2002-06-19 Thread Alexis HAUMONT
Hi,
I've been using the FopServlet to build a prototype, but the first thing 
I did was to change in the
given FopServlet the way it retrieves this files (its dependant on the 
'working directory' of your JVM) :
try replacing the doGet method of FopServlet with the one beside.
Then place your fo files in your /WEB-INF/fo

Regards,
Alex.
   public void doGet(HttpServletRequest request,
 HttpServletResponse response) throws 
ServletException {
   try {
   String foParam = request.getParameter(FO_REQUEST_PARAM);
   String xmlParam = request.getParameter(XML_REQUEST_PARAM);
   String xslParam = request.getParameter(XSL_REQUEST_PARAM);

   if (foParam != null) {
   InputStream foInput = 
getServletContext().getResourceAsStream("/WEB-INF/fo/" + foParam);
   renderFO(new InputSource(foInput), response);
   } else if((xmlParam != null) && (xslParam != null)) {
   File xslFile = new 
File(getServletContext().getRealPath("/WEB-INF/xsl/" + xslParam));
   File xmlFile = new 
File(getServletContext().getRealPath("/WEB-INF/xml/" + xmlParam));
   XSLTInputHandler input = new XSLTInputHandler(xmlFile, 
xslFile);
   renderXML(input, response);
   } else {
   PrintWriter out = response.getWriter();
   out.println("Error\n"+
   "FopServlet ErrorNo 'fo' "+
   "request param given.");
   }
   } catch (Exception ex) {
   throw new ServletException(ex);
   }
   }



gary cor wrote:
Dear All,
I am up and running with my first ever servlets in Tomcat4.03 
(although they only run in the examples folder). So, I put all five of 
the latest version of the jar files as instructed in FOP servlets into 
the lib directory ( avalon-framework-4.1.2.jar batik-all-1.5b1.jar 
fop-0.20.3rc.jar logkit-1.0.1.jar and xalan-2.3.1.jar) and complied 
servlets OK as well.  However, following this I've tried everything I 
can think possible to make a servelt produce a pdf from fo and still 
no joy and very soar eyes now as well!

First I ran them without an fo file but they error as follows:
http://localhost:8080/examples/servlet/FopPrintServlet?
or
http://localhost:8080/examples/servlet/FopServlet?
Results in:
"FopServlet Error
No 'fo' or 'xml/xsl' request param given."
So then I assume I it is just a case of not finding an file.fo but 
when I try to give in one

http://localhost:8080/examples/servlet/FopServlet?fo=border.fo
and it always causes a status 500 internal service error (maybe 
something to do with it running only in the examples folder I have no 
idea!).  I also found a mail a while ago from the group saying to put 
the fo files in the C:\Apache-Tomcat\bin file but still I get the same 
errors.

Please can someone help?
G.
PS. I have also found a servlet in saxon for FOP has anyone tried this 
out is it easier to get working!


_
Send and receive Hotmail on your mobile device: http://mobile.msn.com