Jim, I've attached the servlet that we use to handle a simlar issue issue to what you describe. This serlvet handles both HTML and PDF requests and calls either method based on a parameter in the user's session (which could just as easily be in the request). Maybe it will help.
> -----Original Message----- > From: Jim Urban [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 07, 2001 11:02 AM > To: [EMAIL PROTECTED] > Subject: RE: Problems with seeing pdf-files in IE 5.0 > > > Here is the real problem. When the servlet is posted to, the > browser has no > knowledge of what type of data will be sent back. We have a > single servlet > which looks at the request and calls the appropriate class to > process the > request. The request then sends XML back to the servlet. > Then based upon > the presence of the parameter "print" in the http request, our servlet > attempts to locate the XSL:FO file that maps to the request. > If the XSL:FO > file is found, we FOP the XML and send back PDF. Otherwise we use a > XSL:HTML file and send back a HTML page. Our clients are > responsible for > providing XSL:FO files for the pages they want PDF prints. > The XSL:FO files > are optional and may or may not exist. > > Jim > > -----Original Message----- > From: Alex McLintock [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 07, 2001 11:05 AM > To: [EMAIL PROTECTED] > Subject: RE: Problems with seeing pdf-files in IE 5.0 > > > --- Jim Urban <[EMAIL PROTECTED]> wrote: > > you also > have to use an > url with ".pdf" at the > end > > The url the client is posting to is a servlet which uses > FOP to generate a > > PDF and feed it back to the browser. If the client post a > request to > > myservlet.pdf the server will look for a file called > myservlet.pdf and > > return a 403 when it can't find it. So how do you use a > url that ends > with > > .pdf when using servlets? > > If you can't set up an alias in the webserver as people have > suggested you > could > always have a servlet class called "pdf" within a package "myservlet". > End result: myservlet.pdf > > > > > > Could have sworn this was in the FAQ. > > Oh dear - that means the FAQ isn't good enough yet.... > > > Alex > > > ===== > Alex McLintock [EMAIL PROTECTED] Open Source > Consultancy in London > OpenWeb Analysts Ltd, http://www.OWAL.co.uk/ > --- > SF and Computing Book News and Reviews: http://news.diversebooks.com/ > Get Your XML T-Shirt <t-shirt/> at http://www.inversity.co.uk/ > COMPETITION : http://news.diversebooks.com/article.pl?sid=01/10/08/1947255 ________________________________________________________________ Nokia 5510 looks weird sounds great. Go to http://uk.promotions.yahoo.com/nokia/ discover and win it! The competition ends 16 th of December 2001. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
ReportGeneratorServlet.java
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]