Checking User Agent !

Hi,
We have a requirement that we need to redirect to the correct page by checking the user agent , we dont wanna use Akamai as per financial constraint.
How can we redirect the request to the appropriate jsp's , we dont wanna check the user agent in each page.
We are going to insert one pipeline servlet after the dynamo handler to check the user agent with the following code
DynamoHttpServletRequest.getHeader() ;
is this best way ? or is there any other efficient way to handle this requirement.
Thanks,

This sounds like the job for a session based component. Create a session based component that extends GenericService. In its doStartService method set the sessions user-agent string by accessing the current request (ie ServletUtil.getCurrentRequest()) and get the HTTP User-Agent header. Now you have a session based component that when started has a property that holds the sessions User-Agent string. Next create a pipeline servlet that resolves this session based component and access the user-agent string property. Here you can test the property and redirect if necessary.
This technique only calculates the user-agent once per session when the session based component is started. On subsequent requests the header is not checked because the session based component is started only once per session.
-Andrew

Similar Messages

  • Is there a way to change my user agent from Safari to Internet Explorer?

    Hello All,
    I need to fill out a application on line and it appears that it does not recognize Safari.  Sounds like it needs to see IE.  Anyway to temporarily enable IE for this application?  Otherwise I have to go use a PC at the local library....
    These instructions below in no way match my Snow Leopard 10.6.8 on my iMac - they don't make sense to me.  Any help/guidance is appreciated to fill out this on-line form.  Thanks!
    Apple Safari
    If using Safari, you must have Internet Explorer 6.0 or higher version or Firefox 2.0.0.12 - Macversion web browser at the "User Agent" category or higher for Firefox. Use the following instructions to configure your Safari browser to access e-QIP.
    On the Menu Bar
    Select Edit box (top of screen)
    Preferences
    Security
    Accept Cookies (only from site that you navigate to)
    Advanced
    Check the box labeled "Show Develop Menu in Menu Bar"
    Click proxies - Change settings box (Opens to Internet Explorer (IE) Properties Boxes)
    Advanced tab
    Security category is located near bottom of page
    Click "Do not save encrypted pages to disk"
    Click "Empty Temporary Internet Files folder when browser is closed"
    Click/enable SSL 2.0
    SSL 3.0
    TLS.1
    Exit Preferences Window
    On Menu Bar select "Develop User Agent"

    John..
    This may work but no guarantees ..
    Launch Safari. From the Safari menu bar top of your screen click Safari. From the drop down menu click Preferences then select the Advanced tab.
    Select:  Show Develop menu in menu bar
    Now from the Safari menu bar again, click Develop > User Agent
    Try IE 7, 8, or 9.

  • Configuration issue in IE as Document mode: 10 and User agent String: Internet Explorer 8

    Hi,
    I have a telerik rad popup window performing some input operation. The problem is when I use the configuration in IE as Document mode: 10 and User
    agent String: Internet Explorer 8, scroll bars appear in the window from nowhere. It is working fine with every other configuration of IE. I've also used a separate stylesheet for IE 8 but it won't apply in this case. 
    Here are the screen shots of the window.
    Actual view
    With Scorllbar
    Please if anybody could suggest a solution for this weird problem it would be a great help.
    Thanks in advance.
    Neelesh

    Hi,
    It seems we need to talk with the site developers to determine how the sheet would display with different IE user agent string.
    Regarding the user agent string changes, please take a check with the following article:
    Introducing IE9’s User Agent String
    The Internet Explorer 8 User-Agent String (Updated Edition)
    Hope this may help
    Best regards
    Michael Shao
    TechNet Community Support

  • How to get iphones / ipad user agent for internet access

    Hi.
    We recently setup some wireless, and I'm wondering how I can get iphones and ipads connected to the internet without prompting for a username and password. Even if it does prompt and we put in our domain credentials, things don't work.. it's like it heavily restricts access. However if you put DOMAINNAME\ in front of your user name, then it seems to work.
    Without making static IP reservations and attaching those ip's to no authentication in IronPort... isn't there a way to assign these devices to a policy via their user agent string? Problem is finding that string amongst different versions of iphones and ipads.
    I visited www.ipchicken.com on my iphone and it said Browser: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_2 like Mac OS X; en-us)
    AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5
    What part of this do I copy into the user agents field for my no autnentication identity that I'm trying to alter? I tried putting AppleWebKit in, but it still blocks almost everything.
    Right now in this Allowed User Agents identiy i have Windows Update checked, as well as these:
    (MSOffice\x2014)
    Microsoft NCSI
    SSLSoapClient
    AppleWebKit (does not seem to work)
    Thanks for the help!

    I think I figured it out.  Followed this closely:
    https://ironport.custhelp.com/cgi-bin/ironport.cfg/php/enduser/std_adp.php?p_faqid=1426&p_sid=ODIeCGuk&p_lva=1713&p_li=cF91c2VyaWQ9MXJvblAwcnQmcF9wYXNzd2Q9Zm8wQmE1
    Also do you guys know if the custom user agent field can accept wildcards?  Problem is, every version of iOS for iPhone 1, 3G, 3GS, 4, and iPad 1 & 2, or ipod touch (various generations) all have variations in their user strings.  If I could just do a blanket statement for like *iphone* , *ipad*, etc.... that would be easier.
    So are there any wildcards or txt masks that can be put in and interpreted in the custom user agents field?

  • Content repository FD does not exist :user agent sap web application server

    Hi All
    i am using 3rd party software(dms SERVER) and connecting it using archive link interface SAP HTTP 4.5 AL
    i have created a new repository with name FD using tcode OAC0.when i give inputs in OACO and click on test connection it gives me information Content repository FD does not exist
    here is my HTTP trace at receiver content server side
    TRACE:(5) - GET /Default.aspx?serverInfo&pVersion=0045&contRep=FD HTTP/1.0
    TRACE:(5) - user-agent: SAP Web Application Server (1.0;700)
    TRACE:(5) - host: SERVERIP:PORT
    TRACE:(5) - accept-encoding: gzip
    TRACE:(5) -
    --> C05 --> S06 ==== (15.583) Request <GET /Default.aspx?serverInfo&pVersion=0045&contRep=FD HTTP/1.0>
    --> C05 --> S06 GET /Default.aspx?serverInfo&pVersion=0045&contRep=FD HTTP/1.0
    --> C05 --> S06 user-agent: SAP Web Application Server (1.0;700)
    --> C05 --> S06 host: SERVERIP:PORT
    --> C05 --> S06 accept-encoding: gzip
    --> C05 --> S06 ==== Body 0 bytes
    --> C05 --> S06 Body =>
    Sockets 6 of 4,5,6 need checking ####
    TRACE:(6) - HTTP/1.1 200 OK
    TRACE:(6) - Cache-Control: private
    TRACE:(6) - Content-Length: 189
    TRACE:(6) - Content-Type: text/plain; charset=utf-8
    TRACE:(6) - Server: Microsoft-IIS/7.5
    TRACE:(6) - X-AspNet-Version: 2.0.50727
    TRACE:(6) - boundary:
    TRACE:(6) - X-dateC: 2010-10-22
    TRACE:(6) - X-timeC: 07:07:23
    TRACE:(6) - X-dateM: 2010-10-22
    TRACE:(6) - X-timeM: 07:07:23
    TRACE:(6) - X-contentRep: FD
    TRACE:(6) - X-numberComps: 1
    TRACE:(6) - X-docId: 0
    TRACE:(6) - X-docStatus: online
    TRACE:(6) - X-pVersion: 0045
    TRACE:(6) - X-ContentServer: contentServer=Server ip;contentServerPort='9025;pVersion='0045';id='DMSSRV1'
    TRACE:(6) - X-Powered-By: ASP.NET
    TRACE:(6) - Date: Fri, 22 Oct 2010 13:37:23 GMT
    TRACE:(6) - Connection: close
    TRACE:(6) -
    TRACE:(6) - serverType='DMSSRV1';1;serverVersion=12;serverPatch=0;serverBuild=180;pVersion='0045';serverStatus=running;serverStatusDescription=;serverDate='2010-10-22';serverTime='07:07:23';startUpDate='2010-10-22';startUpTime='07:07:23';lastAccessDate='2010-10-22';lastAccessTime='07:07:23';contRep='FD';contRepStatus=defined;contRepStatusDescription=;contRepDescription=Content-Repository Test;contentStorageHost=localhost;contentStorageName=FD;secKeyVerification=y;defaultDocProt=rucd;
    one change which i have observed in this trace is .. this trace is showing trace agent as SAP Web application server ... ideally it should show user agent :SAP HTTP
    Please suggest me some solution.
    Thanks
    sandeep

    Dear all,
    my issue is resolved.I solved my issue myself
    solution: SAP sends HTTP request in the form of URL like
    http://serverip:port/GET /Default.aspx?serverInfo&pVersion=0045&contRep=FD HTTP/1.0
    Now your response should contain string  contRep="FD"
    dont forget double quotes on repository name coz SAP program matches string with double quotes. if you will return value like this contRep=FD
    this will through error.
    Thanks
    sandeep sharma

  • Bad user agent error message

    my homepage is uk.yahoo.com. there are a number of video adverts which are blank except for this ; bad user agent

    Your user agent looks quite normal to me.
    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites that cause problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • Firefox3 User-Agent spoofing

    Aka "How to use an online banking website by fooling them into using an unsupported browser".
    Natwest check the User-Agent string of the browser, and block ones they dislike.
    So, enter about:config in the firefox3 URL line, right-click on the list that appears, click on "New - String", enter general.useragent.override and for the string, enter one of the following common user agents:
    Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080213 Firefox/2.0.0.12
    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)
    Then check the result.
    This method works with firefox 3.0b3-3.
    Edit: Modify Headers does the same thing and works with firefox3, but is not necessary.
    Last edited by brebs (2008-03-10 19:44:46)

    xsdnyd wrote:general.useragent.override
    Thanks, I've altered the first post to use that instead
    CNN seems OK with a spoofed user agent.
    Last edited by brebs (2008-03-10 20:11:46)

  • Safari 5.0 changes user agent to become mobile device agent on G5 10.5.8

    Safari 5.0 changes the default user agent on my two G5 Dual running on 10.5.8 deeply in the system , affecting ALL browsers in such a way that I can't access my CMS and my organization's website properly anymore. Each and every time it loads as 'default' user agent, but the 'default' user agent is now set to be some kind of mobile device.
    I can check this since my organization has a script which detects which device you are accessing the site with and changes the layout accordingly. By setting the user agent to 'Safari 5.0' in Safari the page loads OK.
    Worse is the fact that CMS works only with Firefox, and it's 'default' user agent is now also some kind of mobile device on my 2 different G5 Duals. This means that I can't access the CMS properly without manually go in and change the url. Doing a preview of a page in the CMS renders an error which can only be simulated by setting the user agent to 'default', both in Safari[5.0] and FF [3.6.3].
    What happened here Apple?
    see thread here: http://discussions.apple.com/message.jspa?messageID=11709335#11709335
    Message was edited by: jarigo_

    Hi and thanks.
    Perhaps I'm not clear enough.
    On my 2 PowerMac's, PPC, 2x2 Ghz, 10.5.8 and all latest patches and security updates using
    Safari 5.0 and Firefox 3.6.3 an Opera there ARE the problems I have been trying to explain.
    On the 2 PowerMac's, PPC, 2x2 Ghz, 10.5.8, ALL browsers pointing to:
    http://unfccc.int
    jumps to:
    http://unfccc.int/home/5198.php , displaying the page as if it was an iPhone or a BlackBerry.
    On my 2 MacBook Pro's, Intel, 10.6.4 and all latest patches and security updates using
    Safari 5.0 and Firefox 3.6.3 there are NO problems.
    On the 2 MacBook Pro's, Intel, 10.6.4, ALL browsers pointing to:
    http://unfccc.int
    jumps to:
    http://unfccc.int/2860.php , which is correct and displays the page correctly
    On my iMac, Intel, 10.5.8 and all latest patches and security updates using
    Safari 5.0 and Firefox 3.6.3 there are NO problems.
    On the iMac, Intel, 10.5.8, ALL browsers pointing to:
    http://unfccc.int
    jumps to:
    http://unfccc.int/2860.php , which is correct and displays the page correctly
    There has been no changes to the CMS. CMS recognize the browsers correctly on all above, EXCEPT the from the 2 PowerMac's, PPC, 2x2 Ghz, 10.5.8.
    ------------

  • Set a Default User Agent

    I want to set a default user agent (I know how to change it…). Is there a way to do this?

    So my question = is there a possibility to set "Internet Explorer 9" as default User agent string.
    How about taking the tack that Compatibility Settings uses?  Its default is IE7 and it is semi-persistent, apparently lasts until you clear your Cookies for it.  So, what is in the Cookie?  If it says make UAS = IE7  perhaps you could
    change it to be something else?  Alternatively, find out how IE7 becomes that procedure's default and see if there is something in that path which is changeable.  Use ProcMon to investigate these ideas.
    Alternatively, on another tack, look at the implementation of the Microsoft list, in IECompatData.xml.   Some, apparently, have experimented with making custom changes in there.  Then a problem would be that they would have to disable regular
    checking and updating of that list or that again, their modifications would only be semi-persistent, and thus they would have to be prepared to periodically, on an unknown schedule, have to be ready to reassert their modifications.
    FYI
    Robert Aldwinckle

  • Set Default User Agent

    Safari 4.0.3
    Is there a way to Set the Default User Agent to Iphone 3 and the user agent does not revert back when the Safari is restarted.
    Current when I set the user agent to Iphone 3 and then restart the browser the Iphone 3 user agent is not retained. Is there a way to ensure that the Iphone 3 user agent is retained after a restart ?

    So my question = is there a possibility to set "Internet Explorer 9" as default User agent string.
    How about taking the tack that Compatibility Settings uses?  Its default is IE7 and it is semi-persistent, apparently lasts until you clear your Cookies for it.  So, what is in the Cookie?  If it says make UAS = IE7  perhaps you could
    change it to be something else?  Alternatively, find out how IE7 becomes that procedure's default and see if there is something in that path which is changeable.  Use ProcMon to investigate these ideas.
    Alternatively, on another tack, look at the implementation of the Microsoft list, in IECompatData.xml.   Some, apparently, have experimented with making custom changes in there.  Then a problem would be that they would have to disable regular
    checking and updating of that list or that again, their modifications would only be semi-persistent, and thus they would have to be prepared to periodically, on an unknown schedule, have to be ready to reassert their modifications.
    FYI
    Robert Aldwinckle

  • CSCum97337 - Ise Endpoint Profile is getting degraded based on poorer user agent

    I have searched but I can not find out how to do this 
    Where can I add user-agent strings to an exclusion list ? 
    regards
    Gudmundur

    Check permission of account and account is lockout.
    Also check below link
    http://technet.microsoft.com/en-us/library/hh212922.aspx
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
    Mai Ali | My blog: Technical | Twitter:
    Mai Ali

  • Sourcefire AD user agent

    We're seeing this error in the user agent:
    Unable to attach event listener to adserver.domain.com. Check firewall settings on AD Server. Operation is not supported on this platform.
    The agent is installed on a member server and the connection to the AD server is successful. 

    Hi..
    Normally there is not problem on a separate server - I have done this in the past. 
    But this time it does not work.
    If I assign domain admin rights to the user it works. 
    We have double-checked the DCOM and WMI settings without luck..
    Waiting for TAC to respond.
    Best regards
    Tue

  • [svn] 3867: Add new user-agent info to the sample services-config.xml file.

    Revision: 3867
    Author: [email protected]
    Date: 2008-10-24 07:13:10 -0700 (Fri, 24 Oct 2008)
    Log Message:
    Add new user-agent info to the sample services-config.xml file.
    Modified Paths:
    blazeds/trunk/resources/config/services-config.xml

    Resolved! The problem was in the php code the wizard had generated as an example and that I had edited in Dreamweaver. I had tried to start a session and set session objects in the php code. I developed if() { statements} to check the session variable before executing the function in some of my data services. Apparently the wizard does not like this. I removed all references to session. I reconfigured the input types and the return types for each service. With the code now clean the wizard created the example code and placed the proper package in the scr.services package. I still have custom php code and it executes.
    Things I learned:
    If the php code stops when a session variable is not available in the if statement and the data service is refreshed, the wizard will not "look" beyond the if statement.
    Functions downstream of a session variable misshap will show in the data services window but the functions will have a circle icon to the left of the function name and each variable to be passed to the php code will be declared as type = Object in Flashbuilder. The input types and return types will have to be reconfigured for each non-functioning function. Simply commenting out a portion of the php code and attempting a refresh will not make it work again.
    When the wizard is unable to refresh properly because of a stop in the php code it stops working completely so additional refreshes or creation of code is not carried out.
    I decided to create a My SQL table for user and other identifiers rather than attempting the session object again.
    Sorry, I did not make screen shots as I solved this problem. I hope the solution is not hard to visualize.
    Thanks for looking and considering how to help me. I hope my solution works for you.

  • My Intel Mac has a User Agent String that is Reading it as a Power PC (PPC)

    Hi. I am hoping someone might be able to help me with an unusual situation. I have been trying to watch online streaming of the Olympics with my MacBook Pro (2.2 Ghz Intel Core 2 Duo). I have updated my browsers to the newest versions and have installed the newest Silverlight from Microsoft in order to ensure compatibility with the nbcolympics.com website. Even so, when I try to get onto the video section, it tells me I have browser or system incompatibilities. I corresponded with the tech person on the olympics website and he looked at my user agent string which (with firefox) reads as follows: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1" I do not have a PPC mac, it is an Intel Mac. Because the olympics website reads it as a powerpc I cannot get onto the video section. Does anyone know what's happening? Ive searched user forums throughout the internet and have not found an answer. Thanks for any help or direction.

    Hi mfwoodwin, and a warm welcome to the forums!
    Many Applications are still PPC & run under Rosetta...
    http://en.wikipedia.org/wiki/Rosetta_(software)
    Some APPs can be chosen to run in PPC or Intel, quit them All, do a Get Info on say FireFox, see if it has a "Use Roseeta" check box, (not on an IntelMac at the moment to see what it is actually called).

  • How to block user agent?

    Hi!
    I would like to block Custom user agents in Ironport Web Security without blocking IE.
    How can I do this to:
    Chrome,
    Safari,
    Firefox,
    Opera,
    My WebOS 7.0

    Hello Wilke,
    You can check the access log for the user agents you want to block, and configure for those.
    To find user agent:
    a) Browser to
    GUI -> "System Administration" -> "Log Subscription" -> 'Access logs'
    b) Add
    %u
    in the Custom fields
    c) Submit and commit the changes
    Then
    d) Grep or tail the access logs based on client IP address
    e) The user agent string should be located at end of the access log line
    Here is a close example, though this is doing authentication bypass:
    http://tinyurl.com/m5kf9c
    Then instead of configuring for bypass authentication, configure an access policy that will block all traffic from this identity.
    I hope this infomratiom helps you.
    Regards,
    Eric

Maybe you are looking for

  • Genius MousePen 8x6 does not work properly.

    I just purchased a Genius MousePen 8x6 graphics tablet. I installed the Mac drivers on the cd but the tablet still doesn't work properly. The mouse that came with the tablet works fine but the pen doesn't work at all. I can't calibrate the pen or any

  • Separate address book for my wife and I

    I reently switched to Mac and this is driving me crazy. I would like to keep our computer under one user so we don't have to switch user profiles to access her address book or if I update and address in my book, it doesn't get updated in hers. But, w

  • How to obtain most popular cities from my users table

    Hi. I've got a 'users' table: USER_ID --- CITY_ID 1 ---- 32 2 ---- 20 3----- 32 4 ---- 32 5 ----- 17 I would like to obtain the most popular cities from this table, and the number of occurrences. Is this possible to make it easy with an SQL statement

  • Sql server agent not work

    hi every one , i use sql server agent to make a job which delete some rows from my table at 12:00 AM this job works on (Mydatabase1) but when i make another job to another database(Mydatabase2) i get this error from ViewJob HIstory : Myjob2,Error,1,F

  • Help for RT PC timed loop in us?

    I have created realtime target  quadcore PC  and created a pulse pattern(500kHz) using DIO pin0.1 and both counters. I want to repeat the pattern or send manny patterns after 512us. I am using time loop. It is not providing more than 28ms however it