• Post Reply Bookmark Topic Watch Topic
  • New Topic

custom tags

 
kira yamato
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone knows how to code the java file for custome tag to act like

<@include file="url" @> using include.

cause i want to explore on how jsp do the include of the file

if possible i will like to code it out myself too which something like this,

<project:include file="url" />
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot mimic the behavior of the include directive (which performs its inclusion at translation time), but you can mimic the behavior of the <jsp:include> action (a run-time include) by exploring the RequestDispatcher.include() method.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
You cannot mimic the behavior of the include directive (which performs its inclusion at translation time), but you can mimic the behavior of the <jsp:include> action (a run-time include) by exploring the RequestDispatcher.include() method.


And, of course, if you want to see how either of those work, just look at the generated servlet code.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!