• 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

using 4 includes only shows bgcolor of first

 
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have used 4 <jsp:includes in my JSP page but it shows bgcolor of only the first.All 4 pages have different bgcolor so I was expecting 4 portions with different color.Here is my code:


index.jsp


























but on running it shows only blue color

thanks
 
author
Posts: 297
5
Android Firefox Browser Fedora
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're including all these in one HTML page then you only have one HTML page, and one HTML body, all the other body tags will be ignored. No browser will care about how your code is divided up on the server, only the HTML page they receive. If you want to have four separate pages with different backgrounds then you need to have four actual pages, in frames or whatever. If you just want to have four sections on your page then use four HTML elements and set the background colour on those. For example:
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yup, what you've ended up with is one HTML page with four HTML elements, which is invalid.

And you should be using CSS rather than bgcolor.
reply
    Bookmark Topic Watch Topic
  • New Topic