The <stripes:param> tag can be used inside the form to provide the parameters required to generate the clean url. e.g.
<stripes:form beanclass="${actionBean.class}"> <stripes:param name="userId" value="${actionBean.userId}"/> </stripes:form> Hope that helps. Thanks, M On 08/30/12 03:52 AM, Derrick Chua wrote: > I use URL bindings on all my actionbeans and some of them requires a > parameter, e.g. /admin/users/123. > > Taking this URL as an example, in my actionbean I am able to get the > parameter 123 and display user information fine. The same page allows > changes to user information and this is where the problem comes in. > > On submitting the updated user information, the URL becomes /admin/users. > > This is a problem because calling context.getRequest().getRequestURL() > returns me /admin/users instead of /admin/users/123. > > I reckon this to be due to the way the tag is written in the jsp: > > <stripes:form > beanclass="com.name.ui.web.stripes.action.admin.UserActionBean">...</stripes:form> > > which resolves to > > <form action="/admin/users"method="post">...</form> > > The corresponding actionbean is coded and annotated as such: > > @UrlBinding("/admin/users/{userId}") > publicclassUserActionBean{ > privatelonguserId; > publiclonggetUserId(){returnuserId;} > publicvoidsetUserId(longuserId){this.userId=userId;} > } > > Has anyone encountered the same problem and managed to solve it? > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > > _______________________________________________ > Stripes-users mailing list > Stripes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/stripes-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users