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

    How to get calling jsp name?

    944726
      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?
          HrishikeshJ
          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")%>"/>

          thanks,
          Hrishikesh