java - How to get url path from jsp in Spring MVC framework -



java - How to get url path from jsp in Spring MVC framework -

to remove language toggle page view(comfirmation page)

i found code doesn't work in spring mvc

<c:if test="${!fn:contains(pagecontext.request.servletpath,'/comfirmation')}"> //other code </c:if> my actual url (shoppingcart.jsp). it used when /viewcart.htm,/updatecart.htm,/confirmation.htm,etc. so, user go /confirmation.htm, redirect shoppingcart.jsp url path in browser /confirmation.htm. i want remove language toggle when phone call /confirmation.htm in above mention.

finally, got it. here go

<% string url=request.getattribute("javax.servlet.forward.servlet_path").tostring(); if(url.equals("/confirmation.htm")){ %> //language toggle code <% } %>

i decided utilize this. way storing url path in session since front end controller.

java jsp spring-mvc jsp-tags

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -