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.2...@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-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >