I've made reasonable progress. I can get it serving from a .sar file, but only to the extent where it returns "Page not found for this context" type messages to the browser.

I am 90% sure that it's because catalina is tied to it's directory structure - particularly for jar files. i.e. me putting jars in lib/ for the sar will never get catalina to work with Phoenix. I suspect this because of lines like the below in org.apache.catalina.core.StandardContext to do with classloading

File directory = new File(System.getProperty("catalina.home"), "jasper");

That also leads onto a second point, the thing relies on catalina.home being set to the root of it's peculiar directory structure. In it's current form, it's just not going to be sarable.

Advice please...?

Or how about this as a proposal .... sar file format supports an environment.xml (instead of lib/*.jar) that looks like so...

   <environment>
      <env-vars>
       <env-var name="catalina.home" value="${sar-root}/catalina"/>
       <env-var name="catalina.base" value="${sar-root}/catalina"/>
      <env-vars>
       <classpath>
         <jar>${sar-root}/catalina/common\lib\servlet.jar</jar>
         <jar>${sar-root}/catalina/common\lib\resources.jar</jar>
         <jar>${sar-root}/catalina/common\lib\naming.jar</jar>
         <jar>${sar-root}/catalina/common\lib\mail.jar</jar>
         <jar>${sar-root}/catalina/common\lib\jndi.jar</jar>
         <jar>${sar-root}/catalina/common\lib\activation.jar</jar>
         <jar>${sar-root}/catalina/server\lib\warp.jar</jar>
         <jar>${sar-root}/catalina/server\lib\servlets-webdav.jar</jar>
         <jar>${sar-root}/catalina/server\lib\servlets-ssi.jar</jar>
         <jar>${sar-root}/catalina/server\lib\servlets-snoop.jar</jar>
         <jar>${sar-root}/catalina/server\lib\servlets-manager.jar</jar>
         <jar>${sar-root}/catalina/server\lib\servlets-invoker.jar</jar>
         <jar>${sar-root}/catalina/server\lib\servlets-default.jar</jar>
         <jar>${sar-root}/catalina/server\lib\servlets-common.jar</jar>
         <jar>${sar-root}/catalina/server\lib\servlets-cgi.jar</jar>
         <jar>${sar-root}/catalina/server\lib\jaxp.jar</jar>
         <jar>${sar-root}/catalina/server\lib\jakarta-regexp-1.2.jar</jar>
         <jar>${sar-root}/catalina/server\lib\crimson.jar</jar>
         <jar>${sar-root}/catalina/server\lib\catalina.jar</jar>
         <jar>${sar-root}/catalina/bin\bootstrap.jar</jar>
         <jar>${JAVA_HOME}\lib\tools.jar</jar>
       </classpath>
   </environment>


... and the sar file contains a complete copy of the catalina binary distribution.


Also, it would be handy for the Block to be able to get the root directory of where it's sar has been unpacked to.

On the positive side, I think it might be possible for the service to be able to have essentially createVirtualHost(...) and publishWebApp(...) as methods.

For those that are interested I am reimplementing the main method from org.apache.catalina.startup.Embedded.

Lastly, Catalina is going to use it's own connection manager and thread pool (without code changes, there is 0% change that we could get it using ours).

Regards,

- Paul H


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to