Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

displaying output of functions

 
Nitish Mittal
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have included the JAR file in WEB-INF/lib folder but not able to display the content stored in wcount.
please help me with code
 
Kishore Tulsiani
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
instead of <%= "wcount" %> you should use <%=Integer.toString(wcount) %>
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kishore Tulsiani wrote:instead of <%= "wcount" %> you should use <%=Integer.toString(wcount) %>

No. First of all, scriptlets shouldn't be used at all in modern JSPs.

Secondly, the conversion to string is completely unnecessary. <%= wcount %> would be sufficient.

But again, modern JSPs should be using the EL, not scriptlets.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic