Announcement Announcement Module
Collapse
No announcement yet.
Problem with http post through proxy Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Success.

    Hi Bas,

    I installed your upload web script in to a sample Surf webapp built a few weeks ago. I then uploaded your back-end web scripts into Alfresco and tested an upload. I am running a HEAD build of Alfresco, but the web scripts that were installed were the ones you provided.

    The upload failed with the same error that you reported -
    400 Description: Request sent by the client was syntactically incorrect.

    I then pulled down the latest Spring Surf libs and built the test application \trunk\spring-surf-applications\spring-surf-application-quickstart and dropped this into my Tomcat server. I added just the upload freemarker template (replacing the home page).

    The upload then succeeds. My test webapp can be found here - http://www.benh.co.uk/springsurf.zip

    Let me know how your testing goes.

    Regards, Ben.

    Comment


    • #17
      your sample works

      Hi Ben,

      Thank you very much for your support. Your code is working properly both for Alfresco Community 3.3 and Enterprise 3.2. I now have a reference that will help me to solve the issue.

      Thanks again.

      Kind regards,

      Bas

      Comment


      • #18
        Great news! Thanks.

        Kev

        Comment


        • #19
          Thanks Bas!

          Regards, Ben.

          Comment


          • #20
            web-application-config.xml

            I guess I found out why I was unable to upload even after Kev's updates to the Surf code although I used the latest snapshot (revision 416). The web-application-config.xml contains some changes. When I commented out the following bean declaration related to the multipart handler the upload works properly:

            <bean id="multipartResolver" class="org.springframework.web.multipart.commons.C ommonsMultipartResolver">
            <property name="maxUploadSize" value="10000000"/>
            </bean>

            The application I used to test the code updates done by Kev used the latest libraries, but I never updated the Roo add-on, so the quick start application still had the old configuration in web-application-config.xml.

            Thanks again Kev and Ben for your help.

            Bas

            Comment


            • #21
              There was a problem with the configuration in the SpringSurf config for sample apps. A bean to handle multi-part form data was incorrectly being applied - which was attempting to read the request before the proxy had a chance to deal with it:
              Code:
                  <bean class="org.springframework.web.multipart.commons.CommonsMultipartResolver" id="multipartResolver">
               		<property name="maxUploadSize" value="10000000"/>
              	</bean>
              this bean has now been removed from the samples!! It is working fine in RC1/RC2
              from my tests.

              Cheers,

              Kev

              Comment

              Working...
              X