top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Java: Does the RequestDispatcher expect a relative URL to be relative to the originally-called servlet

+1 vote
367 views

Does the RequestDispatcher expect a relative URL to be relative to the originally-called servlet or to the current servlet (if different)?

posted Dec 18, 2015 by Roshni

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Since the RequestDispatcher will be passing the control (request object and response object) from the current Servlet, the relative URL must be relative to the current servlet.

The originally called servlet has passed the control to the current servlet, and now current servlet is acting as controller to other resourses.

answer Dec 21, 2015 by Karthick.c
...