aspose file tools*
The moose likes Tomcat and the fly likes Change Security Permissions Temporarily Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Change Security Permissions Temporarily" Watch "Change Security Permissions Temporarily" New topic
Author

Change Security Permissions Temporarily

Prem Khan
Ranch Hand

Joined: May 30, 2005
Posts: 189
I am creating an app that creates a pdf file from jasper reports.

On a link action, i will create the pdf file in a directory and redirect to the file name that was just created.

I dont want anyone to be able to see the contencts of the report directory, only the person who is currently launching the report. Is there any way to do this.

Or is this a bad way of thinking about it ?
peter wooster
Ranch Hand

Joined: Jun 13, 2004
Posts: 1033
Originally posted by Shawn DeSarkar:
I am creating an app that creates a pdf file from jasper reports.

On a link action, i will create the pdf file in a directory and redirect to the file name that was just created.

I dont want anyone to be able to see the contencts of the report directory, only the person who is currently launching the report. Is there any way to do this.

Or is this a bad way of thinking about it ?


This sounds like the wrong way to do what you want. I can't see who you would give the temporary permission to. I think you should create the file in a directory that is under WEB-INF (or some other directory owned by your web server, if you are deployed from a war file) and then use a servlet to send the file contents to the user by writing into the ServletOutputStream as described in this Javaworld tip., or just send it without ever creating the file.

[ June 25, 2005: Message edited by: peter wooster ]
[ June 25, 2005: Message edited by: peter wooster ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Change Security Permissions Temporarily