K
kaeli
Hi all,
I am writing a helper class that will be included in either a JSP page
or in a command line application.
The problem is that System.out only works for command line. It shoves it
off to some other stream (I have yet to find where, but I think it's the
server standard error) when used with jsp.
So, I want to pass the output stream to the method as follows
public void methodName(outputstream)
What class should I use for outputstream?
For JSP, I will pass it as out.
methodName(out);
For command line, I will pass it as System.out.
methodName(System.out);
Then in the method, I want to use
outputstream.println("whatever");
Note that the class is NOT a servlet, so I have no access to servlet
methods like pageContext.getOutputStream.
TIA
--
--
~kaeli~
If that phone was up your a$$, maybe you could drive a
little better!
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
I am writing a helper class that will be included in either a JSP page
or in a command line application.
The problem is that System.out only works for command line. It shoves it
off to some other stream (I have yet to find where, but I think it's the
server standard error) when used with jsp.
So, I want to pass the output stream to the method as follows
public void methodName(outputstream)
What class should I use for outputstream?
For JSP, I will pass it as out.
methodName(out);
For command line, I will pass it as System.out.
methodName(System.out);
Then in the method, I want to use
outputstream.println("whatever");
Note that the class is NOT a servlet, so I have no access to servlet
methods like pageContext.getOutputStream.
TIA
--
--
~kaeli~
If that phone was up your a$$, maybe you could drive a
little better!
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace