No this is not true 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html

Its says ... 

============================================================================
==============
Many web servers can automatically map a request URI starting with a tilde
character ("~") and a username to a directory (commonly named public_html)
in that user's home directory on the server. You can accomplish the same
thing in Catalina by using a special Listener element like this (on a Unix
system that uses the /etc/passwd file to identify valid users):

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

  
   

On a server where /etc/passwd is not in use, you can request Catalina to
consider all directories found in a specified base directory (such as
c:\Homes in this example) to be considered "user home" directories for the
purposes of this directive:

   
 <Host name="localhost" ...>
  ...
  <Listener className="org.apache.catalina.startup.UserConfig"
            directoryName="public_html"
            homeBase=c:\Homes"
            userClass="org.apache.catalina.startup.HomesUserDatabase"/>
  ...
</Host>

  
   

If a user home directory has been set up for a user named craigmcc, then its
contents will be visible from a client browser by making a request to a URL
like:

   
 http://www.mycompany.com:8080/~craigmcc

============================================================================
==============

  
   


-----Original Message-----
From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 12:47
To: Tomcat Users List
Subject: Re: how to access JSPs using servername/~username


Akhthar Parvez. K wrote:

>Hi,
>
>I used to access the html webpages using
servername.(http://servername/~username)
>But I am not able to access JSPs in the above fashion. What could be added
into server.xml
>so that I can access jsps using servername.(http://servername/~username)
>  
>

There is no ellegant solution, like in Apache HTTPD ("UserDir" directive).

Firstly, Tomcat doesn't really care about users on the system or their 
home directories. Secondly, it deals with Web Applications, known as 
"Contexts", rather than directories. Sure, you can keep your JSPs in a 
directory, but they can also be in a WAR file.

So, with Tomcat there is no UserDir concept.

What I usually do, is "one VHost - one user account" and then create 
"webapps" dir for TC web applications.

Nix.

---------------------------------------------------------------------
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]

Reply via email to