use response.redirect(url);
hope this will help you
subbu
Kevin Duffey <[EMAIL PROTECTED]> wrote:
Hi,
My form call looks like so:
<form action="Login.do" method="post">
and my controller servlet code rips it like so:
String actionName =
equest.getRequestURI().substring( request.getRequestURI.lastIndexOf("/") +
1, request.getRequestURI().lastIndexOf(".") );
If the page the form is on is saved in /path/outside/page.jsp, then the
getRequestURI() returns /path/outside/Login.do. I wish I could obtain the
actual page so that I could redirect back to it incase of problems..but for
some reason that isn't possible. None the less, the lastIndexOf("/") + 1
gets me to the Login.do and the last part copies up to the . - 1, so I am
left with Login as my action class. I then do a lookup in the table to
Login, and am returned null if it doesn't exist, or the name of the class to
load if it does. I also do a lookup in another table for the instance of
that class. If it exists, (only one instance), I don't have to load it..and
I just call its perform() method. If it doesn't, I then instantiate it, add
it to the table, then call the perform() method on it.
Hope that helps.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
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
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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