This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes How to I get login params of web server login (htaccess)? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to I get login params of web server login (htaccess)?" Watch "How to I get login params of web server login (htaccess)?" New topic
Author

How to I get login params of web server login (htaccess)?

Robert Jaeger
Ranch Hand

Joined: Apr 29, 2002
Posts: 62
Hi!

I�m using Apache Web Server 1.3 and Tomcat Servlet Server 4.x (Connection established).
Some directories on my web server are protected (htaccess). After the successful login the user will be redirected to my webapp.

How do I get the login parameters (login, password) of a user from the web server. I imagine that Apache passes the parameters to the servlet server in some way.

I might get these params like that way ...
request.getParameter(?);

Would be great if someone can help me!

Regards,
Robert.
Moody Hopkins
Greenhorn

Joined: Nov 24, 2003
Posts: 10
check out the javadocs for HttpServletRequest.
There is a getRemoteUser method that will do what you need.
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/index.html
(or similar for your jdk)
 
jQuery in Action, 2nd edition
 
subject: How to I get login params of web server login (htaccess)?
 
Similar Threads
authentication using apache
how define in htacess a link that don´t exist?
Login security issue
Adding Attributes to Servlet Link?
authenticate using apache