Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 82120 invoked by uid 500); 30 Aug 2002 12:42:01 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 82109 invoked from network); 30 Aug 2002 12:42:01 -0000 Message-ID: <3D6F67EF.1020406@verizon.net> Date: Fri, 30 Aug 2002 08:41:19 -0400 From: Vadim Gritsenko User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: cocoon-users@xml.apache.org CC: glaplanche@jouve.fr Subject: Re: Try-catch error References: <003e01c24cd9$a8018000$433ca8c0@john> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Ganael LAPLANCHE wrote: > Hi ! > > I'm trying to include a very basic XSP part to my pages, but if I > insert a try-catch, I get this error message : > > > *type* fatal > > *message* _Language Exception_ > > *description* _org.apache.cocoon.ProcessingException: Language > Exception: org.apache.cocoon.components.language.LanguageException: > Error compiling test_2_xml: Line 66, column 2: illegal start of type > Line 49, column 11: class > org.apache.cocoon.www.docs.test.docs.test_2_xml should be declared > abstract; it does not define method generate() in interface > org.apache.cocoon.generation.Generator Line 0, column 0: 2 errors _ > > Here is the source code : > > > try > { > public static String foo = "Hello"; Peek a good basic Java book, and read it. When you done, proceed with writing Java in XSPs. > } > catch(Exception e) > { > } > > > It works without the try-catch structure... but doesn't with... Which means you have xsp:logic as the first tag in xsp:page (no content tag). This logic goes into class level, not method level. If you want this logic to be on method level, put xsp:logic inside document body tag. PS Also, read available XSP docs and study samples. Vadim > Could someone help me ? What is this method generate() ? How do I > declare my xml file abstact ??? I'm lost... > > Thank you, > Marty. --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: