Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

MultipartRequest help needed!  RSS feed

 
Manjit Barman
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
we have an application with few JSP's which sends out email after processing users request. email sending request is handle by a Servlet.
Now, as per new requirement i have added file upload functionalities to the application where i changed the request object of the form to multipartRequest. Now, it does not send out mail and throws nullpointer exception. I havn't change the request object of the servlet to
multipartRequest.
My question is that, do i need to change the servlet request object to multipartRequest too? Or How can i change that so that it sends out the email after users request?

Thanks a lot!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65830
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you will need to change code on the server side. When you change the submission to be multi-part, methods like request.getParameter() will no longer work and you will need to seek other means to gather the request parameters.

The Jakarata commons-upload package is one popular choice. The com.oreilly.servlet.multipart package is another.
[ June 22, 2005: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65830
134
IntelliJ IDE Java jQuery Mac Mac OS X
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at common/fileupload/userguide while using jakarta commons fileupload.
 
Manjit Barman
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a heap to you all!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!