This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Testing and the fly likes HTTPUNIT Webform.submit of file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "HTTPUNIT Webform.submit of file." Watch "HTTPUNIT Webform.submit of file." New topic

HTTPUNIT Webform.submit of file.

peter cooke
Ranch Hand

Joined: Mar 16, 2004
Posts: 314
I think I know the answer to this but hoping my understanding is incorrect.

I have a webform with

I browse to the file select it and submit it to the servlet.

the response from the contains is valid xml that includes a proprietary multi verison filesystem path (every version of the file is stored and retained forever and can see ver1 ver2 .... ver n) where the file was uploaded to. It is not a standard url or uri or file system path.

When I call submit on the form, I get " <error message="Bad file descriptor" type=""> Bad file descriptor....."

stack trace

I think submit sees the file tag and tries to build a java.util.File object with the contents of the file element.
is that correct?

CIAO Peter M. Cooke
I agree. Here's the link:
subject: HTTPUNIT Webform.submit of file.
Similar Threads
javax.servlet.ServletException: Cannot create bean of class...
blank page returned from validate
problem while loading the welcome page
How to move a video file(*.flv) from a directory to another directory
Multiple forms in a single JSP page