?
Solved

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

Posted on 2004-10-20
8
Medium Priority
?
311 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
We are witnesses that everyone is saying that our children shouldn't "play" with a technology because it is dangerous. This article is going to prove that they are wrong.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

801 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