Solved

How do you output a variable or a string from and EJB when using JSP

Posted on 2004-10-20
8
303 Views
Last Modified: 2010-04-01
Hi,

I'm using JSP w/ EJB.  How do I output the contents of a variable to a console or something from the EJB?  I am currently using J2EE 1.4 and  System.out.println() doesn't send outputs to the java console.  It's too much work to have to create an extra interface to output to JSP.  Since I need to see what is happening in the EJB, the output is important.  Thanks.
0
Comment
Question by:skip1000
8 Comments
 
LVL 1

Expert Comment

by:krishnaashu
ID: 12367489
by just writting

System.out.println("Your Comment" + Your Variable);

in your jsp/j2ee program it will write tomcat/j2ee servers console window

regds

Ashu Krishna
0
 
LVL 1

Expert Comment

by:krishnaashu
ID: 12367511
ok this might be due to your System.out.println() is not executed due to some logical problem otherwise it will always write to java console.

you can also use output.print() in jsp page it will print output at your web browser and when your work finish remove output.println() from jsp


regds

Ashu Krishna
0
 
LVL 13

Accepted Solution

by:
petmagdy earned 200 total points
ID: 12367582
See if system.out.print() prints to any of the *.log files in ur J2EE SDK
0
 
LVL 9

Expert Comment

by:Ovi
ID: 12368268
Create a class with a static method which will do that for you, instead of println, if not working. That class could create your own log file and append to it, instead of the console. But basically the System.out.println should work.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 21

Expert Comment

by:MogalManic
ID: 12368346
What servlet container are you using?  What envioronment is your server?
0
 

Author Comment

by:skip1000
ID: 12369000
Haven't used servlets just yet.  Just beginning J2EE 1.4 using only things with J2EE 1.4 (app server 8, pointbase) on a Windows XP environment.
0
 
LVL 8

Assisted Solution

by:kiranhk
kiranhk earned 50 total points
ID: 12370423
it would be printing the System.out's in the log files!! check out those log files
0
 

Author Comment

by:skip1000
ID: 12378089
You are right.  System.out.println() prints to the admin console log file.  Thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
In 2017, ransomware will become so virulent and widespread that if you aren’t a victim yourself, you will know someone who is.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now