I tried using request attributes to share data between two jsps of two components but its not working as the second jsp is getting the new request. I've also gone through this question but its not fitting my scenario. How to share data or strings between two component jsps which are set as sling:resourceType to two different pages? Here is more information about the scenario: There will be a link on the first component which when clicked will take to the second page having another component as a resourceType.
Thank you.