You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Jean-Charles Redoutey <je...@gridxpert.com> on 2002/08/20 14:32:30 UTC

RE : Turbine configuration for JSP pages

Thanks for your answer.

I am progressing but it still doesn't work. The problem seems to come
mainly from the configuration: although I have changed the
TurbineResources.properties so that .jsp files should be treated as JSP,
the log files tell me that it is still considered as a Velocity page ...
I tried to put "page.default=JspPage" as it is said in the how-to but
nothing really changes. Moreover, putting "services.JspService.templates
=/templates/jsp" instead of "services.JspService.templates
=/templates/app" doesn't seems to have any effects when I restart the
server. 
In fact I have surely missed a little (important) thing in the
configuration but I can't find out what so if you have any idea, it is
welcome!

Jean-Charles


-----Message d'origine-----
De : Alexander Banthien [mailto:alexander@questech.de] 
Envoyé : mardi 20 août 2002 07:36
À : Turbine Users List
Objet : Re: Turbine configuration for JSP pages

Hi,

answer 1: if at all possible, try to avoid JSP! there is no good reason
to use JSP
in Turbine apart maybe from customer requirements. Velocity is powerful
through
its minimalism and is very easy to learn. Once more, if you can use
Velocity
templates.

answer 2: if you have to us JSP (or like difficult debugging), do the
following
changes to your WEB-INF/conf/TurbineResources.properties
------------------
# Used to set the template homepage if you are using a template
# layout.
#
# Default: /Login.vm

#template.homepage=/Index.vm
template.homepage=/index.jsp
-----
# This is the template that is shown on an incorrect login attempt.
# Setting this property will override any value of screen.login specfied
# below.
#
# Default: Login.vm
template.login=/login_err.jsp
------

# This is the template that is used by the respective Template based
# ErrorScreen for displaying the error. If you are not using a Template
based
# ErrorScreen, then this is ignored.
#
# Default: Error.vm

template.error=/error.jsp
-------

# Turn on the appropriate template service.
services.JspService.classname=org.apache.turbine.services.jsp.TurbineJsp
Service
-------
#services.JspService.default.layout = JspLayout
services.JspService.default.layout = DefaultLayout
services.JspService.templates = /templates/jsp
---------------------------------------
After this change and a restart of your Servlet engine context, all the
jsps under
/template/jsp/screens can be called via the turbine controller servlet.
e.g. a
template /template/jsp/screens/myown.jsp will have a URL
http://my.server.com/mycontext/servlet/mycontext/template/myown.jsp.

Note that by some trickery, the url can be reduced to:
http://my.server.com/myservlet/template/myown.jsp

Good luck!

Alex

Jean-Charles Redoutey wrote:

> Hy everybody,
>
> I am currently trying to use turbine with JSP pages but I can not
manage
> to make it work. There are some messages on this in the mailing-list
> archive but none is giving a clear answer. We want to avoid having to
> learn a new language right now so using velocity is not a solution and
I
> didn't find a full description on how to make a JSP page which really
> works with turbine. So if anybody has already made it work, please
> explain us and don't hesitate to put all the details of the
> configuration, it is in fact what we are searching for.
>
> Thanks
> Jean-Charles
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>

--

Mit freundlichen Grüßen
Alexander Banthien

_______________________________________
Questech GmbH
Schwarzwaldstr. 19
79199 Kirchzarten

Fon: +49 (0)7661 90 35-15
Fax: +49 (0)7661 90 35-20
www.questech.de

_______________________________________



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: RE : Turbine configuration for JSP pages

Posted by Alexander Banthien <al...@questech.de>.
Hi,
try switching off Velocity completely. comment away the line that configures the
classname to the service.

Maybe that gives you some information,

Alex

Jean-Charles Redoutey wrote:

> Thanks for your answer.
>
> I am progressing but it still doesn't work. The problem seems to come
> mainly from the configuration: although I have changed the
> TurbineResources.properties so that .jsp files should be treated as JSP,
> the log files tell me that it is still considered as a Velocity page ...
> I tried to put "page.default=JspPage" as it is said in the how-to but
> nothing really changes. Moreover, putting "services.JspService.templates
> =/templates/jsp" instead of "services.JspService.templates
> =/templates/app" doesn't seems to have any effects when I restart the
> server.
> In fact I have surely missed a little (important) thing in the
> configuration but I can't find out what so if you have any idea, it is
> welcome!
>
> Jean-Charles
>
> -----Message d'origine-----
> De : Alexander Banthien [mailto:alexander@questech.de]
> Envoyé : mardi 20 août 2002 07:36
> À : Turbine Users List
> Objet : Re: Turbine configuration for JSP pages
>
> Hi,
>
> answer 1: if at all possible, try to avoid JSP! there is no good reason
> to use JSP
> in Turbine apart maybe from customer requirements. Velocity is powerful
> through
> its minimalism and is very easy to learn. Once more, if you can use
> Velocity
> templates.
>
> answer 2: if you have to us JSP (or like difficult debugging), do the
> following
> changes to your WEB-INF/conf/TurbineResources.properties
> ------------------
> # Used to set the template homepage if you are using a template
> # layout.
> #
> # Default: /Login.vm
>
> #template.homepage=/Index.vm
> template.homepage=/index.jsp
> -----
> # This is the template that is shown on an incorrect login attempt.
> # Setting this property will override any value of screen.login specfied
> # below.
> #
> # Default: Login.vm
> template.login=/login_err.jsp
> ------
>
> # This is the template that is used by the respective Template based
> # ErrorScreen for displaying the error. If you are not using a Template
> based
> # ErrorScreen, then this is ignored.
> #
> # Default: Error.vm
>
> template.error=/error.jsp
> -------
>
> # Turn on the appropriate template service.
> services.JspService.classname=org.apache.turbine.services.jsp.TurbineJsp
> Service
> -------
> #services.JspService.default.layout = JspLayout
> services.JspService.default.layout = DefaultLayout
> services.JspService.templates = /templates/jsp
> ---------------------------------------
> After this change and a restart of your Servlet engine context, all the
> jsps under
> /template/jsp/screens can be called via the turbine controller servlet.
> e.g. a
> template /template/jsp/screens/myown.jsp will have a URL
> http://my.server.com/mycontext/servlet/mycontext/template/myown.jsp.
>
> Note that by some trickery, the url can be reduced to:
> http://my.server.com/myservlet/template/myown.jsp
>
> Good luck!
>
> Alex
>
> Jean-Charles Redoutey wrote:
>
> > Hy everybody,
> >
> > I am currently trying to use turbine with JSP pages but I can not
> manage
> > to make it work. There are some messages on this in the mailing-list
> > archive but none is giving a clear answer. We want to avoid having to
> > learn a new language right now so using velocity is not a solution and
> I
> > didn't find a full description on how to make a JSP page which really
> > works with turbine. So if anybody has already made it work, please
> > explain us and don't hesitate to put all the details of the
> > configuration, it is in fact what we are searching for.
> >
> > Thanks
> > Jean-Charles
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
> --
>
> Mit freundlichen Grüßen
> Alexander Banthien
>
> _______________________________________
> Questech GmbH
> Schwarzwaldstr. 19
> 79199 Kirchzarten
>
> Fon: +49 (0)7661 90 35-15
> Fax: +49 (0)7661 90 35-20
> www.questech.de
>
> _______________________________________
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--

Mit freundlichen Grüßen
Alexander Banthien

_______________________________________
Questech GmbH
Schwarzwaldstr. 19
79199 Kirchzarten

Fon: +49 (0)7661 90 35-15
Fax: +49 (0)7661 90 35-20
www.questech.de

_______________________________________



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>