I want to call servlet when radio button is clicked, how can I make it?
EDIT
I tried to add URL to servlet in javascript function like this
$.post( "ParentManagementServlet", "isActivated");
and like this
$.post(<%=getServletContext().getContextPath()+"/ParentManagementServlet"%>, "isActivated");
and like this
$.post("/ParentManagementServlet?isActivated=true");
but both does not call servlet!
here's the url mapping of the servlet in web.xml
<servlet>
<servlet-name>ParentManagementServlet</servlet-name>
<servlet-class>ps.iugaza.onlineinfosys.servlets.ParentManagementServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ParentManagementServlet</servlet-name>
<url-pattern>/ParentManagementServlet</url-pattern>
</servlet-mapping>
I usually add the servlet through its name, but I read that it's better to get the servlet absolute path form servlet context.