Search code examples
javajstlspring-roosts-springsourcetoolsuite

How to debug JSTL?


I'm using SpringSource Tool Suite (with Roo) and have some success. What bothers me though is that I don't know how to debug tag library-stuff.

I may add breakpoints but it never stops at them.

What I'm looking for is a dump of all current variables in the context.

Up until now I did something like:

<c:forEach items="${data}" var="item">
    <c:out value="${item}"></c:out><br />
</c:forEach>

Sadly, that's difficult to read and also not pretty straightforward.

What can I do to improve this?


Solution

  • Sorry, but you can't put debug points to a file containing markup. In this case, the tag library definition is in the form of a markup. So, instead of debug, you only get validation support for them.

    An exception would be a Java Server Pages (JSP) file, which would be converted to a servlet (program code) at the runtime.

    Debugging is only possible for scripts and code which have a defined execution sequence.

    The best way to overcome this is to go through the documentation carefully and incrementally implementing the tags after getting knowledge on XML or the related markup language.