Hey Ghazi,

2008/10/12 ghazi bousselmi <[EMAIL PROTECTED]>:
> I have added a class to the Wt library, to handle a JAVA Applet.
> The applet uploads a FILE to the server.
> The file is received by the server, but my Applet Widget receives no
> notification of file upload.
> With some (painful) debug, I pinpointed the error :
>
> src/web/WebController.C : line 635
> -        if (resource) {
> -         CgiEntry *dataE = cgi.getEntry("data");
> -
> -          if (dataE) {
> -            resource->setFormData(dataE);
> -          }
>
> The controller looks for an entry named "data", and dont find it in the HTTP
> POST of my applet.
> The file uploaded is under another entry name (did not check).

<snip>

> Is it normal that the CgiEntry of the uploaded file is not named "data" ?

The "data" member is ad-hoc: the only thing within Wt that handles
file uploads using a separate document (an iframe posted to a
WResouce) is WFileUpload.

> Is what I did to solve it correct ?

It looks like a solution, but...

> Last thing, with this modified code, my Widget gets a setFormData()

... setFormData() is not documented API of Wt. So we should come up
with a solution that only uses a documented API.

Currently, you cannot access file-type parameters from within
WResource::setArguments(). If we would add this capability, then you
would be able to implement your widget using an auxiliary WResource
for communicating with the Java applet (i.e. the Java applet posts the
file to that resource) ?

> notification, and receives indeed a file, But the applet gets a failure
> reply from the server, anyone know why ?

Are you streaming a response to the client by implementing the
WResource API? That response is sent verbatim to the client.

Regards,
koen

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to