By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,467 Members | 1,308 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,467 IT Pros & Developers. It's quick & easy.

if in JSTL

dmjpro
100+
P: 2,476
look at my code ......

Expand|Select|Wrap|Line Numbers
  1. <jsp:usebean id = "test" scope = "page" class="java.lang.String"/>
  2. <c:if test = "test.length()==0">
  3. <H1>Welcome JSTL</h1>
  4. <!--This portion is not executed-->
  5. </c:if>
  6.  
here c is the prefix.
So JSTL experts ... Plz explain why the <H1>Welcome JSTL</H1> is not executed?

Kind regards,
Dmjpro.
Jun 20 '07 #1
Share this Question
Share on Google+
2 Replies


10K+
P: 13,264
look at my code ......

Expand|Select|Wrap|Line Numbers
  1. <jsp:usebean id = "test" scope = "page" class="java.lang.String"/>
  2. <c:if test = "test.length()==0">
  3. <H1>Welcome JSTL</h1>
  4. <!--This portion is not executed-->
  5. </c:if>
  6.  
here c is the prefix.
So JSTL experts ... Plz explain why the <H1>Welcome JSTL</H1> is not executed?

Kind regards,
Dmjpro.
Dj, you need to improve on selecting thread titles. The title must relate as much as possible to the problem.
I've renamed this one.
Jun 20 '07 #2

Expert 10K+
P: 11,448
look at my code ......

Expand|Select|Wrap|Line Numbers
  1. <jsp:usebean id = "test" scope = "page" class="java.lang.String"/>
  2. <c:if test = "test.length()==0">
  3. <H1>Welcome JSTL</h1>
  4. <!--This portion is not executed-->
  5. </c:if>
  6.  
here c is the prefix.
So JSTL experts ... Plz explain why the <H1>Welcome JSTL</H1> is not executed?

Kind regards,
Dmjpro.
Well 'test' is a String, you've declared it so in your first line. The length of test
isn't equal to zero apparently. You know about your own 'test' variable, not me.

kind regards,

Jos
Jun 20 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.