This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I writing to find out what the practice when your webapp makes a call to a library outside the container and where that call needs to be made as a particular user, and not as the container.
For example - I have a web application where a user logs in. The webapp makes a request of resources on the system on the user's behalf - but unfortunately, it actually makes the request as the container which does not have privileges. What is the practice for getting the request to be made as the user that logged in.
I'm not sure if this is a java question, a tomcat (the container I'm using) question, a solaris question or a mixture of all three.
Anyway - any ideas from this forum could be helpful to me.
If we are talking about the webapp emulating a client browser or other process using HTTP, then the Apache HttpClient toolkit can probably help.
Joined: May 07, 2008
When the user clicks a button on the page that is interpreted to mean a request to make a change to the solaris system. The request is made down through a JNI layer to a c library that actually executes the change to the system. By the time the request is made to the c library - I need the thread to be of the user that logged in and not of the tomcat container.