0

How to get client's HTTP user agent?

asked 2007-10-07 14:54:53 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4556451

By: andreas-h

Hi there,

I know that the ui.Execution class provides me with the possibility to check whether the client is using a specific browser. However, I'd like to know the complete client's HTTP User-Agent string.
How can I get it?

Thanks for your help!

A.

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2007-10-08 01:01:22 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4556948

By: robbiecheng

Try this,

((HttpServletRequest)Executions.getCurrent().getNativeRequest()).getHeader("User
-Agent");

/Robbie

link publish delete flag offensive edit

answered 2007-10-08 10:15:03 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4557409

By: andreas-h

Great, thank you, that's doing the job!

A.

link publish delete flag offensive edit

answered 2013-05-18 08:39:04 +0800

kwangz gravatar image kwangz
0

there's getUserAgent() method in ZK. i.e. Executions.getCurrent().getUserAgent()

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2007-10-07 14:54:53 +0800

Seen: 402 times

Last updated: May 18 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More