does anyone know how to forward a request to a specific frame?
I use:
dispatcher = getServletContext().getRequestDispatcher("/servlet/MyServlet" );
dispatcher.forward( request, response );
Is there any way to define a target frame (TARGET=’myFrame’) in such a
request forwarding?
No, it’s not possible to specify the
targetfrom the server side on. Imagine what would happen if it was possible to specify atarget="_blank"from the server side on.You’d need to specify it in the client side. You can specify the
targetattribute in<form>and<a>elements whoseactionorhrefpoints to the servlet in question.As an alternative, you could go for a frameless ajax based approach. In JavaScript it’s possible to traverse/manipulate the HTML DOM tree dynamically based on the servlet response. Frames are too 90’s anyway.