• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Appending JSP to BodyContent using BodyTagSupport

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd like to append some jsp within a custom tag that extends BodyTagSupport.

For example:




And a jsp something like:




I am currently getting the following in the html:


(All the code above i've just made up on the fly, so there code be some compliation issues or methods not overriden properly, but you should get the gist of it....)

Is there anyway of getting the content generated in my tag to be re-rendered by the jsp engine rather than being treated as a string? I don't believe there's a simple answer as if my memory serves anything added to bodycontent is treated seperately from the actual tag body and is never passed to the jsp engine... although i can't believe i'm the first person to want to do this, so there must be a way around it...


Thanks


Dave
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the same issue (as above mentioned post). I just found this while searching through the forum before posting a new topic.
Can anyone answer this?

Isn't it possible to write a custom tag code into the bodyContent and get it evaluated?

Thanks.
 
Creator of Enthuware JWS+ V6
Posts: 3398
312
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi David,

Can you show me your TLD entry?

Regards,
Frits
 
Khp Virajith
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks for replying. By the way, I'm not David, but I just took this thread up, as I have a similar issue.
Please not that I'm using JSP1.2 / Servlets 2.3 (An old system )




Here, I'm listing down my Tag implementation code. For the simplicity, I'm just listing down the method implementation. (Code compiles fine...)



 
Frits Walraven
Creator of Enthuware JWS+ V6
Posts: 3398
312
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Just try removing the bodyContent code from the doInitBody() method and in the doAfterBody() write to the page by using:


Regards,
Frits
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic