English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Here we didnt create any object for PrintStream just make a reference and point towards the response method getWriter.
How it possible.How it happened Any one explain.

2007-03-12 22:48:14 · 4 answers · asked by Albin Xavier 1 in Computers & Internet Programming & Design

4 answers

You have declared as PrintStream res;
which is more than sufficient

2007-03-12 22:52:11 · answer #1 · answered by Anonymous · 0 1

The "web container" (in this case, your Java servlet container) manages all of the resources.

The HTTP request was received by the container when it accepted a socket connection and got both input and output streams from the socket.

The container's implementation of HttpResponse can return the ServletOutputStream via getOutputStream, or, in your case, calling getWriter() gets you a PrintWriter that has been stacked onto the ServletOutputStream.

So, bottom line, is that the container and its implemenation of the JEE or Servlet APIs made the instantiation for you.

2007-03-13 02:59:20 · answer #2 · answered by vincentgl 5 · 0 0

Response.getwriter

2016-11-13 23:37:08 · answer #3 · answered by dorelus 4 · 0 0

outfile is not the same as outFile

2016-03-18 04:43:58 · answer #4 · answered by Gregory 4 · 0 0

fedest.com, questions and answers