Solved

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

Posted on 2004-10-20
8
304 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
ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
maven project jars 7 53
struts hibernate integration example 28 136
spring JDBC Template example error 26 243
main method of string class 3 111
Knowing where your website is hosted is as important as the features you receive, the monthly fee, and the support you receive. Due diligence should be done when choosing your next hosting provider.
Adding Computers to AD groups through an SCCM Task Sequence
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

803 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