Actually I want to check whether page is linked in sitemap or not and on that basis I want to render different header on same page.
Sure. 1. Have a Java External in your component.2. In that External, get the page name.3. In that same External, get the SiteMap XML.4. Try to look for an XML node with that contains your page name in that SiteMap XML.5. Do your logic based on whether you find that page name in the SiteMap or not.HTH!