Dashboard > Community Wiki > ... > Template development > Debugging Templates
Debugging Templates Log In View a printable version of the current page.

Added by GrĂ©gory Joseph , last edited by Boris Kraft on Mar 14, 2008  (view change)
Labels: 

When you dive into creating new templates in JSP, sometimes you will only see a blank page instead of the expected page content. This is because an error has occurred when compiling the JSP to render it.

The JSP in question could be a paragraph template or the page template itself. To quickly see if your configuration is correct, simply remove everything from the page template and write something like "Hello" - tomcat will compile it on the fly and if your configuration is ok, "Hello" will show up. In this case, paste the contents back in and check the logs as described below.

If not the template but your dialog shows up as a blank page, something in the config in adminCentral is wrong.

There is a couple of places to go hunting for error information:

1. Tomcat will log to $CATALINA_HOME/logs/catalina.out. In magnolia this is
*..../magnolia2.0/author/logs/catalina.out and
*..../magnolia2.0/public/logs/catalina.out

  • you generally WON'T find errors for your JSP mistakes in there.

2. The Tomcat installation is setup so that the Magnolia WebApp logs to ..../magnolia2.0/author/logs/magnoliaAuthor_log.2004-12-31.log

  • look here first for your blank page problem
  • This is where Tomcat will log any compilation errors for your JSP's
  • when developing, you can log to here also by calling .log() method on the ServletContext (there are better ways, see below)

3. The last place to look is the location for when magnolia is logging itself. You will find these log files in

  • ..../magnolia2.0/author/webapps/magnolia/logs
  • ..../magnolia2.0/public/webapps/magnolia/logs
  • Magnolia will log here when everything is "running" okay and it is logging all sorts of information (it may log internal errors here also, but these are not generally related to "blank page" issues.

The location of logfiles is configured using log4j. log4j is VERY configurable. You can turn off all sorts of logging and just configure it to log what you need.

The file ..../magnolia2.0/author/webapps/magnolia/WEB-INF/config/log4j.properties configures "where" these logfiles are. LOG4J even has it's own Taglib which can be used in the JSPs. See http://jakarta.apache.org/taglibs/doc/log-doc/log-1.0/

Powered by a free Atlassian Confluence Open Source Project License granted to Magnolia International. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators