Re: fop + servlet + multisession

2003-02-03 Thread Oleg Tkachenko
Gian Piero Bottini wrote:
I am using FOP 0.20.5rc to produce PDF files from XML and XSL-FO
I use a servlet in Tomcat 4.04
if I  have a large file (100 pages) and 2 session of IE are working 
concurrently 
there are no exception but  the two processes don't finish and the pdf 
files are not displayed..
Did FOP finish processing? Run FOP in debug mode and analize debug messages.
--
Oleg Tkachenko
Multiconn Technologies, Israel
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: fop + servlet + multisession

2003-02-03 Thread Gian Piero Bottini
Now I'll try to encrease the debug level...(by the way how can I do that??)
Now my output in the dos-Tomcat window is this ( I'm creating a pdf document
99 pages long):

[INFO] [99]
[INFO] [86]
[INFO] [87]
[INFO] [88]
[INFO] Parsing of document complete, stopping renderer
[INFO] [89]

and it seems blocked but I don't know.
but sometimes it works fine...very strange...
and sometimes the servlet is called twice( why??)

This is the code:

.
try{
   XSLTInputHandler input =
new XSLTInputHandler(xmlFile,
   xslFile);
renderXML(input, response);

  } catch (Exception ex) {
 ex.printStackTrace();
  }
.

public void renderXML(XSLTInputHandler input,
  HttpServletResponse response) throws
ServletException {
try {
ByteArrayOutputStream out = new ByteArrayOutputStream();
response.reset();

// questa riga รจ necessaria per IE che forse non capisce il
SetContentType()
response.setHeader(Content-Disposition,inline; filename= +
Report1.pdf);
response.setContentType(application/pdf);

org.apache.fop.apps.Driver driver = new
org.apache.fop.apps.Driver();

driver.setRenderer(org.apache.fop.apps.Driver.RENDER_PDF);
System.gc();
driver.setOutputStream(out);
driver.render(input.getParser(), input.getInputSource());
System.gc();
System.out.println(stop render);
byte[] content = out.toByteArray();
response.setContentLength(content.length);
response.getOutputStream().write(content);
response.getOutputStream().flush();
} catch (Exception ex) {
throw new ServletException(ex);
}
}

Thanks a lot
Regards

Gian Piero












- Original Message -
From: Oleg Tkachenko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 03, 2003 9:59 AM
Subject: Re: fop + servlet + multisession


 Gian Piero Bottini wrote:

  I am using FOP 0.20.5rc to produce PDF files from XML and XSL-FO
  I use a servlet in Tomcat 4.04
  if I  have a large file (100 pages) and 2 session of IE are working
  concurrently
  there are no exception but  the two processes don't finish and the pdf
  files are not displayed..
 Did FOP finish processing? Run FOP in debug mode and analize debug
messages.
 --
 Oleg Tkachenko
 Multiconn Technologies, Israel


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





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



Re: fop + servlet + multisession

2003-02-03 Thread Fabrizio Tringali
ciao Gian Piero,

this is the snippet to set the log level to debug
--
//Setup logger
Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_DEBUG);
driver.setLogger(logger);
MessageHandler.setScreenLogger(logger);
--


and sometimes the servlet is called twice( why??)
it's a bug of  IE 5.0/5.5



hope this help

fabrizio

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



Re: fop + servlet + multisession

2003-02-03 Thread Gian Piero Bottini
Thanks  a lot 
but sometimes (with 3 session of IE)
tomcat  stops without exception or without particolar debug messages...
Somebody have any ideas??
Could be a memory problem??

Regards
  Gian Piero



- Original Message - 
From: Fabrizio Tringali [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 03, 2003 12:39 PM
Subject: Re: fop + servlet + multisession


 ciao Gian Piero,
 
 this is the snippet to set the log level to debug
 --
 //Setup logger
 Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_DEBUG);
 driver.setLogger(logger);
 MessageHandler.setScreenLogger(logger);
 --
 
 
 and sometimes the servlet is called twice( why??)
 it's a bug of  IE 5.0/5.5
 
 
 
 hope this help
 
 fabrizio
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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