struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Boyko" <abo...@fabgear.com>
Subject RE: cvs commit: jakarta-struts/src/share/org/apache/struts/util BeanUtils.java
Date Fri, 10 Nov 2000 20:40:44 GMT
Hi there.  I'm having a problem with the new multipart stuff
when populating an ActionForm from a GET (no body -> no content type).

This should fix it... there's nothing fundamentally illegitimate
about using GET method with ActionForms, is there?

Looking forward to replacing my terrible multipart form + Resin +
Struts hack code with this new stuff (now that Resin 1.2 allows you 
to disable its previously automatically enabled multipart handling)...

Andy Boyko   aboyko@fabgear.com


diff -c -r1.14 BeanUtils.java
*** BeanUtils.java      2000/11/09 20:44:19     1.14
--- BeanUtils.java      2000/11/10 20:34:15
***************
*** 631,637 ****

          boolean isMultipart = false;

!         if (request.getContentType().startsWith("multipart/form-data")) {
              isMultipart = true;
              //initialize a MultipartRequestHandler
              MultipartRequestHandler multipart = null;
--- 631,639 ----

          boolean isMultipart = false;

!         if (request.getContentType() != null &&
!             request.getContentType().startsWith("multipart/form-data")) {
!
              isMultipart = true;
              //initialize a MultipartRequestHandler
              MultipartRequestHandler multipart = null;

Mime
View raw message