Skip to main content
Active reading. [<http://en.wikipedia.org/wiki/Uniform_resource_locator>]
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

In jstl we can access the current urlURL path using pageContext.request.contextPath,. If you want to do a ajaxan Ajax call, use the following urlURL.

  url = "${pageContext.request.contextPath}" + "/controller/path"

ExExample: inFor the page http://stackoverflow.com/posts/36577223 this will give http://stackoverflow.com/controller/path.

In jstl we can access current url path using pageContext.request.contextPath, If you want to do a ajax call, use following url.

  url = "${pageContext.request.contextPath}" + "/controller/path"

Ex: in the page http://stackoverflow.com/posts/36577223 this will give http://stackoverflow.com/controller/path

In jstl we can access the current URL path using pageContext.request.contextPath. If you want to do an Ajax call, use the following URL.

url = "${pageContext.request.contextPath}" + "/controller/path"

Example: For the page http://stackoverflow.com/posts/36577223 this will give http://stackoverflow.com/controller/path.

Source Link
Maleen Abewardana
  • 14.8k
  • 4
  • 38
  • 39

In jstl we can access current url path using pageContext.request.contextPath, If you want to do a ajax call, use following url.

  url = "${pageContext.request.contextPath}" + "/controller/path"

Ex: in the page http://stackoverflow.com/posts/36577223 this will give http://stackoverflow.com/controller/path