• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Is it possible to use a tag w/in a tag with tag files?

 
author
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to do something like this:

<tag:head><tag:js src="foo.js"/></tag:head>

However, when I use body-content="scriptless" in head.tag, it blows up. When I use body-content="tagdependent", "<tag:js src="foo.js"/>" is spit out w/o being evaluated.

Thanks,
 
Sheriff
Posts: 67754
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

it blows up



Some details on the explosion might be helpful.
 
Matt Raible
author
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nevermind, I got it working - don't know what was causing the non-evaluation before.

I do have a new problem though - if I turn on trimSpaces in Tomcat's web.xml - all the lines spit out by my tag files are on the same line. With a regular JSP, line breaks are honored. Any ideas?

Thanks,

Matt
 
Bear Bibeault
Sheriff
Posts: 67754
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
No, but why does it matter?
 
Matt Raible
author
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bear Bibeault:
No, but why does it matter?



It doesn't matter for an aesthetics point of view, but web developers might get annoyed the output doesn't look like their input. It works fine on JSPs, just not on Tag files. I'm using Tomcat 5.0.25.

Matt
 
Bear Bibeault
Sheriff
Posts: 67754
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

Originally posted by Matt Raible:
but web developers might get annoyed the output doesn't look like their input



As the Dread Pirate Roberts once said "Get used to disappointment."

Seriously, worrying about what the output of a JSP looks like is really not a very valid concern.
[ August 23, 2007: Message edited by: Bear Bibeault ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic