I remember I’ve read this from somewhere but still unsure.
consider scenario below:
<action name="doSomething" class="com.domain.MyAction" method="myMethod">
</action>
and
public class MyAction extends ActionSupport{
public String myMethod(){
private String param;
}
//getter
//setter
}
then via web page I do POST o GET: domain/doSomething?param=hello
I can recover “param” value using any method below, are they the same?
this.getParam();
(String)request.getParameter("param");
(String)request.getSession.getAttribute("param");
if so, then struts will always put request parameters into http_session?
Struts uses getters and setters of request parameters to pass them in the action.