?
Solved

jsp put.println() function

Posted on 2005-04-06
4
Medium Priority
?
365 Views
Last Modified: 2012-05-05
Hello, jsp gurus,

a simple question, why sometimes , out.println() doesn't  print anything ?

appreicte your reply.
0
Comment
Question by:lilyyan
  • 2
4 Comments
 
LVL 10
ID: 13719295
means i didnt understand can u elaborate plz
0
 
LVL 12

Accepted Solution

by:
jessegivy earned 150 total points
ID: 13719643
I have encountered this problem myself and every time it was my fault.  jsp is a high level language and it is difficult to say what the compiler is thinking sometimes.  If there is an error in your page then it deffinatly won't print anything because it prints the error.

My best advice would be to comment out the section of code where you suspect the error exists and try again.  I'm sure you know what I'm talking about and you are probably trying to look at something that is very close to where the error occurs.  Sometimes you just have to crunch the code blind.  If it's any consolation I do know that the when the jsp code gets compiled it actually uses out.print to display plain text that you may be writing to the page.  Sometimes I think it gets confused between the code it writes and the code we write.  Anyway....  ....just work on that error and everything will be fine.

Chin up.
0
 

Author Comment

by:lilyyan
ID: 13720430
Hi,jessegivy
problem solved. i'm doing a select query from a table. out.println(sqlRst.getString( 2 )); , if i use column number, it won't print anything. if i use filed name i.e. out.println(sqlRst.getString( field1));, it works.
0
 
LVL 12

Expert Comment

by:jessegivy
ID: 13721233
Bizzar!

Is it because you only selected one field in your query???
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I came across an unsolved Outlook issue and here is my solution.
With more and more companies allowing their employees to work remotely, it begs the question: What are some of the security risks involved with remote employees and what actions should we take to secure them?
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question