Struts / commons FileUploader question

S

SB

Hello all,

I am having an issue with Java2 security and the commons FileUploader
processing.

I am using the Struts html:file tag to upload files to an action class.
Every thing works fine if Java2 security is not enabled but I get the
below exception when it is enabled. Rather than getting permission to
the jsp cache, I would like to define the TempFile path. Is this
possible?

: java.security.AccessControlException: access denied
(java.io.FilePermission
/opt/WebSphere6/AppServer/profiles/server/temp/server/server/App/AppWeb.war/upload_00000000.tmp
delete)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java(Compiled
Code))
at
java.security.AccessController.checkPermission(AccessController.java(Compiled
Code))
at
java.lang.SecurityManager.checkPermission(SecurityManager.java(Compiled
Code))
at
com.ibm.ws.security.core.SecurityManager.checkPermission(SecurityManager.java(Compiled
Code))
at java.lang.SecurityManager.checkDelete(SecurityManager.java:996)
at java.io.File.deleteOnExit(File.java:906)
at
org.apache.commons.fileupload.DefaultFileItem.getTempFile(DefaultFileItem.java:620)
at
org.apache.commons.fileupload.DefaultFileItem.getOutputStream(DefaultFileItem.java:557)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top