Could you list out your entire XML file? I believe namespace is required? On Jan 17, 2008 9:06 PM, Pablo Vázquez Blázquez <[EMAIL PROTECTED]> wrote:
> <package name="scheduler" extends="struts-default"> > > Everything is into this package. I didn´t define namespaces. > My only own stack is "defaultLoginStack", but I am not using it in the > involved action. > I followed the instructions at > http://struts.apache.org/2.0.9/docs/file-upload-interceptor.html, but it > doesn´t work. > > Another thing is that, when I execute the action in IE, it gives me an > error saying: "Error: Only one top level element is allowed in an XML > document." > > Thanks for your reply. > > Cheng Wei Lee escribió: > > Did you extends "struts-default" in your <package> tag? > > > > e.g. > > > > <package name="fileupload" extends="*struts-default*" > > namespace="/fileupload"> or you used your own stack? > > > > > > On Jan 17, 2008 8:33 PM, Pablo Vázquez Blázquez <[EMAIL PROTECTED]> > wrote: > > > > > >> Please, does somebody know what can be happening? > >> > >> > >> Pablo Vázquez Blázquez escribió: > >> > >>> I´ll give you more information so that it helps you to give me a > >>> solution: > >>> > >>> My Interceptors (defaultLoginStack is my default interceptor stack) > >>> ------------------------------------------------------------------- > >>> > >>> <interceptor-stack name="defaultLoginStack"> > >>> <interceptor-ref name="servlet-config" /> > >>> <interceptor-ref name="params" /> > >>> <interceptor-ref name="session" /> > >>> <interceptor-ref name="login" /> <!-- mine --> > >>> <interceptor-ref name="prepare" /> > >>> <interceptor-ref name="chain" /> > >>> <interceptor-ref name="model-driven" /> > >>> <interceptor-ref name="fileUpload" /> <!-- it should be > >>> here?? --> > >>> <interceptor-ref name="static-params" /> > >>> <interceptor-ref name="params" /> > >>> <interceptor-ref name="conversionError" /> > >>> <interceptor-ref name="validation" /> > >>> <interceptor-ref name="workflow" /> > >>> </interceptor-stack> > >>> > >>> > >>> My action config: > >>> ----------------- > >>> > >>> <action name="AddPlugin" > >>> class="AddPluginAction"> > >>> <interceptor-ref name="fileUpload"/> > >>> <interceptor-ref name="basicStack"/> > >>> <result>/HTML/tiles/configuration/Plugins.jspx</result> > >>> <result > >>> name="input">/HTML/tiles/configuration/Plugins.jspx</result> > >>> </action> > >>> > >>> > >>> Form to add plugin: > >>> --------------------------------- > >>> > >>> <s:form id="addPluginForm" name="addPluginForm" theme="ajax" > >>> action="AddPlugin" enctype="multipart/form-data" > >>> method="post"> > >>> <div class="field"> > >>> <span class="label"> > >>> <fmt:message key="PluginsTable.File"/>*: > >>> </span> > >>> <span class="entry"> > >>> <s:file name="upload" > >>> accept="application/java-archive"/> > >>> <span id="errorId" class="errorMessage"> > >>> <s:property value="fieldErrors['upload'][0]" /> > >>> </span> > >>> <span id="errorId" class="errorMessage"> > >>> <s:property > >>> value="fieldErrors['uploadContentType'][0]" /> > >>> </span> > >>> </span> > >>> </div> > >>> <s:submit type="button" > >>> targets="configAjaxContent" executeScripts="true" > >>> showLoadingText="false" indicator="indicator" > >>> cssClass="submit"> > >>> <s:param name="value"> > >>> <fmt:message key="Buttons.accept"/> > >>> </s:param> > >>> </s:submit> > >>> </s:form> > >>> > >>> Well, several things: > >>> > >>> a) I have a AddPluginAction-validation.xml, but validation never > >>> > >> occurrs. > >> > >>> b) With this interceptors configuration, the AddPluginAction is > >>> successfully executed (it is, the plugin is added), but the > >>> "indicator" image never stops (it is like if the request to the server > >>> never end) and it does not go to the results' page. > >>> c) I had to change the interceptors stack for this action, because, if > >>> not, the action was not executed, but I would like to use my own > >>> defaultLoginStack (if possible). > >>> > >>> > >>> Thanks for your help. > >>> > >>> > >>> > >>> > >>> Pablo Vázquez Blázquez escribió: > >>> > >>>> Yes, I first tried with the default stack, but the problem is the > >>>> same :( > >>>> > >>>> Cheng Wei Lee escribió: > >>>> > >>>>> Try removing the interceptors? If I'm not mistaken, the default > >>>>> stack has > >>>>> it. > >>>>> > >>>>> On Jan 17, 2008 2:32 AM, Pablo Vázquez Blázquez > >>>>> <[EMAIL PROTECTED]> wrote: > >>>>> > >>>>> > >>>>> > >>>>>> I am using Struts 2.0.9 and I have the following action: > >>>>>> > >>>>>> <action name="AddPlugin" > >>>>>> class="AddPluginAction"> > >>>>>> <interceptor-ref name="fileUpload"/> > >>>>>> <interceptor-ref name="basicStack"/> > >>>>>> <result>/HTML/tiles/configuration/Plugins.jspx</result> > >>>>>> <result > >>>>>> name="input">/HTML/tiles/configuration/Plugins.jspx</result> > >>>>>> </action> > >>>>>> > >>>>>> The action is successfully executed, but the "indicator" does not > >>>>>> > >> stop > >> > >>>>>> and it does not go to Plugins.jspx (it "hands on the air"). > >>>>>> > >>>>>> Do I have any problem with my interceptors? What else can be? > >>>>>> > >>>>>> Thanks. > >>>>>> > >>>>>> > >>>>>> > --------------------------------------------------------------------- > >>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>>>>> For additional commands, e-mail: [EMAIL PROTECTED] > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>> --------------------------------------------------------------------- > >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>>> For additional commands, e-mail: [EMAIL PROTECTED] > >>>> > >>>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>> For additional commands, e-mail: [EMAIL PROTECTED] > >>> > >>> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >