I have created ROOT directory and placed index.jsp in ROOT directory
the same as your example:
/path/to/appbase/ROOT/index.jsp    -> myhost.com/index.jsp

but that didn't work. 


I followed following instructions but those didn't work either.

http://www.jguru.com/faq/view.jsp?EID=91006

http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_be_the_Tomcat_default_application.3F

is there any thing else I should do to work this out?

just want 





________________________________
 From: Pid <p...@pidster.com>
To: Tomcat Users List <users@tomcat.apache.org> 
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/
/path/to/httpd/docroot/index.html  -> myhost.com/index.html
/path/to/httpd/docroot/images

/path/to/appbase/
/path/to/appbase/ROOT
/path/to/appbase/ROOT/index.jsp    -> myhost.com/index.jsp
/path/to/appbase/myapp/index.jsp   -> myhost.com/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. workers.properties 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.


p



-- 

[key:62590808]

Reply via email to