users@glassfish.java.net

pls help, file upload to a local directory

From: <glassfish_at_javadesktop.org>
Date: Wed, 18 Apr 2007 21:06:17 PDT

Hi, I've been stuck on this for the past few days and I am quite new at developing web application.

Here is the problem that I am having, I don't know why it keeps on saying "access is denied" when I can see that the file is uploaded to the directory. I am developing a JSP page file upload using Jakarta Fileupload v1.2. However, every time when I try to upload a file to a local path (e:\temp) on the server I keep getting this problem. I even try looking into the server.policy file on glassfish but no luck, your help is appreciated thanks

Here's the log after file upload, note: I can see the file being uploaded in the e:\temp but why does it keep telling me the error?

I'm using netbean 5.5.1 and glassfish v2


Initializing Sun's JavaServer Faces implementation (1.2_04-b10-p01) for context '/TestReport'
java.io.FileNotFoundException: e:\temp (Access is denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
        at org.apache.commons.fileupload.disk.DiskFileItem.write(DiskFileItem.java:390)
        at org.apache.jsp.ProcessFileUpload_jsp._jspService(ProcessFileUpload_jsp.java:83)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:80)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:818)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:464)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:358)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:818)
        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:258)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:189)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:81)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:193)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:255)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:549)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:248)
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:199)
        at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:345)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)
[Message sent by forum member 'arckjmaster' (arckjmaster)]

http://forums.java.net/jive/thread.jspa?messageID=213067