Java: how to debug an invalid JSTL declaration?

Posted by Webinator on Stack Overflow See other posts from Stack Overflow or by Webinator
Published on 2010-05-24T20:37:11Z Indexed on 2010/05/24 20:41 UTC
Read the original article Hit count: 342

Filed under:
|
|

I've seen this kind of issue on SO (and on the Net overall) quite a few times. For example here:

http://stackoverflow.com/questions/1884529

Earlier today I was trying on a JSP (regular .jsp, not .jspx) to do this, because I stupidly cut/pasted some example found on the net:

<%@ taglib prefix = "c" uri = "http://java.sun.com/jstl/core"%>

Then my .jsp was giving a blank page. No error message in the Tomcat log. No nothing. Just a blank page.

While, of course (I'm being sarcastic here), the correct line was this:

<%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core"%>

There was a "jsp/" missing (which I found a hint to in yet another SO question).

So obviously such issues are common.

I can't believe you have to wait for things "not to work" to know you've there's an error and I'm honestly a bit confuzzabled by the number of questions found on the net (and here on SO) where the answer is basically "fix your declaration".

My question here is simple: how do you know that it's a declaration issue? What thought process is required here to diagnose and troubleshoot such issues? Are there tools that can help here? (I don't know, like, say, IntelliJ IDEA or Eclipse or Emacs in nxml-mode warning you in real time that the declared URI is invalid?)

© Stack Overflow or respective owner

Related posts about java

Related posts about jstl