Turbine

Essentials

Models

Get Involved

Documentation

Database

JSP + Turbine Configuration

It is quite possible to use JSP with Turbine. In order to do so, you need to tweak the existing configuration in the TurbineResources.properties file as described below. This is an evolving document, if there are still errors in this configuration, please subscribe to the Turbine Users list and let us know. Also note that this file is checked into Turbine's CVS tree under xdocs/jsp-configuration.xml. We appreciate all patches and contributions that improve this document.

In TurbineResources.properties, search for the key values and modify/verify the following settings:

template.homepage=/index.jsp (or whatever jsp you want for the start
                              page)

template.login=/login.jsp    (or whatever jsp you want for the login 
                              form)

page.default=JspPage

services.JspService.classname=org.apache.turbine.services.jsp.TurbineJspService
services.TemplateService.template.service.name=TurbineTemplateService
services.TemplateService.default.extension=jsp
services.TemplateService.default.navigation=BaseJspNavigation
services.TemplateService.default.screen=BaseJspScreen
services.TemplateService.default.layout.template=/default.jsp

If you want to use "complete" JSP pages (rather than using Turbine's model of having separate files for the navigation components, etc.), then you must delete (or comment out) the layout.default entry so that no default layout is used:

#layout.default=...

ADD the following entry into the properties file:

services.JspService.templates=/templates

Place JSP pages in the <app>/templates/screens directory.

Refer to the JSP pages in URLs as .../template/<xxx>.jsp

Also, the servlet jar file (servlet-2.2-CVSHEAD-12-04-00.jar) that comes with the TDK 1.1a11 and ends up in the ..webapps/<app>/WEB-INF/lib directory seems to cause JSP page compile errors. If you remove it, the servlet.jar file that is in the tdk/bin directory will be used instead, and it should work.


Copyright © 1999-2001, Apache Software Foundation