JSF - Client Information
How can I get the client's hostname, IP Address, browser information, etc? I'd like to do it in JSF, but if JSP is the only way to go -- that works, too.
Here's what I have so far for the IP:
FacesContext.getCurrentInstance().getExternalContext().getRequest().getRemoteAddr()But, of course, it doesn't work. Any help would be greatly appreciated.
Thanks.
Using scriplet:
<%
java.util.Enumeration names = request.getHeaderNames();
while (names.hasMoreElements()) {
String name = (String) names.nextElement();
out.println("<b>" + name + "</b>=" + request.getHeader(name) + "<br>");
%>
Using JSTL
<c:forEach items="${header}" var="h">
<b>
<c:out value="${h.key}"/>
</b>
=
<span style="color:Red;">
<c:out value="${h.value}"/>
</span>
</c:forEach>
Using JSF(without iteration)
<h:outputText id="header_i" value="#{header.host}"/>
<h:outputText id="header_i" value="#{header['userAgent']}"/>
(Iteration may be done using "dataTable" component of JSF)
And at some JSF code:
javax.servlet.http.HttpServletRequest request = ((javax.servlet.http.HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest());
request.getHeader("referer");
(or simple iteration)
Regards,
Oleksa Stelmakh
Similar Messages
-
SCCM 2012 R2 - "Site - Client information" reports contain no data
Hi,
I'm running CM 2012 R2 and have a lot of clients installed. In management console, the clients are active, but Site - Client Information reports contain no data. The other reports, for example, Hardware - Processor etc., show data.
What is wrong?Do you have a Fallback status point enabled and defined? if not then most of these report will not work.
However Count of Client for each site should work.
Garth Jones | My blogs: Enhansoft and
Old Blog site | Twitter:
@GarthMJ -
Hi Mr.Francois
I am using your client information form. Thank you.
But in Linux client
shows
IP & MAC addresses are blank
Any idea !
RegardsFirst, start here:
http://blogs.oracle.com/shay/entry/10_commandments_for_the_otn_fo
Second, if you have questions about java beans created or provided by Francois, you should contact him via his web site and not the Oracle Forums.
http://fdegrelle.over-blog.com/0-categorie-265996.html
OR
http://forms.pjc.bean.over-blog.com/ -
Where can I find client information?
I'm new to r/3. Whenever I log on to a R/3 system, I need to input a client number, but there already exist a number in the client field, so I don't need input it.
Please tell me what is CLIENT in R/3 and where to find the CLIENT information?
thanksHi,
A client is, in organizational terms, an independent unit in the R/3 System. Each client has its own data environment and therefore its own master data and transaction data, assigned user master records and charts of accounts, and specific customizing parameters. A user master record linked to the relevant client must be created for users to be able to log on to the
system.
While logging in, the Client field will be defaulted to a Client and if you want to log in to a different client you need to change the value in the field. The Status bar (on the bottom of the screen) gives the Client to which we are logged.
Reward points if helpful.
regards,
Raj -
How to catch client information from web service server side?
Is there any possibilities to get the client information (any id or ipaddress or anything) from web service running server side(or in console)? I didn't get any idea how to catch this information. If someone knowing this, that would be great and appreciate that help.
hellloo to u tooooooo
if u r using any request object u will get the host ipaddress as
request.getRemoteHost() funciton
regards
shanu -
I am using Quickbooks Pro with my macbook pro. It does not allow me to use the @ symbol when I am inputting an email address into the client information section. What do I do?
stefani88 wrote: It seems from other discussions my current OS on my laptop is the reason why it won't sync but people running older versions of windows aren't having a problem. So I don't get it.
Oh. Gosh. What's Windows got to do with anything? You're on Leopard, on a Mac.
It seems from other discussions my current OS on my laptop is the reason why it won't sync -
Table that stores Oracle client information
Is there any such table in Oracle that would store client information, tns entries client machine name etc.?
I am using 9iThe database server doesn't know what TNS alias was defined on the client machine. If a client machine is currently connected to the database, a variety of columns in V$SESSION will be populated. MACHINE and/or TERMINAL would potentially be what you are looking for.
Justin -
Hello...
I want to write servlet which get client information
IP,OS,DATE,TIME,BROWSER,SCREEN SIZE, COUNTRY and send all information
on server.
If source code possible plzzz give me..
thankx in advance...If you write a HttpServlet (just subclass it) you have the request as a HttpServletRequest. From this object you can get information such a browser etc. Try (inside your servlet code):
PrintWriter out = res.getWriter();
out.println("<HTML><BODY>");
out.println("<H1>Client information</H1>");
out.println("<B>Client address: </B>" + req.getRemoteAddr() + "<BR>");
out.println("<B>Client host: </B>" + req.getRemoteHost() + "<BR>");
out.println("<B>Client user: </B>" + req.getRemoteUser() + "<BR><BR>");
out.println("<B>Server name: </B>" + req.getServerName() + "<BR>");
out.println("<B>Server port: </B>" + req.getServerPort() + "<BR>");
out.println("<B>Requested URL: </B>" + req.getRequestURL().toString() + "<BR>");
out.println("<B>Path info: </B>" + req.getPathInfo() + "<BR>");
out.println("<B>Method: </B>" + req.getMethod() + "<BR>");
out.println("<B>Protocol: </B>" + req.getProtocol() + "<BR>");
out.println("<B>Query string: </B>" + req.getQueryString() + "<BR><BR>");
out.println("<B>Session ID: </B>" + req.getRequestedSessionId() + "<BR>");
out.println("<B>Valid session: </B>" + req.isRequestedSessionIdValid() + "<BR>");
out.println("<B>Secure connection: </B>" + req.isSecure() + "<BR>");
out.println("<B>Authentication type: </B>" + req.getAuthType() + "<BR>");
out.println("<B>Character encoding: </B>" + req.getCharacterEncoding() + "<BR>");
out.println("<B>Content length: </B>" + req.getContentLength() + "<BR>");
out.println("<B>Content type: </B>" + req.getContentType() + "<BR>");
out.println("<B>Context path: </B>" + req.getContextPath() + "<BR>");
out.println("</BODY></HTML>");
Where req and res are the HttpServletRequest and HttpServletResponse objects passed to your servlet with doGet() or doPost().
If if doesn't work out for you - give me you e-mail and I'll send over a complete example. Please notice that screen resolution etc. isn't available in the request object. For that you need to get them with for example JavaScript and then send then as parameters to the servlet.
Good luck! -
Hi,
I would like to create a JSF client application that would be able to modify a text file placed on server
in a different computer on LAN. What all technologies do I need to go through?
Is there any project like this which can help?
please reply with linksOk , here's the small task.. I only need to modify a file present on server.
I know that ExternalContext.getResourceAsStream() gives input stream which can be used to read the files
but how to write them ? -
I use a Forms Central form to ask questions of clients to return with their mailing database; tabulation is not wanted or required. From the answers and boxes marked, I have most or all the information to process data in accordance with the United States Postal Service. After, I return the data and paperwork including eDoc worked so that my company wins, the US Postal Service and my client (and possibly their client) wins! If Forms central was simply an interactive forms builder used for direct B2B or B2C information, it would be a winner. If I wanted SurveyMonkey, then would get it but I and others like me do not need or want tabulation services as I assume Adobe looked at Forms Central as a cash cow; it isn't that at all for me.
I use a Forms Central form to ask questions of clients to return with their mailing database; tabulation is not wanted or required. From the answers and boxes marked, I have most or all the information to process data in accordance with the United States Postal Service. After, I return the data and paperwork including eDoc worked so that my company wins, the US Postal Service and my client (and possibly their client) wins! If Forms central was simply an interactive forms builder used for direct B2B or B2C information, it would be a winner. If I wanted SurveyMonkey, then would get it but I and others like me do not need or want tabulation services as I assume Adobe looked at Forms Central as a cash cow; it isn't that at all for me.
-
I know the following thing
**When the HTML form is submitted it carries the view state value back to the server in the form of an HTTP parameter. JSF uses the value of this parameter to reconstruct the view during the restore view phase. The view is restored by reversing the process used to obtain the view state: it is decoded and deserialized.**
so I have tried to run the following code in jsp page with jsf tags I was able to see the input hidden parameter with facesview state and its value
<f:view>
<h1>Hello World!</h1>
<h:form>
<h:inputText value="#{phonebean.phonenumber}" converter="Pconverter" id="input" >
</h:inputText>
<h:outputText value="rakeshggh" />
<h:commandButton action="test" value="submit" />
</h:form>
</f:view>the encoded html output i was able to view the following hidden value which holds the view state as foolows
<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="H4s......very big value />
but my question is when i have removed the jsf form tag but had some components in the view but there was no hidden element which holds the view state on
client side , so I was wondering how the view state that stores on the client side goes to the server and gets reconstructed i.e the tree of components .It would
be great if someone throws light on this I would appreciate it !!!rocky_nirvana wrote:
**When the HTML form is submitted it carries the view state value back to the server in the form of an HTTP parameter. JSF uses the value of this parameter to reconstruct the view during the restore view phase. The view is restored by reversing the process used to obtain the view state: it is decoded and deserialized.**
so I have tried to run the following code in jsp page with jsf tags I was able to see the input hidden parameter with facesview state and its value
<f:view>
<h1>Hello World!</h1>
<h:form>
<h:inputText value="#{phonebean.phonenumber}" converter="Pconverter" id="input" >
</h:inputText>
<h:outputText value="rakeshggh" />
<h:commandButton action="test" value="submit" />
</h:form>
</f:view>the encoded html output i was able to view the following hidden value which holds the view state as foolows
<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="H4s......very big value />This is by the way only applicable if you have set view state saving to the Client Side.
but my question is when i have removed the jsf form tag but had some components in the view but there was no hidden element which holds the view state on
client side , so I was wondering how the view state that stores on the client side goes to the server and gets reconstructed i.e the tree of components .It would
be great if someone throws light on this I would appreciate it !!!As GET requests are idempotent, JSF can just reproduce the same view at the server side. -
Client information/ appointment scheduling
Hi, does anyone know where I can find some kind of program to enter my clients contact/personal information and appointments? I operate a Nail Salon.
Post relates to: Tungsten E2
This question was solved.
View Solution.Would depend on the type of calendar you download. I'm not familiar with any third party calendar applications. Although if you are wanting a business and a personal calendar you would be able to do that with the built in calendar you can use the category function to keep things separated. If you want to see your business events only then you can set it to show business and anything that is "flagged" as business in the business category will be showing. Then if you want to just see personal set it for the personal category and place your personal events in that category. Set it to "All" to show everything.
-
Error parsing Client information calling Assembler 7
I am getting an exception when calling Assembler via a remote client.<br /><br />Has anyone seen this issue before? I think it might be server configuration, but I don't know what as I'm a application developer not a infrastructure resource. Any help is appreciated.<br /><br />Invocation call:<br />ASMoutput = asm.invoke(DDXDocument,ASMinputs,environment,null);<br /><br />Error:<br />[6/6/07 13:17:43:346 CDT] 30564fd0 AssemblerEJB W com.adobe.service.pdfm.AssemblerEJB setupEnvironment ASM_W00002: Log messages are being logged at the "FINEST" level, which will impact performance. This setting is not recommended for production - use INFO or greater.<br />[6/6/07 13:17:43:377 CDT] 30564fd0 Executive A com.adobe.internal.ddxm.Executive execute DDXM_N00000: Started processing result named FinalDoc.pdf<br />[6/6/07 13:17:43:815 CDT] 304f0fd0 LdapRegistryI E SECJ0361E: Authentication failed for <null> because user is not found in the registry.<br />[6/6/07 13:17:43:846 CDT] 30564fd0 Executive E com.adobe.internal.ddxm.Executive execute DDXM_S00001: Failed to assemble result named FinalDoc.pdf<br />[6/6/07 13:17:43:846 CDT] 30564fd0 Executive E com.adobe.internal.ddxm.Executive execute TRAS0014I: The following exception was logged org.omg.CORBA.INTERNAL: <br /><br />Trace from server: 1218860825 at host XXXXXXXXXXX>><br />org.omg.CORBA.INTERNAL: Error when parsing client certificates, message: null vmcid: 0x49424000 minor code: 300 completed: No<br /> at com.ibm.ISecurityLocalObjectBaseL13Impl.CSIServerRI.receive_request(CSIServerRI.java:425) <br /> at com.ibm.rmi.pi.InterceptorManager.iterateReceiveRequest(InterceptorManager.java:748)<br /> at com.ibm.rmi.poa.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:423)<br /> at com.ibm.rmi.poa.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:274)<br /> at com.ibm.rmi.poa.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:178)<br /> at com.ibm.rmi.iiop.ORB.process(ORB.java:432)<br /> at com.ibm.CORBA.iiop.ORB.process(ORB.java:1728)<br /> at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2227)<br /> at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:65)<br /> at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)<br /> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
When Assembler was installed, was security turned on or off during the configuration manager portion of the installation? My guess is that security was turned on, in which case you'd need to call
Context ctx = asm.login("username","password");
first and then pass that context in to the invoke method, as in:
ASMoutput = asm.invoke(DDXDocument,ASMinputs,environment,ctx);
To quickly verify the security settings, find the adobe-Assembler7.ear that was deployed, and unjar it. Then unjar the assembler7EJB.jar that was extracted and look at the contents of the security.properties file. If security.groups in that file is blank, then security is off, and if it an asterisk "security.groups=*" then security is on.
If security is off and you still get that exception, then it might be time for a call to tech support. -
How to read client information?
I want to get client IP and mac address,can as3 do it? Which class can I use?
ThanksIf you can do it in the browser you can pass any data into your movie with FlashVars. You can get the client IP for sure, no idea about MAC address.
-
JSP and active client information
Hi,
Does anyone know how to get connected WebLogic Server JSP clients to
connected users list in WebLogic Console . I tried with normal JNDI
connection but these connections won't show in console although normal
Java client connections are shown.
Thanks,
Jouni Peltonen
GUI based applications are good but do you think that will it be maintainable and portable?.. Some of the GUI based applications are build on higher Java like 1.5.. i Presume you have the latest and other workstation have only 1.4 or 1.3, this can be n issue on GUI based applications especially on installation on each workstation.
Maybe you are looking for
-
HT4623 Locating Video Function on iPad 3
I cannot find the video option for the camera application for my iPad 3. Anyone else have that problem?
-
Offline program for google apps
Hello guys, I'm using the google apps gmail, calendar and docs very intensively and would like to have an offline copy on my system. Is there a program that synchronises those data, primary my calendar? Regards Last edited by orschiro (2010-12-13 07:
-
Installing Solaris Express 11 on a USB stick
Hi, I am in the process of building a resilient development/testing lab server using 4 SATA disks in a RAIDZ configuration, I want to boot the host SE 11 o/s off a internal USB stick to manage this server, so my question is how do I go about installi
-
Company Vs Company Code?
Dear All, Can you please let me know the exact difference between company and company code? How can we assign different company codes to a company? Regards Prasanth
-
Error U9KP7Q94 when logged in with the deleted user after its recreation...
Hi All, How to get default screen for the deleted user when we recreate the same user with same name? i have deleted the user for ex. 'XYZ' (from the catalog user group managemet) and when again i am trying to browse the obiee with the same user i.e.