Java Network programming Question:

Download Job Interview Questions and Answers PDF

What is an HTTP Redirector?

Java Network programming Interview Question
Java Network programming Interview Question

Answer:

Another simple but useful application for a special-purpose HTTP server is redirection. In this section, we develop a server that redirects users from one web site to another--for example, from cnet.com to home.cnet.com. Example reads a URL and a port number from the command-line, opens a server socket on the port, then redirects all requests that it receives to the site indicated by the new URL, using a 302 FOUND code. Chances are this server is fast enough not to require multiple threads. Nonetheless, threads might be mildly advantageous, especially on a high-volume site on a slow network connection. And this server does a lot of string processing, one of Java's most notorious performance bottlenecks.

Download Java Network programming Interview Questions And Answers PDF

Previous QuestionNext Question
What is an HTTP Server?What is JHTTP Web Server?