This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes displaying output of functions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "displaying output of functions" Watch "displaying output of functions" New topic

displaying output of functions

Nitish Mittal

Joined: Jun 24, 2012
Posts: 6

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

Joined: Jan 15, 2010
Posts: 21
instead of <%= "wcount" %> you should use <%=Integer.toString(wcount) %>
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60766

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.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: displaying output of functions
Similar Threads
how to upload using html or javascript?
Count the number of vowels, words, and sentences.
How to convert pdf in jsp page, which have the arabic data
SimpleTag how to get body in Tag class?
Httpsesion Listener is not working properly?