Hi Nitin,
You can have a hidden input parameter in your form.
And depending on what you have pressed, you set the hidden input.
In your servlet you get different values depending on the action in your html page.
I think now you can call different functions from your servlet to do your certain
work.
Gargi
for example
<HTML>
<SCRIPT>
function function1()
{
document.myForm.iAction.value = "1";
document.myForm.submit();
}
function function2()
{
document.myForm.iAction.value = "2";
document.myForm.submit();
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR=white BACKGROUND=../images/homebttm.gif >
<FORM NAME=myForm ACTION=http://xxx.yyy.zz/servlets/xservlet METHOD=POST >
<input type=HIDDEN name=iAction value="">
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=2 WIDTH=500>
<TR>
<TD WIDTH=202>Name:<input type=TEXT name=lastname value= ""></TD>
<TD WIDTH=300><A HREF="javascript:function1();" >call function1</A></TD>
<TD WIDTH=300><A HREF="javascript:function2();" >call function2</A></TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
Resource Allocation wrote:
> Hi All,
>
> I'm facing a problem in calling diferent servlets from a single HTML. As you know we
>specify the servlet's address and name in action parameter of form tag. But what do I
>do if I want to call different servlets depending on what button is pressed. Does
>anybody knows some thing about it.
> Please respond urgently.
>
> Thanx in advance,
>
> Nitin
>
> IMRglobal Ltd.
> Plot # 22, SEEPZ,
> Andheri (E), Mumbai-400096
> Phone : 8291421 Ext. 151
> Mail To : [EMAIL PROTECTED]
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html