For the convenience of jumping, the current jsp page has
<% String path = request.getContextPath(); // 获得项目完全路径(假设你的项目叫MyApp,那么获得到的地址就是 http://localhost:8080/MyApp/): String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><head> <base href="<%=basePath%>"></head>
http://www.baidu.com
What about this?
Add http://
or use window.open("url"); this way