Pls. give me the solution, I have done in the following level.

In jsp page:

step 1:

<%
String preNRcompanyselect=""; 
%>

step:2:

if(window.parent.document.getElementById("companyselect")) {    
    var companyselect = window.parent.document.getElementById('companyselect').options[window.parent.document.getElementById('companyselect').selectedIndex].text;
    <% preNRcompanyselect=(String)("<script>document.writeln(companyselect)</script>").toString();%>
}

step3:

<%
// This works fine
out.println("jobOpenings="+preNRjobOpenings);

// This is java vairable

RequirementEmailBean reBean = new RequirementEmailBean();

        if (preNRcompanyselect != null)
            reBean.setAccountName(preNRcompanyselect);
System.out.println("=========== output ========="+reBean.getAccountName());     

%>

output come like this:

=========== output =========<script>document.writeln(companyselect)</script>

HOw to solve this. pls. give a solution.