While working on a web application with struts, I came across the following situation.
Consider the following to links:
<s:a href="action1.action" id="link1" ></s:a> and <s:a href="#" id="link2" onclick="submitData();"></s:a>
the function submitData() is defined as follows:
function submitData(){
var var1="x"
$("#targetDiv").load("action1.action",{someVar:var1 });
}
What I discovered when hitting the links is that the number of cookies sent to the action is different. What can cause that difference?
As per cookies definition, some some of them could be set to work in different URL paths:
Wikipedia Article about cookies