RE: xsp:structure - question
OK. Still not running. web.xml: init-param param-nameextra-classpath/param-name param-valueWEB-INF/classes/fraud_management/param-value /init-param java-Class in .../cocoon/Web-Inf/classes/fraud_managment: 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:includefraud_management.execute_report/xsp:include /xsp:structure results xsp:logic execute_report er = new execute_report(); String hello = er.get_fraud(); option xsp:logic xsp:attribute name =blaxsp:exprhello/xsp:expr/xsp:attribute /xsp:logic /option /xsp:logic /results /xsp:page I have a feeling that I don't get the entries in the web.xml param-valueWEB-INF/extra-classes1:/[YOU-ABSOLUTE-PATH-TO]/own.jar/param-value Do I have to insert additionally the class name? e.g. for Windows systems param-valueWEB-INF/classes/fraud_managment;C:/Apache.../fraud_managment/execute_report.class/param-value 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=blahello/xsp:attribute change the last line to: xsp:attribute name =blaxsp:exprhello/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/apache/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
Re: xsp:structure - question
From: [EMAIL PROTECTED] OK. Still not running. web.xml: init-param param-nameextra-classpath/param-name param-valueWEB-INF/classes/fraud_management/param-value /init-param This is not required usually. java-Class in .../cocoon/Web-Inf/classes/fraud_managment: correct. package fraud_management; class execute_report { Is your class 'public'? 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:includefraud_management.execute_report/xsp:include /xsp:structure results xsp:logic execute_report er = new execute_report(); String hello = er.get_fraud(); option xsp:logic xsp:attribute name =blaxsp:exprhello/xsp:expr/xsp:attribute /xsp:logic /option /xsp:logic /results /xsp:page I have a feeling that I don't get the entries in the web.xml param-valueWEB-INF/extra-classes1:/[YOU-ABSOLUTE-PATH-TO]/own.jar/param-v alue Do I have to insert additionally the class name? e.g. for Windows systems param-valueWEB-INF/classes/fraud_managment;C:/Apache.../fraud_managment/ex ecute_report.class/param-value No, you should be able to access your classes if they are placed in WEB-INF/classes as .class files or if they are placed in WEB-INF/lib as a .jar archive. Konstantin 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=blahello/xsp:attribute change the last line to: xsp:attribute name =blaxsp:exprhello/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/apache/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
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=blahello/xsp:attribute change the last line to: xsp:attribute name=blaxsp:exprhello/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/apache/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]