• Post Reply Bookmark Topic Watch Topic
  • New Topic

forwarded to jsp displays content in previous jsp

 
richard koch
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
help,
i am forwarding via:
RequestDispatcher dis = request.getRequestDispatcher(address);
if (dis != null)
{
dis.forward(request,response);
}
when the new jsp is displayed, its content is written over the page that was previously displayed. how does one display only the forwarded to page?
 
Manohar Karamballi
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai!
use include instead of forward..
rgds
Manohar
 
Manohar Karamballi
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use sendRedirect Method......
 
richard koch
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i dont't quite unterstand that. i want to forward from one page to another and so on, when they are finished. my understanding is, that when i include, i run the 2 or more pages at the same time.
 
richard koch
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Manohar Karamballi:
Use sendRedirect Method......

if i use
send.Redirect("/login/message/hallo.jsp")
than it will not do anything. i am not forwarded. Any sugesstions?
[This message has been edited by richard koch (edited August 10, 2001).]
 
Manohar Karamballi
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use sendRedirect method.. Then second JSP page will overwrite first one....
 
Manohar Karamballi
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add this script to the ur first JSP!

<script type=text/javascript>
function doIt() {
if (navigator.appName.indexOf("Netscape") != -1)
window.location = "http://localhost:7001/BeanExperiment/MVCArchitecture/Test.jsp";
if (navigator.appName.indexOf("Microsoft") != -1)
window.location = "http://localhost:7001/BeanExperiment/MVCArchitecture/Test.jsp";
else{
document.location = "http://localhost:7001/BeanExperiment/MVCArchitecture/Test.jsp";
}
}
onload=doIt;
</script>

It might help u..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!