How should I configure my Tomcat so normal users can develop their own Servlet Applications under their home directories?

Alessandro A. Garbagnati

I don't know if this will work, but in theory it should.

In the tomcat server.xml file create one context for each user you want to enable. The context will have as path "/~<user>/myapp" and as docBase "/home/user/public_html/myapp".

The biggest problem is that you have to manually add each user context manually. You can probably work around a better solution if you can find a way to give to the different user a different usr than the one provided by default by Apache. I guess that if you check out the documentation od mod_userdir you can probably find better url.

For example, if you can make it so the url of the user is<user>, then you can create an instance of Tomcat that has its own home directory (you specify in the <ContextManager.../> tag) and inside the webapps you have one directory per user. Being in the webapps dir, their context will be automatically added to the servlet container at startup. These directories will be linked to a directory inside the user's home directory. So they will be able to use that directory as their context repository.

It looks 'weird' but theoretically it should work fine. Eventually you can contact me directly and we can work this out.

[Note: Tomcat 4.0 is threatening to add this feature, but it hasn't yet (as of June 2001). -Alex]

About | Sitemap | Contact