Gopal Ramasammy-Cook wrote:
>
> Hi
>
> I am trying to get a basic JSP template working in Turbine. I don't know how to
>reference the JSP template screen output in my JSP layout template. In Velocity and
>Webmacro, this is simply $screen_placeholder.
>
> Regards
>
> Chris
Here is the example located in src/tlds, if you find it useful, please
format into xdoc format and submit it for inclusion in the jsp howto
doc.
john mcnally
-------------------------------------------------------------
layouts/default.jsp
-------------------------------------------------------------
<%@ page import = "org.apache.turbine.services.jsp.util.*" %>
<%@ page import = "org.apache.turbine.util.*" %>
<%@ page import = "java.util.*" %>
<%@ taglib uri='/WEB-INF/tlds/template.tld' prefix='turbine' %>
<jsp:useBean id="rundata" class="RunData" scope="request"/>
<jsp:useBean id="link" class="JspLink" scope="request"/>
<html>
<!--
A simple jsp layout
<a href="mailto:[EMAIL PROTECTED]">John D. McNally</a>
-->
<head>
<turbine:screen section="head" contextRelevant="false" />
</head>
<body<turbine:bodyAttributes />>
<table width="100%" border="0">
<tr>
<td>
<turbine:navigation template="top.jsp" />
</td>
</tr>
</table>
<table width="120" align="left" border="0">
<tr>
<td valign="top">
Some side<br>
links<br>
Home<br>
</td>
</tr>
</table>
<table width="480" border="0">
<tr>
<td>
<p><font color="#330000"><%= rundata.getMessageAsHTML()
%><br></font></p>
<turbine:screen section="body" />
</td>
</tr>
</table>
<br clear="all">
<table width="100%" border="0">
<tr>
<td>
<turbine:navigation template="bottom.jsp" />
</td>
</tr>
</table>
</body>
</html>
-------------------------------------------------------------
navigations/top.jsp
-------------------------------------------------------------
<%@ taglib uri='/WEB-INF/tlds/template.tld' prefix='turbine' %>
<H1>JSP example</H1>
This is version 0.1.
<BR>
<BR>
-------------------------------------------------------------
navigations/bottom.jsp
-------------------------------------------------------------
<%@ taglib uri='/WEB-INF/tlds/template.tld' prefix='turbine' %>
<BR>
<BR>
The End
-------------------------------------------------------------
screens/welcome.jsp
-------------------------------------------------------------
<%@ taglib uri='/WEB-INF/tlds/template.tld' prefix='turbine' %>
<turbine:head>
<title>Welcome</title>
</turbine:head>
<turbine:body>
Hello<br>
<br>
<% if (true) { %>
Browser_Name: turbine:wmVar name="browserDetector.BrowserName" <br>
Browser_Version: turbine:wmVar name="browserDetector.BrowserVersion"
<br>
Browser_Platform: turbine:wmVar
name="browserDetector.BrowserPlatform" <br>
Browser_JavaScriptOK: turbine:wmVar
name="browserDetector.JavascriptOK" <br>
Browser_CSSOK: turbine:wmVar name="browserDetector.CssOK" <br>
Browser_FileUpload : turbine:wmVar
name="browserDetector.FileUploadOK" <br>
<% } %>
</turbine:body>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]