Hi all.

 

I have created a file upload JSP, which uses a HttpServlet to handle the
POST of the multipart/form data. and this HttpServlet in turn uses Apache
Commons FileUpload 1.0 API to get rid of the rubbish and headers.  BUT all I
get is a blank page when the Servlet is invoked, or triggered or whatever.
My understanding of it is, if I am using the POST method in the JSP (as you
do for form stuff) than I need to have a doPost() method in the HttpServlet,
and all the handling code goes in there, with appropriate responses
according to the degree of success of the upload.  I have these responses
hard-coded, but I am seeing nothing in the browser, and I am seeing none of
the debug System.out.println's in Tomcat server console, or in the logs.  I
do however, get this (I have coded in some ContentInterceptor messages to
tell when a file is accessed or written, that's what the >>>> bits are).

 

>>>>>>>> File to be written!

>>>>>>>> File Written!

08 Aug 2003 19:07:27 - org.apache.slide.webdav.WebdavServlet - INFO - POST =
201 Created (time: 100 ms) URI = /ReceiveUploadServlet

 

 

Now, does this mean it is trying to put the Servlet in the store?!  I don't
think Slide should even know that I am trying to upload the file at this
stage. as I haven't coded in anything to write ANY files to the store yet.
All I have done is write code so that Commons FileUpload is used to accept
the file into memory OR a temporary directory on the server (dependent on
its size).  Is the WebdavServlet capturing the request to upload a file
within the Slide namespace, and messing with it all before my Servlet gets a
chance to do its thang?

 

As a test, without restarting the server, I hit 'back' in the browser and
tried to 'upload' a different file.. It then said this.

 

>>>>>>>> File Retreived!

>>>>>>>> File Retreived!

>>>>>>>> File Retreived!

>>>>>>>> File to be written!

>>>>>>>> File Written!

08 Aug 2003 19:08:52 - org.apache.slide.webdav.WebdavServlet - INFO - POST =
204 No Content (time: 90 ms) URI = /ReceiveUploadServlet

 

 

Now correct me if I'm wrong, but is it trying to say there is already a file
with that name in that bit of the store?!  It's a diff file tho. that's why
its making me think its trying to mess around with the Servlet..

 

 

I hope someone can help. I am getting no errors or exceptions, just a blank
screen in the browser.  I never thought I would long to see some kind of
stack trace!!

 

Cheers

Stuart

 

Reply via email to