473,699 Members | 2,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.out.prin tln("String") Where is the output?

This is from an application and not an Applet.

I believe it goes to stdout but when I do a test and write an abitrary
string and then do a search of the hard disk for the string, I can't find
it. So, I suspect one has to create the file manually before using it.

But I'll be damned if I can remember where.

Thanks to anyone who'll take a few minutes to let me know.
Jul 17 '05 #1
6 17720
> I believe it goes to stdout but when I do a test and write an abitrary
string and then do a search of the hard disk for the string, I can't find
it. So, I suspect one has to create the file manually before using it.


Yes, it goes to stdout. How are you executing this line of code? If
you execute from the command line in a terminal window, you should see
the string written to the terminal screen (unless you've redirected
stdout somehow).

--

Mel Roman
me*@melroman.ne t
Jul 17 '05 #2

"Mel Roman" <me*@melroman.n et> wrote in message
news:1X******** ***********@new s04.bloor.is.ne t.cable.rogers. com...
I believe it goes to stdout but when I do a test and write an abitrary
string and then do a search of the hard disk for the string, I can't find it. So, I suspect one has to create the file manually before using it.


Yes, it goes to stdout. How are you executing this line of code? If
you execute from the command line in a terminal window, you should see
the string written to the terminal screen (unless you've redirected
stdout somehow).

--

Mel Roman
me*@melroman.ne t


It's being executed from a servlet, within a doPost method.

For those not familar with servlets, one enters a URL in a browser that
points to a small java program containing a (in this case doPost) method to
create an HTML page. The HTTP server (Apache) fowards the HTTP request to
the servlet container (Tomcat) which executes the java code that returns the
generated HTML page.
Jul 17 '05 #3
In article <EG************ ********@magma. ca>, Ron Brennan wrote:
It's being executed from a servlet, within a doPost method.


Hmmm... Sorry, I don't have enough experience with servlets to help any
further. Can anyone else here help out?

--

Mel Roman
me*@melroman.ne t
Jul 17 '05 #4

"dfdfd" <df**@aol.com > wrote in message
news:%SAUa.5142 $5b7.2242@laker ead01...
The location for "System.out " depends on your servlet engine.
"Mel Roman" <me*@melroman.n et> wrote in message
news:gF******** ***********@new s01.bloor.is.ne t.cable.rogers. com...
In article <EG************ ********@magma. ca>, Ron Brennan wrote:
It's being executed from a servlet, within a doPost method.


Hmmm... Sorry, I don't have enough experience with servlets to help any
further. Can anyone else here help out?

--

Mel Roman
me*@melroman.ne t

The servlet engine is Tomcat version 4.1.24, dfdfd.

The stdout file doesn't seem to exist yet anywhere, presumably because it
has to be manually created.
Jul 17 '05 #5
Originally I thought there'd be someone with a quick answer - I didn't mean
to take up anyone else's time doing research.

Tomcat is being started from Apache, so the command line idea won't work.
I'll just have to dig more through the Tomcat docs. I'll post here when I
find it. Thanks.
"dfdfd" <df**@aol.com > wrote in message
news:VAFUa.5252 $5b7.951@lakere ad01...

"Ron Brennan" <rb******@magma .ca> wrote in message
news:7M******** ************@ma gma.ca...

"dfdfd" <df**@aol.com > wrote in message
news:%SAUa.5142 $5b7.2242@laker ead01...
The location for "System.out " depends on your servlet engine.
"Mel Roman" <me*@melroman.n et> wrote in message
news:gF******** ***********@new s01.bloor.is.ne t.cable.rogers. com...
> In article <EG************ ********@magma. ca>, Ron Brennan wrote:
>
> > It's being executed from a servlet, within a doPost method.
>
> Hmmm... Sorry, I don't have enough experience with servlets to help any > further. Can anyone else here help out?
>
> --
>
> Mel Roman
> me*@melroman.ne t

The servlet engine is Tomcat version 4.1.24, dfdfd.

The stdout file doesn't seem to exist yet anywhere, presumably because it has to be manually created.


It looks like you need to start Tomcat with a command like this:

$JAVACMD $TOMCAT_OPTS -Dtomcat.home=${ TOMCAT_HOME} $MAIN start $@
${TOMCAT_HOM E}/logs/stdout.log 2>&1 &


I just saw that from a brief web search. there should be some docs
available for your distribution that explains where stdout goes
by default.

Jul 17 '05 #6
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ron Brennan wrote:
Originally I thought there'd be someone with a quick answer - I
didn't mean to take up anyone else's time doing research.

Tomcat is being started from Apache, so the command line idea won't
work. I'll just have to dig more through the Tomcat docs. I'll post
here when I find it. Thanks.


Hi,
I played with Tomcat a bit under Windows one time and, in all cases, I
started Tomcat with a console window. System.out.prin tln() sent the
string to this console. If there's no console, and the string isn't
getting sent to a file, I suspect it's probably being blackholed. If
you really need System.out, you can try redirecting it to a file from
within your servlet itself, using System.setOut() , although I'm not
sure if the servlet security manager allows that or not. Otherwise,
try creating your own stream to a file and call it something like
"out". Then just use it instead of System.out.

- --
Chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/I83wwxczzJRavJY RAp1bAKC4+N6GvR BQX/vloBd1UnKlL1iT6 QCgoaZZ
kz4K5PhbFGKFfG0 K+PGGTrg=
=mzkM
-----END PGP SIGNATURE-----
Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1479
by: Andrew Burgher | last post by:
Feeding the following .xsd into the XsdObjectGen (v1.4.2.0) tool produces an invalid attribute: with DataType="System.String". Has anybody seen this behaviour before? Is this a bug in XsdObjectGen? or a problem with the input schema? I'm trying to avoid hacking the generated code... In: <?xml version = "1.0" encoding = "UTF-8"?> <xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
10
11114
by: cppdev | last post by:
Hi All! I want to clear the string contents from sensitive information such as passwords, and etc. It's always a case that password will appear as string at some point or another. And i feel uneasy leaving it hanging in memory indefinitely (especially in case when string is Interned). So at leats for the case when string is not interned i propose:
3
1836
by: Andy Sutorius via DotNetMonster.com | last post by:
Hi, I have a Sorted List that has 9 key/value pairs. I am trying to take one of the key/value pairs and store the value of that key into a string variable. However, the value that actually gets inserted into the variable is "System. String" and I don't understand what happened to my original value in the key/value pair. Thanks for your help,
21
30519
by: Neel | last post by:
I am trying to "ping" a remote host in my C++/Redhat Linux code to check whether that host is connected or not. if (0 == system("ping -w 2 192.168.0.2)) But, in both cases (connected/disconnected), system call returns 0. Can someone please show what I am doing wrong? How to check the actual result of the ping status using C++ on Redhat linux ? Thanks in advance.
10
7551
by: R2d2Rabeau | last post by:
Hi, I'm new to C#, please be patient :-) I am trying to pass an Arraylist (myAL) to a jagged array (myAL2) . The problem I have is that when I write the values to a file i do not get the values instead I get "System.String" ? How can I fix the problem? I wanted to use ArralyList because its length is flexible and I can add values to it. ...All help will be greatly appreciated. Here's my code:
6
4591
by: =?Utf-8?B?SmVmZg==?= | last post by:
I thought this would already be covered here, but my search turned up nothing. In VS2005, if I use "String" to define a new variable/class, it colors it in the Aqua color as it does other classes. But if I use "string", it colors it in Navy blue as in C# reserved words (e.g. private, void, foreach, etc). What is the diff?
4
11282
by: archu007 | last post by:
hi i'm using the following statement in my application string strTArray = new string; strTArray = (string)(Session); when i run the application its giving the below error {"Unable to cast object of type 'System.String' to type 'System.String'."}
5
5019
by: mvmashraf | last post by:
Hi to all.... I have spent some time browsing for a solution to the following error but have unfortunatly not found any solution yet ,Please any help would be much appreciated.... ------------------------------------------------------------------------------------------------- This is the full error description... "Error Message :Invalid character in a Base-64 string." Error Source :mscorlib Error Stack Trace : ...
21
2965
by: Sami | last post by:
string = "" or string = string.Empty? should is the proper way? Sami
0
8704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9192
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8940
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8895
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7781
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5879
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3071
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2362
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.