Search code examples
parameterizedstripesjspinclude

parameterised jsp:includes of stripes actions?


I've been trying to solve this, and have been getting stuck, so I thought I'd ask.

Imagine two ActionBeans, A and B.

A.jsp has this section in it:

...
<jsp:include page="/B.action">
  <jsp:param name="ponies" value="on"/>
</jsp:include>
<jsp:include page="/B.action">
  <jsp:param name="ponies" value="off"/>
</jsp:include>
...

Take it as read that the B ActionBean does some terribly interesting stuff depending on whether the "ponies" parameter is set to either on or off.

The parameter string "ponies=on" is visible when you debug into the request, but it's not what's getting bound into the B ActionBean. Instead what's getting bound are the parameters to the original A.action.

Is there some way of getting the behaviour I want, or have I missed something fundamental?


Solution

  • The reason that this wasn't working was because of massaging done by our implementation of HttpServletRequest.

    It works fine with the "normal" implementation.