Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to find user ip address and system details in java

 
sunil soni
Greenhorn
Posts: 7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to find user ip address and system detail .I am working on struts 1.3 and want to collect data for reporting purpose .
please help.

Thanks in advance.
 
Piyush Joshi
Ranch Hand
Posts: 207
Eclipse IDE Firefox Browser jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For client's IP address: See this post
For client's system details: you can get HTTP request header "user-agent" which contains information like browser-details, operating system etc.
 
Akhilesh Trivedi
Ranch Hand
Posts: 1599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try writing a javascript code? I think it should be possible to get details and pass them off bundling in hidden fields.

But yes, for ip-address thing, javascript too may depend on some server side script.
 
udaykiran pulipati
Greenhorn
Posts: 12
Hibernate Java MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the code for get ipaddress and system details using Java.

 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aside from the fact that the question was asked more than 2 years ago, it specifically asked about the client IP address in the context of a web app, something entirely different from what this code does.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic