Question

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?

Was it helpful?

Solution 2

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

It works fine with the "normal" implementation.

OTHER TIPS

So are you saying that in each case ${ponies} on your JSP page prints out "on"?

Because it sounds like you are confusing JSP parameters with Stripes action beans. Setting a JSP parameter simply sets a parameter on that JSP page, that you can reference as shown above, it doesn't actually set anything on the stripes action bean.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top