Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Appending JSP to BodyContent using BodyTagSupport

 
David Lund
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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
 
Khp Virajith
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • 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.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2448
96
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • 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
  • 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
Saloon Keeper
Pie
Posts: 2448
96
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic