Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Finding the machine name using JSP  RSS feed

 
gautam anand
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am writing a program wherein i am required to create a file on the local machine of a user with the name of the file being the localmachinename.txt. Is there any way to find out the local name of a machine in JSP or is their any other machine property/attribute that is unique and can be used to create this file.

Thanks
Gautam
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65828
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "local machine"?
 
gautam anand
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

the application has to be designed for the intranet and by the term local machine i refer to the machine that a person/developer would use to access the application. I appreciate your help.

Thanks
gautam
 
Jeffrey Hunter
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gautum,

Yes. You can access the IP address of the client machine making the request to your web server. Be aware that this could be a proxy address, or firewall, or some other IP which "hides" the actual machine address. Anyhow, the method is getRemoteAddr() and it's accesible via the implicit request object in your JSP pages.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65828
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now, as to creating a file on that client machine... that you cannot do.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!