jquery - how to pass javascript value to same jsp page -


i want page url java script , check url value blow script(inside same jsp page).

<script> var currenturl=window.location.href; </script>  <c:when test="${fn:containsignorecase(currenturl, 'homepage') or fn:containsignorecase(currenturl, 'accountpage')}">  // need operation purticular page only. </c:when> 

please give me suggestion. in advance, muthu

why want access url javascript if have access via request? using originatingrequest bean can following:

<dsp:getvalueof bean="/originatingrequest.requesturi" var="requesturi" /> 

this allow check follow:

<c:when test="${fn:containsignorecase(requesturi, 'homepage') or fn:containsignorecase(requesturi, 'accountpage')}">     // need operation particular page only. </c:when> 

this simplest way satisfy particular use-case above.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -