Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Pro JSP
| Search | Today's Posts | Mark Forums Read
Pro JSP Advanced JSP coding questions. Beginning questions will be redirected to the Beginning JSP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro JSP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 30th, 2005, 08:14 AM
Registered User
 
Join Date: Sep 2005
Location: Islamabad, Punjsb, Pakistan.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to get Client information

Hi
Everyone i hope u all are f9. i have a little problem that i want to pass the clients information like logged in user to the computer, computer name, ip address and date &time with asking the client. hidden from him. i am actually creating a feed back form so. i also want to store this information. can any one guide me.
waiting for ur response.


M. Kamran Farooq
Network Support Asst.
National University of Modren Languages,
Islamabad, Pakistan
 
Old December 23rd, 2005, 10:58 AM
Authorized User
 
Join Date: Dec 2005
Location: Bangalore, , India.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Kamran,

you can use the following in your index.jsp:

request.getRemoteHost() - for Hostname
request.getRemoteAddr() - for IP address

But you can't get the logged in user.
This is because, the HttpServletRequest doesn't store
this information.

However, it can be accessed in client's JVM as a
system property, "user.name".

So, if you really want it, you have to make the client
knowingly or unknowling execute a program or command which
returns the logged in user and send it to the server.

_________
Adarsh





Similar Threads
Thread Thread Starter Forum Replies Last Post
connecting client to client (Socket programming) maricar C# 0 September 25th, 2008 04:34 AM
further information dhoward Crystal Reports 0 February 21st, 2008 03:57 PM
Information on C# student_help C# 1 December 16th, 2005 07:34 PM
Need Client information kfarooqguru JSP Basics 1 October 3rd, 2005 10:55 AM
Registry Information bmains ASP.NET 1.x and 2.0 Application Design 1 April 19th, 2004 03:15 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.