How to retrieve which user-agent in a java portlet?
Is there a way to get http user-agent info about which browser requested a page with a portlet from within the java portlet?
It seems like the request.getHeader() always returns the same value no matter what browser we use.
Have also tried portletRenderRequest.getOriginalHeader() but this method also returns the same result.
Does the PPE replace these headers or what..?
Regards,
Per A Jorgensen
Hi Per A Jorgensen,
I see what you mean. I just deployed a simple portlet which displays the user-agent header property.
Here are my observations:
1. If you access the page as user1 from Mozilla, I see the following:
Browser Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 RPT-HTTPClient/0.3-3 RPT-HTTPClient/0.3-3
2. If I now access this page from IE, as user1, then I still see my browser agent as:
Browser Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 RPT-HTTPClient/0.3-3 RPT-HTTPClient/0.3-3
3. If I now access this page from IE, as user2, then i see the following details:
Browser Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) RPT-HTTPClient/0.3-3 RPT-HTTPClient/0.3-3
4. Now I access the same page from Mozilla (after logging out of user1) as user2, I see the following:
Browser Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) RPT-HTTPClient/0.3-3 RPT-HTTPClient/0.3-3
Hmm.. interesting.. it looks like, whoever access the provider first, fixes the user-agent. I need to investigate more into it to find out information as to why this is happening.
In the mean-time, you can be rest assured that as long as you dont have multiple user's accessing the portlet as the same user, you will get the correct information.
thanks,
Harsha
Similar Messages
-
How to add iphone user agent in safari browser running on windows xp
How to add new user agent (iphone user agent) to safari browser(version 3) which is running on windows xp os .
thanks in advanceUPDATE: We were able to further identify the root cause of the problem to be when anonymous access is turned off and the subweb is set up to use basic and integrated authentication (IIS settings). To test this, we removed integrated authentication (leaving only basic authentication in place) and the problem was fixed. However, this is not a viable solution as we need to use integrated authentication (for various other reasons).
-
How to retrieve the User Status on WBS Elements
Hello, could someone please tell me how to retrieve the User Status for WBS Elements using ABAP? Which table stores this information.
Thanks.if you have the OBJNR there was also another FM status in Se37 [link>>|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/changing-status-620444]
also look in the similar requirement [discussion|http://sap.ittoolbox.com/groups/technical-functional/sap-bw/wbs-user-status-262089] -
How to create a mail user agent by using JAVA...
my lecturer has asked me to create a mail user agent by using JAVA , i have no idea how to start this assignment......
What part are you stuck on? Creating a GUI (look at the Swing tutorials), or writing the talk-to-mail-server bit? Look at Java Mail, or the email RFCs.
-
How to append the User Agent String in IE11
We use "Internet Explorer maintenance" GPO to append the standard User Agent String for IE9 with "ADFSIntAuth". "Internet Explorer maintenance" is deprecated and will not work anymore for IE11 and later.
Now we want to move to IE11 and I can't find a solution to append the User Agent String. With GPO this isn't possible anymore (Why Microsoft?). And the registry keys I've tested won't do the job. I've tested
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent\Post Platform
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\User Agent
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent\Post Platform
So whats is the best way to append the user agent string for IE11?
http://social.technet.microsoft.com/Forums/en-US/cdc999aa-faec-4aa5-9025-f12a524794f0/ie10-user-agent-string?forum=winserverGP didn't help.Thank you for the Reply Roger.
I have already read the website you are referring to, but it doesn't say how to append the User Agent String.
Only this:
"Earlier versions of the browser included
Pre-Platform and Post-platform registry value tokens in the user-agent string. However, this led to
performance issues for customers of certain tools and add-ons. As a result, these tokens are now reported only through the
navigator.userAgent property"
With a dead link to the article "navigator.userAgent", but with a search I came to this article: http://msdn.microsoft.com/en-us/library/ie/ms534712(v=vs.85).aspx But also this article won't say how to append the User Agent String for all
clients in a corporate environment. -
How to retrieve the user input in One Step Screenflow
Hello all,
I am new in KM. I would like to ask in One Step Screenflow, I have add a inputfield into the ConfirmComponent. How can I retrieve the user input?
public IRenderingEvent execute(IScreenflowData sfd) throws WcmException
inp.setLabel(new Label("Delegation:"));
ConfirmComponent cc = new ConfirmComponent(ConfirmComponent.OK_CANCEL,this.context.getLocale(),inp);
String sRid = (String)this.values.get(0);
RID rid = RID.getRID(sRid, null);
OneStepScreenflow oscf = new OneStepScreenflow(sfd,this.getAlias(),rid,cc);
return oscf.execute();
In the IRenderingEvent , How to retrieve the user input?
public IRenderingEvent execute(IResource res, Event event ) throws WcmException
if (event instanceof ConfirmEvent)
ConfirmEvent cce = (ConfirmEvent)event;
if (ConfirmEvent.CHOICE_YES.equals(cce.getChoice()))
return new InfoEvent(Status.OK, "Done !");
else if (ConfirmEvent.CHOICE_NO.equals(cce.getChoice()))
return ConfirmComponent.onNo(event, res.getContext().getLocale());
else if (ConfirmEvent.CHOICE_CANCEL.equals(cce.getChoice()))
return ConfirmComponent.onCancel(event, res.getContext().getLocale());
return new InfoEvent(Status.ABORT, "Aborted.");
Many Thanks,
SunnyHello yoga,
Many Many thanks for your reply again.
I have just try the class in the thread link.
There is a error
"The project was not built since its classpath is incomplete. Cannot find the class file for javax.servlet.http.HttpServletRequest. Fix the classpath then try rebuilding this project."
The errors occurs because of "extends OneStepComponent"
public final class NewConfirmInputComponent extends OneStepComponent
Where can find javax.servlet.http.HttpServletRequest to include it in my classpath?
Thanks
Sunny -
How to retrieve all users in the portal with UME API
Hi everybody,
I would like to know how to retrieve all the users from a portal, which uses LDAP as a source (there are users created in the portal as well)
My code snippet is :
IUserFactory userFactory = UMFactory.getUserFactory();
UserSearchFilter searchFilter = userFactory.getUserSearchFilter();
searchFilter.setDisplayName("*", ISearchAttribute.LIKE_OPERATOR, false);
ISearchResult searchResult = userFactory.searchUsers(searchFilter);
My problem is that with the code above, only the users created in the portal are displayed, and no LDAP users.
Does someone know how to retrieve all the users whatever is the source?
Regards
Renaudprakash's code should work.
however, mine code below doesn't user a search filter. it retrieves everyuser including users like indexadmin etc. Note:
result.next().toString();
returns a weird uniqueID used in the portal world.
getUniqueName()
gives your the usernames (sAMAccountName in Microsoft AD) people use to logon to the portal.
try {
IUserFactory uf = UMFactory.getUserFactory();
ISearchResult result = uf.getUniqueIDs();
while (result.hasNext()) {
String uniqueid = result.next().toString();
IUser user = uf.getUser(uniqueid);
String userid = user.getUniqueName();
} catch(Exception e) {
//systemout -
How can know which user accessing specific form in ERP application
Hi,
In our organization we have ERP application that is developed based on Orace forms and reports 10g.
My question is how can i know which user accessing specific form in ERP application based on their login.
Please do the needful.
Regards,
M. SatishWhat I infer from your statements now, significantly different from your OP, is that you do not have any logging mechanism and now want to introduce logging with minimum effort.
If that is the case you can add the logging code in your Menu(s), before the CALL_FORM/NEW_FORM. Fewer object(s) to modify, but roughly the same lines of code get added.
Regards, -
How to determine which user uses which database-object
Hi,
currently we are in the process of consolidating our databases. One of the neccessary steps is to figure out which user connects to the database at all. That's easy, we implemented a logon-trigger and log the collected information into a separate table.
If a user with objects (e.g. tables, views, procedures) exists - but this user never connects to the database - does that automatically mean that these objects are not used at all? No need to say that this is not true. But how can we figure out if a connected user has selected an object of this user?
Our porblem is that we have alot of schemas in our database - but the developers don't know if this schema is not used by an application or not (sad but true).
To enable auditing would be one choice to figure out if an object was ever used or not.
Are there any other possibilities?
Any help will be appricated
Rgds
JanVivaLaVida wrote:
Hi,
currently we are in the process of consolidating our databases. One of the neccessary steps is to figure out which user connects to the database at all. That's easy, we implemented a logon-trigger and log the collected information into a separate table.It could have been even easier by turning on the built-in audit feature.
If a user with objects (e.g. tables, views, procedures) exists - but this user never connects to the database - does that automatically mean that these objects are not used at all? No need to say that this is not true. But how can we figure out if a connected user has selected an object of this user?audit would be a good choice.
Our porblem is that we have alot of schemas in our database - but the developers don't know if this schema is not used by an application or not (sad but true).Not sure what developer will do with used/not used application.
To enable auditing would be one choice to figure out if an object was ever used or not. What's wrong in auditing ?
Even though audit may have a footprint on performance, that would probably be less costly than any custom solution.
Nicolas. -
Hi everyone,
Does anyone know how to use JSOM / REST APIs to retrieve the users that are following a specific document in SharePoint 2013?
Thanks in advance,
NamHi Nam,
Please use the sample code to get the followers for the document. Courtesy: Mokhtar
Bepari
using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Client.Social;
ClientContext clientContext = new ClientContext("http://URL");
SocialFollowingManager followingManager = new SocialFollowingManager(clientContext);
SocialActorInfo actorInfo = new SocialActorInfo();
actorInfo.ContentUri = "<documenturl>"; //set the document url.
actorInfo.ActorType = SocialActorType.Document;
//By using the GetFollowed method you can get the people who the current user is following.
ClientResult < SocialActor[] > followedResult = followingManager.GetFollowed(SocialActorTypes.Users);
//By using the GetFollowers() method you can get the people who are following the current user.
ClientResult < SocialActor[] > followersResult = followingManager.GetFollowers();
clientContext.ExecuteQuery();
Once you get the resultset you can iterate like below:
foreach(SocialActor actor in followedResult)
string name = actor.Name;
string imageURL = actor.ImageUri;
Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply. -
How to determine which user has an Access 2013 databse open
How can I tell which user / PC has opened a Backend Access database?
If the file is stored on a server and you have access to it, you could check in Computer Management, then go into System Tools, Shared Folders, Open Files, and you should find the file listed there along with which user has it open currently.
-
How to find which users has used external scripting
I want to find out the users who used the scripting for doing any mass changes activity.
Hi Murphy;
Please check which user has which forms open? and Re: how to determine which forms are currently open?
Hope it helps you in your issue
Regard
Helios -
How to check which user has the privilege to execute a stored procedure?
I am using Oracle 7 and I would like to check which user has the privilege to execute a stored procedure. How can I check it? Is there any view I can query for?
Alex HungPlease check DBA_SYS_PRIVS.
SQL> select * from dba_sys_privs
2 where grantee='HARY';
GRANTEE PRIVILEGE ADM
HARY EXECUTE ANY PROCEDURE NO
.... -
How to know which user did what action
Hello community
Is there any way to know if a user does some action (like modify or delete an activity or project) which user did it?You may refer to below MOS note
How to Track or Audit Any Changes Made Within Project Management or Methodology Management (Doc ID 907655.1) -
How to find which user submitted concurrent request
Dear all,
How to find out which user has submitted concurrent request with concurrent id. There is once column called requested by in fnd concurrent requests table, is it the user id who submitted that request ?
Regards,
CharanHow to find out which user has submitted concurrent request with concurrent id. https://forums.oracle.com/forums/search.jspa?threadID=&q=fnd_concurrent_requests+AND+fnd_user&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
There is once column called requested by in fnd concurrent requests table, is it the user id who submitted that request ?Yes.
http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=FND_CONCURRENT_REQUESTS&c_owner=APPLSYS&c_type=TABLE
http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=FND_USER&c_owner=APPLSYS&c_type=TABLE
Thanks,
Hussein
Maybe you are looking for
-
When I wish to update an app or purchase an app on my iPhone, i get the message that Verification is required. next I am presented with entering the 4 digit security code for a credit card whose complete number is greyed out except last four digits.
-
A window that keeps poping up ( Java Script Application) uninstal set.
This happends everytime I use FireFox. It dosen't when I use Internet Explorer but; it's slow. I have windows XPSP3
-
Does anyone use both iPhoto and Aperture
I just got an mac book pro and I am trying to decide what to do with my iPhoto library that is on my old G4 eMac. I'm wondering if the best (and safest) plan would be to transfer that library to the new machine, bring it into iPhoto and then import t
-
How to control the variables in 'timing' in simulate signal palette by user numeric control?
is there a way to control the timings of the simulate signal function (i.e. samples per hz, num of sample, etc) by user input (numeric ctrl)? You could easily do so for amplitude, freq, etc but not the timing. Many thanks,
-
I get very small windows popping up on the screen on top of anything else I'm doing regardless of what apps I'm running or not running. If I R-click on the icon in the task bar, it's identified as "plugin-container.exe" The window doesn't say why it'