You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jonathan Linczak <li...@hiram.edu> on 2004/08/10 17:46:00 UTC

Email errors with sendmail

All,

Been trying to get sendmail working with Cocoon without success.   
Installed mail.jar and activation.jar into the lib directory and  
restarted Cocoon.  Created a page that looks like this:

<?xml version="1.0"?>

<xsl:page language="java"
   xmlns:xsp="http://apache.org/xsp"
   xmlns:sendmail="http://apache.org/cocoon/sendmail/1.0"
 >

<xsp:structure>
   <xsp:include>java.util.*</xsp:include>
</xsp:structure>

<page>
   <page-title>Confirmation</page-title>
   <content>
     <title>Hello!</title>
     <paragraph>
       An email has been sent to you!
     </paragraph>

   <sendmail:send-mail>
     <sendmail:charset>ISO-8859-1</sendmail:charset>
     <sendmail:smtphost>localhost</sendmail:smtphost>
     <sendmail:from>linczakjw@hiram.edu</sendmail:from>
     <sendmail:to>linczakjw@hiram.edu</sendmail:to>
     <sendmail:subject>This is a test</sendmail:subject>
     <sendmail:body>This is a test email from XSP</sendmail:body>
   </sendmail:send-mail>

   </content>
</page>

</xsp:page>


I added a pipeline in there and away I went to the URL, but I get this  
as an error:

Language Exception
org.apache.cocoon.ProcessingException: Language Exception:  
org.apache.cocoon.components.language.LanguageException: Error  
compiling test_xsp: ERROR 1  
(org/apache/cocoon/www/lenya/pubs/home/content/authoring/calendar/ 
test_xsp.java): ... String cat_clause = ""; // start error (lines  
274-274) "Syntax error on keyword "if"; "boolean", "void", "byte",  
"short", "int", "long", "char", "float", "double", "Identifier",  
"interface", "class" expected" if (cat == null){ // end error  
cat_clause = ""; }else{ cat_clause = " and category_id = " + cat; ...  
Line 274, column 0: Syntax error on keyword "if"; "boolean", "void",  
"byte", "short", "int", "long", "char", "float", "double",  
"Identifier", "interface", "class" expected


Am I missing something?  I added the builtin-logicsheet as well, so I  
don't think I was missing anything...

Jon


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Email errors with sendmail

Posted by Jonathan Linczak <li...@hiram.edu>.
On Aug 10, 2004, at 11:46 AM, Jonathan Linczak wrote:

> All,
>
> Been trying to get sendmail working with Cocoon without success.   
> Installed mail.jar and activation.jar into the lib directory and  
> restarted Cocoon.  Created a page that looks like this:
>
> <?xml version="1.0"?>
>
> <xsl:page language="java"
>   xmlns:xsp="http://apache.org/xsp"
>   xmlns:sendmail="http://apache.org/cocoon/sendmail/1.0"
> >
>
> <xsp:structure>
>   <xsp:include>java.util.*</xsp:include>
> </xsp:structure>
>
> <page>
>   <page-title>Confirmation</page-title>
>   <content>
>     <title>Hello!</title>
>     <paragraph>
>       An email has been sent to you!
>     </paragraph>
>
>   <sendmail:send-mail>
>     <sendmail:charset>ISO-8859-1</sendmail:charset>
>     <sendmail:smtphost>localhost</sendmail:smtphost>
>     <sendmail:from>linczakjw@hiram.edu</sendmail:from>
>     <sendmail:to>linczakjw@hiram.edu</sendmail:to>
>     <sendmail:subject>This is a test</sendmail:subject>
>     <sendmail:body>This is a test email from XSP</sendmail:body>
>   </sendmail:send-mail>
>
>   </content>
> </page>
>
> </xsp:page>
>
>
> I added a pipeline in there and away I went to the URL, but I get this  
> as an error:
>
> Language Exception
> org.apache.cocoon.ProcessingException: Language Exception:  
> org.apache.cocoon.components.language.LanguageException: Error  
> compiling test_xsp: ERROR 1  
> (org/apache/cocoon/www/lenya/pubs/home/content/authoring/calendar/ 
> test_xsp.java): ... String cat_clause = ""; // start error (lines  
> 274-274) "Syntax error on keyword "if"; "boolean", "void", "byte",  
> "short", "int", "long", "char", "float", "double", "Identifier",  
> "interface", "class" expected" if (cat == null){ // end error  
> cat_clause = ""; }else{ cat_clause = " and category_id = " + cat; ...  
> Line 274, column 0: Syntax error on keyword "if"; "boolean", "void",  
> "byte", "short", "int", "long", "char", "float", "double",  
> "Identifier", "interface", "class" expected
>
>
> Am I missing something?  I added the builtin-logicsheet as well, so I  
> don't think I was missing anything...


Outside of the fact that the I had xsl:page at the top instead of  
xsp:page, once that was fixed I received the following error:

Could not transform  
resource://org/apache/cocoon/components/language/markup/xsp/java/ 
sendmail.xsl

I added this to cocoon.xconf:

         <!-- Sendmail configuration -->
         <builtin-logicsheet>
           <parameter name="prefix" value="sendmail"/>
           <parameter name="uri"  
value="http://apache.org/cocoon/sendmail/1.0"/>
           <parameter name="href"  
value="resource://org/apache/cocoon/components/language/markup/xsp/ 
java/sendmail.xsl"/>
         </builtin-logicsheet>

Am I missing anything?

Jon


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org