You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tommy Pham <to...@yahoo.com> on 2009/09/11 20:10:51 UTC
[S2.1.6] problem with value attribute for
Hi,
I think I found another bug ... I want to include whatever parameters in URL to a form submit action. This is what I used.
<s:url var="urlFormActive" includeParams="get" />
<s:property value="%{urlFormActive}"/> or <s:property value="%{#urlFormActive}"/> shows the correct URL of:
/recipes/Admin/Languages?sort=isoCode2.
But when I use it in the <s:form>:
<s:form enctype="multipart/form-data" method="post" value="%{urlFormActive}">
or
<s:form enctype="multipart/form-data" method="post" value="%{#urlFormActive}">
The source code of the HTML shows:
/recipes/Admin/Languages
However, if I use action attribute instead of value, I get this:
/recipes/recipes/Admin/Languages?sort=isoCode2
Which isn't what I want either and will get a 404 error as there isn't a servlet or Struts action mapped for it. Is anyone else having this same problem? Should I submit a bug report?
Thanks,
Tommy
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2.1.6] problem with value attribute for
Posted by David Canos <da...@gmail.com>.
I think we haven't solve the main problem that is, the context appears in
the action attribute of a form builded from s:form tag.
is s:form ready to not to add the context in a production enviroment?
in my company we've decided, as Tommny, to use html tag <form> instead of
<s:form theme="simple">
thank u guys
2009/9/12 Tommy Pham <to...@yahoo.com>
> --- On Fri, 9/11/09, Dave Newton <ne...@yahoo.com> wrote:
>
> > From: Dave Newton <ne...@yahoo.com>
> > Subject: Re: [S2.1.6] problem with value attribute for <s:form>
> > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > Date: Friday, September 11, 2009, 7:14 PM
> > Tommy Pham wrote:
> > > After going over the tags reference several times, I
> > can't seem to
> > > figure out the simplest way to get all of the
> > parameters in the URL
> > > as I'd like. If use the form's action attribute
> > in conjunction with
> > > <s:url />, I get an extra context path
> > inserted. What do you
> > > recommend since the <s:form> doesn't have
> > 'includeParams' like
> > > <s:url>?
> >
> > Personally, I'd put those params into hidden fields rather
> > than mixing POST params with URL/GET params.
> >
> > Dave
> >
> >
>
> Hi Dave,
>
> It's for SEF/SEO URL rewrite which I'll implement later.
>
> Thanks,
> Tommy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: [S2.1.6] problem with value attribute for
Posted by Tommy Pham <to...@yahoo.com>.
--- On Fri, 9/11/09, Dave Newton <ne...@yahoo.com> wrote:
> From: Dave Newton <ne...@yahoo.com>
> Subject: Re: [S2.1.6] problem with value attribute for <s:form>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Date: Friday, September 11, 2009, 7:14 PM
> Tommy Pham wrote:
> > After going over the tags reference several times, I
> can't seem to
> > figure out the simplest way to get all of the
> parameters in the URL
> > as I'd like. If use the form's action attribute
> in conjunction with
> > <s:url />, I get an extra context path
> inserted. What do you
> > recommend since the <s:form> doesn't have
> 'includeParams' like
> > <s:url>?
>
> Personally, I'd put those params into hidden fields rather
> than mixing POST params with URL/GET params.
>
> Dave
>
>
Hi Dave,
It's for SEF/SEO URL rewrite which I'll implement later.
Thanks,
Tommy
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2.1.6] problem with value attribute for
Posted by Dave Newton <ne...@yahoo.com>.
Tommy Pham wrote:
> After going over the tags reference several times, I can't seem to
> figure out the simplest way to get all of the parameters in the URL
> as I'd like. If use the form's action attribute in conjunction with
> <s:url />, I get an extra context path inserted. What do you
> recommend since the <s:form> doesn't have 'includeParams' like
> <s:url>?
Personally, I'd put those params into hidden fields rather than mixing
POST params with URL/GET params.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2.1.6] problem with value attribute for
Posted by Tommy Pham <to...@yahoo.com>.
--- On Fri, 9/11/09, Musachy Barroso <mu...@gmail.com> wrote:
> From: Musachy Barroso <mu...@gmail.com>
> Subject: Re: [S2.1.6] problem with value attribute for <s:form>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Date: Friday, September 11, 2009, 3:17 PM
> I didn't even know that form had a
> "value" attribute. You should not
> use that. (this might be due to our
> all-tags-inherit-from-UIBean prom)
>
> musachy
>
Hi Musachy,
Thanks for the reply. After going over the tags reference several times, I can't seem to figure out the simplest way to get all of the parameters in the URL as I'd like. If use the form's action attribute in conjunction with <s:url />, I get an extra context path inserted. What do you recommend since the <s:form> doesn't have 'includeParams' like <s:url>?
Thanks,
Tommy
> On Fri, Sep 11, 2009 at 11:10 AM, Tommy Pham <to...@yahoo.com>
> wrote:
> > Hi,
> >
> > I think I found another bug ... I want to include
> whatever parameters in URL to a form submit action. This
> is what I used.
> >
> > <s:url var="urlFormActive" includeParams="get"
> />
> >
> > <s:property value="%{urlFormActive}"/> or
> <s:property value="%{#urlFormActive}"/> shows the
> correct URL of:
> > /recipes/Admin/Languages?sort=isoCode2.
> >
> > But when I use it in the <s:form>:
> >
> > <s:form enctype="multipart/form-data" method="post"
> value="%{urlFormActive}">
> > or
> > <s:form enctype="multipart/form-data" method="post"
> value="%{#urlFormActive}">
> >
> > The source code of the HTML shows:
> > /recipes/Admin/Languages
> >
> > However, if I use action attribute instead of value, I
> get this:
> > /recipes/recipes/Admin/Languages?sort=isoCode2
> >
> > Which isn't what I want either and will get a 404
> error as there isn't a servlet or Struts action mapped for
> it. Is anyone else having this same problem? Should I
> submit a bug report?
> >
> > Thanks,
> > Tommy
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink
> Floyd
>
> ---------------------------------------------------------------------
> 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
Re: [S2.1.6] problem with value attribute for
Posted by Musachy Barroso <mu...@gmail.com>.
I didn't even know that form had a "value" attribute. You should not
use that. (this might be due to our all-tags-inherit-from-UIBean prom)
musachy
On Fri, Sep 11, 2009 at 11:10 AM, Tommy Pham <to...@yahoo.com> wrote:
> Hi,
>
> I think I found another bug ... I want to include whatever parameters in URL to a form submit action. This is what I used.
>
> <s:url var="urlFormActive" includeParams="get" />
>
> <s:property value="%{urlFormActive}"/> or <s:property value="%{#urlFormActive}"/> shows the correct URL of:
> /recipes/Admin/Languages?sort=isoCode2.
>
> But when I use it in the <s:form>:
>
> <s:form enctype="multipart/form-data" method="post" value="%{urlFormActive}">
> or
> <s:form enctype="multipart/form-data" method="post" value="%{#urlFormActive}">
>
> The source code of the HTML shows:
> /recipes/Admin/Languages
>
> However, if I use action attribute instead of value, I get this:
> /recipes/recipes/Admin/Languages?sort=isoCode2
>
> Which isn't what I want either and will get a 404 error as there isn't a servlet or Struts action mapped for it. Is anyone else having this same problem? Should I submit a bug report?
>
> Thanks,
> Tommy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org