This would be much easier if you include what happens when it doesn't work. Is there an error message? If so, what does it say the problem is? Does it run but produce unexpected content? etc.
More below: > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 16, 2003 7:46 AM > To: [EMAIL PROTECTED] > Subject: RE: <xsp:structure> - question > > OK. Still not running. > > web.xml: > <init-param> > <param-name>extra-classpath</param-name> > <param-value>WEB-INF/classes/fraud_management</param-value> > </init-param> You don't need the extra-classpath in web.xml in this case, but I can't imagine that being your problem. > > java-Class in ".../cocoon/Web-Inf/classes/fraud_managment": OK, but make sure that's WEB-INF. Shouldn't matter on windows though. > package fraud_management; > class execute_report { > > public String get_fraud() > { > String hello = "Servus"; > return hello; > } > } > > xsp: > <?xml version="1.0" encoding="ISO-8859-1"?> > <xsp:page language="java" > xmlns:xsp="http://apache.org/xsp"> > > <xsp:structure> > <xsp:include>fraud_management.execute_report</xsp:include> > </xsp:structure> > > <results> > <xsp:logic> > execute_report er = new execute_report(); > String hello = er.get_fraud(); > <option> Get rid of this xsp:logic > <xsp:logic> > <xsp:attribute name > ="bla"><xsp:expr>hello</xsp:expr></xsp:attribute> And this closing tag (obviously): > </xsp:logic> > </option> > </xsp:logic> > </results> > </xsp:page> > xsp:logic denotes a section of pure java logic (although some xsp tags are appropriate inside). > I have a feeling that I don't get the entries in the web.xml > >> > <param-value>WEB-INF/extra-classes1:/[YOU-ABSOLUTE-PATH-TO]/own.ja > r</param-value> > Do I have to insert additionally the class name? e.g. for Windows systems > <param-value>WEB-INF/classes/fraud_managment;C:/Apache.../fraud_ma > nagment/execute_report.class</param-value> No, any classes you place under WEB-INF/classes or jars in WEB-INF/lib are available to cocoon - after you restart cocoon. If you've not restarted since adding your classes make sure to do so. > > Thanks > Jonny > > > ------------------------------------------------------------------ > ---------------------------------- > > This electronic message contains information from the mmo2 plc Group which > may be > privileged or confidential. The information is intended to be for the use > of the > individual(s) or entity named above. If you are not the intended recipient > be aware > that any disclosure, copying, distribution or use of the contents of this > information > is prohibited. If you have received this electronic message in error, > please notify > us by telephone or email (to the numbers or address above) immediately. > > > > |---------+----------------------------> > | | "Geoff Howard" | > | | <cocoon@leveragew| > | | eb.com> | > | | | > | | 01/15/03 07:37 PM| > | | Please respond to| > | | cocoon-users | > | | | > |---------+----------------------------> > > >----------------------------------------------------------------- > -------------------------------------------------------------| > | > | > | To: <[EMAIL PROTECTED]> > | > | cc: > | > | Subject: RE: <xsp:structure> - question > | > > >----------------------------------------------------------------- > -------------------------------------------------------------| > > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, January 15, 2003 11:45 AM > > To: [EMAIL PROTECTED] > > Subject: <xsp:structure> - question > > > > > > Hi, > > > > I want to include my own Java-Class in my XSP-Page > > <snip/> > > > <?xml version="1.0" encoding="ISO-8859-1"?> > > <xsp:page language="java" > > xmlns:xsp="http://apache.org/xsp"> > > > > <xsp:structure> > > <xsp:include> <!-- Meine Klasse "execute_report" --></xsp:include> > > </xsp:structure> > > correct. > > > > > <results> > > <xsp:logic> > > String hello = null; > > hello = get_g(); > > <option> > > <xsp:logic> > > <xsp:attribute name="bla">hello</xsp:attribute> > change the last line to: > <xsp:attribute name > ="bla"><xsp:expr>hello</xsp:expr></xsp:attribute> > > You don't state what "doesn't work" but if you mean the page returned only > a > literal attribute bla="hello" then this should be your only problem from > what I can see. > > > > </xsp:logic> > > </option> > > </xsp:logic> > > </results> > > </xsp:page> > > > > > > Where do I have to place my Java-Class. Under .../cocoon/Web-Inf/classes > > (where I hava placed it right now!)? > > yes, that works - make sure that if your class is declared part of a > package > that you replicate the directory structure under WEB-INF/classes (many > people seem to make that mistake) > > > How do I call methods, like my method get_g()? > > The same way you would from any java class (your usage above should work > fine) since XSP generates and compiles a java file the first time > your page > is executed. I would highly recommend going to take a look at it. It's > under your servlet container's work directory - most likely > $TOMCAT_HOME/work/Standalone/localhost/cocoon/cocoon-files/org/apa > che/cocoon > > /www/jonny/filename_xsp.java - you may have to browse around for > it if I've > made incorrect guesses. > > > HTH, > Geoff Howard > > > --------------------------------------------------------------------- > 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]> > > > --------------------------------------------------------------------- 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]>