• Post Reply Bookmark Topic Watch Topic
  • New Topic

Weird problems in page when using nested includes in my JSP.  RSS feed

 
John Bateman
Ranch Hand
Posts: 320
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I've got a jsp that uses a taglib and this taglib does a pagecontext.include("blah.jsp") to display information.
When I run this .jsp the file contained inside the "blah.jsp" is ALWAYS are the top of my page and the remainder of the jsp follows. So the information is always fisplayed as "taglib info", leftMenu.jsp, footer.jsp instead of leftMenu.jsp, 'taglib info', footer.jsp
The funny thing is that even the HTML and HEAD and /HEAD tags appear AFTER the taglib information.
Funnier still is that it 'seems' to only happen when I deploy to Websphere on the AS/400. This does not happen in Tomcat or Websphere running on Windows 2000, nor does it happen in Websphere Studio Test Environment.
Here's some code to illustrate....

and the taglib looks like this...
 
Kees van Oosterhout
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I seem to have the same problem. Can anyone please help us!!
 
Kees van Oosterhout
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correction: I do not seem to have the same problem. It works fine in Tomcat (of course) but it does not work in Websphere 4.0 on windows 2000.
 
Kees van Oosterhout
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John,
I think i found the solution. It came from:
http://www-1.ibm.com/support/docview.wss?rs=0&context=SW600&q=include&uid=swg21000343
You should turn off buffering or you should flush the buffer before you include the page. I think you can read all about jsp and buffering in you JSP references.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!