Jsp请求路劲模板
Jsp请求路劲模板
- 1.Jsp里面
- <%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" +
request.getServerName() + ":" +
request.getServerPort() + path;
%>
<%=basePath%>/demo/login
<%=basePath%>/ 项目名/servletName
- 2.HTML里面
<form action="/maven3/demo9" method="post">
/ 项目名/servletName
本文来自博客园,作者:ElloeStudy,转载请注明原文链接:https://www.cnblogs.com/ElloeStudy/p/16069786.html