I am getting a null returned from HttpServletRequest.getParts() HTTP/2 and
multipart (see http://bit.ly/1TzXd9k). This happens in my own code, as well
as when I try to upload a *.WAR though the manager/html web page. Other
than configuring the connector and the upgrade protocol (see below), what
must be done?

    <!-- NIO connector with OpenSSL -->
    <Connector port="8443"
protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="200" SSLEnabled="true" compression="on"
               scheme="https" secure="true">
      <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
      <SSLHostConfig honorCipherOrder="false">
        <Certificate certificateKeyFile="conf/foo-nopp.pem"
                     certificateFile="conf/foo.pem"
                     type="RSA" />
      </SSLHostConfig>
    </Connector>


On Tue, Mar 22, 2016 at 5:32 PM, Violeta Georgieva <miles...@gmail.com>
wrote:

> Hi,
>
> 2016-03-19 23:21 GMT+02:00 Ajay Verma <ajay_2...@yahoo.com.invalid>:
> >
> > Hello,
> > I'm trying to get multipart forms working in Tomcat 9 over HTTP2 (with
> TLS enabled).
> >
> > The SSL Connector configuration in server.xml (Tomcat 9) is given
> below<Connector port="443"
> protocol="org.apache.coyote.http11.Http11AprProtocol"  maxThreads="150"
> SSLEnabled="true">
> > <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
> > <SSLHostConfig honorCipherOrder="false" >
> >     <Certificate certificateKeyFile="conf/toeflssl.key"
> >     certificateFile="conf/2_toeflmadeeasy.com.crt"  />
> > </SSLHostConfig>  Multipart form submission does not work (the form
> variable values are not retrieved on server in the servlet) with above
> connector.The sample multipart form html code is given below<form
> name="multiPartForm" method="post" enctype="multipart/form-data">
> > <input type="hidden" id="form_submission_type"
> name="form_submission_type" value="test">
> > File 1:<input type="file" id="file1" name="file1" size="20" value="">
> > File 2:<input type="file" id="file2" name="file2" size="20" value="">
> > <input type="button" value="Submit" name="submit">
> > </form>
> > I am trying to get form parameters by using the
> getParameter("form_submission_type") method on HttpServletRequest, and it
> returns null under HTTP2. If I remove the line <UpgradeProtocol
> className="org.apache.coyote.http2.Http2Protocol" />) it works. But now I
> am not on HTTP2.
> >
> > Anyone have any ideas how I can get it to work on HTTP2?
>
> Is it possible for you to test your configuration with the manager
> application that comes with Tomcat distribution?
> It uses multipart.
>
> I tested it on my side and the manager application is working with HTTP/2
> and multipart.
>
> Regards,
> Violeta
>
> > Thanks in advance for any suggestions and comments.
> > Ajay
>



-- 
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, *Doctor Faustus* (v. 121-24)

Reply via email to