struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maven apache <apachemav...@gmail.com>
Subject Re: how does the namespace work in struts
Date Fri, 05 Nov 2010 10:39:34 GMT
Thanks for all your guys reply.

That's to say I have no choice but using the struts tag if I decide to use
the struts??

2010/11/5 Li Ying <liying.cn.2010@gmail.com>

> >>  <form action="space/register" method="post"></form>
>
> This HTML code, will post your form to the RELATIVE path [space/register].
> So, the ABSOLUTE path which is requested will depend on the current
> URL of this page.
>
> If ABSOLUTE path is not right, no doubt struts2 can not map it to a
> right namespace/action.
>
>
>
> >> I will get a 404 error if I set the action to "/space/register"
>
> This HTML code, will post your form to the ABSOLUTE path [/space/register].
> But your web app is running under the [context path].
> So the valid URL should be something like
> [/contextPath/space/register.action]
>
> My suggestion is:
> (1)Use the Struts2 tag lib, get it works.
> (2)Read the HTML code generated by tag lib, study how it works
>
> ---------------------------------------------------------------------
> 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