[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2004-10-20
8
Medium Priority
?
314 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 600 total points
ID: 12367582
See if system.out.print() prints to any of the *.log files in ur J2EE SDK
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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
 
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 150 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

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

Last month Marc Laliberte, WatchGuard’s Senior Threat Analyst, contributed reviewed the three major email authentication anti-phishing technology standards: SPF, DKIM, and DMARC. Learn more in part 2 of the series originally posted in Cyber Defense …
Tech giants such as Amazon and Google have sold Alexa and Echo to such an extent that they have become household names. And soon they are expected to be used by commoners in their homes, ordering takeout, picking out a song, answering trivia questio…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

864 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