DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20151>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20151
"queryMB.recycle();" is missing in org.apache.tomcat.util.http.Parameters.recycle() method.
------- Additional Comments From a271278@fmr.com 2003-05-22 17:23 -------
I have a need to restore parameters of a previous request exactly as they were.
( A request is being redirected to a login page and then we have to continue
previous transaction after logging in :
User clicks /getInfo?aaa=a -> redirect to login.jsp -> clicks
/login?user=blah-blah&passwd=...&somestuff=... -> gotta redirect to /getInfo?aaa=a
)
We got a huge library we have to use and part of it is validation of the
parameters for every transaction. So, I need to remove all parameters from the
request and put saved ones back.
I had to add a method in org.apache.coyote.tomcat4.CoyoteRequestFacade to get
access to protected member "request":
public CoyoteRequest getRequest()
{ return this.request;
}
Then I access Parameters object:
org.apache.tomcat.util.http.Parameters
p=((CoyoteRequestFacade)p_Request).getRequest().getCoyoteRequest().getParameters();
and, finally:
p.recycle(); // to get rid of name=blah-blah&passwd=...&somestuff=...
p.processParameters((String)storedParameters);
javax.servlet.RequestDispatcher rd =
m_ServletContext.getRequestDispatcher((String)storedUrl);
rd.forward(p_Request, p_Response);
without queryMB.recycle()
it redirects to /getInfo?aaa=a&user=blah-blah&passwd=...&somestuff=... :(
if I try p.setQuery(MessageBytes.newInstance()); instead of p.recycle();
it works twice and then it stops processing url params.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
|