AW: problems with a real mobile phone
ho, if you haven't setup a serializer for wml (specifying the doctype, etc.), then you should do so. that would look something like: ... map:serializer logger=sitemap.serializer.wml mime-type=text/vnd.wap.wml name=wml src=org.apache.cocoon.serialization.XMLSerializer doctype-public-//WAPFORUM//DTD WML 1.1//EN/doctype-public doctype-systemhttp://www.wapforum.org/DTD/wml_1.1.xml/doctype-system encodingISO-8859-1/encoding /map:serializer ... -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von [EMAIL PROTECTED] Gesendet: Montag, 30. Juni 2003 13:09 An: [EMAIL PROTECTED] Betreff: problems with a real mobile phone Hi.. I'm trying to access my cocoon application on my computer with a real mobile device (a panasonic GD67 GPRS) but I'm always getting 'unsupported content type'. With emulators it all worked properly but now I'm getting this problem on a real mobile. I'm using custom generators to create XML and then I'm using xsl to convert the xml into WML. I'm managing to connect to the application with my mobile but it seems that the problem is that no proper WML is given out. Maybe I have to arrange something in the serializer of the sitemap for wml? I would appreciate any hints and help.. I'm using Jdk 1.4.1 , Tomcat 4.1.18, Cocoon 2.0.4 (The mobile's user agent string is: Panasonic-GAD67/1.0 UP.Browser/5.0.3.5 (GUI)) -- - Donate to YMCA's Help The Homeless Campaign at http://shop.di-ve.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Dynamically build xmlforms
hej morten, I don't see a reason why you shouldn't be able to dynamically generate your xmlforms. write corresponding pipelines for the xmlform descriptions, apply the xmlform transformations and you should be set. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von morten svanæs Gesendet: Dienstag, 10. Juni 2003 17:58 An: [EMAIL PROTECTED] Betreff: Dynamically build xmlforms Hi, I'm trying to find out how to build form elements dynamically with the xmlform system. I have a xforms file describing the the form , but I have an order form that may contain over 100 lines ( 100 textboxes ) so I wan't they to be builded on demand. Is there some way to maniupulate a xmlform or must it be defined in a file ? Morten Svanaes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Dynamically build xmlforms
yes, just create pipelines that generate xml like what you currently have in static files. something like this: map:pipeline map:match pattern=my-xmlform.xml map:generate type=serverpages src=my-xmlform.xsp/ !-- transformations -- ... map:serialize type=xml/ /map:match /map:pipeline map:pipeline map:match pattern=my-xmlform.html map:generate src=cocoon:/my-xmlform.xml/ map:transform type=xmlform/ !-- other transformations -- ... map:serialize type=html/ /map:match /map:pipeline or the simple variant: map:pipeline map:match pattern=my-xmlform.html map:generate type=serverpages src=my-xmlform.xsp/ !-- transformations -- ... map:transform type=xmlform/ !-- other transformations -- ... map:serialize type=html/ /map:match /map:pipeline -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von morten svanæs Gesendet: Dienstag, 10. Juni 2003 20:21 An: [EMAIL PROTECTED] Betreff: Re: Dynamically build xmlforms Hei Marco, maybe I'm just making it more difficult than it is. I guess I could make some xsp scripts that writes the forms on the fly. Is that what you meant ? Morten Svanaes - Original Message - From: Marco Rolappe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 2:13 AM Subject: AW: Dynamically build xmlforms hej morten, I don't see a reason why you shouldn't be able to dynamically generate your xmlforms. write corresponding pipelines for the xmlform descriptions, apply the xmlform transformations and you should be set. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von morten svanæs Gesendet: Dienstag, 10. Juni 2003 17:58 An: [EMAIL PROTECTED] Betreff: Dynamically build xmlforms Hi, I'm trying to find out how to build form elements dynamically with the xmlform system. I have a xforms file describing the the form , but I have an order form that may contain over 100 lines ( 100 textboxes ) so I wan't they to be builded on demand. Is there some way to maniupulate a xmlform or must it be defined in a file ? Morten Svanaes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: logic in sitemap.xmap
hi hill, geoff refers to the flow layer (the layer supposed to control the web app flow). check out the cocoon wiki (http://wiki.cocoondev.org/) and search for 'flow'. the language for the flow layer is basically pluggable (though it has to support continuations), it defaults to javascript. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Hill Karimov Gesendet: Dienstag, 3. Juni 2003 07:27 An: [EMAIL PROTECTED] Betreff: Re: logic in sitemap.xmap I use cocoon 2.1 dev. How more complex logics I can use? Is there some docs, examples or links? What is 'check out flow' ? Could you give me some example? Thanks a lot, Hill --- Geoff Howard [EMAIL PROTECTED] wrote: Complex logic is intentionally excluded. What version are you using? 2.0 you are limited to Actions, Selectors and Matchers. In 2.1 you have the same, but check out flow which allows more complex logic. Geoff At 12:21 PM 6/2/2003, you wrote: Hi all, Is possible to use complex logic in sitemap? How I know I can use this code: map:select type=request-attribute map:parameter name=attribute-name value=cocoon-action-run/ map:when test=true ... for logic: if ( true.equals(request.getAttribute(cocoon-action-run)) ) { ... so now I want more, how can I check for null: if ( session.getAttribute(my-attribute) == null ) { ... What logics possible in sitemap? Any advice, tips, links, docs, Thanks a lot, Hill __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Newbie: yet ANOTHER problem: db access (NoValidConnectionException)
hi phil, please try com.mysql.jdbc.Driver as the driver class. that should work. your dburl seems to be correct. otherwise have a look into your mysql-connector jar. there should be a README inside. HTH -Ursprngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Phil Coultard Gesendet: Freitag, 4. April 2003 19:53 An: [EMAIL PROTECTED] Betreff: Newbie: yet ANOTHER problem: db access (NoValidConnectionException) Geoff: Thanks for all your help, you are a star. Big apologies from a newbie struggling with the basics of Cocoon... I have run into yet another problem which I don't seem to be able to get over... This time I am trying to connect to a MySQL db but get the message: ERROR (2003-04-04) 16:18.09:150 [sitemap.generator.serverpages] (/ltd_coultard/mount/com_coultard/tickets) Thread-10/tickets_xsp: Could not get the datasource org.apache.avalon.excalibur.datasource.NoValidConnectionException: No valid JdbcConnection class available in the error log file (tomcat/webapps/applicationname/WEB-INF/logs/error.log) when I run my xsp (enclosed below) I am also new to MySQL but am familiar with MSSQL so... I have: -made the db (called coultard) and made sure MySQL is running (it works fine solo) -put the MySQL db jar file (mysql-connector-java-3.0.6-stable-bin.jar) in C:\tomcat\common\lib -put the init-param for preloading the driver in web.xml as below. -defined the connection pool as below -attempted to run the xsp below I just spits out the title of the page and the session user value (which I have set via a login script) which would be consistent with their being no results except the same sql statement returns results if run directly in MySQL and the error message suggests to me it's not even getting that far. I am using: Win 98 JDK 1.3.1 Tomcat 4.1.24 Cocoon 2.0.4 MySQL 4.0.12Win jar file from: mysql-connector-java-3.0.6-stable What confuses me is that my book (Cocoon developers handbook) assures me that any errors preloading the driver or defining the connection pool will be thrown up when they are attempted (when the application starts) and shown in access.log and core.log respectfully. My entries in these two logs look fine: -- -- DEBUG (2003-04-04) 16:14.22:850 [access] (Unknown-URI) Unknown-thread/CocoonServlet: Trying to load class: org.gjt.mm.mysql.Driver -- -- -- -- DEBUG (2003-04-04) 16:14.24:010 [core.manager] (Unknown-URI) Unknown-thread/DefaultComponentFactory: logger attribute is core.datasources.coultard DEBUG (2003-04-04) 16:14.24:390 [core.manager] (Unknown-URI) Unknown-thread/ThreadSafeComponentHandler: ComponentHandler initialized for: org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource DEBUG (2003-04-04) 16:14.24:390 [core.manager] (Unknown-URI) Unknown-thread/ExcaliburComponentSelector: Adding org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource for hint [coultard] DEBUG (2003-04-04) 16:14.24:390 [core.manager] (Unknown-URI) Unknown-thread/ThreadSafeComponentHandler: ComponentHandler initialized for: org.apache.avalon.excalibur.component.ExcaliburComponentSelector -- -- And yet the error thrown when I try to load the page rather suggests to me that it can't find, or hasn't 'installed' the jar file properly... On the assumption that the preload and connection pool substantiations are working I have two theories (which I'm sure are probably wrong!) 1. That the param-valueorg.gjt.mm.mysql.Driver is incorrect. I got this value from my book but it is sadly for an older MySQL driver. I notice the first line of the README which comes with the jar file reads MySQL Connector/J 3.0.6 Stable (formerly MM.MySQL) and was wondering if this change in naming convention is mirrored somehow in it. I have been unable to find a reference for the correct string for this value (MySQL referring to read your servlet engine or application server vendor's documentation; Cocoon seemingly not making a reference to what these strings should be except for the commented WebSphere, Oracle and IBMWebshpere). Further attempts to substantiate this theory and attempts at guessing its value have been unfruitful. 2. That my reference to the dburl is incorrect. My db is physically located in C:\mysql\data\ and not under the tomcat/webapps dir so I was wondering if this had any influence on the matter. Thankfully Phil -- -- extract from tomcat/webapps/applicationname/WEB-INF/web.xml
AW: Newbie: yet ANOTHER problem: db access (NoValidConnectionException)
first, HTH = Hope That Helps ;-), my first name is marco, my mysql driver jar's name is 'mysql-connector-java-2.0.14-bin.jar' (which is in WEB-INF/lib). within the jar I have a file README. a snip from the section 'USAGE AND INSTALLATION': ... If you are going to use the driver with the JDBC DriverManager, you would use com.mysql.jdbc.Driver as the class that implements java.sql.Driver. You might use this name in a Class.forName() call to load the driver: Class.forName(com.mysql.jdbc.Driver).newInstance(); To connect to the database, you need to use a JDBC url with the following format ([xxx] denotes optional url components): jdbc:mysql://[hostname][:port]/[dbname][?param1=value1][param2=value2]. URL Parameters (can be passed as properties in DriverManager.getConnection() as well): ... so the driver class to load at startup in my case is com.mysql.jdbc.Driver. the README also lists URL parameters that can be supplied in the driver url. -Ursprngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Phil Coultard Gesendet: Freitag, 4. April 2003 22:40 An: [EMAIL PROTECTED] Betreff: RE: Newbie: yet ANOTHER problem: db access (NoValidConnectionException) Hi HTH, Thanks for your suggestion but that didn't work - I'm still getting the same message (even after re-starting the server and deleting the work directory). I have read the readme enclosed with the jar but to my uneducated eye it does not seem to enclose a ref to what I should call the class. Kind Regards Phil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 04 April 2003 19:20 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: AW: Newbie: yet ANOTHER problem: db access (NoValidConnectionException) hi phil, please try com.mysql.jdbc.Driver as the driver class. that should work. your dburl seems to be correct. otherwise have a look into your mysql-connector jar. there should be a README inside. HTH -Ursprngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Phil Coultard Gesendet: Freitag, 4. April 2003 19:53 An: [EMAIL PROTECTED] Betreff: Newbie: yet ANOTHER problem: db access (NoValidConnectionException) Geoff: Thanks for all your help, you are a star. Big apologies from a newbie struggling with the basics of Cocoon... I have run into yet another problem which I don't seem to be able to get over... This time I am trying to connect to a MySQL db but get the message: ERROR (2003-04-04) 16:18.09:150 [sitemap.generator.serverpages] (/ltd_coultard/mount/com_coultard/tickets) Thread-10/tickets_xsp: Could not get the datasource org.apache.avalon.excalibur.datasource.NoValidConnectionException: No valid JdbcConnection class available in the error log file (tomcat/webapps/applicationname/WEB-INF/logs/error.log) when I run my xsp (enclosed below) I am also new to MySQL but am familiar with MSSQL so... I have: -made the db (called coultard) and made sure MySQL is running (it works fine solo) -put the MySQL db jar file (mysql-connector-java-3.0.6-stable-bin.jar) in C:\tomcat\common\lib -put the init-param for preloading the driver in web.xml as below. -defined the connection pool as below -attempted to run the xsp below I just spits out the title of the page and the session user value (which I have set via a login script) which would be consistent with their being no results except the same sql statement returns results if run directly in MySQL and the error message suggests to me it's not even getting that far. I am using: Win 98 JDK 1.3.1 Tomcat 4.1.24 Cocoon 2.0.4 MySQL 4.0.12Win jar file from: mysql-connector-java-3.0.6-stable What confuses me is that my book (Cocoon developers handbook) assures me that any errors preloading the driver or defining the connection pool will be thrown up when they are attempted (when the application starts) and shown in access.log and core.log respectfully. My entries in these two logs look fine: -- -- DEBUG (2003-04-04) 16:14.22:850 [access] (Unknown-URI) Unknown-thread/CocoonServlet: Trying to load class: org.gjt.mm.mysql.Driver -- -- -- -- DEBUG (2003-04-04) 16:14.24:010 [core.manager] (Unknown-URI) Unknown-thread/DefaultComponentFactory: logger attribute is core.datasources.coultard DEBUG (2003-04-04) 16:14.24:390 [core.manager] (Unknown-URI) Unknown-thread/ThreadSafeComponentHandler: ComponentHandler initialized for: org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource DEBUG (2003-04-04) 16:14.24:390 [core.manager]
AW: memory on the status page
hi bert, the 119MB is the amount of memory used by the java process (i.e. heap and other resources). the -Xmx parameter specifies the maximum size of the heap, i.e. not the maximum size of memory used by the process. the other numbers tell you that the heap's current size is 64MB of which 19MB are free. to tune the memory parameters you can do the following: - enable logging for the store janitor (component that can flush stores/caches when memory gets low) - have it enabled long enough a period and have the webapp used - the store janitor logs the values mentioned (current total and free heap sizes) in a determined interval - later you can infer from those logs a more or less optimal value for the maximum heap size and you might want to restrict those memory settings to tomcat by setting CATALINA_OPTS instead of JAVA_OPTS -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Bert Van Kets Gesendet: Donnerstag, 3. April 2003 21:13 An: [EMAIL PROTECTED] Betreff: memory on the status page Hi all, I have Cocoon configured on a Windows2K server that is using JDK 1.3.1 and Tomcat 4.0.6. The JAVA_OPTS environment variable is set to -Xmx256m Tomcat is setup as a service and is using 119MB of memory. When I call the status page it tells me there's 64MB of memory and 19MB is available. What do these numbers actually represent? I have had loads of OutOfMemory problems, that seem to be solved now. I'd like to have a good and clean look on memory consumption. Can anybody explain this please? Thanks a lot, Bert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: include other xsp
hi magne, several possibilites: - have a look at the util.xsl logicsheet. it define several tags for including stuff (e.g. util:include-source, util:include-uri, ...) - CIncludeTransformer - XIncludeTransformer for the latter two you should be able to find docs. regarding the logicsheet I suggest having a look at it yourself. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Magne Skjeret Gesendet: Mittwoch, 2. April 2003 16:08 An: [EMAIL PROTECTED] Betreff: include other xsp Hi I have just started to use cocoon for my web applications, and going from jsp to xsp, there is one thing I really is missing. In jsp it was possible to use include statements to include other jsp into each other. Now, I just have a enoumous long xsp page. Is it possible to do a include with xsp? I have searched google and deja without any result. Magne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Managing users' permissions through the sitemap
hi amelie (always reminds me of that wonderful movie ;-), since I've not yet looked into/used the authentication framework, my first thought would be another authorization action. you supply the action with the respective parameters or let the action grab it from the session, etc. from within your action you check if the user is authorized. in case of non authorized access you return null, otherwise you return a map (empty or containing some sitemap parameters you want to set). then within the pipeline the delivery of the protected content goes into the action block (since what's here only gets executed if the action returned something not null). the pipeline steps for unauthorized access would follow the action block. example: ... map:match pattern=protected/**.xml map:act type=my-custom-auth-action map:parameter name=resource value={0}/!-- {0} - e.g. protected/foo.xml -- !-- execute following if action succeeded (returned non-null) -- map:generate src=protected-stuff/{../1}.xml/ ... map:serialize type=html/ /map:act !-- execute following if action didn't succeed (returned null) -- map:read mime-type=text/html src=unauthorized.html/ /map:match ... just an example off of the top of my head. regarding the term 'open the link'. just to prevent a misunderstanding; when the user clicks a link, this triggers a request which is to be handled (in this case by the sitemap). thus, you handle the request, but maybe differently depending on context (authorization in this case). so you either deliver a respective response to the request (as in the example above; authorized - deliver protected content, unauthorized - deliver error page), or you prevent the user from being able to click the link in the first place. for this you'd have to do the authorization earlier and adapt the response correspondingly. HTH -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Amelie Cordier Gesendet: Montag, 31. Marz 2003 22:36 An: [EMAIL PROTECTED] Betreff: Managing users' permissions through the sitemap Hi everybody, I have a problem, maybe simple, but I don't know how to deal with. I'm sure some of you have enough skills an experience to help me :) In my database, I've got a table managing the users' permissions. There's a global menu (for all the users). To know if an user is allowed to open a link from this menu, I need the user identifier (given by a session attribute) and an other identifier (like a request parameter which comes along with the link for example) Then, I want to check in my DB and : - if it's ok, open the link - if not, diplay an error message I guess I need to manage this on the sitemap level but I don't know what to use. Currently, I'm using an Authentication action which allows an logged user to access to the whole site but, as you can see, I want to be more restrictive for some sections of the site. Any idea would be welcome, thx in advance ! Amelie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: cocoon give empty page without error in log files
hi stavros, the empty page may stem from 'suboptimal' error handling which is fixed in CVS AFAIK. please take a look at your tomcat logs. any exceptions (in this case probably at least an IllegalStateException) should show up there. maybe the OutOfMemoryError you got is actually the problem. after checking that your store janitor settings are correct you could enable logging for the janitor and monitor the amount of free memory. this way you should be able to determine if that's your problem. HTH -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Stavros Kounis Gesendet: Samstag, 29. Marz 2003 10:25 An: [EMAIL PROTECTED] Betreff: cocoon give empty page without error in log files hi there is a problem with our cocoon instalation (cocoon 204) on tomcat 4.1.18) this instalation serve 6 site with subsitepmap for each one when tomcat start cocoon serve all 6 sites without problem or error in log files there is only one worning entry in core.log: WARN(2003-03-29) 09:52.37:587 [core.manager] (/xml/atlastrans.gr/) Thread-80/ExcaliburComponentSelector: Looking up component on an uninitialized ComponentLocator with hint [/home/vhost/atlastrans.gr/conf/sitemap.xmap] and THE PROBLEMS 1. after some requests (after some days maybe) and without to change or touch anything cocoon give not the correct html output aor an error page but an empty page with only body tag notice that cocoon answer corectly in ..:8080/cocoon/ the only solution to this problem is to stop start tomcat (stop start cocoon as webapp dont solve the problem) 2. some times if we change some content files (.xml) in a site cocoon when try to compile (again) the sitemap give an out of memory error page again we have to stop start tomcat (without touch anything else) to solve the problem any idea ? thnx -- Stavros S. Kounis Development Research Department Osmosis - networks consulting services web: http://www.osmosis.gr email:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Build In Eclipse
Title: Message AFAIK the cocoon source comes with its own ANT including custom tasks. that ANT is then used from the build script. you might be able to do the taskdef for the eclipse integrated ANT. but maybe that's already handled by a target that should exist in the build.xml; eclipse.project IIRC which is to generate the eclipse project file. -Ursprngliche Nachricht-Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]Im Auftrag von Mitchell CohenGesendet: Freitag, 28. Mrz 2003 15:27An: [EMAIL PROTECTED]Betreff: Build In Eclipse When I try to build cocoon using ANT from eclipse, I get the following error: "class XConfToolTask cannot be found" Does anybody know what I am doing wrong. Mitchell
possible thread problem..?
hi group, I don't really know if this is a problem or just seems like one. apart from experiencing quite high cpu usage I encountered log entries assoctiated to threads with very high thread numbers; ... INFO(2003-03-16) 10:37.51:408 [access] (/imode_de/galleries/nav(1,2).html) Thread-29876/CocoonServlet: 'imode_de/galleries/nav(1,2).html' Processed by Apa che Cocoon 2.0.4 in 492 milliseconds. INFO(2003-03-16) 10:37.53:694 [access] (/imode_de/galleries/top10(1,2,13,3 ).html) Thread-6/CocoonServlet: 'imode_de/galleries/top10(1,2,13,3).html' Proces sed by Apache Cocoon 2.0.4 in 410 milliseconds. INFO(2003-03-16) 10:37.54:391 [access] (/imode_de/cams/index.html) Thread- 29876/CocoonServlet: 'imode_de/cams/index.html' Processed by Apache Cocoon 2.0.4 in 688 milliseconds. INFO(2003-03-16) 10:38.01:133 [access] (/imode_de/) Thread-6/CocoonServlet : 'imode_de/' Processed by Apache Cocoon 2.0.4 in 392 milliseconds. INFO(2003-03-16) 10:38.02:446 [access] (/imode_de/galleries/cat(1).html) T hread-29876/CocoonServlet: 'imode_de/galleries/cat(1).html' Processed by Apache Cocoon 2.0.4 in 744 milliseconds. ... which disturbs me a bit and makes me think there might be some threading issue. there's also a problem when restarting/shutting down; tomcat doesn't cleanly stop, must be KILLed manually. config on server is: cocoon 2.0.4 tomcat 4.1.18 RH linux - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Cocoon logs
hi amelie, you may look at tomcat's log files ($TOMCAT_HOME/logs). but first make sure please that logging is enabled for the components you're using. i.e. for database actions, sql transformer, etc. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Amelie Cordier Gesendet: Sonntag, 16. März 2003 17:00 An: [EMAIL PROTECTED] Betreff: Cocoon logs Hi, I'm using cocoon with a postgresql database and there is a problem when I try to insert datas in my database. There is no information in the log files in the WEB_INF directory of cocoon. Is there any other log files where I can find help? Thanks in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: HostSelector
hi kevin, in case you copypasted it may just be a typo: map:selector logger=sitemap.selector.host name=host src=org.apache.cocoon.selection.HostSelector/ ^^^ element closed I wonder if you're not getting any other errors because of this. host name=poc1 value=poc1.mydomain.com/ host name=poc2 value=poc2.mydomain.com/ /map:selectors - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: HostSelector
hi geoff, I actually encountered the problem you mentioned and back then I just added a '*' to match the port string. from a quick look at the sources it seems to me that in the case of the selector things are different; it seems to be checking for a substring match. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Geoff Howard Gesendet: Samstag, 15. Marz 2003 05:11 An: [EMAIL PROTECTED] Betreff: RE: HostSelector Are you on port 80? If not, try adding :8080 or whatever port you're using to the end of your host string - I seem to recall that this is necessary with the host matcher, and it seems reasonable to guess the the selector to be the same. Geoff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: xsp resulting in empty xml doc and the error ComponentSelector could not find the component for hint [serverpages] in core.log
hi stephan, you might also want to take a look at tomcat's logs, if nothing appears in cocoon's logs. the 'empty' page is most probably because of 'buggy' error-handling (which I think is fixed by now). -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Stephan Kassanke Gesendet: Freitag, 14. März 2003 09:59 An: [EMAIL PROTECTED] Betreff: Re: xsp resulting in empty xml doc and the error ComponentSelector could not find the component for hint [serverpages] in core.log Hi, the xsl sheet is chosen dynamically (there are a lot of sections of metadata), so the parameter {1} is replaced in the sitemap. e.g. if you access metadata_overview.html, metadata_overview.xsl is chosen, metadata_general.html reults in metadata_general.xsl etc. But thnaks for the hint about the timestamps. i will have a look at it. Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Newbie
hi richard (again ;-), you may have a stylesheet for it, but from the sitemap.xmap attached I don't see it applied to your xml. another thing; you're not getting any images displayed, are you? just asking because I see your matches on *.gif and *.jpg not being defined within pipelines. the paths in the @src attributes of the readers are most probably wrong (I think the one starting with 'cocoon/' is definitely wrong. let's sort things out a bit; I assume when installing you put the cocoon war in tomcat's webapps directory ($TOMCAT_HOME/webapps). afterwards tomcat unpacked this war and you then had (and now have) cocoon in $TOMCAT_HOME/webapps/cocoon. let's call the latter $COCOON_HOME. in this directory you have a sitemap.xmap file which represents the _root sitemap_. I infer you created a subdirectory 'soundpool' within $COCOON_HOME and inserted a mount for this in your _root sitemap_. something like the following: map:match pattern=soundpool/** map:mount src=soundpool/ uri-prefix=soundpool/ /map:match what you need to understand here is _contexts_. each sitemap represents a different context. and all relative paths within sitemaps are evaluated against the context. examples (assuming a normal cocoon installation, i.e. reachable via http://localhost:8080/cocoon/): 1. localhost:8080/cocoon/foo.xml the 'cocoon' part maps to cocoon's servlet, thus cocoon gets a request for 'foo.xml'. since all the request processing starts from the root sitemap, it would have to be handled here. 2. localhost:8080/cocoon/soundpool/foo.xml assuming the mount of your 'soundpool' sitemap mentioned above. this time cocoon gets a request for 'soundpool/foo.xml'. since you have a matcher in your sitemap for anything starting with 'soundpool' (map:match pattern=soundpool/**) this request is handed to your 'soundpool' sitemap/context (via the map:mount). note here that before being processed by your sub-sitemap/context the prefix 'soundpool' is removed from the request uri (because of the @uri-prefix=soundpool); 'soundpool/foo.xml' becomes 'foo.xml' and is now handed to your sub- sitemap for processing. 3. localhost:8080/cocoon/soundpool/foo/bar/baz.xml same assumptions as in 2. 'foo/bar/baz.xml' is handed to your sub-sitemap. another important point for you to know here is the context's directory (which is the directory the sitemap.xmap for your sub-sitemap/context lives). when you have relative references in your sitemap (e.g. map:read mime-type=image/gif src=foo/bar.gif/) these are resolved against the subsitemap's/context's directory. so, taking your attached sitemap (which I assume lives in $COCOON_HOME/soundpool): !-- images Readers -- map:match pattern=*.gif map:read mime-type=image/gif src=cocoon/soundpool/images/{1}.gif/ /map:match map:match pattern=soundpool/images/*.jpg map:read mime-type=image/jpg src=images/{1}.jpg/ /map:match 1. localhost:8080/cocoon/soundpool/foo.gif same assumptions as in examples above. 'foo.gif' is handed to your sub-sitemap/context. your first matcher matches.then the reader tries to read from 'cocoon/soundpool/images/foo.gif' (the {1} was replaced with the text the '*'matched). this finally resolves (against your context's dir) to $COCOON_HOME/soundpool/cocoon/soundpool/images/foo.gif. so this file would have to exist for things to work. but I assume that you have an 'images' directory in your soundpool folder. thus, your relative references to the image files must be relative to your context's dir. for the .jpgs this is right already. but as mentioned at the beginning, the sitemap snippet above must go into a map:pipeline element. one last point regarding the matching; the single '*' only matches 'flat' file names, e.g. foo.gif, bar.gif, but not paths like foo/bar.gif or foo/bar/baz.gif. though I just tell you before you run into problems. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Richard Cunliffe Gesendet: Freitag, 14. Marz 2003 09:42 An: [EMAIL PROTECTED] Betreff: RE: Newbie Dave and Joerg, I am also having problems with going onto the 3rd web page. When the link is clicked only the XML displays, despite there being a style sheet for it. I have a attached my sitemap so you can check my pipelines. The !-- soundpool Database (PC Quick Queries) -- is the third page deep. Richard. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: wml generator ?
as was already mentioned WML is an XML application, thus you 'generate' it via the normal 'file' generator. afterwards, conversion to e.g. xhtml should be possible. for the .wbmps you could write a simple converting Reader, for example. JAI has support for .wbmps, so you could read them in and write out .jpgs, for example. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von zze-MORY Nicolas FTRD/DMI/REN Gesendet: Freitag, 14. März 2003 13:08 An: [EMAIL PROTECTED] Betreff: RE: wml generator ? my source is for example http://www.toto.fr/cinema/titi.wml with pictures .wbmp and i have understand that WML is an xml application and with a good xsl i can generate a xhtml file. But i can't get the .wbmp any idea ? -Original Message- From: Niclas Hedhman [mailto:[EMAIL PROTECTED] Sent: vendredi 14 mars 2003 12:00 To: [EMAIL PROTECTED] Subject: Re: wml generator ? On Friday 14 March 2003 18:16, Antonio Gallardo wrote: I already checked some mail from http://w3c.org. it seems like we need to find a converter from WML - XML. WML is an XML application !!! Just like XHTML is an XML application. i.e. If you have it in print I can use a Xerox to convert from WML to XML, it already is... What do you mean by a WML generator?? What is the source, files, URLs or attachments in mail messages? Anybody see the light??? Niclas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: jsessionid=CE76835B0559A701E89C2CD01D1DEF88
that's a servlet container issue, not a cocoon one. just don't use sessions in your app (I assume you don't need to) and the JSESSIONID should be gone. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Stavros Kounis Gesendet: Freitag, 14. Marz 2003 13:24 An: [EMAIL PROTECTED]; [EMAIL PROTECTED] Betreff: Re: jsessionid=CE76835B0559A701E89C2CD01D1DEF88 this option is inside sub-sitemap where i declare locale action ? On Fri, 14 Mar 2003, Emmanuil Batsis (Manos) wrote: Configuration issue; you probably using URL rewriting instead of cookies to handle user (HTTP) sessions. Stavros Kounis wrote: in http://www.portovistonis.gr some time when i call the url (there is a redirection in apache from / to /xml/ [worp connector]) i get in url somenthing like : jsessionid=CE76835B0559A701E89C2CD01D1DEF88 can anyone explain me where and why this session ID is generated? thnx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Stavros S. Kounis Development Research Department Osmosis - networks consulting services web: http://www.osmosis.gr email:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: empty session attribute ?
as you were probably already told: actions are executed at pipeline assembly time, i.e. before the pipeline processing (including your transformer) starts. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Lionel Crine Gesendet: Donnerstag, 13. Marz 2003 16:02 An: [EMAIL PROTECTED] Betreff: empty session attribute ? I have a Transformer which store an object into the session and thean Action, but the Action only get the name of the attribute, why ? Here is my action code : public class MyAction extends AbstractAction implements ThreadSafe { public Map act (Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters parameters) throws Exception { Request req = ObjectModelHelper.getRequest(objectModel); if (req == null) { getLogger ().debug (No request object); return null; } /* check session validity */ Session session = req.getSession (); if (session == null) { getLogger ().debug (No session object); return null; } else { System.err.println(Session is on); proprietary_Object res = (proprietary_Object)session.getAttribute(resultspace); res is empty, why that ? } return null; } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: dynamically load an action in a resource?
hi christopher, I remember other people trying to do this, but unfortunately the 'type' parameter is not dynamically resolved. this restriction doesn't only apply to map:act. other examples are map:serialize's type, which could also be useful. so in short; it's not possible your way. but I remember somethig similar (for cocoon 2.0.4 it's in scratchpad); MultiAction/AbstractMethodAction, for which you could specify a 'sub-action'. you would define a class implementing the methods you want to invoke, configure the MultiAction/AbstractMethodAction in your sitemap with the method's names you want to invoke and finally invoke them with map:act type=my-multi-action method=fooBar/ which would call that MultiAction's method. please have a look at the respective docs?/sources. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Delis, Christopher E. Gesendet: Donnerstag, 13. März 2003 17:10 An: '[EMAIL PROTECTED]' Betreff: dynamically load an action in a resource? i'm a newbie cocoon2 developer who is trying to create a map:resource for commonly-used pipelines for use with my XMLForms. apparently (here, my newbie status begins to show prominently ;-), you can send map:parameters to map:resources quite easily via map:call (i've done this quite a bit already). also, i think you can even use map:actions within a map:resource. however, i can not dynamically load a map:action (which is the controller bean) within my map:resource like so: map:resource name=my-xmlform ... map:act type={target} ... /map:act ... /map:resource do map:act types have to be declared statically (i.e., a static value for type)? or, is this a bug? or, is this a design choice (for security reasons, etc.)? perhaps, this is a bad way of going about this. i suppose i could write a more generic action and have it do what i want, but i thought it would be good to know why i can't do this. TIA, chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: SQL and Stylesheets
hi richard, I had a quick look at the xsl and it seems to me you should be learning some XSL ;-) maybe go to http://www.w3schools.com and check out their XSL tutorial. they even use some kind of cd database in that tutorial. may be the right thing for you. to the xsl: the title element was supposed to go into the head, the tables and other stuff belong to the body (w3schools also has an html tutorial and tag reference). I haven't yet worked with the sql transformer, only with the esql logicsheet (which is supposed to be quite similar); that sql:* stuff doesn't like quite right either. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Richard Cunliffe Gesendet: Donnerstag, 13. Marz 2003 17:19 An: [EMAIL PROTECTED] Betreff: RE: SQL and Stylesheets OK I have got it working!! But its not coming out in the correct table format, e.g. The result im getting is: ParachutesWhats The Story Morning Glory Coldplay Oasis The result I want: Coldplay Parachutes Oasis The Story Morning Glory I have attached my xsl, what can anyone suggest? Thanks, Richard. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Problem writing a BetwixtTransformer
Title: Problem writing a BetwixtTransformer hi keith, I didn't analyze the code and can't tell you directly where the bug is but... I also got a similar exception which seemed to be an XSLT/xalan exception but actually was an exception thrown from within a custom transformer. somehow the stack trace seems to have been lost. you might want to debug your trasformer to find the actual bug. -Ursprüngliche Nachricht-Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]Im Auftrag von Lyall, KeithGesendet: Mittwoch, 12. März 2003 14:16An: '[EMAIL PROTECTED]'Betreff: Problem writing a BetwixtTransformer Hi, I am trying to write a BetwixtTransformer based on CastorTransformer but have run into a problem. Everything appears to be working Ok according to my logging messages until the XML is serialized when I get this error: java.lang.RuntimeException: java.lang.NullPointerException at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3231) at java.lang.Thread.run(Thread.java:536)
AW: Problem writing a BetwixtTransformer
Title: Problem writing a BetwixtTransformer hi keith, which exceptions did you catch? AFAIK NullPointerException and RuntimeException are unchecked exceptions, so they most probably inhreit from Throwable not from Exception. please make sure that you are catching those Throwables (for debugging purposes). other ways, well... I saw that you already have debug log statements; you can decorate the other methods (maybe even at multiple places; kind of checkpoints) with debug log statements. then after the exception(s) are thrown you should be able to estimate from the logs where approximately the exception is thrown in your code. but a better alternative maybe to just try to debug the transformer via jdb or your favourite IDE debugger; start tomcat (I assume tomcat as your servlet container) in debug/jpda mode, attach to that debug session with your debugger, set breakpoints in your transformer source (maybe do this as first step) and then trigger a transformation so your transformer gets called (setup details etc. may vary). then you should be able to quickly find the bug. -Ursprüngliche Nachricht-Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]Im Auftrag von Lyall, KeithGesendet: Mittwoch, 12. März 2003 18:24An: '[EMAIL PROTECTED]'Betreff: RE: Problem writing a BetwixtTransformer Hi Marco, I tried putting try / catch blocks round all of the code in the methods I have overridden but no exceptions were caught. Do you suggest any other ways to debug a transformer? Keith.
AW: SQL RE: 2 (should be) easy questions
hi richard, well, what can I say... the xsl not only looks complicated, it looks like a mess ;-) you should really, really (really ;-) read up on the technologies you're trying to use. 1. what do you need the DTD for? 2. why are you trying to handle elements which are supposed to be handled by the sql transformer (which in this case couldn't even work because you're not matching the correspondig namespace)? 3. in which sequence are transformations applied? (sql transformer - your stylesheet, or vice versa?) just a guess; starting from your database.xml you want to have an sql query executed and the query results formatted by your database.xsl. then please do it like that. generate (database.xml) - transform (sql) - transform (database.xsl) - serialize (html?) you're not even trying to handle the query results (in database.xml I only see a query defined, but the results are handled nowhere). you seem to be assuming the results are coming from somewhere and are trying to handle them within your stylesheet. please read the accompanying docs; it would save you and those trying to help you time and struggles. just to get you started; to handle the results you would insert appropriate statements within the sql:execute-query element to generate e.g. elements which contain the data you want to transform/style/serialize; example (top off my head, based on esql logicsheet); ... sql:execute-query sql:query SELECT artistbandname, generalmusictitle FROM artistband /sql:query sql:results sql:row-results mydata namesql:get-string column="artistbandname"//name titlesql:get-string column="generalmusictitle"//title /mydata /sql:row-results /sql:results /sql:execute-query ... then after the sql transformer step the corresponding data will be available in the SAX event stream which you can then handle from within your stylesheet. ok, let's get to the stylesheet: ?xml version="1.0" encoding="UTF-8"? xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sql="http://apache.org/cocoon/SQL/2.0" xsl:template match="/" html head/ body img src=""/ titlesoundpool/title the title element should go into the head element. xsl:for-each select="/" what is this supposed to do? for each document root? there's only one document root. table border="0" width="99%" xsl:if test="position()=1" xsl:text disable-output-escaping="yes"lt;tbodygt;/xsl:text /xsl:if is that if test on the document root? why aren't you just creating the table body via tbody? tr td align="right" xsl:for-each select="pda" span xsl:for-each select="title" span span xsl:apply-templates/ /span /span /xsl:for-each /span /xsl:for-each /td /tr nesting mess, huh? ;-) xsl:if test="position()=last()" xsl:text disable-output-escaping="yes"lt;/tbodygt;/xsl:text /xsl:if /table again, why not /tbody? snip/ !-- MySQL Query -- here you would handle the data produced by the sql transformer step. snip/ my last advice; read the docs, please. -Ursprngliche Nachricht-Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]Im Auftrag von Richard CunliffeGesendet: Mittwoch, 12. Mrz 2003 18:47An: [EMAIL PROTECTED]Betreff: RE: SQL RE: 2 (should be) easy questions Thorsten, Ok the following statement is trying to display the results of the query from the MySQL database in a table, I dont know if this is right. What are you trying to do with, anyway: xsl:for-each select="query"xsl:for-each select="execute-query"xsl:apply-templates//xsl:for-each/xsl:for-each The code looks complicated, because I am using XML Spy designer which allows you to put together your style sheet visually, with the aid of the DTD. The code above was the XML Spys way of trying to represent it from the DTD. I have attached my xml, xsl, and dtd for you to have a look at to get a better understanding. Many thanks, Richard.
AW: Logicsheets
just a sidenote; for testing/prototyping purposes you don't need to declare your logicsheets in cocoon.xconf. there's an XSP element you can use to declare a logicsheet within your xsp. example; xsp:page ... xsp:logicsheet location=context://logicsheets/my-cool-logicsheets.xsl/ ... !-- other stuff -- ... /xsp:page -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Amelie Cordier Gesendet: Montag, 10. März 2003 09:09 An: [EMAIL PROTECTED] Betreff: Re: Logicsheets Did you correctly decrlare the logicsheet in the cocoon.xconf ? Did you restart your server? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: xml header on delivered pages
hi nesto, you can use omit-xml-declarationyes/omit-xml-declaration in your serializer config. but IIUC the xml declaration should be in the markup, since it's xhtml. maybe you have to use a mime-type different from text/html? -Ursprüngliche Nachricht-Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]Im Auftrag von NestoGesendet: Montag, 10. März 2003 11:15An: [EMAIL PROTECTED]Betreff: xml header on delivered pages Hi! I'm designing the interface for mobile devices for a web portal using Cocoon. When I test my pages on a iPaq (with Pocket Internet Explorer) I get the correct page, withouterrors, but with del xml header visualized at the beginning of every page. ?xml version="1.0" encoding="ISO-8859-1"? (and then I get the right content...) Of couse I want to delete it!! Here I write the informations I think are importants for this problem: The XSPsthat are called in a pipeline for a iPaq http request (for example) have at the beginning the xml header (?xml version="1.0" encoding="ISO-8859-1"?), while the xsl doesn't. Then I deliver the markup with this serializer: map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html" name="xhtml-Transitional" pool-grow="2" pool-max="64" pool-min="2" src="" doctype-public-//W3C//DTD XHTML 1.0 Transitional//EN/doctype-public doctype-systemhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd/doctype-system encodingISO-8859-1/encoding /map:serializer I think the responsible of the writing of the xml header is the serializer, but I have no idea on how solve the problem. Thank you for your help! Nesto
AW: xsp:attribute for xsp-request:get-parameter
the xsp:attribute on the xsp-request:get-parameter is not possible; it's translated to java code and first executed when generation starts, i.e. when the xsp-request:get-parameter has already been translated. but you should be able to use following: xsp-request:get-parameternameparanamexsp:exprmycount/xsp:expr/name /xsp-request:get-parameter -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von [EMAIL PROTECTED] Gesendet: Freitag, 7. Marz 2003 09:38 An: [EMAIL PROTECTED] Betreff: xsp:attribute for xsp-request:get-parameter I try to get each text field (paranameX) where X are the text fields from the previous page : ... esql:query INSERT INTO Process_Parameters (pp_process, pp_pmid, pp_name) VALUES ..., 'xsp-request:get-parameterxsp:attribute name=nameparanamexsp:exprmycount/xsp:expr /xsp:attribute/xsp-request:get-parameter') ... xsp:logic mycount = mycount + 1; /xsp:logic ... This line : 'xsp-request:get-parameterxsp:attribute name=nameparanamexsp:exprmycount/xsp:expr /xsp:attribute/xsp-request:get-parameter') Gives me the following error : org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate(): java.lang.NullPointerException - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: xhtml serializers
WHICH error do you get? -Ursprüngliche Nachricht-Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]Im Auftrag von NestoGesendet: Freitag, 7. März 2003 17:12An: [EMAIL PROTECTED]Betreff: xhtml serializers Hi! How can I define a set of serializers in the sitemap, with which I can deliver xhtml basic or xhtml transitional or xhtml strict? I want to write in my pipelines somthing like this:map:match map:generate.../ map:transform.../ map:serializa type="xhtml-Transitional"/ /map:match I get an error If I write in the MAIN sitemap this 3 serializers: map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html" name="xhtml-Strict" pool-grow="2" pool-max="64" pool-min="2" src="" doctype-public-//W3C//DTD XHTML 1.0 Strict//EN/doctype-public doctype-systemhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd/doctype-system encodingISO-8859-1/encoding /map:serializer map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html" name="xhtml-Transitional" pool-grow="2" pool-max="64" pool-min="2" src="" doctype-public-//W3C//DTD XHTML 1.0 Transitional//EN/doctype-public doctype-systemhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd/doctype-system encodingISO-8859-1/encoding /map:serializer map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html" name="xhtml-Basic" pool-grow="2" pool-max="64" pool-min="2" src="" doctype-public"-//W3C//DTD XHTML Basic 1.0//EN/doctype-public doctype-systemhttp://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd/doctype-system encodingISO-8859-1/encoding /map:serializer I changed only the name of the serializer and the value of the parameters (DTD..). Do I have to change something else? Please, tell me if this is correct.. maybe the problem is not here! Thank you!!! Nesto
AW: Creating a variable map:act type?
hi derek, AFAIR the nodebuilder for map:act type nodes (and probably others) doesn't resolve those variable references for @type attributes. thus I think it's not possible. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Derek Hohls Gesendet: Mittwoch, 5. Marz 2003 14:25 An: [EMAIL PROTECTED] Betreff: Re: Creating a variable map:act type? Hmm - well, the whole point is to keep the flow logic inside the sitemap - the point is that I want a number of different types of actions to have the same end result (inside the most nested action is an XSP page doing the processing). I would like to know/understand if what I trying is possible or not? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Generating dynamic attributes in xsp
you could post relevant snippets from your page, logicsheet. and please check the logs, too. maybe there's an error somewhere else occurring. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Amelie Cordier Gesendet: Mittwoch, 5. März 2003 01:14 An: [EMAIL PROTECTED] Betreff: Re: Generating dynamic attributes in xsp Thanks, it works better but the returned string is : null :( as if the parameter didn't went through my custom logicsheet. May be a sitemap problem don't you think? By the way, what do you mean by in a place where it can safely expand to a xsp:expr/ ? thanks in advance Am. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: pass parameters to internal pipeline
although it's a bit clumsy, you *can* use request parameters with an internal pipeline; map:match pattern=test/ParamToAgg.xml map:generate src=cocoon:/test/getParam.xml?paramTest=a+param+value+9876/ map:serialize type=xml/ /map:match map:match pattern=test/getParam.xml map:generate src=myDev/test/dummy.xml/ map:transform src=myDev/xsl/getParam.xsl/ map:serialize type=xml/ /map:match you tell the xslt transformer to use request parameters and should then be able to access these from within your stylesheet. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von I-Lin Kuo Gesendet: Sonntag, 2. März 2003 13:18 An: [EMAIL PROTECTED] Betreff: pass parameters to internal pipeline Is it possible to pass parameters to an internal pipeline? This doesn't work for me: map:match pattern=test/ParamToAgg.xml map:generate src=cocoon:/test/getParam.xml map:parameter name=paramTest value=a param value 9876/ /map:generate map:serialize type=xml/ /map:match map:match pattern=test/getParam.xml map:generate src=myDev/test/dummy.xml/ map:transform src=myDev/xsl/getParam.xsl/ map:serialize type=xml/ /map:match P.S. Just to be sure that I haven't made any dumb mistakes, I've checked that I have a top-level xsl:param in my style sheet getParam.xsl which picks up the parameter from the following pipeline: map:match pattern=test/getParam.xml map:generate src=myDev/test/dummy.xml/ map:transform src=myDev/xsl/getParam.xsl map:parameter name=paramTest value=1234/ /map:transform map:serialize type=xml/ /map:match I-Lin Kuo, Ann Arbor, MI Macromedia Certified ColdFusion 5.0 Advanced Developer Sun Certified Java 2 Programmer Ann Arbor Java Users Group (http://www.aajug.org) _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Generating dynamic attributes in xsp
hi amelie (nice name ;-), instead of passing the 'name' parameter as an attribute of mytag:user you could use an element with the same name. the logicsheet-util logicsheet that comes with cocoon has templates that you can call to get a parameter. it checks for an attribute and an element with the name you specify. example markup: mytag:user namexsp-request:get-parameter name=user//name /mytag:user and your modified logicsheet would look something like this: ... xsl:include href=logicsheet-util.xsl/ xsl:param name=namespace-urihttp://your/namespace/uri/xsl:param !-- you know -- xsl:template match=mytag:[EMAIL PROTECTED] or name] xsl:variable name=name xsl:call-template name=get-string-parameter xsl:with-param name=namename/xsl:with-param xsl:with-param name=requiredtrue/xsl:with-param /xsl:call-template /xsl:variable ... /xsl:template ... and in your template you now accees the parameter via the variable. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Amelie Cordier Gesendet: Sonntag, 2. März 2003 14:27 An: [EMAIL PROTECTED] Betreff: Generating dynamic attributes in xsp Hello, I have an xsp page and a logicsheet where I have defined my own tags. In my logicsheet I use thinks like that : xsl:template match=mytag:[EMAIL PROTECTED] in order to perform specifics resquests on a database. This work perfectly if I use a tag like mytag:user name=foo/ in the xsp. But my problem is that I want the attribute name to be dynamically generated by using resquest-parameter. I mean, in my xsp page, I don't want to write foo but something like xsp-request:get-parameter name=user/ and I really don't know how to do it. Thanks for help Amelie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: Generating dynamic attributes in xsp
hi again, see inline... -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Amelie Cordier Gesendet: Sonntag, 2. März 2003 17:07 An: [EMAIL PROTECTED] Betreff: Re: AW: Generating dynamic attributes in xsp snipped-nice-name-et-al/ I can't achieve to make this work. Here is what I've done (I've changed some names because it was quite ambiguous) In my xsp : mytag:user yearxsp-request:get-parameter name=paramyear//year /mytag:user if you used this then the template below doesnt't match because your predicate says there must be an _attribute_ year. either leave the predicate out or also check for the corresponding element; xsl:template match=mytag:[EMAIL PROTECTED] or year] ... And in my xsl: xsl:include href=logicsheet-util.xsl/ xsl:param name=namespace-urihttp://mynamspace/mytag/xsl:param xsl:template match=mytag:[EMAIL PROTECTED] xsl:variable name=varyear xsl:call-template name=get-string-parameter xsl:with-param name=nameyear/xsl:with-param xsl:with-param name=requiredtrue/xsl:with-param /xsl:call-template /xsl:variable xsl:call-template name=mytesttemplate/ /xsl:template As soon as I had [EMAIL PROTECTED] on my match xsl:template, the xsl:call-template name=mytesttemplate/ instruction isn't executed anymore. that should be the predicate as mentioned above. in your example markup your mytag:user element didn't have the attribute (@year) so the template didn't match. Thanks Amelie ingen orsak. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: [modules] url path of pipeline
hi jakob, having a quick look I assume you could use RequestContextPathModule or RequestURIModule. please see your cocoon.xconf whether those modules are declared. you may have to add declarations yourself. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Jakob Praher Gesendet: Sonntag, 2. März 2003 18:49 An: [EMAIL PROTECTED] Betreff: [modules] url path of pipeline Is there currently a module, sorry I hadn't had the time to look into the source files, which returns the url path for the pipeline, that processes it the request? map:pipeline map:match pattern=foo map:generate src=xy.xml / map:transform src=... map:parameter name=base-path value={anImputModule:pipelineUrlPath} / ^ /map:transform /map:match /map:pipeline thanks for your support -- Jakob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Generating dynamic attributes in xsp
hi again too :) :-D I agree with you but each time I add year or year or @year or @year or year, cocoon crashes with this error : // start error (lines 95-95) expected import // end error where does this one show up? on the page or in the logs? a bit more context around that error would be helpful to see what component threw it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Generating dynamic attributes in xsp
-Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von Amelie Cordier Gesendet: Sonntag, 2. März 2003 22:12 An: [EMAIL PROTECTED] Betreff: Re: AW: Generating dynamic attributes in xsp Ok. I'm using a cvs version of cocoon that I build about one week ago I've made a copy of the logicsheet-util in my application directory well, I'm using cocoon 2.0.4 so things might be different here. When I miss to declare xsl:param name=namespace-uri I have an error which says the namespace-uri parameter is missing so I think there is no problem with the logicsheet inclusion. The error above is the one displayed by my browser when I call my page (it's begin by error compiling user_xsp) In the error.log, I have the following : ... import org.apache.cocoon.components.language.markup.xsp.AbstractEsqlQuery; import org.apache.cocoon.components.language.markup.xsp.AbstractEsqlConnection; // start error (lines 95-95) identifier expected import // end error ... Line 95, column 13: identifier expected Line 0, column 0: 1 error seems like that import statement is the delinquent. maybe you fiddled around too much with those logicsheets? ;-) if you're doing sql/esql stuff within your custom logicsheet you should check that. don't know why that import statement wraps onto the next line. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: xsp-session and JAVA sessions
from within an XSP you can have a session be created by specifying the xsp:page's attribute @create-session=true (this is handled by the session logicsheet. this way a session will be created if it didn't yet exist. problems can occur with these sessions, though; sessions created by the session logicsheet from within the XSP are created when actual generation begins, i.e. after pipeline setup. thus, transformers in the pipeline (for which the XSP is the generator) won't see the session instantly. your safest bet is to create the session before the generator step (e.g. via an action) and have the generator access this one via the session logicsheet. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von [EMAIL PROTECTED] Gesendet: Mittwoch, 26. Februar 2003 12:38 An: [EMAIL PROTECTED] Betreff: xsp-session and JAVA sessions What is the difference between these two sessions??? : JAVA session: xsp:structure xsp:includeorg.apache.cocoon.environment.Session/xsp:include /xsp:structure ... xsp:logic Session session = null; ... session = request.getSession(true); session.setAttribute(user,user); ... /xsp:logic -- XSP SESSION: xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:session=http://apache.org/xsp/session/2.0; ... session:set-attribute name=userxsp:expruser/xsp:expr/session:set-attribute ... Is there a way to create and set a JAVA session and then get an attribute with session-xsp, like session:get-attribute name=user/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: WebSphere 5.0 access.log classload error
I'd rather tell you to RTFL ;-) the L is log. there you discover ClassNotFoundExceptions for classes 'For' and 'IBM'. looking at the virgin cocoon web.xml we find following: snippet !-- This parameter is used to list classes that should be loaded at initialization time of the servlet. Usually this classes are JDBC Drivers used -- init-param param-nameload-class/param-name param-value !-- For IBM WebSphere: com.ibm.servlet.classloader.Handler -- !-- For Database Driver: -- org.hsqldb.jdbcDriver !-- For parent ComponentManager sample: org.apache.cocoon.samples.parentcm.Configurator -- /param-value /init-param /snippet so, either that comment in param-value is no comment in your web.xml or your servlet engine doesn't handle it correctly. in the latter case removing/moving the comment should suffice. anyway, in your case it should then look something like: init-param param-nameload-class/param-name param-value com.ibm.servlet.classloader.Handler /param-value /init-param -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Auftrag von W. Nathaniel Mills, III Gesendet: Freitag, 21. Februar 2003 23:14 An: [EMAIL PROTECTED] Betreff: WebSphere 5.0 access.log classload error When starting the app server (WAS 5.0 on Win2K running cocooon 2.0.4 with a .war file I'd built using build.bat), I'm getting the following in the cocoon access.log -- any help is greatly appreciated (Reading the FM for install doesn't offer much advice for WebSphere... so please don't offer RTFM): DEBUG (2003-02-21) 17:11.06:825 [access] (Unknown-URI) Unknown-thread/CocoonServlet: getRealPath for /: c:\was50\installedApps\WNM3\cocoon_war.ear\cocoon.war DEBUG (2003-02-21) 17:11.06:825 [access] (Unknown-URI) Unknown-thread/CocoonServlet: URL for Root: file:/c:/was50/installedApps/WNM3/cocoon_war.ear/cocoon.war/ DEBUG (2003-02-21) 17:11.06:825 [access] (Unknown-URI) Unknown-thread/CocoonServlet: work-directory was not set - defaulting to c:\was50\temp\WNM3\server1\cocoon_war\cocoon.war\cocoon-files DEBUG (2003-02-21) 17:11.06:825 [access] (Unknown-URI) Unknown-thread/CocoonServlet: upload-directory was not set - defaulting to c:\was50\temp\WNM3\server1\cocoon_war\cocoon.war\cocoon-files\upload-dir DEBUG (2003-02-21) 17:11.07:065 [access] (Unknown-URI) Unknown-thread/CocoonServlet: cache-directory was not set - defaulting to c:\was50\temp\WNM3\server1\cocoon_war\cocoon.war\cocoon-files\cache-dir DEBUG (2003-02-21) 17:11.07:065 [access] (Unknown-URI) Unknown-thread/CocoonServlet: Using configuration file: /WEB-INF/cocoon.xconf DEBUG (2003-02-21) 17:11.07:065 [access] (Unknown-URI) Unknown-thread/CocoonServlet: show-time was not set - defaulting to false DEBUG (2003-02-21) 17:11.07:065 [access] (Unknown-URI) Unknown-thread/CocoonServlet: parent-component-manager was not set - defaulting to null. DEBUG (2003-02-21) 17:11.07:075 [access] (Unknown-URI) Unknown-thread/CocoonServlet: container-encoding was not set - defaulting to ISO-8859-1. DEBUG (2003-02-21) 17:11.07:075 [access] (Unknown-URI) Unknown-thread/CocoonServlet: form-encoding was not set - defaulting to null. DEBUG (2003-02-21) 17:11.07:136 [access] (Unknown-URI) Unknown-thread/CocoonServlet: Trying to load class: For WARN(2003-02-21) 17:11.07:136 [access] (Unknown-URI) Unknown-thread/CocoonServlet: Could not force-load class: For java.lang.ClassNotFoundException: For at java.net.URLClassLoader.findClass(URLClassLoader.java(Inlined Compiled Code)) at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionC lassLoader .java:43) at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionC lassLoader .java:39) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClass Loader.jav a(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClass Loader.jav a(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.ReloadableClassLoader.loadClass(ReloadableC lassLoader .java:76) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClass Loader.jav a(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at com.ibm.ws.classloader.ReloadableClassLoader.loadClass(ReloadableC lassLoader .java:76) at org.apache.cocoon.util.ClassUtils.loadClass(ClassUtils.java:88) at org.apache.cocoon.servlet.CocoonServlet.forceLoad(CocoonServlet.java:889) at
AW: Processing XSL output as XSP
the limitation of one generator per pipeline is no real problem here; instead of going 'the linear way', just go 'the indirect way': you can have the map:generate reference a pipeline as source. so, in one pipeline you generate the xsp, in the other you have that xsp generate output. your pipeline: map:match pattern=course/** 1. map:generate src=course/en/{1}.xml/ 2. map:transform src=course/course.xsl map:parameter name=use-request-parameters value=true/ /map:transform !-- something needed here -- 3. 4. map:serialize type=html/ /map:match steps 1. and 2. are to generate the xsp to be executed. at step 3. I assume you want to have your xsp executed whose output is serilized to html in step 4. now we repackage this; steps 1. and 2. go to a separate pipeline as well as steps 3. and 4.: map:match pattern=course/** map:generate type=serverpages src=cocoon:/generated({1}).xsp/ !-- referencing pipeline below -- map:serialize type=html/ /map:match map:match pattern=generated(**).xsp map:generate src=course/en/{1}.xml/ map:transform src=course/course.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:serialize type=xml/ /map:match caveat: you have to hand over the request parameter to the generated.xsp pipeline (because the call to the pipeline represents a different request) so that the transformer can process them. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von [EMAIL PROTECTED] Gesendet: Donnerstag, 20. Februar 2003 08:48 An: [EMAIL PROTECTED] Betreff: Processing XSL output as XSP Hi, I'm new to Cocoon, so sorry if this is a question with an obvious answer - but I can't find anything online which explains how to do this. I have a set of pages in XML. I pass them through an XSL transformation, which auto-generates hyperlinks, etc. Because I want to use sessions when these pages are viewed on the web, this XSL file adds in XSP tags, including xsp-session:encode-url The output from this xsl transformation is valid xsp - at least, it follows exactly the same pattern as the 'apple' xsp example from the cocoon wiki, with the same xmlns declarations at the beginning, etc. So, at this point I want to add something to my pipeline which tells Cocoon to treat the XSL output as XSP, but I can't work it out! Here's the relevant part of my sitemap: map:match pattern=course/** map:generate src=course/en/{1}.xml/ map:transform src=course/course.xslmap:parameter name=use-request-parameters value=true//map:transform !-- something needed here -- map:serialize type=html/ /map:match I assume that somwhere here I need a tag something like map:transform type=serverpage after the existing . I've tried variations on map:transform type=serverpage/, but this just gets me error messages about component handlers not being found. So, I'm missing something. Any hints would be very gratefully received! It's probably something really obvious, but I've got a mental block on it now. Many thanks, Ah Moh - 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]
AW: XSP question
hi nesto, I don't know the xbean logicsheet at all (doesn't seem to be in cocoon = 2.0.4), but anyway; in the simplest case, the jsp:useBean boils down to a variable declaration (scope = page): jsp:useBean id=myBean scope=page class=mypackage.MyClass/ would have an equivalent of something like this: xsp:logic mypackage.MyClass myBean = new mypackage.MyClass (); /xsp:logic for the other scopes you have to store/load those variables in/from the respective contexts: for session scope it's the session, for application scope it's the ServletContext. both have getAttribute()/setAttribute() which you can utilize. hope this helps, in case that xbean logicsheet is not available. you eventually might want to take a lookt at the JSP spec. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Nesto Gesendet: Mittwoch, 19. Februar 2003 15:11 An: [EMAIL PROTECTED] Betreff: XSP question Hi! Sorry if I repost a question, but I need help! I want to convert my JSP in XSP, and I have to reuse complex Javabeans. I read in the Logicsheet documentatin that there is a xbean library that provides functionallity similar to the jsp:useBean directives. But I didn't found much more documentation, and I don't know how to use it! Where I can read more? Please give me some hint on how translate my jsp:useBean id=xxx scope=session class=yyy.zzz / of my old JSP, in code for my new XSP Regards, Nesto - 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]
AW: cocoon-reload parameter
I don't know what the 'ixiarequest' maps to in your pipeline, but maybe there's a problem with that component (generator, I uess?). otherwise I can't directly see the sense of needing cocoon to reload. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Lionel Crine Gesendet: Montag, 17. Februar 2003 10:28 An: [EMAIL PROTECTED] Betreff: cocoon-reload parameter I generate file from a form and I need to use cocoon-reload parameter, I don't know why but I had to. To use it I'm doing, from my xsl file. ... form method=post target=_top action=../ixiarequest?cocoon-reload=true ... Is there another way to use it without passing it in the URL. - 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]
AW: Newbie: where is the error?
hi nesto, that IllegalStateException is a current cocoon bug (should by now be resolved in cocoon-2.0.5-dev and 2.1). cocoon is trying to notify an error, i.e. the one you are searching for. please have a look at your logs to see what the actual error is. if the cocoon logs don't reveal anything try the tomcat logs also. -Ursprüngliche Nachricht-Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von NestoGesendet: Montag, 17. Februar 2003 11:30An: [EMAIL PROTECTED]Betreff: Newbie: where is the error? Hi! I use someJSP for the xml-data generation. These JSPs import some java classes for query a database, and so on... These classes are used ONLY in the JSPs. Where I have to put these java classes on the cocoon context?? In the folder cocoon/WEB-INF? Or somewhere inside the cocoon/myApp folder?? Do I have to configure the file cocoon.xconf for using of my customclasses? Sorryfor my newbiequestion, butI can't find where the error is! In thesub-sitemap I wrote: map:match pattern="userdata.jsp" map:act type="request" map:parameter name="parameters" value="true"/ map:generate type="jsp" src="" mime-type="text/xml"/ map:transform src=""/ -- map:serialize type="xhtml"/ /map:act /map:match But, when I request http://myHost:8080/cocoon/myApp/userdata.jsp (of course with the parameters passed through an xhtml form) I can only obtain this: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception java.lang.IllegalStateException at org.apache.coyote.tomcat4.CoyoteResponseFacade.reset(CoyoteResponseFacade.java:251) at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1115) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)...Thank you for the help!Nesto
AW: What does cocoon-reload initialized
then you should definitely have a look at the source code ;-) -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Lionel Crine Gesendet: Montag, 17. Februar 2003 17:54 An: [EMAIL PROTECTED] Betreff: What does cocoon-reload initialized I'd like to know which objects and files and parsed during the initialization (in a very detailed way) - 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]
AW: dynamic served image files
hi andi, you didn't tell what the source for the dynamically created wbmp image is. if it's based on xml input, you could write a corresponding Serializer (have a look at the respective sources). another option is to write a Reader (which doesn't actually need to read something ;-). third alternative is to completely separate this into its own Servlet. in all cases the general scheme is the same; create your data (wbmp image) and write it to the output stream. in the servlet case you get that stream from the HttpServletResponse. in the cocoon (serializer/reader) case you could get the respective response object from the Environment, from which you could then get the OutputStream to write to. fortunately you don't have to do this, since the OutputStream is handed to you via setOutputStream(). in case of inheriting from AbstractReader you don't even have to handle this, but access the handed stream via 'out'. quick example (Reader case), for which I assume you have the image generated by java code, which contains a method that writes the result to an OutputStream: code // imports omitted public class DynWbmpReader extends AbstractReader { /** get the MIME type of the generated output */ public String getMimeType () { return (image/vnd.wap.wbmp); } public void generate () throws IOException, ProcessingException { YourDynWbmpClass.renderToStream (out); } } /code HTH -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von andi Gesendet: Freitag, 14. Februar 2003 13:47 An: [EMAIL PROTECTED] Betreff: dynamic served image files hi, i want to serve dynamically created imagefiles (wbmps in my case) from the cocoon-pipeline. i wrote an xsp with helperclass and tried to get the output of it, but i don't know how. i thought about taking map:read .. but i don't know how to access a dynamic source.. one possibilty is to write the image to the filesystem and serve a link to it dynamically but as i normally need the image only once i'd rather have it served directly (analog to the svg2jpeg sample included in the cocoon samples) has anyone done anything like that? do i have to write my own transformerand serializer?? thanks for any help. andi. __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com - 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]
AW: Using a RequestAttributeSelector
hi laurent, -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Laurent Comte Gesendet: Freitag, 14. Februar 2003 19:48 An: [EMAIL PROTECTED] Betreff: Using a RequestAttributeSelector snip/ BUT, it seems that the request read by the selector is the original one (or something like this), and my attribute is never found ... I used the logger of the RequestAttributeSelector and it says : RequestAttributeSelector: Request attribute 'nextpage' not set -- failing So, i'de like to find a good way to select my transformer at runtime, depending of the result of the generator-servlet. let me quote a comment from the virgin cocoon sitemap: quote Since this is important, let me repeat it: Selectors are executed during pipeline setup. /quote the same goes for matchers and actions. what this means is that the RequestAttributeSelector is done before your generation step in the pipeline even starts. so, yes, the selector was acting on the original request (someUrl in your pipeline). another issue: I think it wouldn't even work when the selector would execute after the generation step, because you are selecting on a request attribute; but you're generating from the url, i.e. you make a request, you don't process it. so having the servlet set a request attribute is useless, since it generates a response, not a request. apart from that I wonder why you'd want an external servlet as a controller. and I don't have any good idea (besides ugly stuff) how to do what you want to achieve. - 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]
AW: Pass custom parameters into an XSP
hi collin, with XSPs an easier alternative would be to pass your 'parameter' as a request parameter. then you would: map:match pattern="edit.xml" map:generate type="serverpages" src=""/ map:serialize type="xml"/ /map:match map:match pattern="edit/*" map:generate src=""/ ... /map:match then you can get the request parameter from within your XSP via the request logicsheet (xsp-request:get-parameter) or via embedded logic (request.getParameter ()). the other alternative; passing the parameter as a sitemap parameter: map:match pattern="edit/*" map:generate type="serverpages" src="" map:parameter name="entityType" value="{1}"/ /map:generate ... /map:match for this to work you have to embed the appropriate logic into your XSP for retrieving that parameter; as your compiled XSP is a generator in the end you accomplish this by overriding its setup() method and process the parameter(s) there. just as a hint (take a look at the respective sources/docs): xsp:page language="java" ... xsp:logic !-- must occur before content so that it doesn't become part of content/generate() method -- public void setup (SourceResolver resolver, Map objectModel, String src, Parameters params) throws ... { // process parameter(s) here ... super.setup (resolver, objectModel, src, params); } /xsp:logic !-- content here -- /xsp:page HTH -Ursprüngliche Nachricht-Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Collin VanDyckGesendet: Mittwoch, 12. Februar 2003 22:44An: [EMAIL PROTECTED]Betreff: Pass custom parameters into an XSP Hello, I am trying to figure out how I can pass in custom parameters into an already existing generator such as the XSP/serverpages generator. Here's my scenario: I receive a request for /edit/page Which matches /edit/* So from this matcher, I have {1} == "page".. I want to pass this off to let's say /docs/xsp/edit/item.xsp as a parameter named "entityType" So that in the XSP I can access the "entityType" variable. I think I'm missing something obvious. If someone could point me into the right direction, I'd really appreciate it. thanks, Collin
AW: Pass custom parameters into an XSP
yeah, sorry. didn't follow the chain upto AbstractGenerator ;-) -Ursprüngliche Nachricht-Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Nathaniel AlfredGesendet: Donnerstag, 13. Februar 2003 00:51An: [EMAIL PROTECTED]Betreff: RE: Pass custom parameters into an XSP Actually, you don't need to override setup(). The base class ofthe XSP generated class already does that and provides "protected Parameters parameters;" You can use directly in xsp:logic String entityType = this.parameters.getParameter("entityType"); including the other nice features of Parameterssuch asdefaulting and converting to int, boolean, and so on. -Original Message-From: Collin VanDyck [mailto:[EMAIL PROTECTED]]Sent: Donnerstag, 13. Februar 2003 00:04To: [EMAIL PROTECTED]Cc: David CummingsSubject: Re: Pass custom parameters into an XSP Wow. I did not know you could use the XSP to override the setup method. That is VERY helpful. Thanks!! - Original Message - From: Marco Rolappe To: [EMAIL PROTECTED] Sent: Wednesday, February 12, 2003 5:59 PM Subject: AW: Pass custom parameters into an XSP hi collin, with XSPs an easier alternative would be to pass your 'parameter' as a request parameter. then you would: map:match pattern="edit.xml" map:generate type="serverpages" src=""/ map:serialize type="xml"/ /map:match map:match pattern="edit/*" map:generate src=""/ ... /map:match then you can get the request parameter from within your XSP via the request logicsheet (xsp-request:get-parameter) or via embedded logic (request.getParameter ()). the other alternative; passing the parameter as a sitemap parameter: map:match pattern="edit/*" map:generate type="serverpages" src="" map:parameter name="entityType" value="{1}"/ /map:generate ... /map:match for this to work you have to embed the appropriate logic into your XSP for retrieving that parameter; as your compiled XSP is a generator in the end you accomplish this by overriding its setup() method and process the parameter(s) there. just as a hint (take a look at the respective sources/docs): xsp:page language="java" ... xsp:logic !-- must occur before content so that it doesn't become part of content/generate() method -- public void setup (SourceResolver resolver, Map objectModel, String src, Parameters params) throws ... { // process parameter(s) here ... super.setup (resolver, objectModel, src, params); } /xsp:logic !-- content here -- /xsp:page HTH -Ursprüngliche Nachricht-Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Collin VanDyckGesendet: Mittwoch, 12. Februar 2003 22:44An: [EMAIL PROTECTED]Betreff: Pass custom parameters into an XSP Hello, I am trying to figure out how I can pass in custom parameters into an already existing generator such as the XSP/serverpages generator. Here's my scenario: I receive a request for /edit/page Which matches /edit/* So from this matcher, I have {1} == "page".. I want to pass this off to let's say /docs/xsp/edit/item.xsp as a parameter named "entityType" So that in the XSP I can access the "entityType" variable. I think I'm missing something obvious. If someone could point me into the right direction, I'd really appreciate it. thanks, Collin This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any view
AW: Accessing named session attributes in XSP?
hi derek, could you tell me please how the XSP is accessed? the problem might be that your XSP is dealing with a different session (XSPs default to creating a new session). -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Derek Hohls Gesendet: Montag, 10. Februar 2003 14:33 An: [EMAIL PROTECTED] Betreff: Accessing named session attributes in XSP? I know I am missing something *very* obvious, but I have end of day stare here, and cannot figure what mistake I am making. I am using the Database Authenticator to process a login - the user ID is stored in a session attribute called userrname The auth.xml used looks like: auth-descriptor connectionmyDB/connection table name=user select dbcol=UserName request-param=username to-session=username/ select dbcol=UserPassword request-param=userpass / /table /auth-descriptor This process seems to be working, as I can now get access to the protected part of the pipeline: ie. map:match type=sessionstate pattern=* map:parameter name=attribute-name value=username/ !-- all this is accessible after login -- /map:match However, when I try and use the username attribute in an XSP file, I just get a null returned - here's the snippet from the file: xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/request/2.0; !-- Page-level logic -- page xsp:logic //session String sUserName = xsp-session:get-attribute name=username as=string/; /xsp:logic elementxsp:exprsUserName/xsp:expr/element /page The element now contains null (wihtout the ) Any idea how to get the username out into the XSP?? Thanks Derek -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. The CSIR exercises no editorial control over E-mail messages and/or attachments thereto/links referred to therein originating in the organisation and the views in this message/attachments thereto are therefore not necessarily those of the CSIR and/or its employees. The sender of this e-mail is, moreover, in terms of the CSIR's Conditions of Service, subject to compliance with the CSIR's internal E-mail and Internet Policy. - 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]
AW: global sitemap parameters and programatic cocoon configuration
hi hussayn, -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von SAXESS - Hussayn Dabbous Gesendet: Montag, 10. Februar 2003 15:20 An: [EMAIL PROTECTED] Betreff: global sitemap parameters and programatic cocoon configuration Hy, all I just fall over a configuration issue: 1.) assume you like to use a global parameter ${myserver} within several places in your sitemap AND all subsitemaps. Is the following (or something equivalent) possible to do: map:sitemap map:parameter name=myserver value=http://myserver; / ... map:match pattern=*/canvas/collection map:read src=html:${/myserver}/index.xml/ /map:match ... I think there's an input module available for stuff like that which IIRC makes those variables also available to subsitemaps. 2.) Is it possible to also add such parameters programatically to the rootsitemap and use them all over in cocoon? I.e. i want the variable ${myserver} be preset from an external configuration, which happens to be separate from sitemap.xmap. background: I would like to keep the customisation at one place and keep my customers away from sitemap.xmap if possible. is something like this possible with cocoon: 1.) on-startup of cocoon process an additional java-class-instance (a servlet, or better an initilisation-component specified in cocoon.xconf) you can of course have another servlet declared in the web.xml and have it automatically loaded/started via load-on-startup (see servlet spec). the other alternative you pointed out also works and is probably the better way to go (also thought about this, needing to have something like an application core running which could be accessible as a Component). I think for this to work you have to make your 'instance' an avalon component (i.e. implements Component interface) with a defined role (you can specify your own roles in a separate file which you can reference from the cocoon.xconf, /cocoon/@user-roles IIRC). 2.) the initialisation-class reads a customisationfile and adds a set of global variables to the rootsitemap. it might be possible to get hold of the above mentioned input module via a ComponentManager (within your Component) and add those variables programmatically. 3.) After cocoon came up the global sitemap parameters are available within any sitemap.xmap as I said, I think the variables should be visible in sub-sitemaps also, but I might be wrong. But from the fact that the modules declared in the root sitemap are available in sub-sitemaps I assume that the global variable module's scope is not limited to the root sitemap. Does anyone know, if this could be achieved and if yes, could you point me to an example or a document about this ? Just had a quick look and I think the DefaultsMetaModule is what I had in mind. thanks you Hussayn HTH -- Dr. Hussayn Dabbous SAXESS Software Design GmbH Neuenhöfer Allee 125 50935 Köln Telefon: +49-221-56011-0 Fax: +49-221-56011-20 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]
AW: Tomcat error!
why don't you have a look at your tomcat logs? -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von [EMAIL PROTECTED] Gesendet: Montag, 10. Februar 2003 15:52 An: [EMAIL PROTECTED] Betreff: Tomcat error! Hi, I had some troubles with cocoon and tomcat last week. I completely re-install my computer, and now apache just stops at this line : [INFO] Registry - -Loading registry information [INFO] Registry - -Creating new Registry instance [INFO] Registry - -Creating MBeanServer [INFO] Http11Protocol - -Initialisation de Coyote HTTP/1.1 sur le port 8080 Démarrage du service Tomcat-Standalone Apache Tomcat/4.1.18 [INFO] Http11Protocol - -Démarrage de Coyote HTTP/1.1 sur le port 8080 [INFO] ChannelSocket - -JK2: ajp13 listening on 0.0.0.0/0.0.0.0:8009 [INFO] JkMain - -Jk running ID=0 time=0/311 config=C:\Program Files\Apache Group\Tomcat 4.1\conf\jk2.properties I tried with other (newer) versions of apache, but they all make the same error! Thank you for you help! - 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]
AW: AW: global sitemap parameters and programatic cocoon configuration
hi hussayn, I see the classes available and modules declared in cocoon.xconf in 2.0.4, so; 1. they seem to be released stuff and 2. you should be able to use them in 2.0.4. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von SAXESS - Hussayn Dabbous Gesendet: Montag, 10. Februar 2003 21:15 An: [EMAIL PROTECTED] Betreff: Re: AW: global sitemap parameters and programatic cocoon configuration Hy, Jeremy; Thank you for this hint. That's great, because this comes in fact very close to what i want. The only thing i would have to change in my current setup is switching from property-notation to XML-notation in my customisation files. I planned this move anyway. Only one last question, before i dive into it. Does this also work on cocoon-2.0.4, or do i have to wait until 2.1 is released ? regards, Hussayn - 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]
AW: AW: Session problems
hi roberto, please see bottom of mail. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Roberto Cipollini Gesendet: Freitag, 7. Februar 2003 10:16 An: [EMAIL PROTECTED]; [EMAIL PROTECTED] Betreff: Re: AW: Session problems Unfortunatly the encodeRedirectURL did not work :( It may sounds good i have crossing webapplications. My goal is to have a single deployment of cocoon under the jakarta dir, and store all the file of multiple virtualhosts in another directory (/usr/webapps/.). I got it working [maybe it's wrong] configuring the tomcat server.xml to redirct some requests to the cocoon container and then let cocoon do the job. Just to understand the prefix/suffix: pfw is my cocoon environment. it stands for Publishing Frame Work and in all my virtual hosts uri i know that when calling the pfw i invoke the cocoon entity. ex: myvh.com/index.jsp -- tomcat myvh.com/pfw/myvh/read.pfw --cocoon [where pfw is a page generated from sitemap.xmap stored in /usr/webapps/myvh/pfw/sitemap.xmap virtual host directory] This is a pice of my server.xml: host name=myvh.com appBase=/usr/webapps/myvh autoDeploy=0 Context reloadable=true path=/pfw docBase=/opt/jakarta-tomcat-4.0.4/webapps/cocoon debug=0 Context reloadable=true path=*.pfw docBase=/opt/jakarta-tomcat-4.0.4/webapps/cocoon debug=0 /host When i invoke something in the url like myvh.com/pfw/myvh/page.pfw , tomcat redirect the request to cocoon to process the request. Cocoon knows what to do :) in the master subsitemap.xmap there's this fragment code: map:pipeline map:match pattern=myvh/** map:mount check-reload=yes src=file:///usr/webapps/myvh/pfw/sitemap.xmap uri-prefix=myvh / /map:pipeline In the sub sitemap.xamp stored in the myvh dir there's this fragment code: map:match pattern=*.pfw map:aggregate element=ALL map:part src=setup_env.xml map:part src=cocoon:/{1}.xml /map:aggregate map:transform src=xsl/{1}.xsl / map:serialize type=html / /map:match So, after all, do you think i cross? I don't know if this call/over-call procedure is fine and if this is the cause of my session failure. Can anyone help? bye. Roberto - 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] yes, you're crossing contexts (which I totally forgot to mention in the beginning). ex: myvh.com/index.jsp -- tomcat myvh.com/pfw/myvh/read.pfw --cocoon [where pfw is a page generated from sitemap.xmap stored in /usr/webapps/myvh/pfw/sitemap.xmap virtual host directory] This is a pice of my server.xml: host name=myvh.com appBase=/usr/webapps/myvh autoDeploy=0 Context reloadable=true path=/pfw docBase=/opt/jakarta-tomcat-4.0.4/webapps/cocoon debug=0 Context reloadable=true path=*.pfw docBase=/opt/jakarta-tomcat-4.0.4/webapps/cocoon debug=0 /host that means, that the JSP and the cocoon stuff live in seperate (webapp) contexts (you can of course let cocoon handle JSPs). thus, the encodeRedirectURL can't work, of course. note though that the encodeRedirectURL should be done when redirecting within your webapp. for url rewriting based sessions, this appends the ';JSESSIONID=...' to the url. so, not doing this causes losing the session then. so what can you do? from the top of my head two ideas: 1. let cocoon handle the JSPs 2. deliver the parameters (username/pw) via request parameters/attributes (don't know if the latter works, though). - 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]
AW: AW: Session problems
-Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von SAXESS - Hussayn Dabbous Gesendet: Donnerstag, 6. Februar 2003 21:07 An: [EMAIL PROTECTED] Betreff: Re: AW: Session problems snip/ If your servlet runs in the same context as cocoon, then i can't see at the moment, why you loose your session. from the standard behaviour of a servlet container i would expect, that once a session is created within one context, this session is kept. I dont think, my point here was url encoding based session tracking. if cookies are switched off url encoding is used to keep track of the session (via the appended ';JSESSIONID=...'). so if you don't encode your urls correctly you lose your session (in case of url based...). that xsp will always create new sessions. if create-session=true I would expect, it creates a session, if none is existing, but once a well, it does (non-believer ;-), at least in 2.0.4. here the snippet from the session logicsheet: ... xsl:variable name=create xsl:choose xsl:when test=@create-session='yes' or @create-session='true'true/xsl:when xsl:when test=@create-session='no' or @create-session='false'false/xsl:when xsl:otherwisetrue/xsl:otherwise /xsl:choose /xsl:variable xsp:init-page Session session = request.getSession(xsl:value-of select=$create/); /xsp:init-page ... session is created it should be keep living for subsequent requests... After having saying this, i bet you cross webapp boundaries ... regards, hussayn Marco Rolappe wrote: hi roberto, snip/ - 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]
AW: Session problems
hi roberto, the reason why your elements are empty probably are the following; the session accessed in your XSP might be different from the JSP's session. since you redirect without url encoding the redirect url, the session probably doesn't survive the redirect. now in the XSP you didn't specify the xsp:page's attribute create-session=false (which is handled by the session logicsheet), which defaults to true, thus a new session is created in the XSP. I don't know if your sessions are cookie or url rewriting based. anyway, you should be url encoding the redirect url, see inline comments below. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Roberto Cipollini Gesendet: Donnerstag, 6. Februar 2003 18:40 An: [EMAIL PROTECTED] Betreff: Session problems Hi. I have a problem with a jsp page and a cocoon page. I use jsp to simply check a user/password and if all is right then set some variables in the session.setAttribute. I then redirect the user to a cocoon page in wich i should grab the session variable with some xsp-logic commands buti can't see them! Ok...all of you are saying What a stupid newbie :). I know, but pls, it's been a lot of headaches trying to solve this but i still.have headaches. This is the code inside the jsp page: check_login.jsp * session.setAttribute( username, theRealUser ); session.setAttribute( azienda, theRealFirm); //pfw is my custom file format :) response.sendRedirect( /pfw/rv3/setup_env.pfw ); this line should be something like: response.sendRedirect(response.encodeRedirectURL (/pfw/rv3/setup_env.pfw)); ** cocoon page setup_env.pfw *** ?xml version=1.0? ?cocoon-process type=xsp? ?cocoon-process type=xslt? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:xsp-session=http://apache.org/xsp/session/2.0; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xsp:structure xsp:includejava.util.*/xsp:include xsp:includejava.io.*/xsp:include xsp:includejava.text.*/xsp:include xsp:includejavax.*/xsp:include xsp:includejavax.*/xsp:include xsp:includeorg.apache.cocoon.environment.Session/xsp:include /xsp:structure PAGE AZIENDA xsp-session:get-attribute name=azienda / /AZIENDA UTENTE xsp-session:get-attribute name=username / /UTENTE /PAGE /xsp:page the tag AZIENDA and UTENTE are always empty!!! Can anyone help this stupid problem? thanks! R.C. - 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]
AW: Parameters to a JSP page
hi nesto, I assume that the JSP knows how to handle the parameters. you don't really have to process the parameters (via actions, matchers, whatever), since you said you are generating an html form. so, in the generated form there should be something like this: ... form method="get" action="" ... input name="username"/ input name="password"/ ... /form so, when the user submits the form, the db-query.jsp (or whatever the actual URL is) gets invoked with the request parameters username and password. -Ursprüngliche Nachricht-Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von NestoGesendet: Dienstag, 4. Februar 2003 11:01An: [EMAIL PROTECTED]Betreff: Parameters to a JSP page Hi to everyone!I'm a newbie of Cocoon and I have a problem with parameters of a Jsp.I don't know how I can pass a set of parameters to a jsp from a html-form.I'll explain my problem better:I have a form in a html page generated through Cocoon (xml-xsl-html). This is a login page, and there are two parameters: username and password.I have to pass them to a jsp page that queries a database and generate dynamic data for the specific user. I read the documentation, and I think I have to use actions, but my attemps of doing it failed. Does someone can explain me how I can do it? If you know how do it, please, give me some hints, or pieces of sitemap that helps me to resolve my problem. I use Cocoon 2.0.4 on Tomcat 4.1.18.I have to use the JSPs because is a part of an existing system. Thanks to everyone and sorry for my english!Regards, Nesto
AW: Cocoon and MySQL
richard, once again my advice: take a look at the logs (here access.log): DEBUG (2003-02-03) 13:18.51:614 [access] (/cocoon/soundpool/database.html) HttpProcessor[8080][4]/AbstractEnvironment: Reset context to file:/C:/tomcat/webapps/cocoon/ WARN(2003-02-03) 13:18.51:614 [access] (/cocoon/soundpool/database.html) HttpProcessor[8080][4]/CocoonServlet: The resource was not found org.apache.cocoon.ResourceNotFoundException: Resource not found file:/C:/tomcat/webapps/cocoon/soundpool/database.xml: java.io.FileNotFoundException: C:\tomcat\webapps\cocoon\soundpool\database.xml (The system cannot find the path specified) at org.apache.cocoon.components.source.FileSource.getInputStream(FileSource.jav a:145) at org.apache.cocoon.components.source.AbstractStreamSource.getInputSource(Abst ractStreamSource.java:161) at org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStrea mSource.java:206) at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:143) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv entPipeline.java:250) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS treamPipeline.java:395) ... -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Richard Cunliffe Gesendet: Montag, 3. Februar 2003 15:29 An: [EMAIL PROTECTED] Betreff: RE: Cocoon and MySQL Martin, I have made your suggested changes and the web page still comes up completely blank. Is there anything else I should be looking at? Thanks, Richard. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 03 February 2003 14:02 To: [EMAIL PROTECTED] Subject: Re: Cocoon and MySQL Hello Richard, Richard Cunliffe [EMAIL PROTECTED] writes: (logs attached) Hi, I have now got cocoon to start, and I have now put my pipeline in, but the page is coming up blank, when viewed through IE6. My pipeline in the sitemap looks like this: !-- soundpool Database (SQL) -- map:pipeline map:match pattern=soundpool/database.html map:generate src=soundpool/database.xml/ map:transform type=sql map:parameter name=RICHARD value=soundpool/ /map:transform map:transform src=databasepc.xsl/ Do one step after the other -- disable the transformer for testing or use labels. map:serialize/ /map:match /map:pipeline I am unsure what should go under name=. I have assumed it's the local host name given in mysql? No, it is the name of the connection as defined in your cocoon.xconf. My entry looks like this: !-- Datasources: -- datasources jdbc name=slide logger=vsc.sql pool-controller min=2 max=6 / auto-committrue/auto-commit dburljdbc:postgresql://bog.fiz-chemie.de/slidestore/dburl userslide/user passwordgeheim/password /jdbc /datasources So the parameter to the SQL Transformer is: map:transform type=sql map:parameter name=use-connection value=slide/ /map:transform Remember to restart your servlet engine after changes to cocoon.xconf. My web.xml looks like so: Looks okay. My database.xml looks like this: ?xml version=1.0 encoding=UTF-8? document textsoundpool/text titlethe databse/title sql:execute-query xmlns:sql=http://apache.org/cocoon/SQL/2.0; sql:use-connectionlocalhost/soundpool/sql:use-connection You don't need this line. sql:query SELECT generalMusicTitle FROM album /sql:query /sql:execute-query /document -- Martin HolzFIZ CHEMIE Berlin [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] - 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]
AW: Cocoon and MySQL
hi richard, first point: don't be afraid to look at the logs yourself ;-) most of the time they'll reveal what's going wrong. for example in the error.log you attached: ERROR (2003-02-02) 22:45.52:747 [core] (Unknown-URI) Unknown-thread/Cocoon: Could not configure Cocoon environment org.xml.sax.SAXParseException: The element type dburl must be terminated by the matching end-tag /dburl. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHand lerWrapper.java:232) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.ja va:213) ... looking at the following: The following line I was unsure about: dburljdbc:mysql://192.168.44.21:3306/dbrul ^^^ this one's wrong ;-) ok, next point: I got the localhost address from MySQL Admin - I'm not sure if this is right? I uncommented these items from the my.ini file. you can just use 'localhost' (assuming the db is running on the same machine). I am also not sure about jdbc name = . I have tried researching this but I'm still unsure. you can name the datasource as you wish, e.g.: jdbc name=emotion pool-controller max=10 min=5/ auto-committrue/auto-commit dburljdbc:mysql://localhost/soundpool/dbrul !-- mysql database soundpool must exist -- userr_cunliffe/user !-- mysql user r_cunliffe must exist -- password/password /jdbc of course, the data given in this configuration must correspond to your database configuration. in the dburl you can leave out the port if you're using the standard. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Richard Cunliffe Gesendet: Sonntag, 2. Februar 2003 23:52 An: [EMAIL PROTECTED] Betreff: Cocoon and MySQL (I have attached my cocoon and tomcat logs as Zip files) Hi, MS Windows XP Apache 2.0.43 Tomcat 4.0.6 Cocoon 2.0.4 JDK 1.3.1_06 MySQL 3.23.55 JDBC 2.0.14 I am trying to connect to a MySQL database and have followed the instructions provided by Flash Guides and Wiki, but cocoon does not start-up after I edit the cocoon.xconf. If I comment out the inserted code, and restart tomcat then cocoon will load. I have download the JDBC file: mysql-connector-java-2.0.14.jar and have put it in the following directories: C:\tomcat\webapps\cocoon\WEB-INF\lib\mysql-connector-java-2.0.14-bin.jar C:\tomcat\lib\mysql-connector-java-2.0.14-bin.jar The relevant part of web.xml looks like this: init-param param-nameload-class/param-name param-value !-- For MySQL Driver: -- com.mysql.jdbc.Driver !-- For Database Driver: -- org.hsqldb.jdbcDriver !-- For parent ComponentManager sample: org.apache.cocoon.samples.parentcm.Configurator -- /param-value /init-param The relevant part of cocoon.xconf looks like so: !-- Datasources: -- datasources jdbc logger=core.datasources.personnel name=personnel !-- If you have an Oracle database, and are using the the pool-controller below, you should add the attribute oradb and set it to true. pool-controller min=5 max=10 oradb=true/ That way the test to see if the server has disconnected the JdbcConnection will function properly. -- pool-controller max=10 min=5/ !-- If you need to ensure an autocommit is set to true or false, then create the auto-commit element below. auto-commitfalse/auto-commit The default is true. -- dburljdbc:hsqldb:hsql://localhost:9002/dburl usersa/user password/ jdbc name=personnel pool-controller min=5 max=10/ auto-committrue/auto-commit dburljdbc:mysql://192.168.44.21:3306/soundpool/dbrul userr_cunliffe/user password/password /jdbc /jdbc /datasources The following line I was unsure about: dburljdbc:mysql://192.168.44.21:3306/dbrul I got the localhost address from MySQL Admin - I'm not sure if this is right? I uncommented these items from the my.ini file. I am also not sure about jdbc name = . I have tried researching this but I'm still unsure. On the Flash Guide it suggested that I should delete the following directory, which I have done: C:\tomcat\work\Standalone\localhost\cocoon But it recreates itself. What can you suggest? Is there anything on the MySQL side I should be checking? Thanks, Richard. - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faq/index.html To
AW: Apache error on startup
hi richard, I think this is a path issue. see below: -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Richard Cunliffe Gesendet: Donnerstag, 30. Januar 2003 11:34 An: [EMAIL PROTECTED] Betreff: RE: Apache error on startup Hussayn, I have read that the mod_jk.so is for Unix and mod_jk.dll is for windows. I am running windows, and I have the following line already in my auto mod_jk: IfModule !mod_jk.c LoadModule jk_module c:/Program Files/Apache Group/Apache2/modules/mod_jk.dll ^^^ I guess this line makes it 3 arguments because of the space. maybe try quoting it: LoadModule jk_module c:/Program Files/Apache Group/Apache2/modules/mod_jk.dll or maybe use a relative path: LoadModule jk_module modules/mod_jk.dll /IfModule Is there anything that could wrong? Richard. -Original Message- From: SAXESS - Hussayn Dabbous [mailto:[EMAIL PROTECTED]] Sent: 30 January 2003 10:12 To: [EMAIL PROTECTED] Subject: Re: Apache error on startup The error message says, you are missing one parameter. Check, that on your line 4 you have the following content. If you have, check that you are looking at the right file ;-) LoadModule jk_module modules/mod_jk.so regards, hussayn Richard Cunliffe wrote: Hi, I have installed Apache 2.0.43 and tomcat 4.0.6, using mod_jk 2.0.43. I am following the flash guide produced by Lajos. I am getting the following error after I have started tomcat and then try and start Apache: Sntax error on line 4 of c:/tomcat/conf/auto/mod_jk.conf: LoadModule takes two arguments, a module name and the name of a shared object file to load it from How should I go about fixing this? Thanks, Richard. -Original Message- From: SAXESS - Hussayn Dabbous [mailto:[EMAIL PROTECTED]] Sent: 29 January 2003 21:53 To: [EMAIL PROTECTED] Subject: Re: WARP, Jserv or mod_jk? just one tip. As far as i see, you dont need to build the java components for mod_jk if you are planning to run a binary distribution of tomcat-4.*.*. The java components are already included in these tomcat distributions. You would only have to build the apache mod_jk module ... Therefor you may simply skip all the java and ant related topics... maybe that helps you getting faster to your goal. regards, hussayn Richard Cunliffe wrote: Lajos, I have reached point 6, where you build ant, but it is coming up with the following error: Warning: JAVA_HOME environment variable not set. If build fails because sun.* classes could not not be found You will need to set the JAVA_HOME environment variable To the installation directory of java. Bulidfile: build.xml does not exist! Build failed So, 1. How do you set the JAVA_HOME? (I have java 1.3 installed) 2. I checked if build.xml exsits and it does. Is it not finding it because it cant find the JAVA_HOME? Thanks, Richard -Original Message- From: Lajos [mailto:[EMAIL PROTECTED]] Sent: 29 January 2003 15:17 To: [EMAIL PROTECTED] Subject: Re: WARP, Jserv or mod_jk? Is that a link off my guide? Sorry, if it is - I have to update the damn things every couple of weeks 'cause they change so often. Anyhow, if you are using 4.0.6, you need the attached zip file. But you can also check for binaries at http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1 .2.2/bin/ and save yourself some time. Regards, Lajos Richard Cunliffe wrote: Lajos, The following link is not working http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.3/src/j akarta-tomcat-connectors-4.0.2-01-src.zip. If you have the zip file could you e-mail it to me at [EMAIL PROTECTED] Thanks for the advice Richard. -Original Message- From: Lajos [mailto:[EMAIL PROTECTED]] Sent: 29 January 2003 14:46 To: [EMAIL PROTECTED] Subject: Re: WARP, Jserv or mod_jk? Hi Richard - mod_jk by far is the best. WARP is buggy and is may not even be actively developed any more. mod_jk is stable, widely used, and generally has few bugs reported. If you need help with the integration, my FlashGuides (www.galatea.com/flashguides) have instructions on connecting Apache 2.x with Tomcat 4.x using Jk. Regards, Lajos Richard Cunliffe wrote: Hi, I?m upgrading! Can anyone suggest the best way to connect Apache 2.0.42 and Tomcat 4.0.6. I will be using Cocoon 2.0.4. I have read that the WARP connecter is the best, but I used Jserv on my older version. There is also the mod_jk. Which is the most reliable etc. Thanks Richard. -- This message has
AW: How can the result of a pipeline be a parameter for a transformation in another pipeline?
maybe your user agent has several languages set in Accept-Language and maybe the input module uses these (LocalAction using first encountered). -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Cyril Vidal Gesendet: Freitag, 31. Januar 2003 17:27 An: [EMAIL PROTECTED]; [EMAIL PROTECTED] Betreff: Re: How can the result of a pipeline be a parameter for a transformation in another pipeline? Hello Christian, First, thanks for your help! I think I've done what you told me concerning the input module. And in fact, I've just changed the value of the parameter 'locale', given the successfull pattern using localeAction: localeAction *** map:pipeline map:act type=locale map:match pattern=localeAction map:generate src=documents/participants.xml/ map:transform src=stylesheets/participantsINT.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:transform type=i18n map:parameter name=locale value={../locale}/ /map:transform map:serialize type=html/ /map:match /map:act *input module * map:match pattern=inputModule map:generate src=documents/participants.xml/ map:transform src=stylesheets/participantsINT.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:transform type=i18n map:parameter name=locale value={request-header:accept-language}/ /map:transform map:serialize type=html/ /map:match /map:pipeline but unfortunately, I receive the following error message, that I didn't have with the preceding localAction: type fatal message Unable to locate resource: messages description org.apache.cocoon.ProcessingException: Unable to locate resource: messages: org.apache.avalon.framework.component.ComponentException: Unable to locate resource: messages sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet stack-trace Is it normal? Thanks again for your help, Regards, Cyril. - Original Message - From: Christian Haul [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 31, 2003 4:23 PM Subject: Re: How can the result of a pipeline be a parameter for a transformation in another pipeline? On 31.Jan.2003 -- 04:07 PM, Cyril Vidal wrote: Hello, I would like to retrieve the language of the user's browser, so that I could call the I18n Trasnformer in the right way (by passing the locales's value equal to the browser's language). To retrieve the language set up in the browser, I've used the Request Generator, and applied the following simple stylesheet to it: Starting with version 2.0.4 you could try {request-header:accept-language} for that. See input modules in concepts and javadocs. Chris. -- C h r i s t i a n H a u l [EMAIL PROTECTED] 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. 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]
AW: Accessing session variables in the sitemap.xmap
hi heiko, please have a look at: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16246 this explains why the session created in an XSP is not visible later in the pipeline (being created after pipeline setup). you could create your session within your XSP if you override the generator's setup() method within your XSP, creatint your session at that point, so the session will be created at pipeline setup time. but maybe it's easier to create the session via an action, as already suggested. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Heiko Milke Gesendet: Donnerstag, 30. Januar 2003 16:44 An: [EMAIL PROTECTED] Betreff: Re: Accessing session variables in the sitemap.xmap Hey Andrew, Thanks for all your help! But well, it still aint working :( I tried on several browsers. I tried in the mount directory and i tried from the main sitemap. None if it works. Im using cocoon version 2.0.4 (on Windows 2000). Heiko - 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]
AW: Browser Selector
hi richard, from what you wrote in your mail it seems you have misplaced the map:select. those go into the pipeline definitions. maybe it would be best if you read some introductory material on the sitemap or have a look at samples sitemaps. your sitemap should look something like this: !-- soundpool -- map:pipeline map:match pattern=soundpool/soundpool map:generate src=soundpool.xml/ map:select map:when test=avantgo map:transform src=stylesheets/soundpoolpda.xsl/ /map:when map:otherwise map:transform src=stylesheets/soundpoolpc.xsl/ /map:otherwise /map:select map:serialize/ /map:match /map:pipeline -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Richard Cunliffe Gesendet: Samstag, 1. Februar 2003 01:21 An: [EMAIL PROTECTED] Betreff: Browser Selector Hi, I am getting a strange result from my browser selector. I have specified two xsl stylesheets, one for a PDA to run on AvantGo, and another for a PC to run on Explorer. Now the expected result would be: PC= Welcome to soundpool. Your are viewing this site from personal computer PDA = Welcome to soundpool. You are viewing this site from a PDA But the result I get when loading the site for both devices is: Welcome to soundpool. Your are viewing this site from personal computer Welcome to soundpool. You are viewing this site from a PDA Why should it want to do this? I have configured my browser selector as follows: map:selectors default=browser map:selector logger=sitemap.selector.browser name=browser src=org.apache.cocoon.selection.BrowserSelector !-- # NOTE: The appearance indicates the search order. This is very important since # some words may be found in more than one browser description. (MSIE is # presented as Mozilla/4.0 (Compatible; MSIE 4.01; ...) -- browser name=explorer useragent=MSIE/ browser name=pocketexplorer useragent=MSPIE/ browser name=handweb useragent=HandHTTP/ browser name=avantgo useragent=AvantGo/ browser name=imode useragent=DoCoMo/ browser name=opera useragent=Opera/ browser name=lynx useragent=Lynx/ browser name=java useragent=Java/ browser name=wap useragent=Nokia/ browser name=wap useragent=UP/ browser name=wap useragent=Wapalizer/ browser name=mozilla5 useragent=Mozilla/5/ browser name=mozilla5 useragent=Netscape6// browser name=netscape useragent=Mozilla/ /map:selector map:select map:when test=avantgo map:transform src=stylesheets/soundpoolpda.xsl/ map:seralize/ /map:when map:otherwise map:transform src=stylesheets/soundpoolpc.xsl/ map:seralize/ /map:otherwise /map:select and my pipeline looks like this: !-- soundpool -- map:pipeline map:match pattern=soundpool/soundpool map:generate src=soundpool.xml/ map:serialize/ /map:match /map:pipeline What can you suggest? Thanks Richard. - 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]
AW: AW: Accessing session variables in the sitemap.xmap
hey heiko, see comments inline -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Heiko Milke Gesendet: Samstag, 1. Februar 2003 01:32 An: [EMAIL PROTECTED] Betreff: Re: AW: Accessing session variables in the sitemap.xmap Hello Marco, thank you very much for your reply. It is a bit irretating that you can't read something from the session that was set to it earlier in a the thing is that it was not set *earlier*. this has to do with how pipelines work. the xsp attribute create-session=true leads to code in the serverpage's generate() method. but this method is not called before pipeline setup. so at pipeline setup/assembly time the session will not yet have been created. serverpage (while working on the same request) but i'll have to live with it. Now I wrote an action that does the talking to the session and it works fine. The serverpages just lost some of their value for me. I was so it's not really the serverpages' fault. you can have create-session=true get to work. the xsp logicsheet just has to be modified accordingly (create the session in the XSP's setup() method. happy with the XMLFragment implementation of mine working out so well but if session modifications are delayed to the next page request Gn8 Heiko! jo, schlaf ma gut! - 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]
AW: AW: How can I send XML as HTTP POST to a URL?
but wouldn't a source be primarily useful only when generating or serializing? in this case he didn't say anything about data being generated in repsonse to the request he wants to send. so, if it doesn't generate anything as response, it probably wouldn't be a good 'source'. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von SAXESS - Hussayn Dabbous Gesendet: Mittwoch, 29. Januar 2003 09:14 An: [EMAIL PROTECTED] Betreff: Re: AW: How can I send XML as HTTP POST to a URL? It may be adequate to write a protocol Handler for this purpose. I think you can get hold on the original request from the Environment. Maybe .../components/source/URLSource.java is a good starting point ... hussayn Marco Rolappe wrote: you should probably code that as an action, that you can use in your sitemap. please see relevant docs. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von gv Gesendet: Dienstag, 28. Januar 2003 21:13 An: [EMAIL PROTECTED] Betreff: How can I send XML as HTTP POST to a URL? Hello, I need to have Cocoon send an XML structure as an HTTP POST request to a URL. Anyone know how to do this? Thank you, John __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - 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] -- Dr. Hussayn Dabbous SAXESS Software Design GmbH Neuenhöfer Allee 125 50935 Köln Telefon: +49-221-56011-0 Fax: +49-221-56011-20 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]
AW: WARP, Jserv or mod_jk?
hi richard, I'm currently using Cocoon 2.0.4, Tomcat 4.1.18, Apache 1.3.26 and mod_jk2 (which I didn't have problems with yet). -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Richard Cunliffe Gesendet: Mittwoch, 29. Januar 2003 15:08 An: [EMAIL PROTECTED] Betreff: WARP, Jserv or mod_jk? Hi, I'm upgrading! Can anyone suggest the best way to connect Apache 2.0.42 and Tomcat 4.0.6. I will be using Cocoon 2.0.4. I have read that the WARP connecter is the best, but I used Jserv on my older version. There is also the mod_jk. Which is the most reliable etc. Thanks Richard. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. The CSIR exercises no editorial control over E-mail messages and/or attachments thereto/links referred to therein originating in the organisation and the views in this message/attachments thereto are therefore not necessarily those of the CSIR and/or its employees. The sender of this e-mail is, moreover, in terms of the CSIR's Conditions of Service, subject to compliance with the CSIR's internal E-mail and Internet Policy. - 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]
AW: Cocoon for persistent URLs
I think you're mixing up the concepts of files and resources. persistent URLs should AFAIR bind to resources, which in turn may represent a file (and may redirect to a URL for that file, or something like that). example (contrived): http://cocoon.apache.org/manuals/BeginnersGuide this, being a resource may be permanent. the actual representation/file delivered (redirected to) may be html, pdf, whatever. and it may well be a different version of the document (e.g. this resource always redirects to the most recent version). that depends on how specific the contract is. you could also have http://cocoon.apache.org/manuals/BeginnersGuide/1.0 which should represent the resource with the specific version. and finally you could specify http://cocoon.apache.org/manuals/BeginnersGuide/1.0/html or something alike. so I think the minimum contract of your file URLs is that a file exists at that url. to your last question: if i saw an url like http://cocoon.apache.org/manuals/beginner_1.0.html I would expect it's always going to be the same file. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von I-Lin Kuo Gesendet: Mittwoch, 29. Januar 2003 19:20 An: [EMAIL PROTECTED] Betreff: RE: Cocoon for persistent URLs That's what I was thinking, more or less. I'd have a monitoring application check URLs once a day and generate emails if the files were moved or modified. But I was wondering if there were other approaches... There's also the contract issue of what a persistentURL promises: does it merely promise that there will always be some file at that URL, or does it promise it's always going to be the same file at that URL? I-Lin Kuo, Ann Arbor, MI Macromedia Certified ColdFusion 5.0 Advanced Developer Sun Certified Java 2 Programmer Ann Arbor Java Users Group (www.aajug.org) Original Message Follows From: Geoff Howard [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: Cocoon for persistent URLs Date: Wed, 29 Jan 2003 12:22:06 -0500 don't know how one would keep track of moved files automatically, but the resource exists action could help with the first part. you could keep a lookup table in database or xml with old location and new location and use it to lookup new location when resource exists action fails. Geoff -Original Message- From: I-Lin Kuo [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 29, 2003 10:57 AM To: [EMAIL PROTECTED] Subject: Cocoon for persistent URLs Has anybody here used Cocoon to implement persistent URLs? I don't mean just technical using Cocoon to make the URL independent of the actual file location (that's simple using sitemaps), but am interested in how to manage this. For example, some of the issues are: - making sure the file exists at the remapped URL and what to do if it disappears or is modified - how to keep track of files that get moved. _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus - 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]
AW: simple question
hi jordi, please have a look at cocoon's web.xml. there's an init-param named show-time, which, when set to yes/true makes cocoon add the processing time to each response. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Jordi Valldaura Gesendet: Dienstag, 28. Januar 2003 20:55 An: [EMAIL PROTECTED] Betreff: simple question I used cocoon 1.8.* in the past, now I'm using 2.0.4. In the first one each generated page had a line with the time cocoon taked to generate it. I dont see this line in cocoon 2 generated pages is there any easy way to know how much time takes cocoon to generate a page??? - 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]
AW: How can I send XML as HTTP POST to a URL?
you should probably code that as an action, that you can use in your sitemap. please see relevant docs. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von gv Gesendet: Dienstag, 28. Januar 2003 21:13 An: [EMAIL PROTECTED] Betreff: How can I send XML as HTTP POST to a URL? Hello, I need to have Cocoon send an XML structure as an HTTP POST request to a URL. Anyone know how to do this? Thank you, John __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - 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]
AW: How to run 2 tomcat-coocon web server
one might be able to better help you if the error message was translated. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von CARLETTA ANGELO Gesendet: Dienstag, 28. Januar 2003 12:16 An: [EMAIL PROTECTED] Betreff: How to run 2 tomcat-coocon web server --- Reçu de INFETUDE.G145193 02/250.96.71 28-01-03 12.16 Hi, I need to run 2 server tomcat-cocoon in one machine One server use \\localhost:8080\ (port 8080) and the other server use \\localhost\ (port 80 in config tomcat server.xml) I have a probleme in de second server with the used JSP Program In Error: Date of error: 28-janv.-03 Time of Error 12:15:57 Error messages: VGJ0607E - Une inadéquation de version s'est produite entre le serveur et le circuit my.pkg.JAH0001WUIBean. Thanks. Angelo 28-01-03 12.16 Envoyé à - [EMAIL PROTECTED] ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. [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]
AW: I cant get cocoon to process??
hi richard, well, you probably didn't find it, because your logging configuration seems to be different (i.e. strange to me ;-). maybe that's normal for older cocoon versions, I only know cocoon = 2.0.3. one issue (actually 3 ;-) I could find, which is an error in your sitemap.xmap: !-- == Soundpool -- pipelines pipeline map:match pattern=soundpool.xml map:generate src=soundpool.xml/ map:transform src=soundpool.xsl/ map:serialize type=html/ /map:match /pipelines /pipeline you tried to surround your single soundpool pipeline with a 'pipelines' element. furthermore both are incorrectly nested (you should be editing with an XML editor, which wouldn't allow this). third one: the namespace prefix (map) on pipeline is missing. so, this fragment should look like: map:pipeline map:match pattern=soundpool.xml map:generate src=soundpool.xml/ map:transform src=soundpool.xsl/ map:serialize type=html/ /map:match /map:pipeline there could be other issues (I got errors when trying with 2.0.3), but that maybe my setup. or it maybe a cocoon 2.0 thing, with which I couldn't really help. I'd really recommend upgrading to cocoon 2.0.4 and tomcat = 4.0.6. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Richard Cunliffe Gesendet: Mittwoch, 29. Januar 2003 01:19 An: [EMAIL PROTECTED] Betreff: RE: I cant get cocoon to process?? Marco, I have attached all the logs and my sitemap. I searched 'PreparableMatcher', but nothing came back. Thank you so much for taking a look at this for me! Richard. - 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]
AW: pass attributes to phpgenerator
hi johannes, I think you should be matching the request parameter(s) via the respective matcher, i.e. RequestParameterMatcher. the default (WildcardURI) matcher most probably only matches on the URI. so (from the top of my head) it would be something like: !--php try-- map:pipeline map:match pattern=one2.php map:match type=request-parameter pattern=myparam map:generate type=php src=daten/one.php map:parameter name=myparam value={1}/ !-- param matched by request-parameter matcher -- /map:generate /map:match map:transform src=stylesheets/try1.xsl/ map:serialize type=xml/ /map:match /map:pipeline -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Johannes Stein Gesendet: Sonntag, 26. Januar 2003 04:19 An: [EMAIL PROTECTED] Betreff: pass attributes to phpgenerator hello people! after some hours of configuration, i finally got the c2 phpgenerator set up correctly. next thing would be to pass http-attributes as parameters to the php-script. i tried something like this in the sitemap: !--php try-- map:pipeline map:match pattern=one2.php?myparam=** map:generate type=php src=daten/one.php map:parameter name=myparam value={1}/ /map:generate map:transform src=stylesheets/try1.xsl/ map:serialize type=xml/ /map:match /map:pipeline then i called the url one2.php?myparam=three, but the variable myparam isn't available in the php-script, referring to it seems to result in a php errormessage (which is no valid xml, therefore i do not see anything of it). i'd be delighted if anyone had some experience to share on this problem! Thank you, johannes - 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]
AW: Action Not Adding Values to Sitemap or is it?
AFAIR your sitemap variable is only accessible within your map:act block, something like this: sitemap-snippet map:match pattern=view/** map:act type=task map:parameter name=method value=doAddSubjectsAndMyCategories/ map:parameter name=task-subject-node value=Global/ map:match type=request-parameter pattern=xpath map:generate src=xmldb:xindice://localhost:4080/db/wEMR/tasks/{../1}#{1}/ map:transform src=stylesheets/task.xsl map:parameter name=users value={../subjNodes}/ map:parameter name=categories value={../categories}/ /map:transform map:serialize type=html/ /map:match /map:act map:generate src=xmldb:xindice://localhost:4080/db/wEMR/tasks/{1}/ map:transform src=stylesheets/task.xsl/ map:serialize type=html/ /map:match /sitemap-snippet -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Julian Klein Gesendet: Samstag, 25. Januar 2003 00:21 An: Cocoon Users Betreff: Action Not Adding Values to Sitemap or is it? Hi All, I am trying to add a paramater to the sitemap through an Action extended from the MultiAction Class, but when I try to access it in my sitemap, it is empty. I am certain there should be a value coming out of the Action b/c it prints the value to my log from inside the action. Any help would be greatly appreciated. I attached my Action code and sitemap code snippets. I am running Cocoon 2.1 dev and java 1.4 on Red Hat 8.0. The reason for the action is to get collection names from the Xindice database, which translate to client's of the webapp. Thanks, Julian sitemap-snippet map:match pattern=view/** map:act type=task map:parameter name=method value=doAddSubjectsAndMyCategories/ map:parameter name=task-subject-node value=Global/ /map:act map:match type=request-parameter pattern=xpath map:generate src=xmldb:xindice://localhost:4080/db/wEMR/tasks/{../1}#{1}/ map:transform src=stylesheets/task.xsl map:parameter name=users value={subjNodes}/ map:parameter name=categories value={categories}/ /map:transform map:serialize type=html/ /map:match map:generate src=xmldb:xindice://localhost:4080/db/wEMR/tasks/{1}/ map:transform src=stylesheets/task.xsl/ map:serialize type=html/ /map:match /sitemap-snippet * CocoonMultiActionCode /*Places all the user's into a sitemap parameter.*/ public Map doAddSubjNodes (Redirector redirector, SourceResolver resolver, Map objectModel, String src, Parameters parameters) throws Exception { Request request = ObjectModelHelper.getRequest(objectModel); Map sitemapParams = new HashMap(); //determine dest of task to be created String subjectNode = parameters.getParameter(task-subject-node, request.getParameter(task-subject-node)); TaskManager taskManager = new TaskManager(); //get all available subjectNode's String[] subjNodes = taskManager.getSubjectNodes(); String subjStr = ; //add all user's to sitemap for(int x=0;xsubjNodes.length;x++) { subjStr = subjStr + / + subjNodes[x]; } System.out.println(subjNodes=+subjStr); sitemapParams.put(subjNodes, subjStr); return sitemapParams; } /CocoonMultiActionCode = Live simply so others may simply live. -Ghandi Pluralitas non est ponenda sine neccesitate. Entities should not be multiplied unneccesarily -William of Occam __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - 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]
AW: simple question about RequestSelector
hi cyril, the problem is the '{critere}'. you have no sitemap component creating this sitemap variable. but in this case you don't need that anyway since you are instructing the XSLT-/TraxTransformer to 'use-request-parameters', i.e. make all request parameters available to the stylesheet as stylesheet params. to be able to access 'critere' within the stylesheet then, declare it at the head of your stylesheet (xsl:param name=critere/). should you need the parameter to be named 'tri', the simple solution would be a xsl:param name=tri select=$critere/. HTH -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Cyril Vidal Gesendet: Samstag, 25. Januar 2003 13:52 An: [EMAIL PROTECTED] Betreff: simple question about RequestSelector Dear all, I would like to process an URI of the following type: http://localhost:8080/cocoon/hellococoon?langue=anglaiscritere=organisme The first parameter's role is to select a specified stylesheet: langue=anglais - select participantsEN.xslt langue=francais - select participantsFR.xslt while parameter 'critere' is used to pass a parameter to the selectionned stylesheet. If I only take care about the parameter 'langue', the following code's snippet using RequestSelector works fine: map:match pattern= map:generate src=documents/participants.xml/ map:select type=request map:parameter name=parameter-name value=langue/ map:when test=francais map:transform src=stylesheets/participantsFR.xsl /map:transform /map:when map:when test=anglais map:transform src=stylesheets/participantsEN.xsl/ /map:when map:otherwise map:transform src=stylesheets/participantsFR.xsl/ /map:otherwise /map:select map:serialize type=html/ /map:match But When I want to deal with the second parameter too, (by adding the following instructions): map:parameter name=use-request-parameters value=true/ map:parameter name=tri value={critere}/ I have some problems, indeed I receive no error messag but nothing is happening. I use the the following code: map:match pattern= map:generate src=documents/participants.xml/ map:select type=request map:parameter name=parameter-name value=langue/ map:when test=francais map:transform src=stylesheets/participantsFR.xsl map:parameter name=use-request-parameters value=true/ map:parameter name=tri value={critere}/ /map:transform /map:when ... /map:match /map:when I'm sure the XSLT works well , so I guess the sitemap' syntax ins't good. Can someone help me, please? Thannks in advance, Cyril. - 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]
AW: AW: Action Not Adding Values to Sitemap or is it?
hi julian, sorry, I haven't worked with XIndice yet. but from looking at the XIndice sources the NPE seems to be caused by the key being null. as already mentionend, I'm not into XIndice so I don't know where that key is being specified (created by your action, maybe?), but perhaps this info helps you finding the problem. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Julian Klein Gesendet: Samstag, 25. Januar 2003 19:08 An: [EMAIL PROTECTED] Betreff: Re: AW: Action Not Adding Values to Sitemap or is it? Marco, Thanks a lot, I must have overlooked that in the how-to on the website. I was wondering if you know whether or not the new version of Xindice (1.1 Beta) works over the pseudo protocol. I have tried, but to no avail. The new version must run in Tomcat's servlet container. I want to upgrade b/c Xindice does not reliably send all the documents in a given collection to the sitemap pipeline. It seems to throw a DocumentCache error (I attached the stack trace in case you may recognize this error). Also, I attached my final sitemap snippet b/c it was slightly different then what you sent (the sitemap parameter reference for the xindice url/collection had to move back one map). Anyway, I really appreciate the help. -Julian final-sitemap-snippet map:match pattern=view/** map:act type=task map:parameter name=method value=doAddSubjectsAndMyCategories/ map:parameter name=task-subject-node value=Global/ map:match type=request-parameter pattern=xpath map:generate src=xmldb:xindice://localhost:4080/db/tasks/{../../1}#{1}/ map:transform src=stylesheets/task.xsl map:parameter name=users value={../subjNodes}/ map:parameter name=categories value={../categories}/ /map:transform map:serialize type=html/ /map:match map:generate src=xmldb:xindice://localhost:4080/db/tasks/{1}/ map:transform src=stylesheets/task.xsl/ map:serialize type=html/ /map:act /map:match /final-sitemap-snippet **Xindice 1.0 DocumentCache Error stacktrace java.lang.NullPointerException at org.apache.xindice.core.DocumentCache$CacheKey.equals(DocumentCache.java:171 ) at java.util.WeakHashMap.eq(WeakHashMap.java:248) at java.util.WeakHashMap.get(WeakHashMap.java:340) at org.apache.xindice.core.DocumentCache.getDocument(DocumentCache.java:79) at org.apache.xindice.core.Collection.getDocument(Collection.java:711) at org.apache.xindice.core.query.XPathQueryResolver$ResultSet.prepareNextNode(X PathQueryResolver.java:1003) at org.apache.xindice.core.query.XPathQueryResolver$ResultSet.getNextNode(XPath QueryResolver.java:1042) at org.apache.xindice.client.corba.CollectionServant.queryWrapper(CollectionSer vant.java:385) at org.apache.xindice.client.corba.CollectionServant.queryCollection(Collection Servant.java:425) at org.apache.xindice.client.corba.db.CollectionPOA._invoke(CollectionPOA.java: 332) at org.openorb.adapter.poa.POA.dispatch(POA.java:975) at org.openorb.net.AbstractServerRequest.dispatch(AbstractServerRequest.java:75 0) at org.openorb.net.ServerManagerImpl.serve_request(ServerManagerImpl.java:1467) at org.openorb.net.ServerManagerImpl.thread_pool_main(ServerManagerImpl.java:14 10) at org.openorb.net.ServerManagerImpl.access$200(ServerManagerImpl.java:77) at org.openorb.net.ServerManagerImpl$PoolThread.run(ServerManagerImpl.java:1557 ) /stacktrace = Live simply so others may simply live. -Ghandi Pluralitas non est ponenda sine neccesitate. Entities should not be multiplied unneccesarily -William of Occam __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - 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]
AW: Newbie questions about Actions
hi lenya, you compile the java Action code like any other java code, i.e. via javac, IDE, etc. if you package the resulting classes as JAR this has to be in WEB-INF/lib of your cocoon. otherwise the classes go to WEB-INF/classes of you cocoon. note that the package structure has to be reflected in the directory hierarchy, i.e. if your class 'bar' is in package 'foo', the class would have to be in WEB-INF/classes/foo/bar.class. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Lenya L. Khachaturov Gesendet: Montag, 20. Januar 2003 17:34 An: [EMAIL PROTECTED] Betreff: Newbie questions about Actions Hello, I've read through userdocs/concepts/actions.html, but still I dont't get the following (and the docs do not explain this): I've got Java code of an action. HOW do I compile this and WHERE should I put the resulting .class file after this. -- Lenya Khachaturov mailto:[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]
AW: newbie: creating a cocoon action using AbstractMultiAction
the stacktrace says that the AbstractMultiAction can't be found. make sure that this class is in the classpath (it should be in the cocoon JAR, but you better check that out). -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Julian Klein Gesendet: Montag, 20. Januar 2003 22:27 An: [EMAIL PROTECTED] Betreff: Re: newbie: creating a cocoon action using AbstractMultiAction Hey Marcus, Yeah I'm sorry, but I had fixed that (I jsut sent the old sitemap DUH). You see I tried it in the original package of com.ethidium, but then thought my class should be in the cocoon dev jar so I moved it to org.apache.cocoon.acting and changed the sitemap. Unfortunately neither worked eventhough the sitemap matched the location of the class. I know it is accessing the class since it is looking for the AbstractMultiAction class (it's superclass). I am running also the slide sample from the scratchpad which has actions that use the AbstractMultiAction class as well...but they works fine. I am boggled about this...could it have something to do with Thread safety from the Avalon framework or some funny classloading issue? Thanks Again, Julian --- Marcus Crafter [EMAIL PROTECTED] wrote: Hi Julian, Not sure what the problem is exactly, but your source file has your action in the package 'org.apache.cocoon.acting', whereas your sitemap.xmap file says that is under 'com.ethidium.cocoon.action'. Perhaps that's causing things to go a bit pear shaped. Hope that helps. Cheers, Marcus On Mon, Jan 20, 2003 at 01:06:09PM -0800, Julian Klein wrote: *ACTION JAVA CODE** /* * TaskAction.java * * Created on January 14, 2003, 12:16 PM */ package org.apache.cocoon.acting; ...snip/... ***SITEMAP** ** ...snip/... map:actions map:action name=eTask src=com.ethidium.cocoon.action.TaskAction/ -- . ,,$, Marcus Crafter ;$' ':Computer Systems Engineer $: : ManageSoft GmbH $ o_)$$$: 82-84 Mainzer Landstrasse ;$,_/\ :' 60327 Frankfurt Germany ' /( \_' . : - 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] = Live simply so others may simply live. -Ghandi Pluralitas non est ponenda sine neccesitate. Entities should not be multiplied unneccesarily -William of Occam __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - 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]
AW: XSP Redirection HELP!!!
are you using your xsp as an action via ServerPagesAction? are you using your xsp as the target for the form action? like this: form action=save-form-data ... in your sitemap: map:match pattern=save-form-data map:generate type=serverpages src=save-form-data.xsp/ ... /map:match you could redirect after the generation step via map:redirect-to but this is kind of ugly. another alternative would be to use your xsp via the already mentioned ServerPagesAction (if you must use xsp): form action=save-form-data ... in your sitemap: map:match pattern=save-form-data map:act type=serverpages src=save-form-data.xsp/ ... /map:match for this, you must have the serverpages action declared in the sitemap. then you can redirect via map:redirect-to in the sitemap or you can redirect from within the xsp via action:redirect-to (action logicsheet). third alternative would be to directly code the action, invoke it in your 'save-form-data' pipeline, after which you redirect. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Rajasekhar Atchutuni Gesendet: Dienstag, 21. Januar 2003 00:44 An: [EMAIL PROTECTED] Betreff: Re: XSP Redirection HELP!!! Hi, I am sorry I framed my question wrong. I am already successfully saving my form data to oracle using esql:query in my xsp page. What I need to know is how I can send/redirect the user to the home page, after I close the esql:connection. Thanks Raj - 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]
AW: Non-string sitemap custom parameters
hi, as you may know, actions get parameters via avalon Parameters. if you look at the API you see that the parameters in the end can only contain strings. so you have no direct way to pass objects of other type. but you could pass your objects e.g. via request/session attributes. have a look at the respective docs/API. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von jcplerm Gesendet: Dienstag, 21. Januar 2003 02:35 An: [EMAIL PROTECTED] Betreff: Non-string sitemap custom parameters Hello, I need to pass an object of arbitrary type from one action down to another along a sitemap pipeline, but unfortunately it seems that they are all cast to String. This is an example: map:match pattern=myHello2.html map:act type=ObjectRetriever map:act type=CheckParamType map:parameter name=objParam value={objParam}/ map:generate src=jlerm/test1.xml/ map:transform src=jlerm/test1.xsl map:parameter name=zzz value=20/ map:parameter name=objParam value={objParam}/ /map:transform map:serialize type=html/ /map:act /map:act /map:match ObjectRetriever puts an object into its return hashmap, with key objParam. It is passed to CheckParamType with the same name. Unfortunately, tracing code in CheckParamType logs the fact that objParam is of type java.lang.String, when it should be something else (like a Vector, for instance). Any ideas how I could do that? Thanks, Julio Lerm Chicago, IL - 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]
AW: AW: XSP Redirection HELP!!!
well, it does work, I tried it out. only one generator per pipeline, that's right (only one generator can be set at pipeline setup time). but in this case, there is only one pipeline, that is the ServerPagesGenerator. the redirect is to another pipeline. anyway, I can imagine the use of XSP actions for prototyping (apart from generating and using XML fragments). -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Antonio Gallardo Gesendet: Dienstag, 21. Januar 2003 03:03 An: [EMAIL PROTECTED] Betreff: Re: AW: XSP Redirection HELP!!! This will does not work because you have one generator in the pipeline. A strict rule in any version af Cocoon told: Just ONE generator for pipeline then the another generator on the target of the redirection will not be loaded. I think it will throw a Exception. (Gurus, please shine us and tell us what will happen). I never tried to do somethig like this. See more comments down. another alternative would be to use your xsp via the already mentioned ServerPagesAction (if you must use xsp): form action=save-form-data ... in your sitemap: map:match pattern=save-form-data map:act type=serverpages src=save-form-data.xsp/ ... /map:match for this, you must have the serverpages action declared in the sitemap. then you can redirect via map:redirect-to in the sitemap or you can redirect from within the xsp via action:redirect-to (action logicsheet). third alternative would be to directly code the action, invoke it in your 'save-form-data' pipeline, after which you redirect. I think this is a good aproach too. But I dont see why to waste a XSP when any flavor of Database Action (Original or Modular) can do this for you. Listen: If you think you need your special XSP page because you need to validate the form data that you received from the user request. The answer is: Why reinvent the cool water? There is another fine action that can do this for you, please check the following snip from my sitemap: !-- catalog of Table -- map:match pattern=*-table.html !-- Create -- map:match type=request-parameter pattern=cocoon-action-Create map:act action=crear type=form-validator map:parameter name=descriptor value=docs/{../1}-form.xml/ map:parameter name=validate-set value=add/ !-- Here data are safely validated -- map:act type=dbAdd map:parameter name=descriptor value=docs/{../../1}-form.xml/ !-- At this point the data are already stored in the database -- map:redirect-to uri=where_ever_you want/ /map:act !-- Here was wa problem. Data are not into the database, but validated -- /map:act !-- Here Data are not passed the validation check -- !-- You can let it empty, since if no other pipeline match it, the handle error will take care of what happened -- /map:match For more info about form Validation Action, please check: http://wiki.cocoondev.org/Wiki.jsp?page=FormValidationUsingCocoon I hope it will help you. ;-) Antonio Gallardo - 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]
AW: Non-string sitemap custom parameters
hi julio, In lack of details I don't completely understand your use case, but if you're trying to code in the stylesheet you should consider writing a transformer for your needs. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von jcplerm Gesendet: Dienstag, 21. Januar 2003 03:16 An: [EMAIL PROTECTED] Betreff: Re: Non-string sitemap custom parameters Thanks for your reply. What happens is that I want to access another object from within XSLT by means of Xalan extensions. That object should have access to the request/session objects. I think one way would be to subclass TraxTransformer so that it sets XSLT parameters at setup time in the transformer. TraxTransformer apparently has access to the ObjectModelHelper, from which I can extract the request/session and then pass it to the transformer, and the stylesheet passes them to the target object by means of Xalan extension functions. If you have any other ideas, I would appreciate. Thanks, Julio - 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]
AW: Problem in running XForm samples
did you mistype a map:act as act? -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von poornima ponnuswamy Gesendet: Donnerstag, 19. Dezember 2002 05:11 An: [EMAIL PROTECTED] Betreff: Problem in running XForm samples I am using cocoon2.1, Apache tomcat 4.1 and I am able to get into http://localhost:8080/cocoon/samples/welcome but when I get into xml form samples I get the following error The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode notifies that org.apache.cocoon.ProcessingException says: Failed to load sitemap from file:/C:/jakarta-tomcat-4.1.17-LE-jdk14/webapps/cocoon/samples/xmlform/sitem ap.xmap More precisely: org.apache.cocoon.ProcessingException: Failed to load sitemap from file:/C:/jakarta-tomcat-4.1.17-LE-jdk14/webapps/cocoon/samples/xmlform/sitem ap.xmap: org.apache.avalon.framework.configuration.ConfigurationException: Cannot get component selector for 'act' at file:/C:/jakarta-tomcat-4.1.17-LE-jdk14/webapps/cocoon/samples/xmlform/sitem ap.xmap:57:38 original message java.lang.ClassNotFoundException: org.apache.cocoon.samples.xmlform.WizardAction Can anyone help me with it. I was able to do in earler version of cvs but not now. Thanks poornima __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com - 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]
AW: run a Cocoon web application from CD-ROM?
as you said yourself, you set the logging level to ERROR, so you still get errors. you could set the level higher, but then you would get the respective messages. but I think you could just remove all the configured log targets. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Jakob Gesendet: Donnerstag, 19. Dezember 2002 18:15 An: [EMAIL PROTECTED] Betreff: run a Cocoon web application from CD-ROM? Hi, I am trying to run a Cocoon web application from CD-ROM. The webapp consists of Jetty (another servlet container), Cocoon, and an XML database, eXist. I would like to disable *all*logging*; obviously I do not want to write to a log file, as I don't know what OS it will be run (so I can't take a C:\temp or /tmp directory for granted), and I don't want anything output to the console. I have looked into web.xml, cocoon.xconf, logkit.xconf, sitemap.xmap, and have tried to disable logging, by setting values to ERROR, and removing the logger attributes in the sitemap ... But still, there are loads of errors sent to the console ... Thanks for any pointers, -- Jakob. - 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]
AW: Build ERROR last cocoon2 CVS
hi stavros, I don't know line 1039 of your build file, but something in there seems to refer to a local path (the path shown in the error message). and as the exception says, it's a malformed URL. the correct one would start like file://c:/Documents... -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Cocoon User Gesendet: Dienstag, 17. Dezember 2002 18:34 An: [EMAIL PROTECTED] Betreff: Build ERROR last cocoon2 CVS error msg: BUILD FAILED file:C:/Documents and Settings/root/My Documents/CVS/cocoon/xml-cocoon2/build.xml:1039: IOException: java.net.MalformedURLException: unknown protocol: c system: windows XP j2sdk1.4.1_01 any idea to solve this problem? thnx Stavros Kounis - 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]
AW: Include content of another (non-xml) file into an XSP
hi yves, maybe you could simply use one of the Cocoon IncludeTransformers, so that your text file is included before the XSP is compiled and executed. -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Yves Vindevogel Gesendet: Donnerstag, 12. Dezember 2002 14:27 An: [EMAIL PROTECTED] Betreff: Include content of another (non-xml) file into an XSP Hi, I'm looking for a way to include the complete content of a text file into an XSP page. This is an example page : ?xml version=1.0 encoding=ISO-8859-1? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:esql=http://apache.org/cocoon/SQL/v2; xmlns:xsp-request=http://apache.org/xsp/request/2.0; xmlns:xsp-session=http://apache.org/xsp/session/2.0; create-session=true html esql:connection esql:poolpierrefabre/esql:pool esql:execute-query esql:query HERE COMES THE CONTENT OF THE FILE WITH NAME mySQLQuery.sql /esql:query esql:results !-- Handle results -- /esql:results esql:no-results !-- Handle no results -- /esql:no-results /esql:execute-query /esql:connection /html /xsp:page - 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]