Sivakumar S wrote:
> Hi, We are working in an application where we are using HTML,
> Servlets, Oracle Report Server(with pre-created reports) to generate
> PDF reports and download them as and when the user wishes to. He also
> has the option of viewing it on the screen or printing it to a remote
> printer. It is a typical thin client three tier environment Problem
> oneI have a HTML form, which on POST calls a cgi program of an Oracle
> Report server, which in turn creates a PDF file in the background.
> Simultaneously the servlet has to generate a DHTML page which gives a
> link for downloading the PDF report created by the Oracle Report
> server.
>
> Using the click of the submit button, I'm able to either call the CGI
> or the SERVLET. How to trigger both ? Problem two
> Is it possible to browse through the contents of a particular
> directory in the FTP server, sort the files listed and present it to
> the user for downloading. Happy Java Programming !!! Thank
> you Regards Sivakumar S
>
For problem one, an easy approach would be to have your submit go to the
servlet. Then, in the servlet, use the URLConnection class to submit
the request to the CGI script that produces the PDF file. Examples are,
among other places, in the Networking Trail of the Java Language
Tutorial (http://java.sun.com/docs/books/tutorial).
For problem two, this is an automatic feature when you use an "ftp:"
URL. For example, if I have an FTP server with a directory named /pub
on it, the following URL will generate a directory listing for me
(assuming that anonymous access is allowed):
ftp://ftp.mycompany.com/pub
Craig McClanahan
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html