• Post Reply Bookmark Topic Watch Topic
  • New Topic

Determine current user

 
Rob Hunter
Ranch Hand
Posts: 832
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JSP that runs that attempts to read in a file using BufferedReader. I've wrapped the entire section whereby I try and read the text file in with a try / catch java.io.FileNotFoundException statement. I don't get any errors here but on another computer the error comes up with the proper full pathname of the text file and then (Access is denied). Is there something I can put in the JSP to print out access is denied to what user? The file gets written fine to the directory so it looks like it's read permissions. Help would be very much appreciated. Thanks.

Rob
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kind of user are you talking about? As logged into the OS? If so, no chance without OS-specific trickery.
[ June 14, 2007: Message edited by: Bear Bibeault ]
 
Rob Hunter
Ranch Hand
Posts: 832
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear,
I'm trying to find out what user is being used to determine what permissions pertain to the file the JSP is trying to open. I'm having no problem accessing the file on my server but the problem is elsewhere on another server.

Rob
 
Rob Hunter
Ranch Hand
Posts: 832
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear,
Never mind. I have a Perl script that ends up calling the JSP so I just used the getuser function call in that.

Rob
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!