You asked:
where view server output stage-1 of assignment in live server HENCE IN localhost=appear in CLI??
You can display the output on your webserver in your shell or Windows-command-box (DOS-Box) with the Java command
System.out.println("my Answer"). (Is it that what you mean with CLI? CLI could be abbreviation for Command Line Interface. (Greetings from Amiga!) Or do you want to store the output in database? because CLI is also an abbreviation for Call Level Interface, a Standard-API for database).
You said CLI and server, but it's very unlikely that you really mean what you said. Because if you make an inquiry by browser, it makes more sense to show the answer inside the browser on the client machine (and not on the server).
To show the answer, you must send back a response on the openend port which is connected to the browser. You need to send back HTML-text. For example:
-
Content-type: text/html
-
-
<html>
-
<head>
-
<title>My Title</title>
-
</head>
-
<body>
-
My answer
-
</body>
-
</html>
-
Of course you can read in this text from a file (named for example "answer.html") instead of hardcoding it in your server program.
Please be sure about the meaning of technical Terms before using them and then please make
short, understandable English sentences. I had a lot of problems to understand what you mean.
Or just list your source code here, then it also becomes more clear what you mean.