two buttons in same jsp page

hello to java people

My ? is, jsp page named as login.jsp, In this page i want to use two buttons.

If i click on one buton it will goto sucess.jsp and for another button it will go to find.jsp.

i.e, two actions in same page, is it possible ?

help me by giving sample code.

thanks

[317 byte] By [sunvenkata] at [2007-11-27 10:55:28]
# 1

Yes, it's possible. Just assign each button an unique name. If the request.getParamater("buttonName") doesn't return null, then the desired button was pressed.

BalusCa at 2007-7-29 11:56:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

thanks balu for ur answer.

pure java ?

But my doubt is see we take one form

<form action="sucess.jsp">

<input text...>

<input text...>

<input type=submit name=sucess>

<input type=submit name=find>

</form>

means whether i take two buttons as submit and names r diff..

but at top only one action is there .

how can they know to which page it has to go?

do u understand my ?

can u please give some sample code so that i can understand

thanks

sunvenkata at 2007-7-29 11:56:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...