Question: How to send the parameter from jsp to servlet?

I have an application in which first the servlet sends a data list to jsp. User selects one option from the list and again jsp sends the selected option to servlet. Then servlet should process the request and send the data related to that selected option again to jsp for rendering.

How can I achieve this using java?

I am following MVC.

Answer: 
```
if(isset($_POST['ok']))
{
echo  "<script type='text/javascript'>";
echo "window.close();";
echo "</script>";
}

```
```
<script>

    function openWin()
    {
    myWindow=window.open("","","width=200,height=100");
    myWindow.document.write("<p>This is 'myWindow'</p>");
    }

    function closeWin()
    {
    myWindow.close();
    }

</script>

```