Sufi, you could encode the url of the servlet, and pass the url of the
servletA as a parameter.
Example href=/servlets/YourLoginServlet?ToServlet=SerlvetA

Then, in your login servlet simply do a
        String forwardTo = request.getParameter("ToServlet");

        and the "forwardTo" String will be the url of the servlet that you
originally linked to.

To be on the safe side though, you may wish to encode the URL of servletA
using:

href=/servlets/YourLoginServlet?ToServlet=<%=java.net.URLEncoder.encode(stri
ng_of_servletA_url)%>



Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629


-----Original Message-----
From: sufi malak [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 01, 2001 12:45 PM
To: [EMAIL PROTECTED]
Subject: login servlet ??


Hi, please don't be mad, I know for you guru it's an easy question, please
bear with me, I am still learning servlets
I am trying to have a login servlet, and other servlets, when I click to a
link of a servletA, I want to loginservlet get invoqued, my question is how
to save the url of the servletA so if the loginservlet success we will
return to servletA
thanks
God helps all
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

===========================================================================
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

Reply via email to