You aren't even passing the first parameter correctly or using it correctly.
Code:
<a href="formSubmit('<bean:write name="AA" property="aa">','<bean:write name="BB" property="bb">');">
You need the apostrophes around EACH ARGUMENT, separately.
And then:
Code:
function formSubmit(Aa,Bb)
{
document.forms[0].action=
"/accesingpage.do?method=create&AA=" + encodeURIComponent(Aa)
+ "&BB=" + encodeURIComponent(Bb);
...