You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by laredotornado <la...@gmail.com> on 2010/05/12 17:31:12 UTC
Any way to get Tomcat to complain if an EL var is undefined?
Hi,
I'm using Tomcat 6.0.26. I wanted to know if there was any setting that
would cause the compiler to complain if an EL variable was never defined.
For example if I have
<p>${resultttt}</p>
the result will be <p></p> because I haven't defined "resultttt" in any
scope. I was hoping an exception could be raised instead of a blank.
Thanks, - Dave
--
View this message in context: http://old.nabble.com/Any-way-to-get-Tomcat-to-complain-if-an-EL-var-is-undefined--tp28537533p28537533.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Any way to get Tomcat to complain if an EL var is undefined?
Posted by Pid <pi...@pidster.com>.
On 12/05/2010 16:31, laredotornado wrote:
>
> Hi,
>
> I'm using Tomcat 6.0.26. I wanted to know if there was any setting that
> would cause the compiler to complain if an EL variable was never defined.
> For example if I have
>
> <p>${resultttt}</p>
>
> the result will be <p></p> because I haven't defined "resultttt" in any
> scope. I was hoping an exception could be raised instead of a blank.
AFAIK you're out of luck there.
You might be able employ an ELResolver implementation, and assume that
anything that reaches it is MIA and therefore throw an exception, but
that would probably be a bit extreme and is, to be completely honest,
heading off into wild guess territory.
I'm not sure the gain outweighs the cost...
p