I am trying to pass a request parameter to a url that is included in a jsp with a jsp:include tag. I have tried
I also tried
I put a breakpoint in the method that is mapped to "/myUrl" and each time the value of myParam is null. I examined the requestURL and found that it was the URL which returned the jsp which contains this code and the query string was null. Can someone tell me what I am or might be doing wrong here?
Glad that's working for you. I think that's a better approach than a parameter, as it's not necessary to serialize the data to string. But thing I don't like about either of the param or scoped variable approach is that they're implicit and there's no way to force the value to be set or to type check.
With the tag approach, a required attribute to the tag can explicitly enforce that a value be passed, and of the expected type.
subject: Unable to pass parameters to included url