webtier@glassfish.java.net

Include JSP scriptlet in JSF / XHTML page

From: <webtier_at_javadesktop.org>
Date: Mon, 23 Aug 2010 11:25:03 PDT

I am trying to include a JSP scriptlet in an JSF2 / XHTML page using the following in my Facelets Template file:

[code]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:fn="http://java.sun.com/jsp/jstl/functions"
      xmlns:jsp="http://java.sun.com/jsp/page"
      xml:lang="en" lang="en">
 
  <h:head>
    <title>Test Page</title>
  </h:head>
  <h:body>
    <div class="container">
      <jsp:include page="menu.jspf"/>
      <div id="content" class="content">
        <ui:insert name="content">Content Here</ui:insert>
      </div>
    </div>
  </h:body>
</html>
[/code]

However the file is never included. I understand that jsp scriptlets are frowned upon and this is the reason I isolated this functionality into a separate component to keep the nastiness isolated.

Any suggestions on how I can do this ?

Thanks in advance
Alex
[Message sent by forum member 'lostinspace2011']

http://forums.java.net/jive/thread.jspa?messageID=480831