Thanks for your support
I did it using the onClick attribute
out.println ("<a href=\"newPage.html\" onClick=\"SQA.System/testMethod(s);return false\">" +(
String)itr.next()+"</a><br>");
where testMethod placed in the same servlet. and SQA>System is the package.
There is no syntax error. The application runs correctly untill I click on one of the topics where the function testMethod should be processed but it doesn't. I think the problem is with the function URL. I also tried it without the package name.
Does any one knows what I did wrong? How I should pass the method testMethod?
Thanks