views:

84

answers:

1

I am currently accepting the parameters login and password in my servlet, but logs are storing this info when using wget (as long as it is GET method, and apache is in the middle)

Instead of this I want to enhance my servlet's authentication accepting:

wget --http-user=login --http-password=password http://myhost/myServlet

How can I read, in my servlet, the server side, the login and the password user is sending, in java code?

+1  A: 

Can you not persuade your servlet clients to use POST instead of GET? wget has --post-data and --post-file options which might do what you need it.

wget's --http-user and --http-password options cause it to send HTTP Basic authentication. They are normally used for simple access control enforced by the web server itself, typically mediated by a .htaccess file; you'll have to consult your servlet framework documentation to find out whether that is available to you.

crazyscot