request.getHeader("Referer") will give you the full name of the calling
page. You can put a condition to check it.
You can pass a parameter from each JSP while calling to Servlet and check
it.
You can put some value in a session variable from each JSP and check it at
the servlet.
Use the best option.
br/dantus
----- Original Message -----
From: Mihir Sahu <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 13, 2001 11:42 PM
Subject: Session tracking
> Hi,
> I have two jsp forms calling the same servlet for different function.
Is there
> any method that I can use in the servlet to know from which page it is
being
> called, so that I can do the required action..or is it a better idea to
built two
> servlet...one for each. Thanks
> Regards
> Mihir
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets