• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jsp:text question

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
here is an example from jsp syntax:
<hello><jsp:scriptlet>i=3;</jsp:scriptlet>
<hi>
<jsp:text> hi you all
</jsp:text><jsp:expression>i</jsp:expression>
</hi>
</hello>
The output is:
<hello> <hi> hi you all
</hi></hello>
Ques:
Why the value of i is not in the output?
Thanks!
KY
 
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kevin
I don't see the definition for variable 'i' anywhere. You would probably see the value of i if it were defined as <jsp:scriptlet> int i=3;</jsp:scriptlet>
Mark.
 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can alter
<jsp:scriptlet>i=3;</jsp:scriptlet> to
<jsp eclaration>int i=3;</jsp eclaration> .
Try it out.
 
Kevin Yun
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Much appreciation to both of you. I tested the code within a JSP page. After the declartion of i, the output is : "hello you all 3". It is different with the example.
KY
 
reply
    Bookmark Topic Watch Topic
  • New Topic