I don't use this feature, but a couple of things come to mind:


- does the user account that Tomcat uses have read permissions to those directories?

- NOTHING under WEB-INF is ever directly accessible, both WEB-INF and META- INF are protected resources as far as tomcat is concerned. I'm not sure what you're expecting with the URLs you posted.

The test to see if it is working is to put index.html in ~johndoe/public_html and then try to access it by http://localhost:8080/~johndoe or http://localhost:8080/~johndoe/index.html (or even index.jsp).

After that, anything else you have to do would have to follow the standard app deployment rules, such as having servlets defined in web.xml or using the invoker, defining welcome pages in web.xml, etc.

HTH

John
On Fri, 27 Jun 2003 00:24:40 -0230 (NDT), Neil Zanella <[EMAIL PROTECTED]> wrote:



Thank you for your suggestion. I am using Tomcat 4.0.1 and I realize that the same applies to Tomcat 4.0:

http://jakarta.apache.org/tomcat/tomcat-4.0- doc/config/defaultcontext.html

I have read the "User Web Applications" section and done as described:

I added the XML entity and attributes given by:

<Listener className="org.apache.catalina.startup.UserConfig"
directoryName="public_html"
userClass="org.apache.catalina.startup.PasswdUserDatabase"/>

inside the Host entity in the server.xml file. I added these at the very
end of the entity. I also created user readable files:

~johndoe/public_html/contextroot/WEB-INF/web.xml
~johndoe/public_html/contextroot/WEB-INF/classes
~johndoe/public_html/contextroot/WEB-INF/classes/JohnDoe.class

and also tried

~johndoe/public_html/webapps/contextroot/WEB-INF/web.xml
~johndoe/public_html/webapps/contextroot/WEB-INF/classes
~johndoe/public_html/webapps/contextroot/WEB-INF/classes/JohnDoe.class

as well as:

~johndoe/public_html/WEB-INF/web.xml
~johndoe/public_html/WEB-INF/classes
~johndoe/public_html/WEB-INF/classes/JohnDoe.class

but I get a 404 HTTP response (file not found) each
time I point my browser to:

http://localhost:8080/~johndoe/contextroot/webappjohndoe
http://localhost:8080/~johndoe/webappjohndoe

Furthermore, each time I have a directory called ~johndoe/public_html/WEB-INF and restart the server,
I get a 404 when I access:


http://localhost:8080/~johndoe

whereas in the other cases I get a directory listing.

The documentation states:

Each user web application will be deployed with characteristics established by any DefaultContext element you have configured
for this Host.


Does this have anything to do with it? I am puzzled by why
my servlet is not displaying.

Once again, thank you for your help!!!

Neil

On Thu, 26 Jun 2003, John Turner wrote:


http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html


The section marked "User Web Applications" should be what you want.

John

On Thu, 26 Jun 2003 09:17:33 -0230 (NDT), Neil Zanella <[EMAIL PROTECTED]> wrote:

>
> Hello,
>
> I have successfully setup Tomcat but now I want the following:
>
> Suppose some Linux based system has a dynamic and constantly changing
> number of users ranging in the thousands. I would like to set up
> tomcat so that:
>
> Each user gets a context root in a directory such as:
> http://localhost:8080/~johndoe/contextroot/
>
> This happens in such a way that when a request to a subdirectory
> that looks like the one above is issued, Tomcat automatically
> knows how to handle it. Is this possible?
>
> This would be ideal. I don't see why it shouldn't be possible.
>
> If this is impossible, then consider it to be a missing feature
> from tomcat. I almost feel it should be documented somewhere if
> available, otherwise, if not available, it should be implemented.
>
> I guess I could define a path mapping of the form:
>
> http://localhost:8080/~+/contextroot/
>
> I actually tried this but it did not work: I used the path mapping
> inside the webapps/ROOT/WEB-INF/web.xml file:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <!DOCTYPE web-app
> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd";>
>
> <web-app>
>
> <display-name>welcome</display-name>
> <description>These examples are from the created contextroot subdirectory > of webapps.</description>
> <servlet>
> <servlet-name>welcome</servlet-name>
> <description>This web application welcomes you.</description>
> <servlet-class>WelcomeServlet</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>welcome</servlet-name>
> <url-pattern>http://localhost:8080/~*/contextroot/*</url-pattern>
> </servlet-mapping>
>
> </web-app>
>
> I thought I could have the URL execute a servlet, that would execute
> then execute a servlet from the users' directory. Sound complicated?
> Perhaps there is an easier way???
>
>
> Suggestions very welcome!!!
>
> Neil
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to