Allow servlet to expand paths so CommandBox web aliases or ModCFML web dirs can be used CF
Description
Adobe does this today via their “magic” connector. Lucee has never supported it, but here is the ticket for it:
The expand path should work like so now
if it doesn’t start with a / (and isn’t absolute), then make it relative to the base path
look for a CF mapping (not including “/” )
check if it’s an absolute path already like C:/foo/bar
then announce an ON_MISSING_MAPPING interception point
if no interceptor provided a value, then resolve via the root / mapping
The servlet runtime will have an listener for ON_MISSING_MAPPING that attempts to use servetContext.getRealPath() to try and resolve the path. This will allow any aliases in the resource manager to kick in.
Right, now if the servlet has an alias called /foo and you expand the path /foo/existingFile.txt, it will see it, but if you expand the path /foo/notExistingFile.txt then it will not “see” the mapping. We can solve that by taking off segments to see if any part of the path are found, but there is a performance hit to that and I’m not sure if it’s necessary or not.
Activity
Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.
Adobe does this today via their “magic” connector. Lucee has never supported it, but here is the ticket for it:
The expand path should work like so now
if it doesn’t start with a
/
(and isn’t absolute), then make it relative to the base pathlook for a CF mapping (not including “/” )
check if it’s an absolute path already like C:/foo/bar
then announce an
ON_MISSING_MAPPING
interception pointif no interceptor provided a value, then resolve via the root
/
mappingThe servlet runtime will have an listener for
ON_MISSING_MAPPING
that attempts to useservetContext.getRealPath()
to try and resolve the path. This will allow any aliases in the resource manager to kick in.Right, now if the servlet has an alias called
/foo
and you expand the path/foo/existingFile.txt
, it will see it, but if you expand the path/foo/notExistingFile.txt
then it will not “see” the mapping. We can solve that by taking off segments to see if any part of the path are found, but there is a performance hit to that and I’m not sure if it’s necessary or not.