webEditor using mod_jk

Anonymous
2001-03-02
2001-03-06

  • Anonymous
    2001-03-02

    webEditor is great...given that I can get it up and running using the mod_jk adapter rather than mod_jserv. The Tomcat site advises the use of mod_jk, and it is heavily documented, so it is expected that mod_jk will become the defacto standard adapter. Are you developing a documentation for installation under mod_jk?

     
    • Hope we have the time to develope this kind of documentation, but in the meantime try this:

      as you can read in the tomcat doc the mod_jk.conf-auto will be created each time on startup. but due to a limited capability to reflect user settings in web.xml (apps level) you have to correct few things by hand. now you are leaving the 'auto' path. anyway, you should do this by copying the last mod_jk.conf-auto to your own name, correct your inclusion in httpd.conf and change your mod_jk.conf-yourname in the section of webeditor with the following entries.

      #
      # The following line makes apache aware of the location of the /webeditor context
      #
      Alias /webeditor "F:/Utilities/jakarta-tomcat-3.2.1/webapps/webeditor"
      <Directory "F:/Utilities/jakarta-tomcat-3.2.1/webapps/webeditor">
          Options Indexes FollowSymLinks
      </Directory>

      Alias /editor_1/ "F:/Utilities/jakarta-tomcat-3.2.1/webapps/webeditor/editors/editor_1/docs/"
      <Directory "F:/Utilities/jakarta-tomcat-3.2.1/webapps/webeditor/editors/editor_1/docs">
         Options Indexes MultiViews
         AllowOverride None
         Order allow,deny
         Allow from all
      </Directory>

      #
      # The following line mounts all JSP files and the /servlet/ uri to tomcat
      #
      JkMount /webeditor/servlet/* ajp12
      JkMount /webeditor/*.jsp ajp12
      JkMount /webeditor/*.xml ajp12

      #
      # The following line prohibits users from directly accessing WEB-INF
      #
      <Location "/webeditor/WEB-INF/">
          AllowOverride None
          deny from all
      </Location>
      #
      # Use Directory too. On Windows, Location doesn't work unless case matches
      #
      <Directory "F:/Utilities/jakarta-tomcat-3.2.1/webapps/webeditor/WEB-INF/">
          AllowOverride None
          deny from all
      </Directory>

      #
      # The following line prohibits users from directly accessing META-INF
      #
      <Location "/webeditor/META-INF/">
          AllowOverride None
          deny from all
      </Location>
      #
      # Use Directory too. On Windows, Location doesn't work unless case matches
      #
      <Directory "F:/Utilities/jakarta-tomcat-3.2.1/webapps/webeditor/META-INF/">
          AllowOverride None
          deny from all
      </Directory>

      stuff needed in webeditor's web-inf/web.xml. the cocoon part is important due to a bug (either in my config, in cocoon or tomcat) to read the cocoon.properties outside the webapps path. so you should copy cocoon-properties to webeditor's web-inf path and point  to this location.

      <!-- Cocoon -->
          <servlet>
                <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
                <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
                <init-param>
                 <param-name>properties</param-name>
                 <param-value>/WEB-INF/cocoon.properties</param-value>
                </init-param>
          </servlet>
          <servlet-mapping>
            <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
            <url-pattern>*.xml</url-pattern>
          </servlet-mapping>
         
      <!-- webEditor -->
          <servlet>
            <servlet-name>webEditor.wEd</servlet-name>
            <servlet-class>webEditor.wEd</servlet-class>
                <init-param>
                 <param-name>wEd_root</param-name>
              <param-value>F:\Utilities\jakarta-tomcat-3.2.1\webapps\webeditor\editors\editor_1</param-value>
                </init-param>
      </servlet>

      restart both - tomcat and apache - and it should work. try both apache and tomcat's standalone webserver to see that both giveing the same picture.

      hope this helps. and promised, the time will come to have it documented ;-)

      regards

      Fritz 

       

    • Anonymous
      2001-03-05

      WebEditor is currently running on tomcat-jserv(very cool indeed!). I will try the mod_jk implementation this week. If you'd like I can send you the documentation I'll produce after I've done it.
      -ee

       
      • would be nice to have a template. help is always appreciated. thanks in advance. I will try to get few more informations about mod_jk for try out. might be it can be included into your doc.

        Fritz

         

        • Anonymous
          2001-03-05

          Thanks, the more the better.
          -Ethan

           

          • Anonymous
            2001-03-06

            Have you sucessfully run wedEditor with cocoon on the apache/mod_jk/tomcat combo, or 'should' it work. Most list serves report problems running cocoon and mod_jk...and I had these same problems. It's as if mod_jk doesn't recognize xml or xsl documents, altering them as they pass to tomcat? I even placed xalan and xerces in my system classpath, but to no avail. Could this be a larger problem with coccon and mod_jk rather than with mod_jk and webEditor?

             
            • Hi Ethan,

              yes, it runs in that combo (on NT and on Linux/SuSE). here is a brief desc of my config.

              1. install and config apache and tomcat in a normal way
              2. get cocoon and install it either beside tomcat or inside (under webapps/cocoon)
              3. if you have installed it outside, you have to correct tomcat/conf/server.xml to point a    new context to this docbase; if inside, tomcat gets it automatically at startup time
              4. include the cocoon libs in tomcat.sh and workers.properties (only in classpath is running    at this moment, but the guys starting to change it, so you have to copy the whole bunch
                 to tomcat/lib)
              5. create under your cocoon dir a dir WEB-INF, copy a web.xml to it and put the changes in
                 I've sent before (take care of the cocoon.properties, put it under the WEB-INF too
                 [security] and correct it in web.xml)
              6. restart only tomcat and make a copy of the conf/mod_jk.conf-auto and change the
                 section of cocoon to the following:
              #########################################################
              # Auto configuration for the /cocoon context starts.
              #########################################################

              #
              # The following line makes apache aware of the location of the /cocoon context
              #

              <Files *.xml>
                  SetHandler      jakarta-servlet
              </Files>

              <Location "/cocoon">
                  SetHandler      jakarta-servlet
              </Location>

              AddType text/xml .xml

              Alias /cocoon "F:/Utilities/cocoon-1.8.1"
              <Directory "F:/Utilities/cocoon-1.8.1">
                  Options Indexes FollowSymLinks
              </Directory>

              #
              # The following line mounts all JSP files and the /servlet/ uri to tomcat
              #
              JkMount /cocoon/servlet/* ajp12
              JkMount /cocoon/*.jsp ajp12
              JkMount /cocoon/*.xml ajp12

              #
              # The following line prohibits users from directly accessing WEB-INF
              #
              <Location "/cocoon/WEB-INF/">
                  AllowOverride None
                  deny from all
              </Location>
              #
              # Use Directory too. On Windows, Location doesn't work unless case matches
              #
              <Directory "F:/Utilities/cocoon-1.8.1/WEB-INF/">
                  AllowOverride None
                  deny from all
              </Directory>

              #
              # The following line prohibits users from directly accessing META-INF
              #
              <Location "/cocoon/META-INF/">
                  AllowOverride None
                  deny from all
              </Location>
              #
              # Use Directory too. On Windows, Location doesn't work unless case matches
              #
              <Directory "F:/Utilities/cocoon-1.8.1/META-INF/">
                  AllowOverride None
                  deny from all
              </Directory>

              #######################################################
              # Auto configuration for the /cocoon context ends.
              #######################################################
              (REMARK: you can use both ajp12 and ajp13; you have to take yours and correct them here; if you have other context sections (like webeditor) which should serve xml files, you have to change them too))
              7. include your copy of mod_jk.conf in httpd.conf and restart the whole bundle
              8. now both http://localhost/Cocoon.xml and http://localhost:8080/Cocoon.xml
                 (if this is not running, but http://localhost/cocoon/Cocoon.xml, you have to copy
                 cocoon.properties under each context, which should run xml files, in the above case
                 it is ROOT/WEB-INF of tomcat/webapps; don't ask why copying around, but I was       discovering problems, if cocoon.properties is under a generic dir; cocoon is throwing an       exception, that it can't read the file under the givin dir (don't say, I have to check
                 permissions ;-)
                
              That should do the trick.

              Fritz