| The best way is to use an HTTPHandler. Essentially these are classes which "trap" the server request for any kind of file you want (in this case, a .pdf file) and process the class instead. If the user is logged in, you can then look up the PDF filename that is being requested and write it to the output stream.
Start by Googling HTTPHandler and reading the documentation/examples. |