Re: Why doesn't my context work?

2005-09-29 Thread Mark Eggers
--- Michael Sullivan [EMAIL PROTECTED] wrote:

[ lots of stuff snipped ]

OK, I finally got around to putting this together on
my Limux (Fedora Core 4) box.

My environment:
2.6.12-1.1456_FC4 running on a Dell 8200 with 768 MB
java 1.5.0_04-b05
apache 2.0.54
mod_jk 1.2.14.1
tomcat 5.5.9

My configurations:

#
# httpd.conf stuff
#
LoadModulejk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevelwarn
JkLogStampFormat  [%a %b %d %H:%M:%S %Y] 
JkShmFile logs/shm-file

LoadModule userdir_module modules/mod_userdir.so
IfModule mod_userdir.c
UserDir enable username
/IfModule

Directory /home/*/webspace
  AllowOverride FileInfo AuthConfig Limit
  Options MultiViews Indexes SymLinksIfOwnerMatch
IncludesNoExec
Limit GET POST OPTIONS
Order allow,deny
Allow from all
/Limit
LimitExcept GET POST OPTIONS
Order deny,allow
Deny from all
/LimitExcept
/Directory

#
# Adding JkMounts for UserDir
#
JkMount /~*/*.jsp local
JkMount /~*/*/*.jsp   local
JkMount /~*/servlet/* local
JkMount /~*/*.do  local

#
# workers.properties stuff - mostly default for now
#
worker.list=local

#
# one to serve the applications
#
worker.local.type=ajp13
worker.local.host=localhost
worker.local.port=8009

#
# server.xml stuff in Tomcat under Host/Host
#
!-- adding listener to test local host directories
--
Listener 
  className=org.apache.catalina.startup.UserConfig
  directoryName=webspace
  userClass=
 org.apache.catalina.startup.PasswdUserDatabase/

NOTES
=
httpd.conf
--
1. Add the appropriate user names in the line:

UserDir enable username

This is a space-separated list of user names. 
Otherwise you can just have:

UserDir enabled

to get them all.

2. Excuse the wrapping in the Options line under the
Directory directive.

workers.properties
--
This is just a bare bones one.  There are lots of
options to explore.

server.xml
--
This is the listener that will add the same directory
to Tomcat that was added to Apache with the userdir
module.

RESULTS
===
You will get a single web application under
/~username.  If you look at Tomcat's manager
application, you will see a /~username application.

I ran the first application from the Head First
Servlets  JSP book (my standard is it working
application) and this setup worked.

One thing to note.  I did not get Tomcat to explode a
war file in /~username.  I had to explode the war
manually in ~username/webspace.

I didn't see a way of adding multiple user
applications by using this listener.  I just did a
quick scan of the UserConfig javadoc.  My guess is
that if you want multiple web applications per user
you will have to set up a virtual host for each user.

Just some thoughts.

HTH

/mde/




__ 
Yahoo! for Good 
Donate to the Hurricane Katrina relief effort. 
http://store.yahoo.com/redcross-donate3/ 


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



Re: Why doesn't my context work?

2005-09-26 Thread Mark Eggers
--- Michael Sullivan [EMAIL PROTECTED] wrote:
 
 Right now I use symlinks
 to my individual
 users' website directories, but now that I've
 discovered Alias I'll
 probably switch completely to using Aliases.

Good.  
 I
 created a test Alias
 point to the ~/webspace/webapps directory in my
 personal account, but I
 can't seem to JkMount it, and I can't figure out
 why.  Here is the
 mod_jk portion of my httpd.conf file:
 
 #mod_jk stuff
 
 LoadModule jk_module
 modules/mod_jk.so
 
 JkMount /*.jsp wrkr

I think your JSP JkMount line will only get
hostname/*.jsp.  It won't match hostname/*/*.jsp. 
I think you'll need another line in there that says:

JkMount /*/*.jsp wrkr

 JkMount /servlet/* wrkr

You will probably have the same issue with the servlet
matching.  Try this instead:

JkMount /*/servlet/* wrkr

Good idea here.

 # Deny direct access to WEB-INF
 LocationMatch .*WEB-INF.*
AllowOverride None
deny from all
 /LocationMatch

Good start.

 Alias /michael /home/michael/webspace/webapps

I would probably change some of the Directory
directives.  Since this lives outside your normal
DocumentRoot, this Directory is not going to inherit
the permissions you gave to DocumentRoot.

Something like the following might work better:

Directory /home/michael/webspace/webapps
  Options Indexes
  Allow Override None
  Order allow,deny
  Allow from all
/Directory

 Directory /home/michael/webspace/webapps
 Options FollowSymLinks
 AllowOverride None
 /Directory

I tend to put the Directory and Aliases before the
JkMount statement, if I do that, then I can do the
following:

Alias /michael /home/michael/webspace/webapps
Directory /home/michael/webspace/webapps
  Options Indexes
  Allow Override None
  Order allow,deny
  Allow from all
/Directory

JkMount /michael/*.jsp wrkr
JkMount /michael/*/*.jsp wrkr
JkMount /michael/*/servlet/* wrkr

Finally, make sure the user Tomcat is running as has
read access to everything in
/home/michael/webspace/webapps.

If there are a lot of applications, you can group all
the Directory directives, followed by all the Alias
directives, followed by all the JkMount statements.

Another way to organize your httpd.conf file is by
application.  In other words, for each application:

Directory
  # directory directives
/Directory
Alias /desired_mapping /directory_napping
JkMount /desired_mapping/*.jsp tomcat-worker
JkMount /desired_mapping/servlet/* tomcat-worker

I'm away from my system right now, but I think either
of these methods should work fine.

The ugly thing about doing it this way is that every
time you add a new user, you'll have to update Apache,
which means you'll have to stop and start the server.

If you could get the user directory idea to work, then
everything would just happen.

HTH

/mde/

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Why doesn't my context work?

2005-09-26 Thread Michael Sullivan
On Sun, 2005-09-25 at 23:21 -0700, Mark Eggers wrote:
 --- Michael Sullivan [EMAIL PROTECTED] wrote:
  
  Right now I use symlinks
  to my individual
  users' website directories, but now that I've
  discovered Alias I'll
  probably switch completely to using Aliases.
 
 Good.  
  I
  created a test Alias
  point to the ~/webspace/webapps directory in my
  personal account, but I
  can't seem to JkMount it, and I can't figure out
  why.  Here is the
  mod_jk portion of my httpd.conf file:
  
  #mod_jk stuff
  
  LoadModule jk_module
  modules/mod_jk.so
  
  JkMount /*.jsp wrkr
 
 I think your JSP JkMount line will only get
 hostname/*.jsp.  It won't match hostname/*/*.jsp. 
 I think you'll need another line in there that says:
 
 JkMount /*/*.jsp wrkr
 
  JkMount /servlet/* wrkr
 
 You will probably have the same issue with the servlet
 matching.  Try this instead:
 
 JkMount /*/servlet/* wrkr
 
 Good idea here.
 
  # Deny direct access to WEB-INF
  LocationMatch .*WEB-INF.*
 AllowOverride None
 deny from all
  /LocationMatch
 
 Good start.
 
  Alias /michael /home/michael/webspace/webapps
 
 I would probably change some of the Directory
 directives.  Since this lives outside your normal
 DocumentRoot, this Directory is not going to inherit
 the permissions you gave to DocumentRoot.
 
 Something like the following might work better:
 
 Directory /home/michael/webspace/webapps
   Options Indexes
   Allow Override None
   Order allow,deny
   Allow from all
 /Directory
 
  Directory /home/michael/webspace/webapps
  Options FollowSymLinks
  AllowOverride None
  /Directory
 
 I tend to put the Directory and Aliases before the
 JkMount statement, if I do that, then I can do the
 following:
 
 Alias /michael /home/michael/webspace/webapps
 Directory /home/michael/webspace/webapps
   Options Indexes
   Allow Override None
   Order allow,deny
   Allow from all
 /Directory
 
 JkMount /michael/*.jsp wrkr
 JkMount /michael/*/*.jsp wrkr
 JkMount /michael/*/servlet/* wrkr
 
 Finally, make sure the user Tomcat is running as has
 read access to everything in
 /home/michael/webspace/webapps.
 
 If there are a lot of applications, you can group all
 the Directory directives, followed by all the Alias
 directives, followed by all the JkMount statements.
 
 Another way to organize your httpd.conf file is by
 application.  In other words, for each application:
 
 Directory
   # directory directives
 /Directory
 Alias /desired_mapping /directory_napping
 JkMount /desired_mapping/*.jsp tomcat-worker
 JkMount /desired_mapping/servlet/* tomcat-worker
 
 I'm away from my system right now, but I think either
 of these methods should work fine.
 
 The ugly thing about doing it this way is that every
 time you add a new user, you'll have to update Apache,
 which means you'll have to stop and start the server.
 
 If you could get the user directory idea to work, then
 everything would just happen.
 
 HTH
 
 /mde/


Here is my updated mod_jk section in /etc/apache2/httpd.conf:

#mod_jk stuff

LoadModule jk_module modules/mod_jk.so

JkMount /*.jsp wrkr
JkMount /*/*.jsp wrkr
JkMount /servlet/* wrkr
JkMount /*/servlet/* wrkr
# Deny direct access to WEB-INF
LocationMatch .*WEB-INF.*
   AllowOverride None
   deny from all
/LocationMatch
Alias /michael /home/michael/webspace/webapps
Directory /home/michael/webspace/webapps
Options Indexes
AllowOverride None
Order allow,deny
Allow from all
/Directory

JkMount /michael/*.jsp wrkr
JkMount /michael/*/*.jsp wrkr
JkMount /michael/*/servlet/* wrkr


It still doesn't work.  Everything in the directory tree from /home
to /home/michael/webspace/webapps/colors.jsp is all readable/executable.
I don't know why this isn't working.  www.espersunited.com/index.jsp
still works though, but www.espersunited.com/michael/colors.jsp gives me
Tomcat 404.


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



Re: Why doesn't my context work?

2005-09-25 Thread Michael Sullivan
On Fri, 2005-09-16 at 19:31 -0700, Mark Eggers wrote:
 
 --- Michael Sullivan [EMAIL PROTECTED] wrote:
 
  OK.  For clarification I am running
  tomcat-5.0.27-r6.  I want user's
  tomcat files to be read from
  /home/*/webspace/webapps.  My personal
  account is michael so my personal tomcat directory 
  would
  be /home/michael/webspace/webapps .  Just for the
  sake of arguments I
  created a directory called user under
  /home/michael/webspace/webapps and
  moved my jsp files into it.
  My /opt/tomcat5/conf/Catalina/localhost/user.xml
  file looks like this
  now:
  
  Context
  docBase=/home/michael/webspace/webapps/user
  debug=0 privileged=true
  /Context
 
 You don't need privledged=true, so let's remove
 that.
 
  I restarted Tomcat.  I am using mod_jk and when I go
  to
  www.espersunited.com/index.jsp I see the Tomcat
  start page.  However,
 
 Good, you're using mod_jk.  You will need to do some
 Apache configuration in order for this to work.
 
 I am going to assume that /home/* lies outside of the
 DocumentRoot directory tree.
 
 1. Get Apache to recognize web directories outside of
 the DocumentRoot tree.  There are several ways of
 doing this.  One such way is given in the actuall
 httpd.conf file that comes with the stock Apache.
 
 Basically you need to give a set of Directory
 directives that give Apache access to the material in
 the home directories.
 
 If you use the userdir_module in Apache, then
 ~username/directory will become a part of the web
 space (if you take the comments out).
 
 If you do this by hand, you'll need to give both
 Directory directives and an Alias directive to move it
 into the web space that Apache serves.
 
 2. Once you do that, you'll need to add JkMount
 statements as well.  I suspect that JkMount statements
 will respond to Alias directives since JkMount deals
 with web space and not directories.
 
 I don't know if JkMount interacts with the
 userdir_module.  In other words, I don't know what
 will happen if you put in a JkMount statment that
 reads:
 
 JkMount /~*/*.jsp tomcat
 
 It would be interesting to find out if that would end
 up mapping to /~username/directory/*.jsp where
 username is the user name and directory is the
 value of UserDir.
 
 3. Once you do that, it's always nice to make a small
 WEB-INF/web.xml, even for plain jsp pages.  Something
 like the following should work:
 
 ?xml version=1.0 encoding=UTF-8?
 !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-nameBeginning JSP/display-name
 descriptionContainer for quick
 jsptests/description
 welcome-file-list
   welcome-fileindex.jsp/welcome-file
 /welcome-file-list
 /webapp
 
 Sorry for the wrapping.
 
 In short, you need to do the following three steps.
 
 1. Make sure your Apache server knows about
 directories outside of DocumentRoot.  Use Directory
 and Alias directives or userdir_module.
 
 2. Use JkMount to map the expected incoming URLs to
 the Tomcat server.  Experiment to see if JkMount picks
 up on the substitutions done by userdir_module.
 
 3. Make a small WEB-INF/web.xml with the appropriate
 structure.  Creating a proper web application is
 useful, especially once you start adding servlets to
 the mix.
 
 /mde/
 


I've been wrestling the past week with the hassles of upgrading to
Apache-2.0.54-r31 on my Gentoo system.  I think I've finally got
everything working the way it's supposed to except mod_jk for my user
directories.  I tried to do the userdir thing you suggested, but I
couldn't get it to work.  Right now I use symlinks to my individual
users' website directories, but now that I've discovered Alias I'll
probably switch completely to using Aliases.  I created a test Alias
point to the ~/webspace/webapps directory in my personal account, but I
can't seem to JkMount it, and I can't figure out why.  Here is the
mod_jk portion of my httpd.conf file:

#mod_jk stuff

LoadModule jk_module modules/mod_jk.so

JkMount /*.jsp wrkr
JkMount /servlet/* wrkr
# Deny direct access to WEB-INF
LocationMatch .*WEB-INF.*
   AllowOverride None
   deny from all
/LocationMatch
Alias /michael /home/michael/webspace/webapps
Directory /home/michael/webspace/webapps
Options FollowSymLinks
AllowOverride None
/Directory

I don't know if I need that LocationMatch stuff - It was part of a
VirtualHost block that seemed to be unecessary, so I took it out.  I
tried putting my JkMount statements inside the Directory block, but
when I tried to restart Apache it gave me the following error:

JkMount can not have a path when defined in a location

In /home/michael/webspace/webapps there is a file called colors.jsp.
When I navigate my browser to www.espersunited.com/michael/colors.jsp I
get the Tomcat 404 error, yet when I navigate to
www.espersunited.com/index.jsp I get the Tomcat start page.  What am I
doing wrong?



Why doesn't my context work?

2005-09-16 Thread Michael Sullivan
I wrote in yesterday asking about how to map certain directories to
tomcat contexts.  When nobody answered me I did some Google research.  I
didn't find much that made sense to me.  I prefer man and info pages to
what I found.  Anyway, I created a file called home.xml
in /opt/tomcat5/conf/Catalina/localhost.  I made home.xml by copying
admin.xml and altering it.  Here are the contents of home.xml:

Context path=/user appBase=/home docBase=michael/webspace/webapps
debug=0 privileged=true
/Context


If I understand this correctly, when I ask for
www.espersunited.com/user/index.jsp, Tomcat should deliver to my browser
the contents of /home/michael/webspace/webapps/index.jsp.  I restarted
Tomcat and went to www.espersunited.com/user/index.jsp in my browser.  I
got a Tomcat 404 Resource Not Available error.  Why?  Do I not have the
syntax of my context tag right?  I would think that this would be a
pretty basic thing to do, but maybe not since no one has answered me.
What should I do?  I've looked over the Tomcat docs on the
jakarta.apache.org/tomcat website and as I said there are no man or info
pages...


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



Re: Why doesn't my context work?

2005-09-16 Thread Mark Eggers
 Here are the contents of
 home.xml:
 
 Context path=/user appBase=/home
 docBase=michael/webspace/webapps
 debug=0 privileged=true
 /Context

From the documentation for Tomcat 5.5.9 at
http://localhost:8080/tomcat-docs/config/context.html:

The Document Base (also known as the Context Root) 
directory for this web application, or the pathname
to the web application archive file (if this web
application is being executed directly from the WAR 
file). You may specify an absolute pathname for this 
directory or WAR file, or a pathname that is relative 
to the appBase directory of the owning Host.

If you've not changed server.xml, then the appBase is
$CATALINA_HOME/webapps.

Rather than using a combination of appBase and docBase

in your context file (and I don't think appBase is
appropriate in a context node - at least in 5.5.9),
you could use an absolute path for docBase:

/home/michael/webspace/webapps/user

This means that the following URL would potentially
work.

www.espersunited.com/user/index.jsp

The next issue is one of permissions.  If you're on a
UNIX machine, make sure that 

/home/michael/webspace/webapps/user

is readable by the owner of the process running
Tomcat.  Otherwise you'll not be able to serve the
files.

Finally, I notice that you're going directly at this
URL:

http://www.espersunited.com/user/index.jsp

Unless your Tomcat is configured to run on port 80,
you will be hitting any web server that is running,
and not your Tomcat server.  By default, Tomcat serves
http on port 8080.

In order to get Tomcat and Apache talking, you'll have
to do a lot more work.  This involves getting mod_jk
(or mod_proxy) built and installed, configuring Apache
httpd.conf, workers.properties, and possibly
server.xml (although the default server.xml already
has the ajp 1.3 connector configured).

I hope that starts you down a more productive path.

/mde/

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Re: Why doesn't my context work?

2005-09-16 Thread Hassan Schroeder

Michael Sullivan wrote:


what I found.  Anyway, I created a file called home.xml
in /opt/tomcat5/conf/Catalina/localhost.  I made home.xml by copying
admin.xml and altering it.  Here are the contents of home.xml:

Context path=/user appBase=/home docBase=michael/webspace/webapps
debug=0 privileged=true
/Context


Per the Tomcat doc that's been quoted here half-a-dozen times in the
last couple of days, or so it seems :-) --

*take the path attribute out* because Tomcat *doesn't use it* unless
the Context is defined inside server.xml.

Either call the file user.xml or change your request to
  http://www.espersunited.com/home/index.jsp

And, as has already been pointed out, 'appBase' is not a valid
attribute of Context.

HTH,
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

  dream.  code.



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



Re: Why doesn't my context work?

2005-09-16 Thread Michael Sullivan
 From the documentation for Tomcat 5.5.9 at
 http://localhost:8080/tomcat-docs/config/context.html:
 
 The Document Base (also known as the Context Root) 
 directory for this web application, or the pathname
 to the web application archive file (if this web
 application is being executed directly from the WAR 
 file). You may specify an absolute pathname for this 
 directory or WAR file, or a pathname that is relative 
 to the appBase directory of the owning Host.
 
 If you've not changed server.xml, then the appBase is
 $CATALINA_HOME/webapps.
 
 Rather than using a combination of appBase and docBase
 
 in your context file (and I don't think appBase is
 appropriate in a context node - at least in 5.5.9),
 you could use an absolute path for docBase:
 
 /home/michael/webspace/webapps/user
 
 This means that the following URL would potentially
 work.
 
 www.espersunited.com/user/index.jsp
 
 The next issue is one of permissions.  If you're on a
 UNIX machine, make sure that 
 
 /home/michael/webspace/webapps/user
 
 is readable by the owner of the process running
 Tomcat.  Otherwise you'll not be able to serve the
 files.
 
 Finally, I notice that you're going directly at this
 URL:
 
 http://www.espersunited.com/user/index.jsp
 
 Unless your Tomcat is configured to run on port 80,
 you will be hitting any web server that is running,
 and not your Tomcat server.  By default, Tomcat serves
 http on port 8080.
 
 In order to get Tomcat and Apache talking, you'll have
 to do a lot more work.  This involves getting mod_jk
 (or mod_proxy) built and installed, configuring Apache
 httpd.conf, workers.properties, and possibly
 server.xml (although the default server.xml already
 has the ajp 1.3 connector configured).
 
 I hope that starts you down a more productive path.
 
 /mde/
 
 __

OK.  For clarification I am running tomcat-5.0.27-r6.  I want user's
tomcat files to be read from /home/*/webspace/webapps.  My personal
account is michael so my personal tomcat directory  would
be /home/michael/webspace/webapps .  Just for the sake of arguments I
created a directory called user under /home/michael/webspace/webapps and
moved my jsp files into it.
My /opt/tomcat5/conf/Catalina/localhost/user.xml file looks like this
now:

Context docBase=/home/michael/webspace/webapps/user
debug=0 privileged=true
/Context


I restarted Tomcat.  I am using mod_jk and when I go to
www.espersunited.com/index.jsp I see the Tomcat start page.  However,
when I go to www.espersunited.com/user/index.jsp I get Tomcat 404
Resource Not Available for /user/index.jsp .  You reprinted the
paragraph from the Tomcat documentation and it made the same amount of
sense to me as it did when I read it in the Tomcat docs:  Basically
none.  I've taken the path and appBase attributes out of the my Context
tag as you see above.  The entire tree from /home/michael/webapps to the
files in /home/michael/webapps/user have been set chmod 755 (owner all,
group and others read/execute), and it still doesn't work.  Any other
ideas?  I haven't changed /opt/tomcat5/conf/server.xml at all...


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



Re: Why doesn't my context work?

2005-09-16 Thread Mark Eggers


--- Michael Sullivan [EMAIL PROTECTED] wrote:

 OK.  For clarification I am running
 tomcat-5.0.27-r6.  I want user's
 tomcat files to be read from
 /home/*/webspace/webapps.  My personal
 account is michael so my personal tomcat directory 
 would
 be /home/michael/webspace/webapps .  Just for the
 sake of arguments I
 created a directory called user under
 /home/michael/webspace/webapps and
 moved my jsp files into it.
 My /opt/tomcat5/conf/Catalina/localhost/user.xml
 file looks like this
 now:
 
 Context
 docBase=/home/michael/webspace/webapps/user
 debug=0 privileged=true
 /Context

You don't need privledged=true, so let's remove
that.

 I restarted Tomcat.  I am using mod_jk and when I go
 to
 www.espersunited.com/index.jsp I see the Tomcat
 start page.  However,

Good, you're using mod_jk.  You will need to do some
Apache configuration in order for this to work.

I am going to assume that /home/* lies outside of the
DocumentRoot directory tree.

1. Get Apache to recognize web directories outside of
the DocumentRoot tree.  There are several ways of
doing this.  One such way is given in the actuall
httpd.conf file that comes with the stock Apache.

Basically you need to give a set of Directory
directives that give Apache access to the material in
the home directories.

If you use the userdir_module in Apache, then
~username/directory will become a part of the web
space (if you take the comments out).

If you do this by hand, you'll need to give both
Directory directives and an Alias directive to move it
into the web space that Apache serves.

2. Once you do that, you'll need to add JkMount
statements as well.  I suspect that JkMount statements
will respond to Alias directives since JkMount deals
with web space and not directories.

I don't know if JkMount interacts with the
userdir_module.  In other words, I don't know what
will happen if you put in a JkMount statment that
reads:

JkMount /~*/*.jsp tomcat

It would be interesting to find out if that would end
up mapping to /~username/directory/*.jsp where
username is the user name and directory is the
value of UserDir.

3. Once you do that, it's always nice to make a small
WEB-INF/web.xml, even for plain jsp pages.  Something
like the following should work:

?xml version=1.0 encoding=UTF-8?
!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-nameBeginning JSP/display-name
descriptionContainer for quick
jsptests/description
welcome-file-list
  welcome-fileindex.jsp/welcome-file
/welcome-file-list
/webapp

Sorry for the wrapping.

In short, you need to do the following three steps.

1. Make sure your Apache server knows about
directories outside of DocumentRoot.  Use Directory
and Alias directives or userdir_module.

2. Use JkMount to map the expected incoming URLs to
the Tomcat server.  Experiment to see if JkMount picks
up on the substitutions done by userdir_module.

3. Make a small WEB-INF/web.xml with the appropriate
structure.  Creating a proper web application is
useful, especially once you start adding servlets to
the mix.

/mde/

 when I go to www.espersunited.com/user/index.jsp I
 get Tomcat 404
 Resource Not Available for /user/index.jsp .  You
 reprinted the
 paragraph from the Tomcat documentation and it made
 the same amount of
 sense to me as it did when I read it in the Tomcat
 docs:  Basically
 none.

Hmm, let me see if I can give my explanation.

If you do not have a leading / in your appBase value,
then the containing Host's docBase value gets stuck
on in front.  In other words:

appBase-value/docBase-value

From the Host container documentation, if the
appBase value does not have a leading /, then it is
taken relative to $CATALINA_BASE.  The resulting path
to the application looks like:

$CATALINA_BASE/appBase-value/docBase-value

If you haven't defined $CATALINA_BASE, it defaults to
the same value as $CATALINA_HOME.  The resulting path
to the application the looks like:

$CATALINA_HOME/appBase-value/docBase-value

--

In combination with the userdir_module from Apache to
get the directories into Apache's web space, you might
also want to take a look at user web applications
section of the Host container document.  The section
is toward the end of:

http://localhost:8080/tomcat-docs/config/host.html

It looks like you could use the userdir_module,
appropriate JkMount directives, and the howto in the
Host container document to construct a pretty
flexible environment where every user could have a web
applications directory.

/mde/



__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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