Skip to main content
Oct 29, 2015 7:17 AM UTC
Solved

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

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.
Peter_Puzanovs
Peter_PuzanovsAccepted solution
Community Advisor
Oct 29, 2015 12:51 PM UTC

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
Community Advisor
Community Advisor
Oct 29, 2015 9:59 AM UTC

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

Translate
Oct 29, 2015 11:20 AM UTC

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.

Translate
edubey
Level 10
Oct 29, 2015 11:39 AM UTC

Hi, 

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

(function() {p = window.location.pathname; if(p.startsWith("/sites.html")) doSomething(); })();
Translate
Peter_Puzanovs
Community Advisor
Peter_PuzanovsCommunity AdvisorAccepted solution
Community Advisor
Oct 29, 2015 12:51 PM UTC

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

Translate