how to get the base url from jsp request object?

前端 未结 6 918
予麋鹿
予麋鹿 2020-11-30 07:10

How to get the base url from the jsp request object? http://localhost:8080/SOMETHING/index.jsp, but I want the part till index.jsp, how is it possible in jsp?

6条回答
  •  攒了一身酷
    2020-11-30 08:00

    JSP variant of Bozho's answer:

    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    
    
    

提交回复
热议问题