jsp设置网页根目录
<% String path = request.getContextPath(); String basePath = request.getScheme()+"://" +request.getServerName()+":" +request.getServerPort()+path+"/" ; //System.out.println("path="+path); //System.out.println("basePath="+basePath); %> <base href="<%=basePath%>" >
这样设置之后,路径就可以从根目录开始了:
<form id="submit_form" method="post" action="/search/upload_iframe" </form>
声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。