Welll...... this is a PHP forum, but the logic is the same:
if ($authenticated) {
header("location: /downloads/your_file.ext");
exit();
}
else {
// display login form
}
Convert that to JSP and you should have a starting point.
-geoff