1 Reply Latest reply on Sep 8, 2012 6:24 AM by HrishikeshJ

    How to get calling jsp name?

      We are implementing iStore 12.1.3

      We have a jsp which can be called from multiple jsps. When the jsp is processed, navigation should go back to the calling jsp.
      Is there any in-built API which provides calling jsp name?

      Please advise urgently.
      Thanks in advance
        • 1. Re: How to get calling jsp name?
          Is it a custom jsp or seeded jsp?
          you can go back to previous page programmatically, only if previous page reference is passed thru request object
          if it is seeded jsp, you will need to check if calling jsp is passing the name of page to destination page through request object.

          if it is custom jsp, introduce code like below on all the source/calling JSPs.

          <input type=hidden name="fromRef" value="<%=IBEUtil.htmlEncode("<name of page>")%>">

          and on processing page, write code to forward to fromRef.

          e.g. <jsp:forward page="<%=request.getParameter("fromRef")%>"/>