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 12:33:31 GMT
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?

just want 

 From: Pid <>
To: Tomcat Users List <> 
Sent: Sunday, December 4, 2011 2:11:22 PM
Subject: Re: MVC or Model2 with Tomcat
On 04/12/2011 09:32, Blaxton wrote:
> Apache 2.2.16  is connected to  Tomcat 6.0.29 through mod_jk version 2
> and every thing is working fine, but to implement Model2 or MVC, I need
> to serve JSP files from apache document root and don't know what is 
> the best soluction.

Why do you need to do that to implement MVC?

Mixing Apache HTTPD DocumentRoot and Tomcat appBase's is risky and often
users make mistakes which expose secure data.

Tomcat applications are not comparable with a DocumentRoot.  Each
application is indepedent and may be mapped to path which does not
exactly match the directory name.

Better practice is to separate the two:

/path/to/httpd/docroot/index.html  ->

/path/to/appbase/ROOT/index.jsp    ->
/path/to/appbase/myapp/index.jsp   ->

> Tried adding following to apache config file but that didn't help serving
> jsp files from apache document root.

Strongly recommend not doing that.

> JkMount /*.jsp ajp13

Without more information about your config, e.g. it's
impossible to tell why this didn't work.

> Should i change Apache document root to tomcat's web application root
> to be able to support jsp files in apache document root ?
> Or should i change the Tomcat's docbase to Apache's document root ?

No, definitely not.

> Or it can be done be aliasing in apache config file:
> Alias /examples /vat/tomcat3/webapps/examples

No, definitely not.



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