Re: tabs in the output
Thank you Robert! Your solution works greatly!!! Thanks to Lionel and Adam too! Bye, Nesto - Original Message - From: "Robert Koberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 20, 2003 4:20 PM Subject: RE: tabs in the output > Hi, > > This will have the same problems and is totally unnecessary. It is much better, > IMO, to use attribute value templates '{}' when possible. > > The problem would be fixed by: > > > > > > best, > -Rob > > > > -Original Message- > > >Hi! > > >I don' know if this is OT, beause I cant find the problem! > > > > > >I'm writing a stylesheet that transforms xml int xhtml > > >(Transitional/basic/Mobile Profile). > > >I use Cocoon 2.0.4 as publishing framework. > > > > > >I have a problem with a portion of code generated: > > >The goal is to produce something like this: > >href="results?city=Rome">Rome > > > > > >The xml is like this: > > > > > > Rome > > > ... > > > . > > > > > > > > > > > >The stylesheet I wrote is this: > > > > > > > > >. > > > > > >. > > > > > > > > > > > >But the result is > > > > > >Rome > > > > > > > > >I think the ": " are tabs, but I really don't know why they are inserted! > > >Of course this causes an error when you follow that link... (not on all > > >browsers... with IE it works correctly, but, for example, with the Nokia > > >Mobile Browser... It doesn't) > > > > > > > > >Is this a encoding problem?? Or a serialization problem? > > >( Here I put the serializaer I use... > > > > >name="xhtml-Basic" pool-grow="2" pool-max="64" > > >pool-min="2" src="org.apache.cocoon.serialization.XMLSerializer"> > > >-//W3C//DTD XHTML Basic 1.0//EN > > >http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd > octype-system> > > > > > >) > > > > > >If yes, How can I solve it?? > > >Any idea is well accepted!! > > > > > >Thank you for all the answers. Best regards, > > > > > >Nesto > > > > > > - > > 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]
Re: tabs in the output
No Lionel, your solution gives me the same result... However thank you for the answer and for the rapidity!!! Nesto - Original Message - From: "Lionel Crine" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 20, 2003 4:18 PM Subject: Re: tabs in the output > Why don't you try : > > > results?city= select="name"/> > > > > instead of : > > > > > > > At 16:10 20/03/2003 +0100, you wrote: > >Hi! > >I don' know if this is OT, beause I cant find the problem! > > > >I'm writing a stylesheet that transforms xml int xhtml > >(Transitional/basic/Mobile Profile). > >I use Cocoon 2.0.4 as publishing framework. > > > >I have a problem with a portion of code generated: > >The goal is to produce something like this: >href="results?city=Rome">Rome > > > >The xml is like this: > > > > Rome > > ... > > . > > > > > > > >The stylesheet I wrote is this: > > > > > >. > > > >. > > > > > > > >But the result is > > > >Rome > > > > > >I think the ": " are tabs, but I really don't know why they are inserted! > >Of course this causes an error when you follow that link... (not on all > >browsers... with IE it works correctly, but, for example, with the Nokia > >Mobile Browser... It doesn't) > > > > > >Is this a encoding problem?? Or a serialization problem? > >( Here I put the serializaer I use... > > >name="xhtml-Basic" pool-grow="2" pool-max="64" > >pool-min="2" src="org.apache.cocoon.serialization.XMLSerializer"> > >-//W3C//DTD XHTML Basic 1.0//EN > >http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd > > > >) > > > >If yes, How can I solve it?? > >Any idea is well accepted!! > > > >Thank you for all the answers. Best regards, > > > >Nesto > > > - > 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]
tabs in the output
Hi! I don' know if this is OT, beause I cant find the problem! I'm writing a stylesheet that transforms xml int xhtml (Transitional/basic/Mobile Profile). I use Cocoon 2.0.4 as publishing framework. I have a problem with a portion of code generated: The goal is to produce something like this: Rome The xml is like this: Rome ... . The stylesheet I wrote is this: <xsl:template match="city"> . > . But the result is Rome I think the ": " are tabs, but I really don't know why they are inserted! Of course this causes an error when you follow that link... (not on all browsers... with IE it works correctly, but, for example, with the Nokia Mobile Browser... It doesn't) Is this a encoding problem?? Or a serialization problem? ( Here I put the serializaer I use... -//W3C//DTD XHTML Basic 1.0//EN http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd > ) If yes, How can I solve it?? Any idea is well accepted!! Thank you for all the answers. Best regards, Nesto
xml declaration
Hi! I'm trying to serialize my xhtml pages with the xhtml serializer, but I don't want to serialize the xml declaration at the top of the document. This because with Pocket Internet Explorer the declaration is visible at the top of the page. I tried this: -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ISO-8859-1 yes > but the page sent still contains the xml declaration. Why?? And how can I solve my problem?? (If I use the html serializer the declaration disappears, but there are problems with the content i want to deliver, so I don't want the html serializer!) Thanks in advance! Nesto
Re: XHTML Mobile profile
Try adding this to your MAIN sitemap.xmap in the serializers section: http://www.wapforum.org/DTD/xhtml-mobile10.dtd ISO-8859-1 You may change the doctype or encoding if you want. And then in your sitemap, you refer to this serializer writing: Hope this helps! Nesto - Original Message - From: "zze-MORY Nicolas FTRD/DMI/REN" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 10, 2003 1:16 PM Subject: XHTML Mobile profile does a xHTML Mobile profile SERIALIZER exists for cocoon ? -To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]
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, without errors, but with del xml header visualized at the beginning of every page. (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 XSPs that are called in a pipeline for a iPaq http request (for example) have at the beginning the xml header (), while the xsl doesn't. Then I deliver the markup with this serializer: -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ISO-8859-1 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
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: I get an error If I write in the MAIN sitemap this 3 serializers: -//W3C//DTD XHTML 1.0 Strict//EN> http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd> ISO-8859-1> -//W3C//DTD XHTML 1.0 Transitional//EN> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> ISO-8859-1> "-//W3C//DTD XHTML Basic 1.0//EN http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd ISO-8859-1 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
Re: session:set-attribute !error!
Hi! I get the same error, with a similar group of instructions. I think your code is correct, and it should work. However, my solution was to write the same instruction in java: session.setAttribute("user", user); inside a element This worked... Nesto - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 11:20 AM Subject: session:set-attribute !error! When I write user I get an error : java.lang.NullPointerException But I don't understand, If I take the line, make a copy-paste of the same line it works. Then after some refreshes it don't work again! I don't understand! Why??? I'm sure user is correct, and is correct to! Thanks for your help - 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]
Re: failure in request parameters
Hi Eduardo! I have the same problem with a jsp. Here I forward you the (only) answer I received from the cocoon developers mailing list, with my original message. Maybe it can help you. Now I'm thinking in translate my JSPs in XSPs as you can read on my posts (but I haven't received any answer yet), but I we can solve this problem it would be better! If you have some solution please, tell me! Regards, Nesto - Original Message - From: "Konstantin Piroumian" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 18, 2003 10:43 AM Subject: Re: Is this a bug? > Check if the JSP samples work.> If yes, then probably there's an error somewhere in your code that causes an> exception which is handled incorrectly in the recent Cocoon (according to> rumors in users list).> > Also, you can use the JSPReader to get the pure output of your JSP and then> check Cocoon logs to see if there are any exceptions (except the Illegal> state one).> > Konstantin - Original Message - From: Nesto To: [EMAIL PROTECTED] Sent: Tuesday, February 18, 2003 10:29 AM Subject: Is this a bug? Hello! I have a problem with a JSP generator, and after many attempts, now I think that there could be a bug. So I need your help! I use Cocoon 2.0.4 with Tomcat 4.1.18, on a server that runs Linux RedHat 8. Here I write my simple test code: The jsp (named prova.jsp) generates a small xml data, and reads a request parameter from the http request. <%@ page contentType="text/xml"%> <%=request.getParameter("name")%> This simple jsp was included as generator in my sitemap: <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> I think there is nothing wrong in this sitemap! But when I request http://myHost:8080/cocoon/myApp/prova.jsp?name=xyz I get the exception: 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) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386) at org.a
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 of my old JSP, in code for my new XSP Regards, Nesto
XSP and JavaBeans
Hi, I want to convert my JSP (that actually generates my xml data) in XSP for use them with Cocoon. My JSP are based on JavaBeans and import some custom classes. Is there a way to reuse this components? My classes can be imported with the element , but how can I include my Beans in a way similar to the directive? Thank you! Nesto
Newbie: where is the error?
Hi! I use some JSP 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 custom classes? Sorry for my newbie question, but I can't find where the error is! In the sub-sitemap I wrote: --> > 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
Session managing problem
Hi! I have a problem with the session managing. I'm trying to write a user interface of an existing system using cocoon as publishing framework. The system is composed of a set of JSPs that generates xml data from a database. So the pipelines in the sitemap I wrote are all of this type: The REMOTE application manage itself the user sessions, but i don't how i have to modify my sitemap in order to let client and the remote application exchange session informations. In this moment the presence of Cocoon between client and Remote App causes the loss of session information (accessing through IE directly, I can see the correct xml data) I read the documentation on Cocoon site, and on Wiki, and I found something that looks interesting: the matchers of type cookie and sessionstate. But the problem is that I really haven't understand how I can use them. Thanks for your answers! Nesto
Re: Passing parameters
Hi Eduardo! Your question is general, I don' know if I understand it well. However, in the past weeks I had the same problem. Here I post you the solution I found, with the great help of this community. Hope this help for your problem to. I wanted to write a matcher for an URI of this type: http://myhost.com:8080/cocoon/myApp/list.jsp?param=value The matcher is: http://anotherhost:8080/anotherApp{../1}.jsp?param={param}"; mime-type="text/xml"/> Note: the jsp that generates xml data is included with type="file" and not as type="jsp" Nesto - Original Message - From: "Eduardo Zurita" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 11, 2003 2:16 PM Subject: Re: Passing parameters > OK. > > is there a way to pass a parameter from the user querystring to a JSP > generator? > > Thanks in advance > > Eduardo. > - 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]>
Re: matcher of a request
Dear Hussayn, sorry, but this more generic matcher doesn't works! The same matcher with the parameters explicitly written works! I don't know why. Your solution is better and the sitemap would be shorter... If you can tell me if there is a difference... thank you! Nesto - Original Message - From: "SAXESS - Hussayn Dabbous" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 06, 2003 12:36 PM Subject: Re: matcher of a request > You can make this even more generic: > > > > src="http://anotherhost:8080/anotherApp{../1}.jsp{requestQuery}"; >mime-type="text/xml"/> > > > > > > This will simply copy the GET-parameters from your original request ;-) > and i think it's slightly more performant ... > regards, Hussayn > > Nesto wrote: > > Thank you Jan for your help!! > > Finally I wrote a matcher that works fine! > > I post it to the group because it could be interesting. > > > > I wanted to write a matcher for an URI of this type: > > http://myhost.com:8080/cocoon/myApp/list.jsp?user=tom&password=tom > > > > The matcher is: > > > > > > > > > > > src="http://anotherhost:8080/anotherApp{../1}.jsp?username={username}&pa ssword={password}" > > mime-type="text/xml"/> > > > > > > > > > > > > Hope this helps someone else! > > > > 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]>
Re: matcher of a request
Thank you Jan for your help!! Finally I wrote a matcher that works fine! I post it to the group because it could be interesting. I wanted to write a matcher for an URI of this type: http://myhost.com:8080/cocoon/myApp/list.jsp?user=tom&password=tom The matcher is: > Hope this helps someone else! Nesto! - Original Message - From: Jan Harms To: [EMAIL PROTECTED] Sent: Wednesday, February 05, 2003 3:29 PM Subject: AW: matcher of a request Nesto, I´m not sure if this works, but try http://anotherHost:8080/theApp/{1}.jsp?user={request:user}&password={request:password}" /> > The {request:yourparam} parts are so called input-modules. See: http://xml.apache.org/cocoon/userdocs/concepts/modules.html Be careful with the generator type you choose. The JSP generator expects the location of a JSP-File. You are calling a jsp from another server, that means you have to use a generator that matches the *output* of this jsp. I.e if the jsp produces HTML you need the HTML-generator. In your case you need the file-generator since the jsp produces XML. Hope this helps, -Jan Harms
matcher of a request
How can I write a matcher for this type of request: http://myhost.com:8080/cocoon/myApp/list.jsp?user=tom&password=tom I can't write a matcher that runs fine! I don't know how the parameters can be passed. The jsp runs on another server and generates a xml document. > How I have to modify the matcher?? Thanks in advance! Nesto
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