This content has been marked as final.
Show 1 reply
-
1. Re: Request loses URL Parameter after doing a forward.
mailinator May 30, 2006 7:54 AM (in response to mailinator)I must add something:
We use the UrlRewriteFilter from http://tuckey.org/urlrewrite/.
This Filter wraps within the doFilter() the current request and response into an UrlRewriteWrappedResponse.
This wrapper overrides the encodeURL() method and is passed as parameter to the requestdispatcher instance.RequestDispatcher rq = request.getRequestDispatcher("/pages/productDetail.jsf?id=hwcatalog/HW2200-0623&") requestDispatcher.forward(request, wrappedResponse);
At my first post i wrote, that after forwarding the available request doesn't know the URL parameter:
After further debugging i noticed that this isn't the case.((ServletRequest)facesContext.getExternalContext.getRequest()).getParameter("id")
retrieves the correct value for paramater 'id'.
The different behaviour between OC4J and Jboss lays in the wrapped request within the UrlRewriteWrappedResponse.
OC4J's wrapped request knows the updated URL Parameter but
JBoss' wrapped request doesn't have noticed the change.
Can it be that JBoss creates a new Request instance after a forward
whereas OC4J updates the existing one?
And what is the correct behaviour?
I can't find any information about this issue.
Thanks
Denny