0

I am making a servlet program. It is working fine, but now I am trying to make a method other than doGet or doPost that get called from JSP. Is it possible?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
saloni
  • 173
  • 2
  • 3
  • 16

1 Answers1

1

No, it is not. If you want to have a single servlet which controls all requests and can invoke business actions depending on the request, then have a look at the front controller pattern.

If you actually want to invoke utility methods (public static methods in a public final class) during display, then you can make use of EL functions (something like as JSTL functions).

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555