could not find the JSP or js which renders: http://localhost:4502/sites.html/content | Community
Skip to main content
New Participant
October 29, 2015
Solved

could not find the JSP or js which renders: http://localhost:4502/sites.html/content

  • October 29, 2015
  • 4 replies
  • 1037 views

I an unable to find the JSP or the JS file which renders the sites.html page. I need to redirect to this page with a click of a button and perform certain actions on sites.html page when coming via that button click. If anyone knows this, kindly reply asap

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Peter_Puzanovs

Hello Monu,

Yes, from the resource you can get to the jcr:content node(/libs/wcm/core/content/sites/jcr:content) you can find out sling:resourceType = granite/ui/components/foundation/page that generates this page:

Inside the

/libs/granite/ui/components/foundation/page

You may find out that

/page.jsp actually generates the page, This is the jsp you are probably willing to overlay.

But, overlaying foundation with custom logic will bring troubles later down the line when the time for the upgrade kicks in.

Thanks,

Peter

4 replies

Peter_Puzanovs
Peter_PuzanovsAccepted solution
New Participant
October 29, 2015

Hello Monu,

Yes, from the resource you can get to the jcr:content node(/libs/wcm/core/content/sites/jcr:content) you can find out sling:resourceType = granite/ui/components/foundation/page that generates this page:

Inside the

/libs/granite/ui/components/foundation/page

You may find out that

/page.jsp actually generates the page, This is the jsp you are probably willing to overlay.

But, overlaying foundation with custom logic will bring troubles later down the line when the time for the upgrade kicks in.

Thanks,

Peter

edubey
New Participant
October 29, 2015

Hi, 

You can easily write your code in /etc/clientlibs/granite/utils.js

(function() {p = window.location.pathname; if(p.startsWith("/sites.html")) doSomething(); })();
New Participant
October 29, 2015

PuzanovsP wrote...

Hey Monu,

JcrNodeResource, type=cq:Page, superType=null, path=/libs/wcm/core/content/sites

You can check it yourself from: http://localhost:4502/system/console/jcrresolver?msg=JcrNodeResource%2C+type%3Dcq%3APage%2C+superType%3Dnull%2C+path%3D%2Flibs%2Fwcm%2Fcore%2Fcontent%2Fsites&test=sites.html

Thanks,

Peter

 

Thanks Peter for this information. But I needed the jsp file which renders this page or pages continuing it. You have provided with the node structure of it.

Peter_Puzanovs
New Participant
October 29, 2015

Hey Monu,

JcrNodeResource, type=cq:Page, superType=null, path=/libs/wcm/core/content/sites

You can check it yourself from: http://localhost:4502/system/console/jcrresolver?msg=JcrNodeResource%2C+type%3Dcq%3APage%2C+superType%3Dnull%2C+path%3D%2Flibs%2Fwcm%2Fcore%2Fcontent%2Fsites&test=sites.html

Thanks,

Peter