About Question enthuware.jwpv6.2.1046 :
Posted: Mon Jul 23, 2012 7:37 pm
The question says "you want to redirect the request to another resource which may or may not be a part of the same web application."
The explanation says that forward() works if the resource that is going to take the request is part of the same application, and sendRedirect() works fine if the resource is outside the web application...ok I knew that, however, it is not clear to me why the correct answer is :
3. response.sendRedirect("some url");
If forward() works within the same application, and sendRedirect() outside, and it cannot be predictable whether or not the resource that is taking the request is in the same application, I think that sendRedirect works for both situations, is that right???
Thx
The explanation says that forward() works if the resource that is going to take the request is part of the same application, and sendRedirect() works fine if the resource is outside the web application...ok I knew that, however, it is not clear to me why the correct answer is :
3. response.sendRedirect("some url");
If forward() works within the same application, and sendRedirect() outside, and it cannot be predictable whether or not the resource that is taking the request is in the same application, I think that sendRedirect works for both situations, is that right???
Thx