Hi, (I did read your message, but thought that "remove arguments" meant remove the "args" that was in main(String[] args)" : I've got the point now it must be absolutly identical -empty- to the call) The code did compile in javac, but not in cocoon2.0b2 : it said: "Exception java.io.IOException must be caught, or it must be declared in the throws clause of this method" I spent the day in exceptions tutorials and ended up with: class make_xsl { public void main() { try { FileReader entree = new FileReader("a1.html"); FileWriter sortie = new FileWriter("output.txt"); int c; while ( (c = entree.read()) != -1 ) sortie.write(c); sortie.close(); entree.close(); } catch (FileNotFoundException e) { System.err.println("CheckedIODemo: " + e); System.exit(-1); } catch (java.io.IOException e) { System.err.println("CheckedIODemo: " + e); System.exit(-1); } catch (NoSuchMethodError e) { System.err.println("CheckedIODemo: " + e); System.exit(-1); } catch (Exception e) { System.err.println("CheckedIODemo: " + e); System.exit(-1); } } } PROBLEM: -it only works if a1.html (the input file) is in Tomcat/bin -it makes cocoon and tomcat go down (404 for all pages in localhost, even Tomcat welcome page) if there is no a1.html in Tomcat/bin or if I try a url http://localhost/cocoon/a1.html to get a1.html from an xsp generation. I guess I'm not a java master yet. Thanks for your help. Cib France, Bordeaux, xml and gay pride. ----- Original Message ----- From: "Christian Haul" To: Cc: "cib" Sent: Saturday, September 22, 2001 10:03 AM Subject: Re: abstract class > Cib, > > I'd really appreciate it if you'd care to read me responses and don't > post the same question over and over. > > If you change your code the code as indicated it compiles OK. > > On 22.Sep.2001 -- 04:42 AM, cib wrote: > > > > > > > language="java" > > xmlns:xsp="http://apache.org/xsp" > > xmlns:esql="http://apache.org/cocoon/SQL/v2"> > > > > > > java.io.* > > > > > > > > class make_xsl { > public void main( ) throws IOException { > // before: public void main(String[]) throws IOException { > > > FileReader entree = new > > FileReader(("http//:localhost/cocoon/test/make.xsl")); > > FileWriter sortie = new FileWriter("output.txt"); > > int c; > > while ( (c = entree.read()) != -1 ) > > sortie.write(c); > > sortie.close(); > > entree.close(); > > } > > } > > > > > > > > > > > > make_xsl anObject = new make_xsl(); > > anObject.main(); > > > > > > > > If you see this, it works. > > > > > > > > Chris. > > -- > C h r i s t i a n H a u l > haul@informatik.tu-darmstadt.de > fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08 > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. > > To unsubscribe, e-mail: > For additional commands, e-mail: > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: