Sheila's Blog

Software Development

Sheila's Blog header image 2

Debugging Seam applications

April 3rd, 2009 by Sheila

Seam provides two different pages that can be useful for debugging applications.  The Facelets Debug page which shows page-rendering errors, and the Seam Debug page which shows any uncaught application exceptions.

Enable the Facelets Debug Page:
In web.xml you set Facelets to development mode.
WEB-INF/web.xml <context-param> <param-name>facelets.DEVELOPMENT</param-name> <param-value>true</param-value> </context-param>

The Facelets debug page gives you the line number in the .xhtml page where the error occured and access to the JSF component tree.

You can access the facelets debug page at any point by setting a hot key for that page.  To launch a debug popup on a page using CTRL-SHIFT-D, add <ui:debug hotkey=”d”/> in the page.

Enable the Seam Debug Page:
You need to add Facelets and Seam UI Support, then enable debugging in components.xml

WEB-INF/components.xml <core:init jndi-pattern="example/#{ejbName}/local" debug=true/>where example is the name of the application.

You can always access the seam debug page by going to the /debug.seam page in your browser.

Tags:   · No Comments

Leave a Comment

0 responses so far ↓

There are no comments yet...Kick things off by filling out the form below.