RE: Webform.newUnvalidatedRequest question

<[email protected]>
Newsgroups gmane.comp.web.httpunit.devel
Message-ID <652366DEEF97A3438EC2F4669BD66BA540618A@msgswbmnmsp31.wellsfargo.com>
I would say it's a feature.

The purpose of an unvalidated request (in my opinion) is to generate
requests that do NOT conform to the form.  See also
http://www.agile2005.org/RP4.pdf

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On 
> Behalf Of Stuart Maclean
> Sent: Friday, April 21, 2006 3:38 PM
> To: [email protected]
> Subject: [Httpunit-develop] Webform.newUnvalidatedRequest question
> 
> 
> In order to mimic a javascript-driven change to a hidden form 
> parameter, 
> I am using WebForm.newUnvalidatedRequest().  My problem is 
> that the form 
> action string includes a query string, which the server will see as 
> parameters (the form is a POST).  The query string does not 
> get passed 
> over to the new WebRequest, I need to do it by hand:
> 
> 	private WebRequest newUnvalidatedRequest( WebForm f ) {
> 		WebRequest result = f.newUnvalidatedRequest();
> 		String[] sa = f.getParameterNames();
> 		for( int i = 0; i < sa.length; i++ ) {
> 			String key = sa[i];
> 			String[] values = f.getParameterValues( key );
> 			result.setParameter( key, values );
> 		}
> 		return result;
> 	}
> 
> 
> Is the observed behaviour of Webform.newUnvalidatedRequest a bug or 
> feature?  If the web request is to be mimicing the form, then 
> should its 
> submission not mimic the submission of the form?  The server 
> would see 
> different parameters lists for the two submissions,  unless I 
> append the 
> parameters to the WebRequest as above??
> 
> Any help appreciated.
> 
> Stuart Maclean
> 
> 
> 
> 
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web 
> services, security? Get stuff done quickly with 
> pre-integrated technology to make your job easier Download 
> IBM WebSphere Application Server v.1.0.1 based on Apache 
> Geronimo 
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&
dat=121642
_______________________________________________
Httpunit-develop mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/httpunit-develop


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.