Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

include directive and include action

 
Raghu Shree
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what are the difference between include directive and include action?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One is a run-time include and the other is a translation-time include. This gets asked a lot so look through the forum history if you'd like more details.
 
Raghu Shree
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Bear Bibeault,
Thanks for the reply. Before my posting I searched with this question in this forum. But I didn't get the exact difference. So again I have posted this question. From your reply I know include directive is included at translation time and include action is included the source at request time.

I have another one doubt. Is it possible to retrive the parameter which is used in include page. If yes please give me some more hints.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try searching this forum with: include action directive difference.
I just did and found thirteen threads that discuss this (some are better than others).

Your second question was straightforward enough that it would have been quicker to write a test app and run it for the answer than to wait for someone to respond here:

Page A:


Page B (the included page):

Name page A anything you want but page B must be named pageb.jsp.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've just added an entry to the FAQ for this issue.
It's not comprehensive yet but it should be enough to answer most people's questions on the issue.

http://faq.javaranch.com/view?IncludesActionDirective
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excellent entry, Ben.
 
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:
Excellent entry, Ben.


Thank you.

It looks like someone added the mention of the jspf convention.
Good catch.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, that was me. I also fixed a few typos. Hope you don't mind.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not at all.
I was planning on going back and cleaning it up some more.
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic