You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Sam Newman <sa...@www.stamplets.com> on 2001/04/24 10:59:58 UTC

Re: Mission Impossible: Tomcat + Apache ???

Have you read the Apache-Tomcat howto in the docs (comes with tomcat)? If so, can you give us more specific info on your problems?

regards,
sam
  ----- Original Message ----- 
  From: Yoav 
  To: tomcat-user@jakarta.apache.org 
  Sent: Tuesday, April 24, 2001 10:58 AM
  Subject: Mission Impossible: Tomcat + Apache ???


  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 !!

Re: Mission Impossible: Tomcat + Apache ???

Posted by Arnaud Dostes - NTI <ad...@nti-sa.com>.
No one works like that, (well I don't) =)

You can configure the Apache's virtual host to point to a tomcat dir...

let's say you have your webapps in /tomcat/webapps/myApp/

you should have the following directory structure :

/tomcat/webapps/myApp/
                                    WEB-INF/
                                                 /classes
                                    

In apache's virtual host config, set the HTML root to /tomcat/webapps/myApp
All the static HTML in myApp/ will be served by Apache
All the *.jsp and servlets will be served by Tomcat

That should do it.

Putting your *.jsp in c:\apache\htdocs won't work, cause that path is not in the <Directory> directive of mod_jk.conf

Regards, Arnaud "I'm confusing you more" Dostes.
  ----- Original Message ----- 
  From: Yoav 
  To: tomcat-user@jakarta.apache.org 
  Cc: sam.newman@stamplets.com 
  Sent: Tuesday, April 24, 2001 3:29 PM
  Subject: Re: Mission Impossible: Tomcat + Apache ???


  That's what I'm talking about !!
   
  That's the problem I couldn't solve!!
  In all other JSP/servlets engines (JavaWebServer, Apache_Jserv+GnuJsp) - All the HTML & JSP files are mixed in the SAME directory structure.
   
  How can I implement this under Apache-tomcat ?
  All available configurations hold all the JSP files in some webapps\ROOT directory...  
   
  C'mon! there's gotta be a way.
  I find it hard to believe that everyone works like that.
   
  Yoav.
   
    ----- Original Message ----- 
    From: Sam Newman 
    To: tomcat-user@jakarta.apache.org 
    Sent: Tuesday, April 24, 2001 1:36 PM
    Subject: Re: Mission Impossible: Tomcat + Apache ???


    the mod_jk.conf-auto tomcat creates authomatically generates the apache directives so apache can see the contexts setup under tomcat. Whilst they use different document roots, you can easily make them look the same my tweaking the generated directives. The .jsp files & servlets have to sit under the tomcat webapps directory for them to get picked up by the tomcat classloader. The jsp file actually gets compiled at runtime to a servlet before being viewed.
     
    sam
      ----- Original Message ----- 
      From: Yoav 
      To: tomcat-user@jakarta.apache.org 
      Sent: Tuesday, April 24, 2001 12:51 PM
      Subject: Re: Mission Impossible: Tomcat + Apache ???


      Yes, I've read the apache-tomcat howto, and followed it's instructions step by step.
       
      BUT
       
      When I've put (as a test...) snoop.jsp in the c:\apache\htdocs directory - it couldn't find it!
      Only once I've put it in the c:\jakarta-tomcat\webapps\ROOT it was found and compiled.
      So, I figured out that by default they (Apache vs. Tomcat ) have different "DocumentRoot" structure.
      That's my question.
       
      I've also tried to point in the mod_jk.conf and server.xml the "/" dir of the tomcat to use c:\apache\htdocs - but still no luck...


Re: Mission Impossible: Tomcat + Apache ???

Posted by Yoav <yo...@capitalmerchant.com>.
That's what I'm talking about !!

That's the problem I couldn't solve!!
In all other JSP/servlets engines (JavaWebServer, Apache_Jserv+GnuJsp) - All the HTML & JSP files are mixed in the SAME directory structure.

How can I implement this under Apache-tomcat ?
All available configurations hold all the JSP files in some webapps\ROOT directory...  

C'mon! there's gotta be a way.
I find it hard to believe that everyone works like that.

Yoav.

  ----- Original Message ----- 
  From: Sam Newman 
  To: tomcat-user@jakarta.apache.org 
  Sent: Tuesday, April 24, 2001 1:36 PM
  Subject: Re: Mission Impossible: Tomcat + Apache ???


  the mod_jk.conf-auto tomcat creates authomatically generates the apache directives so apache can see the contexts setup under tomcat. Whilst they use different document roots, you can easily make them look the same my tweaking the generated directives. The .jsp files & servlets have to sit under the tomcat webapps directory for them to get picked up by the tomcat classloader. The jsp file actually gets compiled at runtime to a servlet before being viewed.

  sam
    ----- Original Message ----- 
    From: Yoav 
    To: tomcat-user@jakarta.apache.org 
    Sent: Tuesday, April 24, 2001 12:51 PM
    Subject: Re: Mission Impossible: Tomcat + Apache ???


    Yes, I've read the apache-tomcat howto, and followed it's instructions step by step.

    BUT

    When I've put (as a test...) snoop.jsp in the c:\apache\htdocs directory - it couldn't find it!
    Only once I've put it in the c:\jakarta-tomcat\webapps\ROOT it was found and compiled.
    So, I figured out that by default they (Apache vs. Tomcat ) have different "DocumentRoot" structure.
    That's my question.

    I've also tried to point in the mod_jk.conf and server.xml the "/" dir of the tomcat to use c:\apache\htdocs - but still no luck...


Re: Mission Impossible: Tomcat + Apache ???

Posted by Sam Newman <sa...@www.stamplets.com>.
the mod_jk.conf-auto tomcat creates authomatically generates the apache directives so apache can see the contexts setup under tomcat. Whilst they use different document roots, you can easily make them look the same my tweaking the generated directives. The .jsp files & servlets have to sit under the tomcat webapps directory for them to get picked up by the tomcat classloader. The jsp file actually gets compiled at runtime to a servlet before being viewed.

sam
  ----- Original Message ----- 
  From: Yoav 
  To: tomcat-user@jakarta.apache.org 
  Sent: Tuesday, April 24, 2001 12:51 PM
  Subject: Re: Mission Impossible: Tomcat + Apache ???


  Yes, I've read the apache-tomcat howto, and followed it's instructions step by step.

  BUT

  When I've put (as a test...) snoop.jsp in the c:\apache\htdocs directory - it couldn't find it!
  Only once I've put it in the c:\jakarta-tomcat\webapps\ROOT it was found and compiled.
  So, I figured out that by default they (Apache vs. Tomcat ) have different "DocumentRoot" structure.
  That's my question.

  I've also tried to point in the mod_jk.conf and server.xml the "/" dir of the tomcat to use c:\apache\htdocs - but still no luck...


Re: Mission Impossible: Tomcat + Apache ???

Posted by Yoav <yo...@capitalmerchant.com>.
Yes, I've read the apache-tomcat howto, and followed it's instructions step by step.

BUT

When I've put (as a test...) snoop.jsp in the c:\apache\htdocs directory - it couldn't find it!
Only once I've put it in the c:\jakarta-tomcat\webapps\ROOT it was found and compiled.
So, I figured out that by default they (Apache vs. Tomcat ) have different "DocumentRoot" structure.
That's my question.

I've also tried to point in the mod_jk.conf and server.xml the "/" dir of the tomcat to use c:\apache\htdocs - but still no luck...

  ----- Original Message ----- 
  From: Sam Newman 
  To: tomcat-user@jakarta.apache.org 
  Sent: Tuesday, April 24, 2001 10:59 AM
  Subject: Re: Mission Impossible: Tomcat + Apache ???


  Have you read the Apache-Tomcat howto in the docs (comes with tomcat)? If so, can you give us more specific info on your problems?

  regards,
  sam
    ----- Original Message ----- 
    From: Yoav 
    To: tomcat-user@jakarta.apache.org 
    Sent: Tuesday, April 24, 2001 10:58 AM
    Subject: Mission Impossible: Tomcat + Apache ???


    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 !!

Re: Mission Impossible: Tomcat + Apache ???

Posted by Morten Rønseth <Mo...@coil.no>.
Undeliverable mail. 

Re: Mission Impossible: Tomcat + Apache ???

Posted by Morten Rønseth <Mo...@coil.no>.
Undeliverable mail. 

Re: Mission Impossible: Tomcat + Apache ???

Posted by Morten Rønseth <Mo...@coil.no>.
Undeliverable mail. 

Re: Mission Impossible: Tomcat + Apache ???

Posted by Morten Rønseth <Mo...@coil.no>.
Undeliverable mail. 

Re: Mission Impossible: Tomcat + Apache ???

Posted by Morten Rønseth <Mo...@coil.no>.
Undeliverable mail.