aspose file tools*
The moose likes Tomcat and the fly likes 5.5.20 context.xml -- how to show multiple apps? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "5.5.20 context.xml -- how to show multiple apps?" Watch "5.5.20 context.xml -- how to show multiple apps?" New topic
Author

5.5.20 context.xml -- how to show multiple apps?

Jeff Pollet
Ranch Hand

Joined: Jul 20, 2005
Posts: 49
Hello all,

I am slowly migrating a simple set of webapps from Tomcat 4.1 to 5.5.20.

In one of our webapps, we have pages which allow users to look at particular directories through the browser. In order to do this, we created separate webapps, each with their own contexts and context files. So, the main webapp has a link to webapp2, which has it's own webapp2.xml context file that gives "/webapp2" as the context path and "somedirectorystructure/directory2" as the docBase. Click on the webapp2 link, and you see a page that shows directory2.

I'm not sure if this is the only way to accomplish this, but that's how we had it in 4.1 and it worked just fine. Now, however, with 5.5.20, with the introduction of the context.xml file, it seems that our various webapp.xml files aren't being used -- at least that's what I'm thinking because now when the user clicks on the webapp2 link, we get a 'requested resource /webapp2/directory2 not available' error.

Is there a way with 5.5.20 to provide multiple contexts? Or perhaps I just need to place them somewhere else? Or perhaps there's a better way to allow a user to see directories through the browser altogether?

Any help would be greatly appreciated.


newbie, please be gentle.
Jeff Pollet
Ranch Hand

Joined: Jul 20, 2005
Posts: 49
I figured out what was going on, in case anybody else runs into this. Starting with 5.5, the <tomcat-home>/conf/web.xml file has listings set to 'false' by default (under <servlet>), which explains why my listings weren't coming up.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 5.5.20 context.xml -- how to show multiple apps?