tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Blaxton <>
Subject Re: MVC or Model2 with Tomcat
Date Sun, 04 Dec 2011 20:50:52 GMT

 From: Pid * <>
To: Tomcat Users List <> 
Sent: Sunday, December 4, 2011 11:10:08 PM
Subject: Re: MVC or Model2 with Tomcat
On 4 Dec 2011, at 16:17, Blaxton <> wrote:

> ________________________________
> From: André Warnier <>
> To: Tomcat Users List <>
> Sent: Sunday, December 4, 2011 6:51:58 PM
> Subject: Re: MVC or Model2 with Tomcat
> Blaxton wrote:
>> I have created ROOT directory and placed index.jsp in ROOT directory
>> the same as your example:
>> /path/to/appbase/ROOT/index.jsp    ->
>> but that didn't work.
>> I followed following instructions but those didn't work either.
>> is there any thing else I should do to work this out?
> I wrote that second faq, but I don't see what it has to do with your problem.
> You haven't answered Pid's question :
>> Why do you need to do that to implement MVC?
> Nor his second question :
>> Without more information about your config, e.g. it's
>> impossible to tell why this didn't work.
> And please, do not top-post.  It is very hard to follow a discussion when you have to
jump up and down in the mesage to understand what each phrase relates to.
> Also, thank you for providing the versions of Apache httpd and Tomcat up-front.
> But "mod_jk version 2", that does not exist.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
> My bad, the subject should have been "serving .jsp files from apache document root"
> I just want to access my website as follow:
> the same as the solustion you wrote, but that solustion didn't work for me.
> maybe because in that solution you were talking about
> CATALINA_BASE/webapps/ROOT directory
> and I created CATALINA_BASE/webapps/myapplication/ROOT directory.
> can we have ROOT directory for each application ?
> like:
> CATALINA_BASE/webapps/firstapp/ROOT
> CATALINA_BASE/webapps/secondapp/ROOT

No, you can't. None of the docs day you can.

ROOT is the special name for the default application, which serves
resources from / and handles all requests which are not handled by
other applications.

Putting ROOT inside other apps just results in publishing that whole
dir as /appname/ROOT.

If you don't provide other details of your config, no-one here will be
able to help, without a really, really lucky guess.


> anyway, here is the out put of the package query on my FreeBSD box:
> ap22-mo_jk-ap2-1.2.30_1 Apache2 JK module for connecting to Tomcat using AJP1X

To unsubscribe, e-mail:
For additional commands, e-mail:

Its a virtual host with following lines have been added to main httpd.conf:
LoadModule jk_module          libexec/apache22/
JkWorkersFile /usr/local/etc/apache22/
JkShmFile     /var/log/mod_jk.shm
JkLogFile     /var/log/mod_jk.log
JkLogLevel   debug 
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

and following JkMount directives for each virtual host:
JkMount  /appexmp1/*     appexmp1
JkMount  /appexmp1/*.jsp appexmp1

and following is the worker file for two of the sites:

Created separate directories in CATALINA_BASE/webapps/
for each application so , it contain following directories:

context file for each application resides in 
CATALINA_BASE/conf/Catalina/localhost for example:

cat  CATALINA_BASE/conf/Catalina/localhost/appexmp1.xml
<Context path="/appexmp1" docBase="appexmp1" debug="0" reloadable="true" crossContext="true">

and web.xml file as follow:
cat CATALINA_BASE/webapps/appexmp1/WEB-INF/web.xml
<web-app xmlns="" version="2.5">




I already can access and every thing works fine
but want to be able to serve .jsp files as follow:
for each of my virtual hosts.

I hope I have provided enough information.

Thanks for help
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message