How do I open a website in browser through JAVA without having the browser open a new tab
<p><strong>Introduction</strong></p>

<p>I am making a proxy server in java. Whenever the user enters an unknown host (URL) in the browser, the proxy server handles <code>UnknownHostException</code> by executing the code below:</p>

<pre><code>try {
        Process p=Runtime.getRuntime().exec("cmd /c start http://www.mysite.com/unknownhosterror.htm"); 
    }
    catch(IOException io) {
        System.out.println("Error");
    }
</code></pre>

<p>What these lines of code do is to display an html file containing "This page could
 not be displayed." whenever the user entered a non-existing URL.</p>

<p><strong>Problem</strong></p>

<p>The code above opens a new tab and displays the content of www.mysite.com/unknownhosterror.htm. What I want is to redirect to it. </p>

<p>For example, I wrote www.nosuchsite.com in the URL bar. Suppose there is no such site, it will automatically redirect to www.mysite.com/unknownhosterror.htm and display "This page could not be displayed.".</p>

<p>How can I do this?</p>

<p><em>EDIT</em> NOTE: I do not use <code>Servlet</code>. </p>
