I need my servlet to redirect two different pages to two different frames. I can do this in html like this
<INPUT TYPE="button" Value="Click me"
I can do ONE page to go to other frame giving TARGET in FORM tag in JSP.
How can I do multiple pages from servlet?
Browser requesting a page and servlet responding it are a request response system. All the servlet can do is respond to a request from the HTML. Even the target (to which frame or to a new window etc.) to which the response should be directed is decided is at the fornt end. You cannot make the servlet send two responses to two different frames.
What you can do is a work around. When you submit from your HTML and set the target say frame1 return the relevent html to this frame. On load of this frame submit to a servlet and redirect the response to frame2. Similarly you can probably find other workarounds depending on your requirements.