Component that create a file, how to?
Hey guys, how are you doing?
I'm trying to create a .txt file on my content repository everytime a specific template is used on AEM 6.0. So, I tought about put this code in a component .jsp file and then including this component on this specific template.
My two questions is: can someone give me a sample code of simply creating a .txt file somewhere in the content repository (/content/files, for example) to be used on a component?
And, is this the correct/best way to achieve what I want to achieve?
I have some idea on how to do this using a .java class, creating a new resource and all, and then calling this as a service on a component, but I believe that there has to be an easier way, like directly in the component.
Thanks very much.