I have a requirement where the username & password from webpage that contains the applet needs to be available in the applet also.
1. User logs in to site using form based authentication
2. Home page contains/embeds an applet where we need the already authenticated username & password to do some separate processing.
Since this is then (after the login) presumably a secure connection using SSL, the easiest would be to embed them as parameter tag in the applet tag.
But do you really the username and password? Or is it a case where you want to be sure that the applet that accesses the server comes from an authenticated user? If the latter, you could pass some secure (hashed) user identifier to the applet, which would then use that whener it needs to access the server.
All of life is a contant education - Eleanor Roosevelt. Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!