nitin403 wrote: > I have create a servlet which needs to read a file on a share folder. > When I run tomcat service as anonymous it is not able to access read this > file. > But when I run tomcat service as a user who as access to this file, then it > runs fine. > > My Question is, is it possible to something similar to this in servlet code > at run time for running the servlet in tomcat.
No, you can't change Tomcat user at runtime. What you can do is to run Tomcat as a specific user, and allow that spcific user to access the files it needs to (via group membership or a per-account permission). -- ..Juha --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]