Why I get a NullPointerException by using MultipartIterator?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Friday, January 11, 2002 12:41 AM

Hi, I want to upload a file via jsp. I have a html-form like this: <_form method="post" action="upload.jsp" enctype="multipart/form-data"> in my jsp-file i use the Apache-classes org.apache.struts.upload.* to get the request from the html-file. Why get I a NullPointerException by using the following lines??? MultipartIterator iter = new MultipartIterator(request); //this is the cause for a NullPointerException MultipartElement element; I hope you can help me! ps: I´m sorry for my pure english.    More>>

Hi,



I want to upload a file via jsp.

I have a html-form like this:



<_form method="post" action="upload.jsp" enctype="multipart/form-data">










in my jsp-file i use the Apache-classes org.apache.struts.upload.* to get the request from the html-file.



Why get I a NullPointerException by using the following lines???

MultipartIterator iter = new MultipartIterator(request); //this is the cause for a NullPointerException

MultipartElement element;

I hope you can help me!


ps: I´m sorry for my pure english.

   <<Less

Re: Why I get a NullPointerException by using MultipartIterator?

Posted By:   Ted_Husted  
Posted On:   Sunday, January 20, 2002 06:41 AM

Be sure you try with this Struts 1.0 or the nightly build.
There may be a problem with the file uploading in the
1.0.1 release (mia culpa).



-Ted

About | Sitemap | Contact