Having the ServletAPI plus the configurations you can make to jetty or any other web container
While dispatching a request in your own configured servlet, can we forward ( not redirect ) the request to the 'default' servlet. ? Will this allways work ?
RequestDispatcher rd = getServletContext().getNamedDispatcher("default"); HttpServletRequest wrapped = new HttpServletRequestWrapper(req) { public String getServletPath() { return ""; } }; rd.forward(wrapped, resp);
Thanks in advance!
Spring has something to take care of this. If you're using Spring, you're in luck, or else you need to roll your own solution based on what Spring does. I can't speak for other frameworks, but I guess many other frameworks would have some support for this.
Take a look at org.springframework.web.multipart.commons.CommonsMultipartResolver
and org.springframework.web.multipart.MaxUploadSizeExceededException
The CommonsMultipartResolver
has a property maxUploadSize
that lets you control the max size.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.