posted 16 years ago
Okay, with a little help from my friends, I got it working! I had to move the code for the ServletOutputStream to after the InputStream so that it would not commit the response before I'd actually tested if the file requested was valid. Once I did that, if the filename requested was invalid in any way, shape, or form, it pulled in an html file whose sole purpose was to execute a javascript alert. PDC! (pretty durned cool)
If anyone is interested in code that works really, really well, here you go:
And the badLink.html looks like this: