Looking in servlet spec and do not see an answer. What's is right behavior of container in the following situation: 1. servlet invoked by client and processes a multipart request 2. servlet decides to forward request to another servlet 3. another servlet is capable process muktipart requests as well, so my questions are: - what is a request method of a forwarded servlet? (An original or PUT?) - what happens if a forwarded servlet acceesses request input/reader? (Illegal state or EOS?)
I know that a servlet can manage if it called by due forward, but I need answers to provide right container behaivor when serlet doesn't take care of that.
what is a request method of a forwarded servlet? (An original or PUT?) - what happens if a forwarded servlet acceesses request input/reader? (Illegal state or EOS?)
1. The request object retains the original method. 2. If the initial servlet read the input stream, the second servlet can not back it up or regenerate it but has to work with the input stream in the condition left by the first. If the first servlet created any objects from the multiparts, they could be attached to the forwarded request.