struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li Ying <liying.cn.2...@gmail.com>
Subject Re: how does the namespace work in struts
Date Fri, 05 Nov 2010 09:15:14 GMT
>>  <form action="/space/register" method="post"></form>


Are you rendering html code by your self?
Don't do this.
Try Struts2's tag lib instead.

Example:
<s:form namespace="space" action="register" method="post"></s:form>

The tag lib will convert the namespace/action to a valid URL for you.
And then,when you submit this form, on the server side, struts2 will
map your request URL to an action.

See:
http://struts.apache.org/2.2.1/docs/form.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message