解决办法:
js端:
window.open("demoExcel.jsp?columnName="+encodeURI(encodeURI(columnName))+"&columnWidth="+columnWidth+"&resultSetType="+resultSetType+"&columnSum="+columnSum+"&mainHeader="+encodeURI(encodeURI(mainHeader))+"&subHeader="+encodeURI(encodeURI(subHeader))+"&sql="+sql+"&bw="
java端:
String subHeader = URLDecoder.decode(request.getParameter("subHeader"),"utf-8");