Re: How to save uploaded files?
Search the wiki for upload Sonny Sukumar wrote: If I want to keep the autosave-uploads param = false in web.xml, then how would I save certain files that I want to? More specifically, sometimes I just want the user to be able to preview a photo next to other data but I don't want to save it. Other times I specifically want to save all form data, including the uploaded photos that come along in the multi-part form data. What's the best way to implement this dual preview/save functionality? Thanks, Sonny - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: xinclude - cinclude - map:aggregate ??
Oookay, looking at the wiki this does not seem possible (unless it's an undocumented feature). The src attribute of map:part does not seem to give access to the requestgenerator in some way or another I'll rephrase my problem then, maybe there is something more fundamental wrong with my logic. 1)I have an xml file 2)This xml file has placeholders that need to arbitrary replaced with request parameters. Eg invoking url myfile.xml?placeholder1=myvaluehere outputs the xml document with every occurrence of placeholder1 replaced with myvaluehere. 3)unlimited amount of placeholders can be defined, this results in an arbitrary amount of requestparameters, hence I really need to be able query the requestobject and loop over them. Hope this clarifies my problem a bit. Should I approach this differently? Jorg -Original Message- From: Jorg Heymans [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 6. August 2003 14:12 To: '[EMAIL PROTECTED]' Subject: xinclude - cinclude - map:aggregate ?? Hi list, I want to iterate over the requestparameter variables in my stylesheet. Following won't work map:match pattern=*.smil map:generate src={1}.smil / map:transform src=stylesheets/replace.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:serialize type=smil/ /map:match Is the map:aggregate or xinclude functionality the thing I'm looking for? How would I reference the request object as a source then? map:aggregate element=smil map:part src=resource://={1}.smil / map:part src=cocoon://request / /map:aggregate this didn't bring what I was looking for.. Normally I would do map:generate type=request and then transform from there on, but I need to keep the Smil file as the starting point here. Any thoughts? Jorg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: IE6: Can't open dynamic PDF from applet
Hi No, I'm not using https ... My cocoon instructions in sitemap look like this: map:match pattern=table.pdf map:generate type=serverpages src=xsp/table.xsp/ map:transform src=stylesheets/xml2fo.xsl map:parameter name=view-source value=xsp/table.xsp/ /map:transform map:serialize type=fo2pdf/ /map:match The most important - I can't understand why it works with proxy nad doesn't work without proxy. It seems like IE wants the pdf file to be cached anywhere? -Ursprüngliche Nachricht- Von: Beat De Martin [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 6. August 2003 17:10 An: [EMAIL PROTECTED] Betreff: Re: IE6: Can't open dynamic PDF from applet Hi It might not be exactly your problem but I had problems with dynamic generated pdf and proxies as well. My dynamic generated pdf's have been cached by the proxy which I didn't for obviuos reasons. What I did was the following. In my sitemap I have a match like map:match pattern=*.pdf* ... And the my pdf-link I created dynamically like http://myserver/cocoon/table_XXX.pdf where XXX is a kind of unique ID (e.g. timestamp) So my pdf's will never be cached ! Another problem I had was using https and dynamic pdf's, but you're using https aren't you ? Are setting the content-length ? Cheers Beat De Martin Zurich, Switzerland Dear Friends! I have read a lot about so called internet explorer PDF Bug but none of the suggested solutions has helped. Apart from that, I'm trying to open my pdf file NOT from a html site, but from a APPLET. Please take a little time and read my problem. I'd like to open a dynamically generated (Cocoon 2.0.4) PDF file from an applet using a method: applet.getAppletContext().showDocument(http://myserver/cocoon/table.pdf ?par1=1par2=2); This works perfectly with all Netscape-like browsers (Mozilla etc). It works with Internet Explorer 6 too, but only WHILE USING PROXY SERVER. But with Internet Explorer 6 WITHOUT PROXY it doesn't work. Error message: Site cannot be opened. It is either not available or cannot be found. Try it later again. Anybody of the community must have faced this problem, I believe. Are there workarounds for this problem? Why does it work with proxy (cache?)? Thank you very much in advance Regards, Viktor Skladovs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test -- 1. GMX TopMail - Platz 1 und Testsieger! 2. GMX ProMail - Platz 2 und Preis-Qualitätssieger! 3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 2.1rc1 build error
on Wed, 6 Aug 2003 18:05:11 +0100 Cedric Picard [EMAIL PROTECTED] wrote: I just checked my own version 2.1m2 and ResolverImpl.java does not exist in src/java/org/apache/cocoon/components/resolver. You'll need to get this class from CVS if you downloaded the release version. I found this class in depreated, which means this test is outdated; I also found problems with other tests Thanx for your Re. Regards, Rufio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem creating a new transformer
On Wed, 2003-08-06 at 13:56, Miguel Carvalho wrote: Hi, i want to create a new transformer that gets sax events from a XSP Generator created by me. i'm using cocoon 2.0.4 under a XP with java version 1.4.1_03. snip/ org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate(): java.lang.NullPointerException request-uri /dae/daestart original exception Original exception : java.lang.NullPointerException at org.apache.cocoon.serialization.AbstractTextSerializer.startElement(Abstract TextSerializer.java:271) at org.apache.cocoon.xml.AbstractXMLPipe.startElement(AbstractXMLPipe.java:87) at pt.laseeb.dae.transformer.daeTransformer.startElement(daeTransformer.java:11 6) . and it goes on... :( I have just checked the source of cocoon 2.0.4 and the line 271 of the AbstractTextSerializer is outside of the startElement method, which conflicts with what your stacktrace is showing. Are you sure you are using version 2.0.4, or have you maybe made changes to those sources? -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Confused About Perfomance Issues (but not as much)
Geoff, This week is hectic and I do not think I will have time to sit down and really improve the performace. When I get around to it, I'll probably ask a few more questions and then make a wiki. Thanks, Julian --- Geoff Howard [EMAIL PROTECTED] wrote: Julian wrote: Geoff, Thanks for the help! I see about a second and a half performance boost (10.29s to 8.87s) on startup. The longest to respond is a sitemap with various XSP's and a fop2pdf generator (12.35 sec). I have two more issue though in light of your tips: Very glad to hear it - I'd think you'll be able to get that down quite a bit more. See more comments below. questions 1) Should I declare the components only in the sitemap that uses them or is the performance the same when they are declared in the base sitemap (not declared in sub-sitemap)? I don't know if sitemap components are loaded lazily or not in the tree processor (2.1), but it would be an easy experiment. You may be able to find hints in the logs (if you turn logging up to debug). That reminds me. Logging is by default turned to ERROR (WARN?) now in 2.1 which was not the case with earlier versions, or earlier in 2.1 cvs. But web.xml has an additional config for logging during startup. I think this may be left to debug by default, and you may want to experiment with startup times with it changed. 2) Are JSP/XSP sources compiled everytime the server is restarted? If so, will getting my hands on the class generated and generating it otherwise improve the performace? /questions They should not be recompiled on server restart (though I'm not sure about JSP within Cocoon if called from the JSP reader or generator). You need to make sure though that your servlet container is not deleting the work directory on startup or shutdown. ( I think I recently discovered that Jetty does this). If it is, they will be recompiled because the class file will be missing. You can fix this either by changing config on the servlet container or by changing Cocoon's work directory to one that isn't getting deleted. The same by the way goes with the cache directory. Your idea to get the pregenerated class file will work - though I'm not sure if XSP engine uses the same class loader, or if it only looks in the configured work directory. This will change where you would need to put it to avoid recompiling. Also, the build process has a step that is supposed to precompile XSPs. You may not want to rebuild the entire cocoon project each time you change an xsp but you could look into creating a new build target for yourself to do just this step. If you figure it out, please wiki it. Regarding components: I am not sure which I use and which I do not. I use Cocoon for the basics and will have to do some reading. Yes, this is an issue. It won't be clear even to experienced users what all those components are. It's better now that blocks are here, but not everything can be/is in a block. Maybe if you did an inventory of what you still have in cocoon.roles and cocoon.xconf and wiki'd it we could build up a little page detailing what each is and when you could get rid of it. Geoff Thanks a million, Julian --- Geoff Howard [EMAIL PROTECTED] wrote: Reinhard Pötz wrote: -Original Message- From: Julian [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 4:20 PM To: cocoon Subject: Confused About Perfomance Issues Hi, I have looked into this a few times, but am not getting it. question How can I configure/build Cocoon to pre-load/pre-compile sitemaps before or during server startup? /question In 2.1 (latest CVS) the interpreted sitemap is used - no compilation is necessary. scenario Every time my server is restarted Cocoon takes about 8-10 secs. to respond to requests to a given sitemap. I believe this is sitemap compilation. I have a few sitemaps so this causes some serious lag time, albeit on first request...afterwards all responds quickly. jre 1.4.1, Cocoon CVS version, Tomcat 4.1.12 /scenario It's not only the sitemap - Cocoon initialized many components and this needs some time at startup. It also takes some time to compile XSP pages (in the case you use them). And this time can be reduced by eliminating all unused components. First, start by building without unused blocks. Second, edit your sitemaps to remove any unused sitemap components (e.g., Generators you'll never use). If things are still not noticeably better, examine cocoon.xconf and cocoon.roles for components you expect to never need. This last step is a little more advanced. If there are any questions about what a component is/does ask here or on the dev list. Geoff
Re: 2.1rc1 build error
rufio wrote: on Wed, 6 Aug 2003 18:05:11 +0100 Cedric Picard [EMAIL PROTECTED] wrote: I just checked my own version 2.1m2 and ResolverImpl.java does not exist in src/java/org/apache/cocoon/components/resolver. You'll need to get this class from CVS if you downloaded the release version. I found this class in depreated, which means this test is outdated; I also found problems with other tests This was cleaned up recently - I thought right before rc1, but maybe it was right after. Before the cleanup it should only have happened when excluding the deprecated classes from the build. After the cleanup, it should never happened. If you're curious, looking through the archives for [EMAIL PROTECTED] and [EMAIL PROTECTED] should clear the timing up, and give more explanation of what was going wrong. Geoff Howard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem creating a new transformer
Hi, i want to create a new transformer that gets sax events from a XSP Generator created by me. i'm using cocoon 2.0.4 under a XP with java version 1.4.1_03. bellow i will post the XSP code of the generator !--Begin of start.xsp xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:util=http://apache.org/xsp/util/2.0; xsp:structure xsp:includept.laseeb.dae.xmlDbApi.daeXmlDbApi/xsp:include xsp:includeorg.xmldb.api.base.ResourceIterator/xsp:include xsp:includeorg.xmldb.api.base.Resource/xsp:include xsp:includeorg.xmldb.api.base.XMLDBException/xsp:include xsp:includeorg.apache.cocoon.components.language.markup.xsp.XSPUtil.*/xsp :include /xsp:structure document xmlns:dae=http://laseeb/dae/sgDae; xsp:logic try { Resource res = null; String resStr = null; daeXmlDbApi daeApi = new daeXmlDbApi(); ResourceIterator results; results = daeApi.getArticleSection(1).getIterator(); while (results.hasMoreResources()) { res = results.nextResource(); resStr = (String) res.getContent(); util:include-exprutil:exprxsp:exprresStr/xsp:expr/util:expr/util: include-expr } } catch(Exception e) { } /xsp:logic /document /xsp:page !--End of start.xsp when i create a pipeline with only this genrator and a html serializer like, map:pipeline map:match pattern=daestart map:generate type=serverpages src=daexsps/start.xsp/ map:serialize type=html/ /map:match /map:pipeline i get the following result, !-- document xmlns:xml=http://www.w3.org/XML/1998/namespace; xmlns:util=http://apache.org/xsp/util/2.0; xmlns:xsp=http://apache.org/xsp; xmlns:dae=http://laseeb/dae/sgDae; dae:article id=1 rating=2 sectionid=1 xmlns:dae=http://laseeb/dae/sgDae; xmlns:src=http://xml.apache.org/xindice/Query; src:col=/db/daeDocuments src:key=1 dae:titleTitulo com rating 2/dae:title dae:textTexto/dae:text /dae:article dae:article id=2 rating=1 sectionid=1 xmlns:dae=http://laseeb/dae/sgDae; xmlns:src=http://xml.apache.org/xindice/Query; src:col=/db/daeDocuments src:key=2 dae:titleTitulo do artigo com rating igual a 1/dae:title dae:texttexto do artigo com rating igual a 1/dae:text dae:imageimg1.jpg/dae:image /dae:article dae:article id=3 rating=2 sectionid=1 xmlns:dae=http://laseeb/dae/sgDae; xmlns:src=http://xml.apache.org/xindice/Query; src:col=/db/daeDocuments src:key=3 dae:titleTitulo do artigo com rating igual a 2/dae:title dae:texttexto do artigo com rating igual a 2/dae:text dae:imageimg1.jpg/dae:image /dae:article dae:article id=4 rating=2 sectionid=1 xmlns:dae=http://laseeb/dae/sgDae; xmlns:src=http://xml.apache.org/xindice/Query; src:col=/db/daeDocuments src:key=4 dae:titleTitulo do artigo com rating igual a 2/dae:title dae:texttexto do artigo com rating igual a 2/dae:text dae:imageimg1.jpg/dae:image /dae:article /document !-- wich is the right one. But when i try to apply one transformer created by me, deaTransformer.java (bellow are the methods setup, startElement and endElement that i had to implement, !--Begin of daeTransformer.java- --- public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException { this.mode = MODE_NONE; } public void startElement(String namespaceURI, String localName, String qName, Attributes attributes) throws SAXException { if (namespaceURI != null namespaceURI.equals(NAMESPACE) ) { AttributesImpl newAttr = new AttributesImpl(); if (localName.equals(ARTICLE_ELEMENT) == true) { newAttr.addAttribute(namespaceURI, ARTICLE_ELEMENT, qName, color, red); super.startElement(namespaceURI, ARTICLE_ELEMENT, qName, newAttr); } else if (localName.equals(ARTICLE_TITLE_ELEMENT) == true) { this.mode = MODE_TITLE; super.startElement(namespaceURI, localName, qName, attributes); } else if (localName.equals(ARTICLE_TEXT_ELEMENT) == true) { this.mode = MODE_TEXT; super.startElement(namespaceURI, localName, qName, attributes); } else if (localName.equals(ARTICLE_IMAGE_ELEMENT) == true) { this.mode = MODE_IMAGE; super.startElement(namespaceURI,
Re: IE6: Can't open dynamic PDF from applet
Hi It might not be exactly your problem but I had problems with dynamic generated pdf and proxies as well. My dynamic generated pdf's have been cached by the proxy which I didn't for obviuos reasons. What I did was the following. In my sitemap I have a match like map:match pattern=*.pdf* ... And the my pdf-link I created dynamically like http://myserver/cocoon/table_XXX.pdf where XXX is a kind of unique ID (e.g. timestamp) So my pdf's will never be cached ! Another problem I had was using https and dynamic pdf's, but you're using https aren't you ? Are setting the content-length ? Cheers Beat De Martin Zurich, Switzerland Dear Friends! I have read a lot about so called internet explorer PDF Bug but none of the suggested solutions has helped. Apart from that, I'm trying to open my pdf file NOT from a html site, but from a APPLET. Please take a little time and read my problem. I'd like to open a dynamically generated (Cocoon 2.0.4) PDF file from an applet using a method: applet.getAppletContext().showDocument(http://myserver/cocoon/table.pdf ?par1=1par2=2); This works perfectly with all Netscape-like browsers (Mozilla etc). It works with Internet Explorer 6 too, but only WHILE USING PROXY SERVER. But with Internet Explorer 6 WITHOUT PROXY it doesn't work. Error message: Site cannot be opened. It is either not available or cannot be found. Try it later again. Anybody of the community must have faced this problem, I believe. Are there workarounds for this problem? Why does it work with proxy (cache?)? Thank you very much in advance Regards, Viktor Skladovs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test -- 1. GMX TopMail - Platz 1 und Testsieger! 2. GMX ProMail - Platz 2 und Preis-Qualitätssieger! 3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]