Hi Karam,
Did you put it in the WEB-INF directory or the WEB-INF/lib
directory? The "jasper" message you are getting seems to indicate
that you are using JSP's, which should not be the case of
JSFTemplating files (which is what you have below).
Your directory structure should look like this in your web application:
/WEB-INF/faces-config.xml (optional)
/WEB-INF/web.xml
/WEB-INF/lib/dataprovider.jar (woodstock requirement)
/WEB-INF/lib/json.jar (woodstock requirement in newest version... I
think)
/WEB-INF/lib/webui-jsf (woodstock)
/WEB-INF/lib/webui-jsf-suntheme.jar (woodstock)
/WEB-INF/lib/jsftemplating.jar (jsftemplating)
/WEB-INF/lib/jsftemplating-dynafaces-0.1.jar (new jsftemplating
requirement)
/yourfile.jsf
I "think" that's all that's required.
Just yesterday I integrated with Ed Burn's "Dynamic Faces" project.
This introduced "jsftemplating-dynafaces-0.1.jar" as a requirement to
work with the "tip" of JSFTemplating. There is a branch prior to
this integration called "JSF1_1" which does not have this
requirement. It also works with JSF 1.1, JSF 1.2 will be a
requirement going forward. I hope to remove the requirement to
include the Dynamic Faces .jar files, but until I can get Ed to make
some changes this will continue.
If this doesn't help you get going, you can send me your web
application and I can take a look to see what might be causing the
problem. Also, you may find the "demo" application on the
JSFTemplating site may be a good example to see what is required in
the app... esp. wrt the build environment (it has ant build.xml files
that are already setup to compile with "apt", etc.).
Good luck!
Ken
P.S. Unless there is Sun confidential information, please feel free
to use the "dev@jsftemplating.dev.java.net" email alias. There are
others inside Sun and outside that may provide additional help... or
your question may help someone else experiencing the same problems!
;) If you haven't already subscribed to that alias you may want to
do that by going here:
https://jsftemplating.dev.java.net/servlets/ProjectMailingListList
Karam Singh Badesha wrote:
Ken/Anissa,
Here is my first problem just setting up the netbeans env. I have
copied all the woodstock jar files and jsftemplating jar files into
the WEB-INF folder and there are no problems in building the
following code from jsftemplating website:
<sun:page>
<sun:html>
<sun:head title="Pick A Number" />
<sun:body>
<sun:form>
<sun:textField label="Pick a Number:"
text="#{requestScope.num}" />
<staticText value="<br />You picked:
#{requestScope.num}<br />" />
<sun:button text="OK" />
</sun:form>
</sun:body>
</sun:html>
</sun:page>
And here is the exception I get.
org.apache.jasper.JasperException: /index.jsp(6,62) #{...} not
allowed in a template text body.
Is there a page which describes how to debug in this environment?
thanks
Karam
------------------------------------------------------------------------
<jsp:root version="2.0"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
<jsp:directive.page contentType="text/html" />
<f:view>
<webuijsf:page id="page2" >
<webuijsf:html id="html2" >
<f:loadBundle basename="com.sun.webui.jsf.example.resources.Resources" var="msgs" />
<webuijsf:head id="head2" title="#{msgs.masthead_title}">
<webuijsf:link rel="shortcut icon" url="/images/favicon.ico" type="image/x-icon" />
</webuijsf:head>
<webuijsf:body id="body2" >
<webuijsf:form id="form2">
<!-- Masthead with Attributes -->
<webuijsf:masthead id="masthead" serverInfo="#{MastheadBean.server}" userInfo="#{MastheadBean.user}"
dateTime="true" notificationMsg="#{msgs.masthead_notificationmsg}" jobCount="0"
productImageURL="/images/example_primary_masthead.png" productImageDescription="#{msgs.mastheadAltText}"
utilities="#{MastheadBean.links}"
alarmCounts="#{MastheadBean.alarms}" >
<!-- Utility Bar Facets -->
<f:facet name="consoleLink" >
<webuijsf:hyperlink id="hyp1" toolTip="#{msgs.masthead_consoleLink}"
actionExpression="#{MastheadBean.consolePage1Clicked}" immediate="true" />
</f:facet>
<f:facet name="versionLink" >
<webuijsf:hyperlink id="hyp2" onClick="javascript: var versionWin = window.open('/example/faces/masthead/Version.jsp', 'VersionWindow','scrollbars,resizable,
width=650,height=500,top='+((screen.height - (screen.height/1.618)) - (500/2))+',left='+((screen.width-650)/2) ); versionWin.focus();
if(window.focus){versionWin.focus();} " immediate="true"
toolTip="#{msgs.masthead_versionLink}" actionExpression="#{MastheadBean.versionPage1Clicked}"/>
</f:facet>
<f:facet name="logoutLink">
<webuijsf:hyperlink id="hyp3" actionExpression="#{MastheadBean.logoutPage1Clicked}" toolTip="#{msgs.masthead_logoutLink}" immediate="true" />
</f:facet>
<f:facet name="helpLink" >
<webuijsf:hyperlink id="hyp4" actionExpression="#{MastheadBean.helpPage1Clicked}" toolTip="#{msgs.masthead_helpLink}" immediate="true" />
</f:facet>
</webuijsf:masthead>
<!-- Breadcrumbs -->
<webuijsf:breadcrumbs id="breadcrumbs">
<webuijsf:hyperlink id="hyp5" actionExpression="#{IndexBean.showIndex}" text="#{msgs.exampleTitle}"
toolTip="#{msgs.index_title}" immediate="true"
onMouseOver="javascript:window.status='#{msgs.index_breadcrumbMouseOver}'; return true"
onMouseOut="javascript:window.status=''; return true"/>
<webuijsf:hyperlink id="hyp6" actionExpression="#{MastheadBean.goToMastheadIndex}"
text="#{msgs.masthead_title}" toolTip="#{msgs.masthead_titleToolTip}"
onMouseOver="javascript:window.status='#{msgs.masthead_breadcrumbMouseOver}'; return true"
onMouseOut="javascript:window.status=''; return true" immediate="true"/>
<webuijsf:hyperlink id="hyp7" text="#{msgs.masthead_masthead1Title}" />
</webuijsf:breadcrumbs>
<!-- Alert -->
<webuijsf:alert id="message" type="information" summary="#{MastheadBean.message}" rendered="#{MastheadBean.isRendered1}" />
<!-- Page Title -->
<webuijsf:contentPageTitle id="pagetitle" title="#{msgs.masthead_pageTitle1}" helpText="#{msgs.masthead_helpText1}" />
<div class="ConMgn_sun4">
<br/>
<!-- Hyperlink to Popup window with Secondary Masthead -->
<webuijsf:hyperlink id="hyperlinkpopup" text="#{msgs.masthead_link}" toolTip="#{msgs.masthead_linkToolTip}" immediate="true"
onClick="javascript: var popupWin = window.open('/example/faces/masthead/Popup.jsp','PopUpWindow','scrollbars,resizable,width=650,
height=500,top='+((screen.height - (screen.height/1.618)) - (500/2))+',left='+((screen.width-650)/2) ); popupWin.focus();
if(window.focus){popupWin.focus();} return false;" />
</div>
</webuijsf:form>
</webuijsf:body>
</webuijsf:html>
</webuijsf:page>
</f:view>
</jsp:root>
------------------------------------------------------------------------
setResourceBundle(key="msgs"
bundle="com.sun.webui.jsf.example.resources.Resources"); /> //
Removed, see above /* * Facets have a different syntax in
JSFTemplating, the following * is the old syntax for the facet
defined above left here for * comparison purposes. * * * * */ //
Note the use of a double quote before any line that should be //
rendered directly to the output stream. "
"
"