My Application has a docroot folder (i.e /apps/myapp/docroot) and contains some static files. When trying to access those files from the / (slash) url it doesn't find them.
The Resource Resolver is not configured to map the application docroot to / (slash)
Access the Resource Resolver configuration from the /system/console and add a mapping. Eventually your application can make this automatically during bundle activation via component (see OSGi component), or it can be done via stored configuration in the application when installing a CRX Package.
For example you can store it in /apps/myapps/config/org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl.cfg
with org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl.cfg containing:
Later if this is found in a CRX Package that contains your application folder, it would automatically get applied during package installation.
CQ 5.1 WCM