(This appears to be a continuation of the thread here) What configuration are you using, is there a web server in front? sendRedirect() forces the browser to make a re-request for the specified page and hence comes from "the outside world". getRequestDispatcher().XXX() loads and returns the respource from the server within the application context. Dave.
Joined: Oct 04, 2001
hi David, Thanks for your answer. iam using Borland Application server and jsdk2.0.when iam using RequestDispatcher, during compilation time it's giving error message as follows.. unable to Resolve symbol RequestDispathcher rd=getServletContext().getRequestDispatcher("/Home.jsp"); plz help me.. thanks
Where is "Home.jsp" located with respect to the root of your war file? That might make a difference. Kyle ------------------ Kyle Brown, Author of Enterprise Java (tm) Programming with IBM Websphere See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
The original problem was that getRequestDispatcher() and request.getRequestDispatcher() seemed to offer different behaviour.
From the API: The difference between this method [ ie: HttpRequest.getRequestDispatcher(java.lang.String) ] and ServletContext.getRequestDispatcher(java.lang.String) is that this method can take a relative path.