X

Geertjan's Blog

  • July 4, 2005

Effective Monitoring of Deployed Wicket Applications

Geertjan Wielenga
Product Manager
I'm really enjoying Wicket and what seems to me to be a very simple approach to web application development. There's no better way to get to learn a technology than to look at its examples, and this is what I've been doing -- because, fortunately, Wicket has a lot of examples. And they're really very useful. However, less fortunately, some of them seem to be intertwined with each other so that one example depends on another. I prefer learning about a technology by studying very very small examples -- and so I'm trying to separate some of the Wicket samples from each other. In doing so, I've found the NetBeans HTTP Monitor very helpful. For example, thinking that I'd completed Wicket's GuestBook example, I deployed it. I did this by right-clicking the project in the IDE's Projects window and choosing Run Project. So, the project deployed over Tomcat (because that's my target server, which is bundled with the IDE) and displayed the example in the browser.

However, when I looked in the NetBeans HTTP Monitor (which is displayed by default when you deploy an application over Tomcat), I saw this:

Looking at the HTTP Monitor I knew for the first time that I was missing a stylesheet. So, I went back to Wicket's examples folders and looked for the stylesheet. When you look at the Request URI field in the Request tab in the illustration above, you'll see where the stylesheet was expected to be found. So that's where I put it. Then I re-deployed the application and it displayed correctly in the browser, including the stylesheet. However, this is what I saw in the HTTP Monitor:

So now I knew that a file called wicket-logo.png was missing. So I looked for it in Wicket's examples folders and placed it exactly where the Request URI field in the illustration above told me to. When I deployed the application again, both the stylesheet and the logo were displayed. However, this time when I looked in the HTTP Monitor, I saw the following:

Here I can see that the stylesheet and the logo were found; however, there seems to be some kind of message about the stylesheet. The icon is not red like in the previous records, and in the Request tab I see that the HTTP exit status is "304: Not Modified". "What does this mean?" I asked myself. "Is this a problem or just some kind of information?" So I pressed F1 in the HTTP Monitor. I found this text (click to enlarge):

So I clicked the "Analyzing Session Data" link and found a page that describes what all the icons in the HTTP Monitor mean. It includes a link to the W3.org Status Code Definitions page, which told me that the 304 status code is nothing to be worried about. It is just informational.

In other words, the IDE's HTTP Monitor and its help topics are a really useful combination when working with Wicket. I've never really used the HTTP Monitor extensively before, but will now do so while disentangling Wicket's examples.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.