struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xianwinwin <>
Subject ajax upload file - error message [Object] when returning a div.
Date Mon, 07 Apr 2008 15:42:43 GMT

Hi there,

can anyone adivse how to return a 'Success message' to a div after a file
was uploaded?
For some reason, I get this annoying message [Object] after a file was
successfully uploade. This is caused because I return a message to a div
(without it, it works ok - but the page is refreshed)

<%@ taglib prefix="s" uri="/struts-tags" %>

    request.setAttribute("decorator", "none");
    response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
    response.setHeader("Pragma","no-cache"); //HTTP 1.0
    response.setDateHeader ("Expires", 0); //prevents caching at the proxy
    <s:head theme="ajax" debug="true"/>

<s:form action="files_insertFile" method="POST"
enctype="multipart/form-data" cssStyle="font-size :	8pt; font-family:
verdana"  >
         <s:file size="33" name="upload" label="File"/>          
    <s:submit action="files_insertFile" theme="ajax"
targets="id_result_success_file" showLoadingText="false"

<s:div id="id_result_success_file" theme="ajax"></s:div>

* the code runs smoothly and return a jsp page with a confirmation (success)
* using both IE7 and FireFox - same error
* no error on the javascript [fireBug]
View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message