O'Reilly logo

Struts 2 Design and Programming: A Tutorial by Budi Kurniawan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16. Debugging and Profiling

This chapter discusses two related topics that can help you debug your application, debugging and profiling. Debugging is made easy by the introduction of the debug tag in the Struts tag library and the Debugging interceptor. Profiling lets you profile your application courtesy of the Profiling interceptor.

This chapter starts with the debug tag and proceeds with the Debugging interceptor. It then concludes with profiling.

The debug Tag

The debug tag displays the content of the Value Stack and other objects. Using debug is a no-brainer as you need only write:

<LINELENGTH>90</LINELENGTH>
<s:debug/>

This tag has one attribute, id, but you hardly need to use it.

The code in Listing 16.1 is a JSP that uses a debug tag. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required