Discussions

General J2EE: j2ee

  1. j2ee (2 messages)

    Hi friends, I has one doubt regarding the RequestDispatcher class. My doubt, is in our project I am calling a jsp from a servlet. I am including the content of jsp in servlet using RequestDispatcher.include method. The jsp content is getting into the servlet but the problem is in displaying the content. what I want to know is when we forward/include does the page gets refreshed or not. Any Help is appreciated. Thanks & Regards, Sathish Kumar.G.

    Threaded Messages (2)

  2. Page will get refreshed[ Go to top ]

    Hi, Requestdispatcher forwards/include will refresh the screen. If you are looking for ajax kind of thing you need to look for ajax library support. Thanks, Senthil Balakrishnan
  3. synchronous or asynchronous submit?[ Go to top ]

    include will simply add the response of the included JSP to the current response stream. It doesn't have anything to do with refresh. Refresh depends on how you raised your request. If it was a synchronous browser submit ( including form.submit() or changing the frame.src using js ) then the page will refresh. If it is an asynchronous ajax request, then the page will not refresh.