0

When I've tried to deploy a war in glassfish (4.1), I have this error:

cvc-complex-type.2.4.a: Invalid content was found starting with element 'multipart-config'. One of '{"http://java.sun.com/xml/ns/j2ee":run-as, "http://java.sun.com/xml/ns/j2ee":security-role-ref}' is expected.

Looking in the web.xml file, has a error right on the line of multi-part config, where I reproduce bottom:

<multipart-config>
        <max-file-size>10485760</max-file-size>
        <max-request-size>20971520</max-request-size>
        <file-size-threshold>5242880</file-size-threshold>
    </multipart-config>

Someone could help me with this?

I'm using the multipart in a jsp page.

Thanks

Sergio

  • post your full servlet config. seems like you place the `multipart-config` tag in a wrong place – David Florez May 23 '17 at 20:26
  • Indeed, here is an answer to a very similar question where the problem was that an element was in the wrong place. The error is very similar, so @DavidFlorez is probably right: https://stackoverflow.com/a/5175139/212224 – Mike May 23 '17 at 20:44

1 Answers1

0

Solved! Changing the xmlns to a newest version, the issue have been solved. This topic can be marked as resolved.

Tks

Sergio