struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cheng Wei Lee" <zhenwei...@gmail.com>
Subject Re: File Upload
Date Thu, 17 Jan 2008 12:52:45 GMT
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 <pvazquez@denodo.com> 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
> >>> <pvazquez@denodo.com> 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: user-unsubscribe@struts.apache.org
> >>>> For additional commands, e-mail: user-help@struts.apache.org
> >>>>
> >>>>
> >>>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message