betweenGo

Testing Which Page Loaded your JSP Page Fragment

by on Feb.01, 2010, under JSTL

Zen Water on Flickr

Zen Water by darkpatator

Sometimes you want to check in your JSP page fragment which page loaded it.  Fortunately this is simple with JSTL.

<c:if test="${fn:indexOf(pageContext.request.requestURI,'foo.jsp') != -1}">
  The request URI ${pageContext.request.requestURI} contains foo.jsp.
</c:if>

Simple but something I always forget how to do. :-)


Share

Related posts:

  1. Get JSTL Vars from PageContext
  2. JSTL for current URI
  3. JSP redirect to another page
  4. Getting the request parameter
  5. ATG Log Error from JSP Page


Leave a Reply

 

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!