Anonymous - 2004-05-24

If the post form's action method has a querystring in it i.e.

test.asp?param1=1@param2=2

and you need to manipulate the form parameters via the getRequest method which returns a PostMethodWebRequest object this will not have its target set correctly. I posted a message about not being able to use it correctly and this was why.

in the constructor its:

protected WebRequest( WebRequestSource requestSource )

this( requestSource.getBaseURL(), requestSource.getRelativePage(), requestSource.getPageFrame(), requestSource.getTarget(), newParameterHolder( requestSource ) );
...

I've changed it to

this( requestSource.getBaseURL(), ((WebForm) requestSource).getAction(), requestSource.getPageFrame(), requestSource.getTarget(), newParameterHolder( requestSource ) );
...
This works for myself but I'm fairly sure theres a better way of doing it.