Hi Pid,

Thanks for the useful explanation with an easy to understand example!

I did as you say, but am getting a 404 error. My TC structure looks like
this:

apache-tomcat-6.0.20
  conf
    Catalina
      cfusion
        pub.xml
      localhost
        <std TC stuff>
   webapps
     cfusion
       cfdocs
       CFIDE
       META-INF
         MANIFEST.MF
       WEB-INF
         web.xml
         <other stuff>
     <std TC stuff>

The pub.xml looks like:
    <?xml version='1.0' encoding='utf-8'?>
    <Context docBase="c:\geo\W"></Context>

The c:\geo\W looks like:
   index.jsp
   index.cfm

I get the 404 error when I browse to:
http://localhost:8080/cfusion/pub/index.jsp

The TC console error is: Error [http-8080-1] - File not found:
/pub/index.jsp The specific sequence of files included or processed is:
C:\Program Files\Apache Software
Foundation\apache-tomcat-6.0.20\webapps\cfusion\pub\index.jsp''

I can launch the CFM administrator using:
http://localhost:8080/cfusion/CFIDE/administrator/index.cfm

Thanks for helping!

--Bob

-----Original Message-----
From: Pid [mailto:p...@pidster.com]
Sent: Friday, July 30, 2010 12:27 AM
To: Tomcat Users List
Subject: Re: Does Tomcat have something similar to JRun's
virtual-mapping?


On 30/07/2010 07:52, Bob Carpenter wrote:
> I have inherited a ColdFusion app that runs under JRun and uses several
> virtual-mappings for content in OS folders. The mappings look like this
> (there are 10 mappings):
>
> <virtual-mapping>
>    <resource-path>/thecontent</resource-path>
>    <system-path>c:\some\os\file\path</system-path>
> </virtual-mapping>
>
> I'd like to convert the app from JRun to Tomcat. I have the cfusion app
> running under TC6 - the admin tools all come up, etc, but I can't figure
out
> how to get the web site content to display.

There isn't a direct equivalent in Tomcat 6.0.

You can create individual Context definitions which map to the system
resource, which may be suitable for static resources, by setting the
'docBase' attribute to the 'system-path' valuea and putting an .xml file
named to the 'resource-path' value in:

 apache-tomcat-6.x/conf/Catalina/<hostname>/<resource-path>.xml

where '<resource-path>' is the target path you wish to deploy the
resource at.  You replace a '/' in multi-level paths with a '#' symbol.

E.g. in a file called:

 conf/Catalina/localhost/the#content.xml

The definition would be:

 <Context docBase="c:\some\os\file\path">

Which would result in the contents of '...\file\path' being made
available at:

 localhost:8080/the/content

Tomcat 7.0 has an 'aliases' property on the Context element, if you are
prepared to live slightly closer to the edge.

 http://tomcat.apache.org/tomcat-7.0-doc/config/context.html


p

> Any ideas?
>
> Thanks,
>
> --Bob
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to