Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can a custom tag return a jsp tag?

 
John Pritchard
Ranch Hand
Posts: 49
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all-
I am fumbling through the correct implementation of the Composite View pattern using custom tags to may runtime determinations of JSP content. I have a custom tag that evaluates the username/password of the user at login and performs a set of :

statements among others. The problem is that all of the html tags that appear in my out.println statements get evaluated fine by the JSP. None of the jsp:includes do however. The statements do end up in the source returned to the browser however. For example if I do a view source on the resulting webpage, I see all the <jsp:include> tags it's just they were not interpretted. I've been through the Professional JSP text but are unable to find a definitive answer if you can return jsp tags in a custom tag. I'm using Weblogic 7.0.
hmmm
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64186
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, the JSP tags are evaluated at translation time, and your custom tags execute at run time -- long after the JSP tags have been evaluated.
For your particular problem, remember that the value of the page attribute on the jsp include tag can be a run-time value, and you can perform an include operation from within the custom tag code.
hth,
bear
[ January 09, 2003: Message edited by: Bear Bibeault ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic