Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Doubt in nested tags: (Please Help)

 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am unsure why am i not getting the desired output:

JS_SimpleInner_Outer.jsp

>

JS_SimpleInner.tld


JS_ClassicOuter.tld
JS_Classic_Outer.java



JS_SimpleInner.java



Bases on above code i expected output to be

:

This is to check for simpleInner
in set namein set nameClassicParentTag
let us c in simple inner
Parent attribute is in simple inner ClassicParentTag



However the output what iam getting actually is

This is to check for simpleInner
in set namein set nameClassicParentTag



Above output doesnot contain the prints mentioned in inner tag i.e here ( mine:SimplyInner which in turn calls JS_SimpleInner.java)

NOTE However , if i comment the outer tag in the JSP, then the SimplyInner tag works fine....CAn anyone please tell me what is the problem here exactly....
[ November 14, 2008: Message edited by: Maan Shenoy ]
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't tested your code, but I can't see a:



in your outer tag. This is needed to tell the container it should evaluate the content enclosed by the tag (invoking any children tag handlers in the process).

On a side note I'd recommend reviewing your naming as I found it a little confusing having a class called "JS_Classic_Outer" that uses the SimpleTagHandler interface!

Rufus.
 
Maan Suraj
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm.....thanks rufus...it worked...

going forward i will follow naming conventions as well.....
 
This tiny ad is suggesting that maybe she should go play in traffic.
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic