File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes HTTP_USER_AGENT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "HTTP_USER_AGENT" Watch "HTTP_USER_AGENT" New topic
Author

HTTP_USER_AGENT

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I'm using JSP with WLS, and am trying to capture the HTTP_USER_AGENT header variable to prepopulate a form text box. I can find no reference in any of the JSP books I have available. Is there any way to the user's network logon?
Rick Sharpless
DirecTV
rsharpless@directv.com
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
The http user-agent which is part of the request header, is used to determine the type of browser that the client is using. Not sure if that's what you are trying to do.

Bosun


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
OOOPS! It's not the user_agent I'm after. My mistake. I know IIS captures a couple of other variables, and maybe WLS doesn't provide this info. What I'm after is the AUTH_USER or REMOTE_USER variable.
Sorry for the confusion.
Rick Sharpless
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
Provided you are using Basic Authenication, you should be able to get the REMOTE_USER from the request object using the getRemoteUser() method.
James.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
THAT WAS IT! Thanks soooo much.
Rick Sharpless
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

"rsharpless"
your name doesn't agree with the javaranch guidelines.
please take a moment and re-register after reviewing the
guidelines at http://www.javaranch.com/name.jsp
thanks for your cooperation.
- satya

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTTP_USER_AGENT