Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp:include in JSF  RSS feed

 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The included page is not processed by JSF.

The page is:


The included page (inc.jsp) is:


But the output in browser is (source code):


You see inc.jsp is treated like a html.

Thanks!

[ May 12, 2006: Message edited by: Bruce Jin ]
[ May 12, 2006: Message edited by: Bruce Jin ]
 
Stefan Evans
Bartender
Posts: 1834
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You also need to declare the tag libraries in the included jsp.

Add this to the top of inc.jsp


explanation: <jsp:include> includes the result of running the specified page. The included page is completely evaluated, and its response merged in with that of the current page.
Thus you need to declare the taglib at the top of the included page, so that it can interpret the jsf tags correctly.

Cheers,
evnafets
 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Stefan;

Now it works after including the tag libraries in the included page.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!