1 Reply Latest reply: Apr 13, 2010 10:42 AM by Rajasundaram Gopalan RSS

    ActionRequest.getContentType() not returning multipart  in portlet

    raju k Newbie

      hi all

      when accessing requestParamets from jsp with enctype="multipart/form-data" in portlet,

      actionRequest.getContentType() is returning text/xml; charset=UTF-8 not returing multipart.

       

      in jsp

      <form id="uploadform" name="frmnewmail" method="post" action="<%=actionURL%>" enctype="multipart/form-data">

       

      in portlet

      public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
              throws PortletException, IOException
          {

       

      // this  if condition not returing true for multi part

      if(actionRequest.getContentType() != null && actionRequest.getContentType().startsWith("multipart"))
              {
                  portletFileUpload = new PortletFileUpload(actionRequest);
                  portletFileUpload.initialize();

             }

      // this  if condition also not returing true for multi part

      if (PortletDiskFileUpload.isMultipartContent(actionRequest))
              {

             }

      }

       

       

      Any help regarding this,

      Thanks in advance

      Raju.k