• 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

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

 
Ranch Hand
Posts: 320
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic