Hi Judah, thanks for giving it a spin. :)
I would bet that yes the problems you're having are related to the UNC
path. In the /_tap/ directory there's a path.cfc which is created once
for each request and responsible for setting some path information about
the environment.
Within that component, #this.root# is the application root directory
(the /ontap/ directory in the archive), and #this.domain_relative# is
supposed to be the portion of the file path between the web root and the
application root. So in the case of an application at http://vm/ontap
the value of #this.domain_relative# should be "/ontap".
I'd be willing to bet one or more of those values either aren't what
they're supposed to be. Although it may still not work properly even if
they are correct because other parts of the system may not know how to
handle the UNC path. I honestly don't know, because I've never used it
in that environment. I don know there are a number of parts of the
system that use java.io.File.getCanonicalPath() in order to normalize
file paths. That may return the UNC path, but it may also return a file
path on that machine starting with the drive, again I don't know.
Anyway, I hope that information helps. Let me know if you have any other
questions. And of course, if you're able to make it work with the UNC
path, absolutely let me know so I can include your mods in the public
distribution. :)
--
[ ike ] founder - onTap framework
phone: 781.769.0723
Thanks,
Judah
<cffunction name="init" access="public" output="false">
<cfargument name="file" type="string" required="true" />
<cfset var fso = CreateObject("java","java.io.File") />
<cfset variables.file = fso.init(arguments.file).getCanonicalPath() />
</cffunction>
<cfscript>
init(expandpath("/ontap/_tap/localman.cfc"));
</cfscript>
<cfoutput>
#variables.file#
</cfoutput>
That outputs: \\.host\Shared
Folders\web_projects\wwwroot\_default_\ontap\_tap\localman.cfc
Ya know... I just never noticed that function... :)
Started doing this little dance with figuring out those paths on CF5 and
have stuck with it... I'd have to test getContextRoot() to see how well
it works.
Since I've never used it, I couldn't say whether there would be any
issues with for example my Apache install where I've got several "sites"
on my notebook at different depths. So for example the virtual host
"localhost" is at c:\apache\htdocs\ but then "ontap" is at
\htdocs\tap\ontap\ "df" is at \htdocs\tap\datafaucet\ and "demo" is at
\htdocs\demo\. But they all use the same CF instance, just different
virtual hosts in Apache.
If it works across at least as many configurations as the code I have,
then I'm all for swapping it out. :)
Thanks Judah, really appreciate your help. :)