You might want to be cautious about that -- essentially you are allowing the client by typing a URL in their browser to delete material in your database in an adhoc fashion. Chris M
-----Original Message----- From: Bhaarat Sharma <bhaara...@gmail.com> To: Struts Users Mailing List <user@struts.apache.org> Sent: Tue, 14 Apr 2009 11:03 am Subject: Re: sample CRUD application question oh cool so i can just add method parameter myself. damn the shorthands. we need a wiki that explains all these On Tue, Apr 14, 2009 at 11:01 AM, Security Management < list-subscripti...@secmgmt.com> wrote: > I *think* it's the method name of the action? > > In other words, the equivilant of: > <s:url action="crud" method="delete" id="url"> > <s:param name="employee.employeeId" value="employeeId"/> > </s:url> > > Mike. > -----Original Message----- > From: Bhaarat Sharma [mailto:bhaara...@gmail.com] > Sent: Tuesday, April 14, 2009 10:55 AM > To: Struts Users Mailing List > Subject: sample CRUD application question > > I was looking at the CRUD sample application in struts2 > > http://struts.apache.org/2.0.14/docs/crud-demo-i.html > > in one of the jsp's they have this code > > <s:url action="crud!delete" id="url"> > <s:param name="employee.employeeId" value="employeeId"/> > </s:url> > > and some part of the struts.xml is: > > <action name="crud" > class="com.aurifa.struts2.tutorial.action.EmployeeAction" method="input"> > <result name="success" type="redirect-action">index</result> > <result name="input">/WEB-INF/jsp/employeeForm.jsp</result> > <result name="error">/WEB-INF/jsp/error.jsp</result> > </action> > > I am lost as to why <s:url action="curd!delete" > > shouldnt the action be just "crud" what does the exclamation mark and > delete > do?? is that a shorthand for something or is that just an action name and > if > it is an action name then why is it not defined in struts.xml > > Thanks!! > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >