Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the parameters passed by <s:url.. struts tag in the action class

Tags:

tags

struts

M sending the parameters from the jsp page, the code is

  <s:url id="url" action="searchAction">
    <s:param name="id">"${cgConsultant.id}"</s:param>
     </s:url>

and m getting it in the url as..

http://localhost:8080/search/searchAction.html?id="1"

I need to get it in the action class how do i get it.. please do any suggestion for that..

like image 760
Vinayak Bevinakatti Avatar asked Nov 18 '25 21:11

Vinayak Bevinakatti


1 Answers

Just declare a

public void setId(String id) {
}

method and give it an implementation.

like image 76
krosenvold Avatar answered Nov 20 '25 16:11

krosenvold



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!