Antw: RE: LDAP Transformer with XSP page?
Hello Maxime, it is possible. the xsp page has to generate the correct xml syntax for the LDAP transformer. (example at wiki) Martin [EMAIL PROTECTED] Dienstag, 1. Juli 2003 16:20:59 Is it possible to create the ldap.xml, with the ldap queries in a xsp page? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] .org] Sent: Tuesday, July 01, 2003 4:10 PM To: [EMAIL PROTECTED] Subject: RE: LDAP Transformer I think there must be a way other than set the parameter in the sitemap like : from the ldap.xml write something like that : ldap:filter(amp;(cn=request:get-query-string/))/ldap:filter Is that possible? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] .org] Sent: Tuesday, July 01, 2003 3:59 PM To: [EMAIL PROTECTED] Subject: RE: LDAP Transformer it doesn't work. As I said the filter cannot be definied as parameter in the sitemap. It returns the error [LDAPTransformer] Error in LDAP-Query: javax.naming.directory.InvalidSearchFilterException: Empty filter; It must be a bug or so... But refering to the original may, with the other way to search why is it so slow ? hello, I have integrated ldap into my portal as identhification system. My problem is that I have to put a filter to search all users from these seven groups : DG_IT-CLI-DAR_A_00 to DG_IT-CLI-DAR_A_06 I have to ways, the first would be to set into my filter a parameter in the sitemap, like map:parameter name=filter value=(cn={request-param:name})/ But it seems that the ldap transformer has a lot of bugs. The parameter rootdn works, password works, but both filter and serverurl doesn't work!!! So the only way to filter it is to search by the attribute memberOf in every user data. But this attribute is a DN (means not substring or wildcards search). With a shareware I've found (LDAP Browser) I can search all these data, but with the ldap transformer I get the error : [LDAPTransformer] Error in LDAP-Query: javax.naming.TimeLimitExceededException: [LDAP: error code 3 - Timelimit Exceeded]; remaining name 'DC=corproot,DC=net' Is it a bug of the ldap transformer? Is the filter to long/complex? Here is the filter (ldap:filter) (|(memberOf=CN=DG_IT-CLI-DAR_A_00,OU=IT_CLI-DAR,OU=IT_Generic,OU=IT_Res , OU=IT,DC=corproot,DC=net)(memberOf=CN=DG_IT-CLI-DAR_A_01,OU=IT_CLI-DAR, O U=IT_Generic,OU=IT_Res,OU=IT,DC=corproot,DC=net)(memberOf=CN=DG_IT-CLI- D AR_A_03,OU=IT_CLI-DAR,OU=IT_Generic,OU=IT_Res,OU=IT,DC=corproot,DC=net) ( memberOf=CN=DG_IT-CLI-DAR_A_04,OU=IT_CLI-DAR,OU=IT_Generic,OU=IT_Res,OU = IT,DC=corproot,DC=net)(memberOf=CN=DG_IT-CLI-DAR_A_05,OU=IT_CLI-DAR,OU= I T_Generic,OU=IT_Res,OU=IT,DC=corproot,DC=net)(memberOf=CN=DG_IT-CLI-DAR _ A_06,OU=IT_CLI-DAR,OU=IT_Generic,OU=IT_Res,OU=IT,DC=corproot,DC=net)) Thanks -Original Message- From: Yury Mikhienko [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 3:44 PM To: [EMAIL PROTECTED] Subject: Re: LDAP Transformer On Tue, 1 Jul 2003 14:55:52 +0200 [EMAIL PROTECTED] wrote: hello, I have integrated ldap into my portal as identhification system. My problem is that I have to put a filter to search all users from these seven groups : DG_IT-CLI-DAR_A_00 to DG_IT-CLI-DAR_A_06 I have to ways, the first would be to set into my filter a parameter in the sitemap, like map:parameter name=filter value=(cn={request-param:name})/ But it seems that the ldap transformer has a lot of bugs. The parameter rootdn works, password works, but both filter and serverurl doesn't work!!! try the following filter syntax: (amp;(uid={request-param:name})) -- Best regards, Yury Mikhienko. IT engineer, ZAO Mobicom-Kavkaz - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antw: Using Cocoon and ($tool) to generate static pages.
I think Forrest will do the job? [EMAIL PROTECTED] Donnerstag, 6. Februar 2003 18:07:02 Which is the best tool to create an offline copy of a cocoon live site? It should spider through the pages, follow every link and gather both html and images/css/pdf. Then it should rearrange internal links from absolute to relative (http://site/page; - page.html, / - index.html). The result is to be loaded on a low-spec [ = no cocoon :( ] webserver. I don't consider the batch use from command line to be a viable alternative, because: - There are different views of single xml files. - I don't want to explicitly change the internal URL format used by the site (/ ... /page/ with a final slash) - (not sure) Would it work with dynamic SVG-gif? - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antw: Mail-transformer
Hello, I have used the sample of the cocoon Book Cocoon: Building XML Applications 1. You need to write a own Mail Transformer place the class under web-inf/classes You can change the Package and the NAMESPACE to something you like more package com.business.cocoon.transformation; //import org.apache.avalon.excalibur.pool.Poolable; import org.apache.avalon.framework.parameters.Parameterizable; import org.apache.avalon.framework.parameters.Parameters; import org.apache.avalon.framework.parameters.ParameterException; import org.apache.cocoon.ProcessingException; import org.apache.cocoon.environment.SourceResolver; import org.apache.cocoon.transformation.AbstractTransformer; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.AttributesImpl; import java.io.IOException; import java.util.Date; import java.util.Map; import java.util.Properties; import javax.mail.*; import javax.mail.internet.*; public class SendMailTransformer extends AbstractTransformer implements Parameterizable { public static final String NAMESPACE = http://com/business/cocoon/sendmail;; public static final String SENDMAIL_ELEMENT = sendmail; public static final String MAILTO_ELEMENT = mailto; public static final String MAILSUBJECT_ELEMENT = mailsubject; public static final String MAILBODY_ELEMENT = mailbody; protected static final int MODE_NONE = 0; protected static final int MODE_TO = 1; protected static final int MODE_SUBJECT = 2; protected static final int MODE_BODY = 3; protected int mode; protected StringBuffer toAddress; protected StringBuffer subject; protected StringBuffer body; protected String mailHost; protected String fromAddress; /** * Parameterizable */ public void parameterize(Parameters parameters) throws ParameterException { this.mailHost = parameters.getParameter(mailhost); this.fromAddress = parameters.getParameter(from); if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug(Parameters= + mailHost + : +fromAddress); } } /** * Setup */ public void setup(SourceResolver resolver, MapobjectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException { this.mode = MODE_NONE; this.toAddress = new StringBuffer(); this.subject = new StringBuffer(); this.body = new StringBuffer(); } public void startElement(String uri, String name, String raw, Attributes attr) throws SAXException { if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug(BEGIN startElement uri= + uri + , name= + name + , raw= + raw + , attr= + attr); } if (uri != null uri.equals(NAMESPACE) ) { if (name.equals(SENDMAIL_ELEMENT) == true) { // No need to do anything here } else if (name.equals(MAILTO_ELEMENT) == true) { this.mode = MODE_TO; } else if (name.equals(MAILSUBJECT_ELEMENT) == true) { this.mode = MODE_SUBJECT; } else if (name.equals(MAILBODY_ELEMENT) == true) { this.mode = MODE_BODY; } else { throw new SAXException(Unknown element + name); } } else { // Not for us super.startElement(uri, name, raw, attr); } if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug(END startElement); } } public void endElement(String uri, String name, String raw) throws SAXException { if (this.getLogger().isDebugEnabled() == true) { this.getLogger().debug(BEGIN endTransformingElement uri= + uri + , name= + name + , raw= + raw); } if (uri != null uri.equals(NAMESPACE) ) { if (name.equals(SENDMAIL_ELEMENT) == true) { if (this.getLogger().isInfoEnabled() == true) { this.getLogger().info(Mail contents: To: + this.toAddress + , Subject: + this.subject + , Body: + this.body); } String text; try { Properties props = new Properties(); props.put(mail.smtp.host, this.mailHost); Session mailSession = Session.getInstance(props, null); MimeMessage pm = new MimeMessage(mailSession); // set from pm.setFrom(new InternetAddress( this.fromAddress )); // set to pm.setRecipients(Message.RecipientType.TO, InternetAddress.parse(
Antw: Re: Sessions (read please!)
Hello, i don t use servlets but JSPs have the following code: 1. xsp Document xsp:structure xsp:includeorg.apache.cocoon.environment.Session/xsp:include /xsp:structure ... Session session = request.getSession (false); if (session != null) { // delet od session session.invalidate (); } // create new session session = request.getSession (true); session.setAttribute (props, properties); session.setAttribute (user, user); session.setMaxInactiveInterval(3600); // 1 houer ... 2. Session in JSP page or xsp page HTTPSession is a default class in a JSP page!(?) % HttpSession session = request.getSession (false); // When there's no session and no user object tell person in front of the screen so if (session != null session.getAttribute (user) != null) { User user = (User)session.getAttribute (user); } else { ... } JSP in sitemap as JSPreader, not JSPgenerator, cause i first developed JSPs and then changed to cocoon hth Martin Geißler [EMAIL PROTECTED] Freitag, 29. November 2002 15:15:10 Hi! third time. I'm still stuck. May be the subject is not interesting, or may be no one is working with cocoon, servlets and session attributes. HELP! (read below). Thanks, and sorry for insisting. -- Mauro On Fri, 22 Nov 2002, Mauro Daniel Ardolino wrote: Hi again! I'm still stuck. I've tried a lot of things without success. Does anyone work with cocoon and servlets, and session attributes? If so, please read below (my previous mail)! thanks! -- Mauro On Mon, 18 Nov 2002, Mauro Daniel Ardolino wrote: Hi! I have a problem using cocoon with other servlets. I have a servlet that outputs a xml and then in a pipeline I apply a xsl transformation. This works well, but this servlet needs a session parameter. Inside the servlet I wrote: HttpSession session= request.getSession(); TreeMap cart= (TreeMap) session.getAttribute(cart) But I cannot obtain the cart parameter. If I put the false parameter to the request.getSession(), I obtain an exception. So I have to think that cocoon is not passing the session to this servlet. I have to say that other servlet adds the cart parameter to the session, of course. Here's a copy of the pipeline: map:match pattern=CheckoutPage.html map:generate src=http://delta:18080/ProductSelectionDemo1/checkoutPage/ map:transform src=style/CheckoutPage_html.xsl type=xslt/ map:serialize type=html/ /map:match Must I do something special to pass the session to this servlet? (the servlet url is http://delta:18080/ProductSelectionDemo1/checkoutPage;) Thanks in advance. -- Mauro -- Ing.Mauro Daniel Ardolino Departamento de Desarrollo y Servicios Altersoft Billinghurst 1599 - Piso 9 C1425DTE - Capital Federal Tel/Fax: 4821-3376 / 4822-8759 mailto: [EMAIL PROTECTED] website: http://www.altersoft.com.ar - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LDAP
Hello, as far as i know is the LDAP Tranformer not included in Cocoon 2.0.3 Perhaps use the sources at the Code Repository. Regards Martin [EMAIL PROTECTED] Freitag, 15. November 2002 14:52:53 Hi!. Can anyone give me any example of use LDAP Transformer on Cocoon 2.0.3, because I can't find it in documentation. Witek - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: question about uploading
There is a mail in the mail-archive with an Action code that does what you want. Have a Look Martin [EMAIL PROTECTED] Freitag, 18. Oktober 2002 12:48:59 Hello, I want to upload an xml file to cocoon in order to apply some transformations to it. I have seen upload.xsp example, but I don't want to save the file in the server, just take the input stream in the http request and pass it to a transformer. How could it be done? Oskar - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: XML to PDF
Look at http://www.ibiblio.org/xml/books/bible2/chapters/ch18.html or the docs of the Apache FOP Project hth Martin - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]