• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Output of RequestDispatcher include with JSP?

 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, I get the Req..Disp... with a JSP as a target and include(...) it in a JSP in the middle.
But, then when I try, the included JSP content comes first and then the Calling JSP content.
Why? Any help is appreciated.
Thanks.
- satya

With this example I expect to see:

Test RequestDispatcher........
Hello..................1.2 JSP SPEC
[content of login-error.jsp]
The end!!!
 
Guy Allard
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi - Very Bizarre!
I am unable to recreate the problem you describe.
I run TC4.01, JVM 1.3.1_01, Linux RH 7.2.
When I C+P your code, change the include name to an appropriate one for my system, I get output but the included jsp data comes before the including jsp data!!
To "solve" that problem, I add:
out.flush();
as the 1st line of the scriptlet. Output is then in proper order.
What is going on here?
Regards, Guy
OK, this was really a reply to the post about the html file.
G.
[ February 28, 2002: Message edited by: Guy Allard ]
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, even I see the same result. Only if I use the out.flush() in the scriptlet, I see the including JSP before the included JSP.
Seems odd to me. But thanks for the tip on
flush().
- satya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic