At 19:07 2000-11-27, John McNally wrote:
>ingo schuster wrote:
>
> > No, and that's exactly my problem. Your code cuts off the starting slash,
> > with the effect that the path is no more regarded as relative to the
> > document root. To be honest, I don't understand how you are able to
> > configure your system to work properly with this code? As I wrote in my
> > earlier note, you _need_ the path to start with a slash - and your init
> > method always cuts it off!
> > Do you understand my problem? Perhaps you could give my an example of how
> > you set the JR.P keys - I'm probably just missing somthing...
> >
> > ingo.
>
>I will try to remember to look tonight (about 10 hours from now).  But I
>think I placed the templates at root level and then the template.path
>properties would be empty.

Ok, this explains it to me: If your template.path is empty, in the init 
method you don't modify the path at all, it stays empty. If now your 
template filename starts with a slash, everything will be ok:

For example:
                                 path is "", filename is "\layouts\default.jsp"
after exec. initJsp:            path is "", filename is "\layouts\default.jsp"
handleRequest forwards to:      "\layouts\default.jsp"

However if your path is not empty, but e.g. "\templates" it goes following way:

                                 path is "\templates", filename is 
"\layouts\default.jsp"
after exec. initJsp:            path is "templates\", filename is 
"\layouts\default.jsp"
handleRequest forwards to:      "templates\\layouts\default.jsp"

This won't work. Just try to use a non-empty path and you'll see what I mean!
Thanks,
                 ingo.


>sample_app/
>         screens/
>                 welcome.jsp
>                 ...
>         layouts/
>                 default.jsp
>         WEB-INF/
>
>
>------------------------------------------------------------
>To subscribe:        [EMAIL PROTECTED]
>To unsubscribe:      [EMAIL PROTECTED]
>Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
>Problems?:           [EMAIL PROTECTED]



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to