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 : > > <xsp:logic> > 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) > { > } > </xsp:logic> > > 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. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>