• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

forwarded to jsp displays content in previous jsp

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use sendRedirect Method......
 
richard koch
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
reply
    Bookmark Topic Watch Topic
  • New Topic