I'm using Datatables server side ajax pagination and need to pass some variables to server. My server is running Struts2 actions to handle this datatables requests.
I'm facing some problems because datatables is passing predefined internal variables (like iDisplayStart, iDisplayLength, iColumns, sSearch), but Struts2 cannot receive this kind of camelcase style (just first one char lower and second upper case).
To ensure this, I created this test action:
@Action (value = "dummy",
results = {
@Result(name="ok", type="httpheader", params={"status", "200"}) }
)
@ParentPackage("default")
public class DummyAction {
private String xTrace;
public String execute () {
System.out.println( xTrace );
return "ok";
}
public String getxTrace() {
return xTrace;
}
public void setxTrace(String xTrace) {
this.xTrace = xTrace;
}
}
I'm calling this URL:
localhost:8580/sagitarii/dummy?xTrace=thisisatest
The output is NULL, but when I change xTrace to xyTrace (and get, set and url too) all goes fine. How can I make this to work?
* EDIT *
I already tried with any word with this format: iPad, iMac, iPhone, eMail, ... I think this could be just my configuration, but please give a try before post answers.