Skip to Content
0
Sep 23, 2016 at 04:17 AM

Is it possible to get webroot in Java source

188 Views

Hi Is it possibe to get webroot setting in file? I created a new webservices extension called 'hybristestservices', which webroot is "hybristestservices". I want to get the webroot from file in Java source directly(contorller or service), instead of hardcode in source or setting in properties. Please guide me how to get it. Thank you!

 <extensioninfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="extensioninfo.xsd">
 
    <extension abstractclassprefix="Generated" classprefix="hybristestservices" managername="hybristestservicesManager" managersuperclass="de.hybris.platform.jalo.extension.Extension" name="hybristestservices" usemaven="false">
       <!-- for more information on maven managed libraries please consult https://wiki.hybris.com/x/Nq8sDQ -->
       <requires-extension name="webservicescommons"/>         
       <requires-extension name="basecommerce"/>
       <requires-extension name="acceleratorservices"/>    
       <requires-extension name="cms2"/>    
       <requires-extension name="chinesewechatproductfacades"/>  
        
       <coremodule generated="true" manager="de.hybris.platform.hybristestservices.jalo.hybristestservicesManager" packageroot="de.hybris.platform.hybristestservices"/>
       <webmodule jspcompile="false" webroot="/hybristestservices"/>            
    </extension>
 </extensioninfo>