• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP: make app crash if EL variable unknown or namespace not declared

 
manuel aldana
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

several times the page displayed fine though a corrupt data was used inside a JSP like:
...
${nonExistentVar.bla}
...


The same counts for using jsp tags where jsp-namespace are not declared:
<!-- c: namespace not declared in jsp header
<c:if.....>


Is there a way/configuration to make the app crash if such coding errors are inside JSP? It is really annoying if page shows up though JSPs contain wrong stuff. In my view this should be default setting....

thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The EL specification clearly states what conditions will result in errors and which will result in empty output. There are no settings to adjust this.
 
manuel aldana
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see,

for the EL side I think it is a very bad approach to filtering out buggy markup. I wished here EL would go the freemarker way, where at a empty you have to explicitly append a '?' to tell that it should produce empty string otherwise an exception is thrown.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!