Hi, (I think this one goes primarily to John McNally)

some questions/remarks regarding the JSPService:

0.a) I'm really happy that you checked this in!
0.b) I didn't try to understand all your code, just tried to get it running 
and adapt it for my purposes...


1.) In order to be consistent with the naming of the other Turbine 
services, shouldn't the service be called "TurbineJspService" instead of 
simply "JspService?"

2.) In your examples (jsp_examples.txt, section default.jsp) an attribute 
called "contextRelevant" is used for the screen tag, however the respective 
screenTag bean doesn't define it.

3.) In ScreenPlaceHolder, the error/log message is wrong: you forgot to 
change it when you copied it from the NavigationPlaceHolder. ;)

4.) This is the most important one for me. The initJsp method in 
TurbineJspService doesn't make sense to me: You take the path to the 
templates and if it starts with a slash, the slash is stripped of. At the 
end however, you check wether the the path ends with a slash. If not, you 
add one.
Firstly, the templates are usually stored somewhere below the webserver's 
document root, aren't they? In this case, I definitely _need_ the path to 
start with a slash!
Secondly, I set the services.JspService.templates key to "/templates/jsp" 
and my default layout page to "/default.jsp". This is how it is suggested 
by the services.TurbineTemplateService.default.layout.template key. If you 
do it like this, there shouldn't be a slash at the end of the template path.
In short: I would rather do it the other way round - make sure there is a 
slash at the beginning and none at the end. (Or just leave the two ifs out, 
so that everybody can use the style he/she wants to).

ingo


P.S.: The method like I currently use it.
=============================
     /**
      * This method sets up the template cache.
      */
     private void initJsp(ServletConfig config)
         throws Exception
     {
         ServletContext context = config.getServletContext();
         Properties props = getProperties();

         path = props.getProperty("templates", "");
         if (path.startsWith("/"))
         {
// why??           path = path.substring(1);
         }
         if (path.length() > 0 && !path.endsWith("/"))
         {
// why??            path += "/";
         }

         bufferSize = Integer.parseInt(props.getProperty("buffer.size", 
"2000000"));
     }





------------------------------------------------------------
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