How to get correct current URL in JSP in Spring webapp

后端 未结 10 587
梦谈多话
梦谈多话 2021-02-03 18:53

I\'m trying to get a correct current URL in JSP in Spring webapp. I\'m trying to use the following fragment in the JSP file:

${pageContext.request.requestURL}
         


        
10条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-03 19:26

    I used the following in a similar situation. ${currentUrl} can then be Used where needed. Needs core tag library

    
    

提交回复
热议问题