tags:

views:

34

answers:

1

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?

+1  A: 

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).

BalusC
(+1) (well, actually you do access the `service(..)` method :) )
Bozho
Or `doPut()`, `doTrace()`, etc.. But that's likely not what he's after :)
BalusC
I want use my own methodName is it possible ? w/o using any framework...
saloni
Then homegrow a framework with a front controller which does that. JSF for example is open source, check there how they did it.
BalusC