I tried searching about this, but didnt got a solid answer. Is it possible to call functions other than doGet or doPost of a servlet from a JSP. I know you can call them indirectly by making a call to either doGet or doPost and then calling the function from there.
For eg:
public class FooServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response){
}
public void myFunc(){
}
How to call myFunc from my JSP
No. The published interface for Servlets is only the
doXXXmethods (doGet, doPost, etc). You are right that the only way to invoke other methods is by calling the published interface and then calling the other methods.