Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 21185 invoked by uid 500); 24 Oct 2001 07:32:24 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 21171 invoked from network); 24 Oct 2001 07:32:24 -0000 From: "Carsten Ziegeler" To: Subject: RE: cvs commit: xml-cocoon2/src/org/apache/cocoon/servlet CocoonServlet.java Date: Wed, 24 Oct 2001 09:33:39 +0200 Message-ID: MIME-Version: 1.0 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: <3BD58720.C00CC71B@apache.org> X-MIMETrack: Itemize by SMTP Server on PBSN1/Systeme und Netzwerke(Release 5.0.8 |June 18, 2001) at 24.10.2001 09:32:33, Serialize by Router on PBSN1/Systeme und Netzwerke(Release 5.0.8 |June 18, 2001) at 24.10.2001 09:32:34, Serialize complete at 24.10.2001 09:32:34 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Berin, just relax. Everything is still working as it was before, you can use the cocoon: and the resource: url inside svg/batik! Why? When using services everything was working fine using the cli, but using cocoon as a servlet (e.g. inside Tomcat) this was not working, as the services file was never found. So instead of using the services, the protocols are now added to batik by the SVGSerializer. And this works in all cases. This also makes everything more maintanable, as you don't need any initialization for the protocol handlers in either Main or CocoonServlet. Everything for Batik is done in the SVGSerializer. So, really, no case to worry about. Just test it, and you will see all the beautiful documentation as it was before. Carsten Berin Loritsch wrote: > > cziegeler@apache.org wrote: > > > > cziegeler 01/10/23 04:40:24 > > > > Modified: src/org/apache/cocoon Main.java > > src/org/apache/cocoon/serialization SVGSerializer.java > > src/org/apache/cocoon/servlet CocoonServlet.java > > Removed: src/META-INF/services > > org.apache.batik.util.ParsedURLProtocolHandler > > > WHY!?! > > This code was working, and it provides a predictable environment for > people using Batik. Why are you removing it? What are you doing to > ensure that the functionality is there, if the code isn't? > > Please enlighten me, because this repeal from HEAD seems ludicrous. > Help me understand, because I _really_ don't like this. I *want* > to be able to use the same URL whether I am running in a servlet > environment or not. I NEED this ability for the functionality that > my side business is building off of. Please do NOT remove the > functionality. > > > Log: > > Cleaned up code for batik protocols > > > > Revision Changes Path > > 1.27 +1 -3 xml-cocoon2/src/org/apache/cocoon/Main.java > > > > Index: Main.java > > =================================================================== > > RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/Main.java,v > > retrieving revision 1.26 > > retrieving revision 1.27 > > diff -u -r1.26 -r1.27 > > --- Main.java 2001/10/22 09:09:55 1.26 > > +++ Main.java 2001/10/23 11:40:24 1.27 > > @@ -24,7 +24,6 @@ > > import org.apache.cocoon.util.IOUtils; > > import org.apache.cocoon.util.MIMEUtils; > > import org.apache.cocoon.util.NetUtils; > > -import > org.apache.cocoon.components.url.ParsedContextURLProtocolHandler; > > import org.apache.log.Hierarchy; > > import org.apache.log.Logger; > > import org.apache.log.Priority; > > @@ -36,7 +35,7 @@ > > * Command line entry point. > > * > > * @author Stefano Mazzocchi > > - * @version CVS $Revision: 1.26 $ $Date: 2001/10/22 09:09:55 $ > > + * @version CVS $Revision: 1.27 $ $Date: 2001/10/23 11:40:24 $ > > */ > > > > public class Main { > > @@ -262,7 +261,6 @@ > > CommandlineContext clContext = new > CommandlineContext(contextDir); > > clContext.setLogger(log); > > > appContext.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, clContext); > > - ParsedContextURLProtocolHandler.setContext(clContext); > > DefaultLogKitManager logKitManager = null; > > if(logKit != null) { > > final FileInputStream fis = new > FileInputStream(logKit); > > > > > > > > 1.7 +12 -4 > xml-cocoon2/src/org/apache/cocoon/serialization/SVGSerializer.java > > > > Index: SVGSerializer.java > > =================================================================== > > RCS file: > /home/cvs/xml-cocoon2/src/org/apache/cocoon/serialization/SVGSeria > lizer.java,v > > retrieving revision 1.6 > > retrieving revision 1.7 > > diff -u -r1.6 -r1.7 > > --- SVGSerializer.java 2001/10/23 11:10:02 1.6 > > +++ SVGSerializer.java 2001/10/23 11:40:24 1.7 > > @@ -14,11 +14,15 @@ > > import org.apache.avalon.framework.configuration.Configurable; > > import org.apache.avalon.framework.configuration.Configuration; > > import > org.apache.avalon.framework.configuration.ConfigurationException; > > +import org.apache.avalon.framework.context.Context; > > +import org.apache.avalon.framework.context.ContextException; > > +import org.apache.avalon.framework.context.Contextualizable; > > import org.apache.batik.transcoder.Transcoder; > > import org.apache.batik.transcoder.TranscoderInput; > > import org.apache.batik.transcoder.TranscoderOutput; > > import org.apache.batik.transcoder.TranscodingHints; > > import org.apache.batik.util.ParsedURL; > > +import org.apache.cocoon.Constants; > > import org.apache.cocoon.caching.CacheValidity; > > import org.apache.cocoon.caching.Cacheable; > > import org.apache.cocoon.caching.NOPCacheValidity; > > @@ -44,13 +48,17 @@ > > * > > * @author Davanum Srinivas > > * @author Ross Burton > > - * @version CVS $Revision: 1.6 $ $Date: 2001/10/23 11:10:02 $ > > + * @version CVS $Revision: 1.7 $ $Date: 2001/10/23 11:40:24 $ > > */ > > public class SVGSerializer extends SVGBuilder > > -implements Composable, Serializer, Configurable, Poolable, > Cacheable { > > +implements Composable, Serializer, Configurable, Poolable, > Cacheable, Contextualizable { > > > > - // add cocoon specific protocols > > - static { > > + /** > > + * Get the context > > + */ > > + public void contextualize(Context context) throws > ContextException { > > + ParsedContextURLProtocolHandler.setContext( > > + > (org.apache.cocoon.environment.Context)context.get(Constants.CONTE XT_ENVIRONMENT_CONTEXT)); > > ParsedURL.registerHandler(new > ParsedContextURLProtocolHandler()); > > ParsedURL.registerHandler(new > ParsedResourceURLProtocolHandler()); > > } > > > > > > > > 1.45 +2 -6 > xml-cocoon2/src/org/apache/cocoon/servlet/CocoonServlet.java > > > > Index: CocoonServlet.java > > =================================================================== > > RCS file: > /home/cvs/xml-cocoon2/src/org/apache/cocoon/servlet/CocoonServlet.java,v > > retrieving revision 1.44 > > retrieving revision 1.45 > > diff -u -r1.44 -r1.45 > > --- CocoonServlet.java 2001/10/11 14:34:44 1.44 > > +++ CocoonServlet.java 2001/10/23 11:40:24 1.45 > > @@ -17,7 +17,6 @@ > > import org.apache.avalon.framework.logger.Loggable; > > import org.apache.cocoon.*; > > import > org.apache.cocoon.components.classloader.RepositoryClassLoader; > > -import > org.apache.cocoon.components.url.ParsedContextURLProtocolHandler; > > import org.apache.cocoon.environment.Environment; > > import org.apache.cocoon.environment.http.HttpContext; > > import org.apache.cocoon.environment.http.HttpEnvironment; > > @@ -59,7 +58,7 @@ > > * @author Berin Loritsch > > * @author Carsten Ziegeler > > * @author href="mailto:leo.sutic@inspireinfrastructure.com">Leo Sutic > > - * @version CVS $Revision: 1.44 $ $Date: 2001/10/11 14:34:44 $ > > + * @version CVS $Revision: 1.45 $ $Date: 2001/10/23 11:40:24 $ > > */ > > > > public class CocoonServlet extends HttpServlet { > > @@ -124,10 +123,7 @@ > > String value; > > > > this.servletContext = conf.getServletContext(); > > - HttpContext envContext = new > HttpContext(this.servletContext); > > - > this.appContext.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, envContext); > > - ParsedContextURLProtocolHandler.setContext(envContext); > > - > > + > this.appContext.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, new > HttpContext(this.servletContext); > > this.initLogger(); > > > > this.forceLoadParameter = > conf.getInitParameter("load-class"); > > > > > > > > > > ---------------------------------------------------------------------- > > In case of troubles, e-mail: webmaster@xml.apache.org > > To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org > > For additional commands, e-mail: cocoon-cvs-help@xml.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org > For additional commands, email: cocoon-dev-help@xml.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org