I try to redirect my page to another using request.getRequestDispatcher("/index.jsp").forward(request, response);
. But it dont work. Why? But when I change it to response.sendRedirect
it work fine.
Ccna final exam - java, php, javascript, ios, cshap all in one. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Monday, February 20, 2012
Why getRequestDispatcher("/index.jsp”).forward() dont work with JSP?
Tags
java,
jsp,
Tips For Programmer
Subscribe to:
Post Comments (Atom)
I think the problem might be because of not using relative url.
ReplyDeleteYou can try like this
request.getRequestDispatcher("index.jsp").forward(request, response);