Search code examples
javaservletsservlet-filterssitebricks

Is there a way to get post parameters from a http request in a filter but keep the input stream intact for servlet?


I am trying to fix a bug in sitebricks where it consumes the input stream in of the data of all servlets even those not using site bricks.

HiddenMethodFilter.java line:66

String methodName = httpRequest.getParameter(this.hiddenFieldName);

See http://code.google.com/p/google-sitebricks/issues/detail?id=45


Solution

  • Yes you can provide your own request, see Modify request parameter with servlet filter.

    Furthermore may be extending the wrong sitebricks filter might be easier than chaining.