[JBoss-dev] [ jboss-Bugs-594563 ] Include of JSP jumps to top of page
Bugs item #594563, was opened at 2002-08-13 12:18 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id=22866 Category: CatalinaBundle Group: v3.0 Rabbit Hole Status: Closed Resolution: Fixed Priority: 5 Submitted By: Jeff Miner (jeff_miner) Assigned to: Scott M Stark (starksm) Summary: Include of JSP jumps to top of page Initial Comment: OS: Win98 JDK: 1.4 I have some code that manually does a JSP include by getting a RequestDispatcher. The code worked under Weblogic 5.1 and 6. In Jboss/Catalina, although there are no errors thrown, the output from the included JSP gets put at the top of the containing page rather than in the middle where it was called. This is puzzling because it ought to be exactly the same as a tag (and I assume those work!) **Containing Page*** <%= myObject.getOutput(request, response) %> ... *** Object public String getOutput(HttpServletRequest request, HttpServletResponse response) { RequestDispatcher dispatch = context.getRequestDispatcher("someJSP.jsp"); try { dispatch.include(request, response); } catch(Exception e){} return ""; * The output from "someJSP.jsp" should go inside the table, but instead it goes at the top of the containing page. -- >Comment By: Jeff Miner (jeff_miner) Date: 2002-11-12 02:26 Message: Logged In: YES user_id=592596 Yes, this: <%pageContext.getOut().flush();%> works, but can it be done in the object rather than in the JSP? I'd have to pass the 'out' to the object (not good practice). -- Comment By: Nobody/Anonymous (nobody) Date: 2002-10-01 09:44 Message: Logged In: NO Try using <%pageContext.getOut().flush();%> The following works for me about to include stuff -- <% pageContext.getOut().flush(); RequestDispatcher rd = application.getRequestDispatcher ("/Included.jsp"); rd.include(request, response); %> -- finished including stuff whereas this does not: about to include stuff -- <% response.flushBuffer(); RequestDispatcher rd = application.getRequestDispatcher ("/Included.jsp"); rd.include(request, response); %> -- finished including stuff Regards, Alex Sumner -- Comment By: Jeff Miner (jeff_miner) Date: 2002-10-01 03:07 Message: Logged In: YES user_id=592596 nobody: I tried flushing the buffer (response.flushBuffer()) both before (makes sense) and after (a desperate move), but it didn't help. starksm: Version No.? When was it fixed? My version is not that old, I don't think. -- Comment By: Nobody/Anonymous (nobody) Date: 2002-09-30 10:43 Message: Logged In: NO The jump to the top of the page is due to the buffer not being flushed. The given example is the same as a jsp include without a buffer flush. If you want the buffer flushed, you have to explicitly code that. -- Comment By: Scott M Stark (starksm) Date: 2002-09-29 03:12 Message: Logged In: YES user_id=175228 This was a jasper issue that has been fixed. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id=22866 --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [ jboss-Bugs-594563 ] Include of JSP jumps to top of page
Bugs item #594563, was opened at 2002-08-13 12:18 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id=22866 Category: CatalinaBundle Group: v3.0 Rabbit Hole Status: Closed Resolution: Fixed Priority: 5 Submitted By: Jeff Miner (jeff_miner) Assigned to: Scott M Stark (starksm) Summary: Include of JSP jumps to top of page Initial Comment: OS: Win98 JDK: 1.4 I have some code that manually does a JSP include by getting a RequestDispatcher. The code worked under Weblogic 5.1 and 6. In Jboss/Catalina, although there are no errors thrown, the output from the included JSP gets put at the top of the containing page rather than in the middle where it was called. This is puzzling because it ought to be exactly the same as a tag (and I assume those work!) **Containing Page*** <%= myObject.getOutput(request, response) %> ... *** Object public String getOutput(HttpServletRequest request, HttpServletResponse response) { RequestDispatcher dispatch = context.getRequestDispatcher("someJSP.jsp"); try { dispatch.include(request, response); } catch(Exception e){} return ""; * The output from "someJSP.jsp" should go inside the table, but instead it goes at the top of the containing page. -- Comment By: Alex Sumner (pqzx2) Date: 2002-11-12 11:54 Message: Logged In: YES user_id=647259 You can either have <%pageContext.getOut().flush();%> ... <%=myObject.getOutput(request, response) %> in the JSP, or you can put the flush in myObject. For the latter you just have to make sure you're flushing the right thing. Bit busy at the moment, don't have time to produce and check an example. Your easiest option is to do it in the JSP as above I think. -- Comment By: Jeff Miner (jeff_miner) Date: 2002-11-12 02:26 Message: Logged In: YES user_id=592596 Yes, this: <%pageContext.getOut().flush();%> works, but can it be done in the object rather than in the JSP? I'd have to pass the 'out' to the object (not good practice). -- Comment By: Nobody/Anonymous (nobody) Date: 2002-10-01 09:44 Message: Logged In: NO Try using <%pageContext.getOut().flush();%> The following works for me about to include stuff -- <% pageContext.getOut().flush(); RequestDispatcher rd = application.getRequestDispatcher ("/Included.jsp"); rd.include(request, response); %> -- finished including stuff whereas this does not: about to include stuff -- <% response.flushBuffer(); RequestDispatcher rd = application.getRequestDispatcher ("/Included.jsp"); rd.include(request, response); %> -- finished including stuff Regards, Alex Sumner -- Comment By: Jeff Miner (jeff_miner) Date: 2002-10-01 03:07 Message: Logged In: YES user_id=592596 nobody: I tried flushing the buffer (response.flushBuffer()) both before (makes sense) and after (a desperate move), but it didn't help. starksm: Version No.? When was it fixed? My version is not that old, I don't think. -- Comment By: Nobody/Anonymous (nobody) Date: 2002-09-30 10:43 Message: Logged In: NO The jump to the top of the page is due to the buffer not being flushed. The given example is the same as a jsp include without a buffer flush. If you want the buffer flushed, you have to explicitly code that. -- Comment By: Scott M Stark (starksm) Date: 2002-09-29 03:12 Message: Logged In: YES user_id=175228 This was a jasper issue that has been fixed. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id=22866 --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [ jboss-Bugs-594563 ] Include of JSP jumps to top of page
Bugs item #594563, was opened at 2002-08-13 12:18 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id=22866 Category: CatalinaBundle Group: v3.0 Rabbit Hole Status: Open Resolution: None Priority: 5 Submitted By: Jeff Miner (jeff_miner) Assigned to: Scott M Stark (starksm) Summary: Include of JSP jumps to top of page Initial Comment: OS: Win98 JDK: 1.4 I have some code that manually does a JSP include by getting a RequestDispatcher. The code worked under Weblogic 5.1 and 6. In Jboss/Catalina, although there are no errors thrown, the output from the included JSP gets put at the top of the containing page rather than in the middle where it was called. This is puzzling because it ought to be exactly the same as a tag (and I assume those work!) **Containing Page*** <%= myObject.getOutput(request, response) %> ... *** Object public String getOutput(HttpServletRequest request, HttpServletResponse response) { RequestDispatcher dispatch = context.getRequestDispatcher("someJSP.jsp"); try { dispatch.include(request, response); } catch(Exception e){} return ""; * The output from "someJSP.jsp" should go inside the table, but instead it goes at the top of the containing page. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id=22866 --- This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today! http://seeker.dice.com/seeker.epl?rel_code=31 ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [ jboss-Bugs-594563 ] Include of JSP jumps to top of page
Bugs item #594563, was opened at 2002-08-13 05:18 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id=22866 Category: CatalinaBundle Group: v3.0 Rabbit Hole >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Jeff Miner (jeff_miner) Assigned to: Scott M Stark (starksm) Summary: Include of JSP jumps to top of page Initial Comment: OS: Win98 JDK: 1.4 I have some code that manually does a JSP include by getting a RequestDispatcher. The code worked under Weblogic 5.1 and 6. In Jboss/Catalina, although there are no errors thrown, the output from the included JSP gets put at the top of the containing page rather than in the middle where it was called. This is puzzling because it ought to be exactly the same as a tag (and I assume those work!) **Containing Page*** <%= myObject.getOutput(request, response) %> ... *** Object public String getOutput(HttpServletRequest request, HttpServletResponse response) { RequestDispatcher dispatch = context.getRequestDispatcher("someJSP.jsp"); try { dispatch.include(request, response); } catch(Exception e){} return ""; * The output from "someJSP.jsp" should go inside the table, but instead it goes at the top of the containing page. -- >Comment By: Scott M Stark (starksm) Date: 2002-09-28 20:12 Message: Logged In: YES user_id=175228 This was a jasper issue that has been fixed. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id=22866 --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [ jboss-Bugs-594563 ] Include of JSP jumps to top of page
Bugs item #594563, was opened at 2002-08-13 05:18 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id=22866 Category: CatalinaBundle Group: v3.0 Rabbit Hole Status: Closed Resolution: Fixed Priority: 5 Submitted By: Jeff Miner (jeff_miner) Assigned to: Scott M Stark (starksm) Summary: Include of JSP jumps to top of page Initial Comment: OS: Win98 JDK: 1.4 I have some code that manually does a JSP include by getting a RequestDispatcher. The code worked under Weblogic 5.1 and 6. In Jboss/Catalina, although there are no errors thrown, the output from the included JSP gets put at the top of the containing page rather than in the middle where it was called. This is puzzling because it ought to be exactly the same as a tag (and I assume those work!) **Containing Page*** <%= myObject.getOutput(request, response) %> ... *** Object public String getOutput(HttpServletRequest request, HttpServletResponse response) { RequestDispatcher dispatch = context.getRequestDispatcher("someJSP.jsp"); try { dispatch.include(request, response); } catch(Exception e){} return ""; * The output from "someJSP.jsp" should go inside the table, but instead it goes at the top of the containing page. -- Comment By: Nobody/Anonymous (nobody) Date: 2002-09-30 03:43 Message: Logged In: NO The jump to the top of the page is due to the buffer not being flushed. The given example is the same as a jsp include without a buffer flush. If you want the buffer flushed, you have to explicitly code that. -- Comment By: Scott M Stark (starksm) Date: 2002-09-28 20:12 Message: Logged In: YES user_id=175228 This was a jasper issue that has been fixed. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id=22866 --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [ jboss-Bugs-594563 ] Include of JSP jumps to top of page
Bugs item #594563, was opened at 2002-08-13 12:18 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id=22866 Category: CatalinaBundle Group: v3.0 Rabbit Hole Status: Closed Resolution: Fixed Priority: 5 Submitted By: Jeff Miner (jeff_miner) Assigned to: Scott M Stark (starksm) Summary: Include of JSP jumps to top of page Initial Comment: OS: Win98 JDK: 1.4 I have some code that manually does a JSP include by getting a RequestDispatcher. The code worked under Weblogic 5.1 and 6. In Jboss/Catalina, although there are no errors thrown, the output from the included JSP gets put at the top of the containing page rather than in the middle where it was called. This is puzzling because it ought to be exactly the same as a tag (and I assume those work!) **Containing Page*** <%= myObject.getOutput(request, response) %> ... *** Object public String getOutput(HttpServletRequest request, HttpServletResponse response) { RequestDispatcher dispatch = context.getRequestDispatcher("someJSP.jsp"); try { dispatch.include(request, response); } catch(Exception e){} return ""; * The output from "someJSP.jsp" should go inside the table, but instead it goes at the top of the containing page. -- >Comment By: Jeff Miner (jeff_miner) Date: 2002-10-01 03:07 Message: Logged In: YES user_id=592596 nobody: I tried flushing the buffer (response.flushBuffer()) both before (makes sense) and after (a desperate move), but it didn't help. starksm: Version No.? When was it fixed? My version is not that old, I don't think. -- Comment By: Nobody/Anonymous (nobody) Date: 2002-09-30 10:43 Message: Logged In: NO The jump to the top of the page is due to the buffer not being flushed. The given example is the same as a jsp include without a buffer flush. If you want the buffer flushed, you have to explicitly code that. -- Comment By: Scott M Stark (starksm) Date: 2002-09-29 03:12 Message: Logged In: YES user_id=175228 This was a jasper issue that has been fixed. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id=22866 --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] [ jboss-Bugs-594563 ] Include of JSP jumps to top of page
Bugs item #594563, was opened at 2002-08-13 05:18 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id=22866 Category: CatalinaBundle Group: v3.0 Rabbit Hole Status: Closed Resolution: Fixed Priority: 5 Submitted By: Jeff Miner (jeff_miner) Assigned to: Scott M Stark (starksm) Summary: Include of JSP jumps to top of page Initial Comment: OS: Win98 JDK: 1.4 I have some code that manually does a JSP include by getting a RequestDispatcher. The code worked under Weblogic 5.1 and 6. In Jboss/Catalina, although there are no errors thrown, the output from the included JSP gets put at the top of the containing page rather than in the middle where it was called. This is puzzling because it ought to be exactly the same as a tag (and I assume those work!) **Containing Page*** <%= myObject.getOutput(request, response) %> ... *** Object public String getOutput(HttpServletRequest request, HttpServletResponse response) { RequestDispatcher dispatch = context.getRequestDispatcher("someJSP.jsp"); try { dispatch.include(request, response); } catch(Exception e){} return ""; * The output from "someJSP.jsp" should go inside the table, but instead it goes at the top of the containing page. -- Comment By: Nobody/Anonymous (nobody) Date: 2002-10-01 02:44 Message: Logged In: NO Try using <%pageContext.getOut().flush();%> The following works for me about to include stuff -- <% pageContext.getOut().flush(); RequestDispatcher rd = application.getRequestDispatcher ("/Included.jsp"); rd.include(request, response); %> -- finished including stuff whereas this does not: about to include stuff -- <% response.flushBuffer(); RequestDispatcher rd = application.getRequestDispatcher ("/Included.jsp"); rd.include(request, response); %> -- finished including stuff Regards, Alex Sumner -- Comment By: Jeff Miner (jeff_miner) Date: 2002-09-30 20:07 Message: Logged In: YES user_id=592596 nobody: I tried flushing the buffer (response.flushBuffer()) both before (makes sense) and after (a desperate move), but it didn't help. starksm: Version No.? When was it fixed? My version is not that old, I don't think. -- Comment By: Nobody/Anonymous (nobody) Date: 2002-09-30 03:43 Message: Logged In: NO The jump to the top of the page is due to the buffer not being flushed. The given example is the same as a jsp include without a buffer flush. If you want the buffer flushed, you have to explicitly code that. -- Comment By: Scott M Stark (starksm) Date: 2002-09-28 20:12 Message: Logged In: YES user_id=175228 This was a jasper issue that has been fixed. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id=22866 --- This sf.net email is sponsored by: DEDICATED SERVERS only $89! Linux or FreeBSD, FREE setup, FAST network. Get your own server today at http://www.ServePath.com/indexfm.htm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] [ jboss-Bugs-594563 ] Include of JSP jumps to top of page
I've seen something very similar with Jetty 3.1.7. Calling RequestDispatcher.include() should flush the output stream, but it appears not to. If you add an explicit response.getWriter().flush(); (or response.getOutputStream().flush() I guess, though I haven't tried it) just before the include(), then it works as expected. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 13, 2002 1:18 PM Subject: [JBoss-dev] [ jboss-Bugs-594563 ] Include of JSP jumps to top of page > Bugs item #594563, was opened at 2002-08-13 12:18 > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id =22866 > > Category: CatalinaBundle > Group: v3.0 Rabbit Hole > Status: Open > Resolution: None > Priority: 5 > Submitted By: Jeff Miner (jeff_miner) > Assigned to: Scott M Stark (starksm) > Summary: Include of JSP jumps to top of page > > Initial Comment: > OS: Win98 > JDK: 1.4 > > I have some code that manually does a JSP include > by getting a RequestDispatcher. The code worked > under Weblogic 5.1 and 6. In Jboss/Catalina, > although there are no errors thrown, the output from > the included JSP gets put at the top of the containing > page rather than in the middle where it was called. > This is puzzling because it ought to be exactly the > same as a tag (and I assume those > work!) > > **Containing Page*** > > > <%= myObject.getOutput(request, response) %> > > ... > > > *** Object > public String getOutput(HttpServletRequest request, > HttpServletResponse response) { > RequestDispatcher dispatch = > context.getRequestDispatcher("someJSP.jsp"); > try { >dispatch.include(request, response); > } catch(Exception e){} > return ""; > * > > The output from "someJSP.jsp" should go inside the > table, but instead it goes at the top of the containing > page. > > > -- > > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id =22866 > > > --- > This sf.net email is sponsored by: Dice - The leading online job board > for high-tech professionals. Search and apply for tech jobs today! > http://seeker.dice.com/seeker.epl?rel_code=31 > ___ > Jboss-development mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-development > > --- This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today! http://seeker.dice.com/seeker.epl?rel_code=31 ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] [ jboss-Bugs-594563 ] Include of JSP jumps to top of page
Seems to be a Jasper thing, exactly the same happens with Tomcat 4.0.4. If you programatically dispatch a request from within a JSP, either with something like this: <%RequestDispatcher rd = application.getRequestDispatcher("/Included.jsp"); rd.include(request, response);%> or with the equivalent code in a custom tag, then the output stream isn't flushed first, so the included stuff ends up before the stuff that preceeded it. - Original Message - From: "Alex Sumner" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 13, 2002 5:26 PM Subject: Re: [JBoss-dev] [ jboss-Bugs-594563 ] Include of JSP jumps to top of page > I've seen something very similar with Jetty 3.1.7. Calling > RequestDispatcher.include() should flush the output stream, but it appears > not to. If you add an explicit > > response.getWriter().flush(); > > (or response.getOutputStream().flush() I guess, though I haven't tried it) > just before the include(), then it works as expected. > > - Original Message - > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, August 13, 2002 1:18 PM > Subject: [JBoss-dev] [ jboss-Bugs-594563 ] Include of JSP jumps to top of > page > > > > Bugs item #594563, was opened at 2002-08-13 12:18 > > You can respond by visiting: > > > https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id > =22866 > > > > Category: CatalinaBundle > > Group: v3.0 Rabbit Hole > > Status: Open > > Resolution: None > > Priority: 5 > > Submitted By: Jeff Miner (jeff_miner) > > Assigned to: Scott M Stark (starksm) > > Summary: Include of JSP jumps to top of page > > > > Initial Comment: > > OS: Win98 > > JDK: 1.4 > > > > I have some code that manually does a JSP include > > by getting a RequestDispatcher. The code worked > > under Weblogic 5.1 and 6. In Jboss/Catalina, > > although there are no errors thrown, the output from > > the included JSP gets put at the top of the containing > > page rather than in the middle where it was called. > > This is puzzling because it ought to be exactly the > > same as a tag (and I assume those > > work!) > > > > **Containing Page*** > > > > > > <%= myObject.getOutput(request, response) %> > > > > ... > > > > > > *** Object > > public String getOutput(HttpServletRequest request, > > HttpServletResponse response) { > > RequestDispatcher dispatch = > > context.getRequestDispatcher("someJSP.jsp"); > > try { > >dispatch.include(request, response); > > } catch(Exception e){} > > return ""; > > * > > > > The output from "someJSP.jsp" should go inside the > > table, but instead it goes at the top of the containing > > page. > > > > > > -- > > > > You can respond by visiting: > > > https://sourceforge.net/tracker/?func=detail&atid=376685&aid=594563&group_id > =22866 > > > > > > --- > > This sf.net email is sponsored by: Dice - The leading online job board > > for high-tech professionals. Search and apply for tech jobs today! > > http://seeker.dice.com/seeker.epl?rel_code=31 > > ___ > > Jboss-development mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-development > > > > > > > > --- > This sf.net email is sponsored by: Dice - The leading online job board > for high-tech professionals. Search and apply for tech jobs today! > http://seeker.dice.com/seeker.epl?rel_code=31 > ___ > Jboss-development mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-development > > --- This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today! http://seeker.dice.com/seeker.epl?rel_code=31 ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development