Solved

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

Posted on 2004-10-20
8
302 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

A procedure for exporting installed hotfix details of remote computers using powershell
In  today’s increasingly digital world, managed service providers (MSPs) fight for their customers’ attention, looking for ways to make them stay and purchase more services. One way to encourage that behavior is to develop a dependable brand of prod…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

707 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

19 Experts available now in Live!

Get 1:1 Help Now