Web application uses struts2 and velocity
1)
The velocity file has a link and when the link is clicked i want java function to be called.
productform.vm
<a href="javascript:void(0);" onclick="*************" id="acnt_link"> Add Acnt </a>
when the link from velocity file is clicked, i need java function to be called
abc.java
public void printabc(){
syso("Java function called when link from velocity temp is clicked");
}
Please advise on how to do this
2)
i can invoke javascript function when link from velocity is clicked, but from javascript function how can i call the java function(for example abc.printabc())
Please advise.