You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2004/12/08 14:52:26 UTC

DO NOT REPLY [Bug 29360] - [PATCH] precompile xsp's without starting URI

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29360>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29360


simon.mieth@t-online.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|precompile xsp's without    |[PATCH] precompile xsp's
                   |starting URI                |without starting URI




------- Additional Comments From simon.mieth@t-online.de  2004-12-08 14:52 -------
This patch allows the precompiling of xsp, but outside of the CocoonBean/CLI. 

Precompiling without uri scans the context-directory for xsp-files and compiles
this with the components from XSP (ProgramGenerator). This was not a crawling
through pages like the CocoonBean does. By moving XSP to a block all dependences
were removed from org.apache.cocoon.Cocoon
org.apache.cocoon.bean.CocoonWrapper/CocoonBean. 

The patch is a copy and paste of all this removed code in a single class
XSPPrecompileWrapper. It depends on the XSP-Block and in this case it is placed
in the XSP-Block.

A simple extend of the CocoonWrapper is impossible (the needed
org.apache.cocoon.Cocoon is private there). So all code from the Wrapper is copy
and paste there. The patch is tested with cocoon-2.1.5.1 and cocoon-2.1.6
and works in both. 


Usage:
------

*  all classes and jars must be in classpath (servlet.jar too)
   (Unix:
    for  i in `ls build/webapp/WEB-INF/lib/*.jar`; 
    do export CLASSPATH=$CLASSPATH:$i;
    done)
* java org.apache.cocoon.bean.XSPPrecompileWrapper -c build/webapp
          -w  my_work_dir

  
this will generate all *.java and *.class files to the work-dir.


Best Regards,

Simon






 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.