First of all, make sure that you appended addition to the apache
configuration file generated by tomcat (see tomcat-apache documentation).

After that clear, do the following. I have found, that the best way to do
"directory merger" as you do, by using virtual server facility on both 
tomcat and
apache. The "real" directory is under tomcat's webapps. Then do symbolic 
link
to apache's htdocs (or whatever). Point tomcat's virtual server's 
document root
to "real" directory and apache's to symlink.

This will result in adding jsp handler and mounting appropriate servlet
directories while keeping the same directory for both tomcat and apache.
Virtual servers would allow for clean structure since tomcat normally
has distinctively separate contecsts under webapps which otherwise
may confuse apache.

Additional remark. If you use both jsp and servlets, the best idea is
to "use bean" approach in jsp rather than calling servlet through http
protocol. In this case, among other advantages, you get rid of the hassle
to keeping track of servlet directory mounts.

Nikolai




Lance Dyas wrote:

> Yoav wrote:
> 
>> Hiya all,
>> 
>>  
>> 
>> We're trying to migrate from running JSP's and servlets under JWS2.0 
>> to Apache+Tomcat.
>> 
>>  
>> 
>> It seems like the simplest and most basic configuration, yet I could 
>> find nowhere a way to make this work!!
>> 
>>  
>> 
>> The same way JWS works, (and Apache-Jserv+GnuJsp) also:
>> 
>>  
>> 
>> 1) Apache serves all static content.
>> 
>> 2) Tomcat serves servlets/JSP's (through apj12)
>> 
>> 3) They both share the same directory structure. (C:\apache\htdocs) 
>> and *.jsp files can be anywhere in that directory tree - not *ONLY* 
>> in the /examples dir or /jsp dir (!!!!!@!@#???)
>> 
>>  
>> 
>> Did someone actually made this work?
>> 
>> how, exactly ?
>> 
>>  
>> 
>>  
>> 
>> H E L P !!
>> 
> Hmmm I have apache serving static content
> tomcat serving jsps and servlets through apj12
> but not number3 as I have distinct directory structures.
> 
> Lance Dyas
> Dynamic Mapping
> www.dyasdesigns.com/TNTservlet
> 
> 

Reply via email to