RE: Servlets and Cocoon2.
Yes, it is in the package testcocoonproject. Any other ideas? -Original Message- From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 7:22 PM To: [EMAIL PROTECTED] Subject: RE: Servlets and Cocoon2. Hello, Is the package information for the servlet classes testcocoonproject ? I think just by copying the class files into a subdirectory of WEB-INF classes is not sufficient, the servlet classes should have the necessary package info ... Regds, Chiths I saw this message in the archives, but I can't seem to get servlets and Cocoon2 to work. I think my problem is getting the servlet to run. It's like it is not in the classpath. I have my servlet in WEB-INF\classes\testcocoonproject\TestServlet. Here's the entry from my sitemap file: map:match pattern=testcocoonproject/* map:generate src=http://localhost:9090/Cocoon/testcocoonproject.{1}/ map:transform src=stylesheets/page/simple-page2html.xsl/ map:serialize type=html/ /map:match I would expect when I enter the URL (http://localhost:9090/Cocoon/testcocoonproject/TestServlet) that the servlet would execute but I get a an error message. It picks up the testcocoonproject/*, but TestServlet yeilds the same result as any other non-existant name. org.apache.cocoon.ProcessingException: Could not read resource http://localhost:9090/Cocoon/testcocoonproject.TestServlet Do you have any suggestions on how to get this to work or samples of servlet output to Cocoon for XSL Transformation? Thanks, Joe Hall --INCLUDED MESSAGE FROM THE COCOON ARCHIVES--- Yes, working now. I sent the following yesterday. Thanks very much for your help. Thanks to Vadim Gritsenko and David Rosenstrauch. This scheme now works. Here is what I learned that may be valuable to others who would like to write servlets that output XML and would like for the XML to be input to an XLS Transformation. The sitemap entry: map:match pattern=servlet23/* map:generate src=http://cb:8080/examples/servlet/servlet23.{1}/ map:transform src=stylesheets/servlet23/{1}/ map:serialize type=html/ /map:match - where . servlet23 is a package name; this makes the matching straightforward. . the generate src entry is the servlet as externally referencable: note that if you address it from a browser you will get xml that you can look at for debug . the stylesheet is pathed from cocoon root. - Debugging required looking at: the logs in %tomcathome%\logs and %tomcathome%\webapps\cocoon\WEB-INF\logs --- Thanks to all developers for a great system. ---END INCLUDED MESSAGE- - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlets and Cocoon2.
I think servlets may not be the solution. The developer docs for Cocoon 2 are not complete. What is the recommended way of running Java code in Cocoon2 without the use of XSP? I haven't seen any documentation on this or how to configure Cocoon to run it after I write the code. I have existing Java code that is currently in servlets. I would like to get it to run in Cocoon. In Cocoon 1 we used Producers. What's the equivalent of a Producer in Cocoon 2? Will I still have access to the HttpRequest object? How would you do this? Thank you all very much for your help. Joe Hall -Original Message- From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 7:22 PM To: [EMAIL PROTECTED] Subject: RE: Servlets and Cocoon2. Hello, Is the package information for the servlet classes testcocoonproject ? I think just by copying the class files into a subdirectory of WEB-INF classes is not sufficient, the servlet classes should have the necessary package info ... Regds, Chiths I saw this message in the archives, but I can't seem to get servlets and Cocoon2 to work. I think my problem is getting the servlet to run. It's like it is not in the classpath. I have my servlet in WEB-INF\classes\testcocoonproject\TestServlet. Here's the entry from my sitemap file: map:match pattern=testcocoonproject/* map:generate src=http://localhost:9090/Cocoon/testcocoonproject.{1}/ map:transform src=stylesheets/page/simple-page2html.xsl/ map:serialize type=html/ /map:match I would expect when I enter the URL (http://localhost:9090/Cocoon/testcocoonproject/TestServlet) that the servlet would execute but I get a an error message. It picks up the testcocoonproject/*, but TestServlet yeilds the same result as any other non-existant name. org.apache.cocoon.ProcessingException: Could not read resource http://localhost:9090/Cocoon/testcocoonproject.TestServlet Do you have any suggestions on how to get this to work or samples of servlet output to Cocoon for XSL Transformation? Thanks, Joe Hall --INCLUDED MESSAGE FROM THE COCOON ARCHIVES--- Yes, working now. I sent the following yesterday. Thanks very much for your help. Thanks to Vadim Gritsenko and David Rosenstrauch. This scheme now works. Here is what I learned that may be valuable to others who would like to write servlets that output XML and would like for the XML to be input to an XLS Transformation. The sitemap entry: map:match pattern=servlet23/* map:generate src=http://cb:8080/examples/servlet/servlet23.{1}/ map:transform src=stylesheets/servlet23/{1}/ map:serialize type=html/ /map:match - where . servlet23 is a package name; this makes the matching straightforward. . the generate src entry is the servlet as externally referencable: note that if you address it from a browser you will get xml that you can look at for debug . the stylesheet is pathed from cocoon root. - Debugging required looking at: the logs in %tomcathome%\logs and %tomcathome%\webapps\cocoon\WEB-INF\logs --- Thanks to all developers for a great system. ---END INCLUDED MESSAGE- - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlets and Cocoon2.
From: Hall, Joe [mailto:[EMAIL PROTECTED]] I think servlets may not be the solution. The developer docs for Cocoon 2 are not complete. Can you complete it? You are welcome to send patches for any incomplete docs. What is the recommended way of running Java code in Cocoon2 without the use of XSP? Generators, transformers, serializers, actions, matchers, selectors - depending on what you want to achieve. I haven't seen any documentation on this or how to configure Cocoon to run it after I write the code. I have existing Java code that is currently in servlets. I would like to get it to run in Cocoon. In Cocoon 1 we used Producers. What's the equivalent of a Producer in Cocoon 2? Generators. Will I still have access to the HttpRequest object? org.apache.cocoon.environment.Request. *Very* similar to HttpRequest. Vadim How would you do this? Thank you all very much for your help. Joe Hall - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlets and Cocoon2.
Joe, When I was frustrated trying to get my servlets to work, my solution was to instantiate a transformer from within the servlet and not use Cocoon. This may be the best solution anyway because of performance. It is straightforward. An example I think in Oreilly, 'Java and XSLT',Burke Chapter 5. examples available from Oreilly site. Bob Garvey - Original Message - From: Hall, Joe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 30, 2002 9:48 AM Subject: RE: Servlets and Cocoon2. I think servlets may not be the solution. The developer docs for Cocoon 2 are not complete. What is the recommended way of running Java code in Cocoon2 without the use of XSP? I haven't seen any documentation on this or how to configure Cocoon to run it after I write the code. I have existing Java code that is currently in servlets. I would like to get it to run in Cocoon. In Cocoon 1 we used Producers. What's the equivalent of a Producer in Cocoon 2? Will I still have access to the HttpRequest object? How would you do this? Thank you all very much for your help. Joe Hall -Original Message- From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 7:22 PM To: [EMAIL PROTECTED] Subject: RE: Servlets and Cocoon2. Hello, Is the package information for the servlet classes testcocoonproject ? I think just by copying the class files into a subdirectory of WEB-INF classes is not sufficient, the servlet classes should have the necessary package info ... Regds, Chiths I saw this message in the archives, but I can't seem to get servlets and Cocoon2 to work. I think my problem is getting the servlet to run. It's like it is not in the classpath. I have my servlet in WEB-INF\classes\testcocoonproject\TestServlet. Here's the entry from my sitemap file: map:match pattern=testcocoonproject/* map:generate src=http://localhost:9090/Cocoon/testcocoonproject.{1}/ map:transform src=stylesheets/page/simple-page2html.xsl/ map:serialize type=html/ /map:match I would expect when I enter the URL (http://localhost:9090/Cocoon/testcocoonproject/TestServlet) that the servlet would execute but I get a an error message. It picks up the testcocoonproject/*, but TestServlet yeilds the same result as any other non-existant name. org.apache.cocoon.ProcessingException: Could not read resource http://localhost:9090/Cocoon/testcocoonproject.TestServlet Do you have any suggestions on how to get this to work or samples of servlet output to Cocoon for XSL Transformation? Thanks, Joe Hall --INCLUDED MESSAGE FROM THE COCOON ARCHIVES--- Yes, working now. I sent the following yesterday. Thanks very much for your help. Thanks to Vadim Gritsenko and David Rosenstrauch. This scheme now works. Here is what I learned that may be valuable to others who would like to write servlets that output XML and would like for the XML to be input to an XLS Transformation. The sitemap entry: map:match pattern=servlet23/* map:generate src=http://cb:8080/examples/servlet/servlet23.{1}/ map:transform src=stylesheets/servlet23/{1}/ map:serialize type=html/ /map:match - where . servlet23 is a package name; this makes the matching straightforward. . the generate src entry is the servlet as externally referencable: note that if you address it from a browser you will get xml that you can look at for debug . the stylesheet is pathed from cocoon root. - Debugging required looking at: the logs in %tomcathome%\logs and %tomcathome%\webapps\cocoon\WEB-INF\logs --- Thanks to all developers for a great system. ---END INCLUDED MESSAGE- - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Please check that your question has not already
Re: Servlets and Cocoon2.
I had a question about servlets in a pipeline and came up with the following a few days ago. The discussion is in the archives, I assume. Thanks to Vadim Gritsenko and David Rosenstrauch. This scheme now works. Here is what I learned that may be valuable to others who would like to write servlets that output XML and would like for the XML to be input to an XLS Transformation. The sitemap entry: map:match pattern=servlet23/* map:generate src=http://cb:8080/examples/servlet/servlet23.{1}/ map:transform src=stylesheets/servlet23/{1}/ map:serialize type=html/ /map:match - where . servlet23 is a package name; this makes the matching straightforward. . the generate src entry is the servlet as externally referencable: note that if you address it from a browser you will get xml that you can look at for debug . the stylesheet is pathed from cocoon root. - Debugging required looking at: the logs in %tomcathome%\logs and %tomcathome%\webapps\cocoon\WEB-INF\logs A distinction I see is that you do not have /servlet/ in the URI path. - Original Message - From: Hall, Joe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 29, 2002 2:55 PM Subject: Servlets and Cocoon2. I saw this message in the archives, but I can't seem to get servlets and Cocoon2 to work. I think my problem is getting the servlet to run. It's like it is not in the classpath. I have my servlet in WEB-INF\classes\testcocoonproject\TestServlet. Here's the entry from my sitemap file: map:match pattern=testcocoonproject/* map:generate src=http://localhost:9090/Cocoon/testcocoonproject.{1}/ map:transform src=stylesheets/page/simple-page2html.xsl/ map:serialize type=html/ /map:match I would expect when I enter the URL (http://localhost:9090/Cocoon/testcocoonproject/TestServlet) that the servlet would execute but I get a an error message. It picks up the testcocoonproject/*, but TestServlet yeilds the same result as any other non-existant name. org.apache.cocoon.ProcessingException: Could not read resource http://localhost:9090/Cocoon/testcocoonproject.TestServlet Do you have any suggestions on how to get this to work or samples of servlet output to Cocoon for XSL Transformation? Thanks, Joe Hall --INCLUDED MESSAGE FROM THE COCOON ARCHIVES--- Yes, working now. I sent the following yesterday. Thanks very much for your help. Thanks to Vadim Gritsenko and David Rosenstrauch. This scheme now works. Here is what I learned that may be valuable to others who would like to write servlets that output XML and would like for the XML to be input to an XLS Transformation. The sitemap entry: map:match pattern=servlet23/* map:generate src=http://cb:8080/examples/servlet/servlet23.{1}/ map:transform src=stylesheets/servlet23/{1}/ map:serialize type=html/ /map:match - where . servlet23 is a package name; this makes the matching straightforward. . the generate src entry is the servlet as externally referencable: note that if you address it from a browser you will get xml that you can look at for debug . the stylesheet is pathed from cocoon root. - Debugging required looking at: the logs in %tomcathome%\logs and %tomcathome%\webapps\cocoon\WEB-INF\logs -- - Thanks to all developers for a great system. ---END INCLUDED MESSAGE- - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlets and Cocoon2.
I forgot to add my servlet to the web.xml file. I now have it outputting XML to the browser but cocoon isn't translating the XML output. Is there some other configuration needed to make your servlet a pipeline? Thanks for the quick response. -Original Message- From: Bob Garvey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 4:11 PM To: [EMAIL PROTECTED] Subject: Re: Servlets and Cocoon2. I had a question about servlets in a pipeline and came up with the following a few days ago. The discussion is in the archives, I assume. Thanks to Vadim Gritsenko and David Rosenstrauch. This scheme now works. Here is what I learned that may be valuable to others who would like to write servlets that output XML and would like for the XML to be input to an XLS Transformation. The sitemap entry: map:match pattern=servlet23/* map:generate src=http://cb:8080/examples/servlet/servlet23.{1}/ map:transform src=stylesheets/servlet23/{1}/ map:serialize type=html/ /map:match - where . servlet23 is a package name; this makes the matching straightforward. . the generate src entry is the servlet as externally referencable: note that if you address it from a browser you will get xml that you can look at for debug . the stylesheet is pathed from cocoon root. - Debugging required looking at: the logs in %tomcathome%\logs and %tomcathome%\webapps\cocoon\WEB-INF\logs A distinction I see is that you do not have /servlet/ in the URI path. - Original Message - From: Hall, Joe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 29, 2002 2:55 PM Subject: Servlets and Cocoon2. I saw this message in the archives, but I can't seem to get servlets and Cocoon2 to work. I think my problem is getting the servlet to run. It's like it is not in the classpath. I have my servlet in WEB-INF\classes\testcocoonproject\TestServlet. Here's the entry from my sitemap file: map:match pattern=testcocoonproject/* map:generate src=http://localhost:9090/Cocoon/testcocoonproject.{1}/ map:transform src=stylesheets/page/simple-page2html.xsl/ map:serialize type=html/ /map:match I would expect when I enter the URL (http://localhost:9090/Cocoon/testcocoonproject/TestServlet) that the servlet would execute but I get a an error message. It picks up the testcocoonproject/*, but TestServlet yeilds the same result as any other non-existant name. org.apache.cocoon.ProcessingException: Could not read resource http://localhost:9090/Cocoon/testcocoonproject.TestServlet Do you have any suggestions on how to get this to work or samples of servlet output to Cocoon for XSL Transformation? Thanks, Joe Hall --INCLUDED MESSAGE FROM THE COCOON ARCHIVES--- Yes, working now. I sent the following yesterday. Thanks very much for your help. Thanks to Vadim Gritsenko and David Rosenstrauch. This scheme now works. Here is what I learned that may be valuable to others who would like to write servlets that output XML and would like for the XML to be input to an XLS Transformation. The sitemap entry: map:match pattern=servlet23/* map:generate src=http://cb:8080/examples/servlet/servlet23.{1}/ map:transform src=stylesheets/servlet23/{1}/ map:serialize type=html/ /map:match - where . servlet23 is a package name; this makes the matching straightforward. . the generate src entry is the servlet as externally referencable: note that if you address it from a browser you will get xml that you can look at for debug . the stylesheet is pathed from cocoon root. - Debugging required looking at: the logs in %tomcathome%\logs and %tomcathome%\webapps\cocoon\WEB-INF\logs -- - Thanks to all developers for a great system. ---END INCLUDED MESSAGE- - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail
Re: Servlets and Cocoon2.
That seems to match my sitemap entry. The only difference is the /servlet/ in the URI. In my configuration I do not have any other web servers, just using Tomcat4.0. What is your servlet container? I assume that your output matches the elements of the stylesheet simple-page2html.xsl - Original Message - From: Hall, Joe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 29, 2002 3:33 PM Subject: RE: Servlets and Cocoon2. I forgot to add my servlet to the web.xml file. I now have it outputting XML to the browser but cocoon isn't translating the XML output. Is there some other configuration needed to make your servlet a pipeline? Thanks for the quick response. -Original Message- From: Bob Garvey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 4:11 PM To: [EMAIL PROTECTED] Subject: Re: Servlets and Cocoon2. I had a question about servlets in a pipeline and came up with the following a few days ago. The discussion is in the archives, I assume. Thanks to Vadim Gritsenko and David Rosenstrauch. This scheme now works. Here is what I learned that may be valuable to others who would like to write servlets that output XML and would like for the XML to be input to an XLS Transformation. The sitemap entry: map:match pattern=servlet23/* map:generate src=http://cb:8080/examples/servlet/servlet23.{1}/ map:transform src=stylesheets/servlet23/{1}/ map:serialize type=html/ /map:match - where . servlet23 is a package name; this makes the matching straightforward. . the generate src entry is the servlet as externally referencable: note that if you address it from a browser you will get xml that you can look at for debug . the stylesheet is pathed from cocoon root. - Debugging required looking at: the logs in %tomcathome%\logs and %tomcathome%\webapps\cocoon\WEB-INF\logs A distinction I see is that you do not have /servlet/ in the URI path. - Original Message - From: Hall, Joe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 29, 2002 2:55 PM Subject: Servlets and Cocoon2. I saw this message in the archives, but I can't seem to get servlets and Cocoon2 to work. I think my problem is getting the servlet to run. It's like it is not in the classpath. I have my servlet in WEB-INF\classes\testcocoonproject\TestServlet. Here's the entry from my sitemap file: map:match pattern=testcocoonproject/* map:generate src=http://localhost:9090/Cocoon/testcocoonproject.{1}/ map:transform src=stylesheets/page/simple-page2html.xsl/ map:serialize type=html/ /map:match I would expect when I enter the URL (http://localhost:9090/Cocoon/testcocoonproject/TestServlet) that the servlet would execute but I get a an error message. It picks up the testcocoonproject/*, but TestServlet yeilds the same result as any other non-existant name. org.apache.cocoon.ProcessingException: Could not read resource http://localhost:9090/Cocoon/testcocoonproject.TestServlet Do you have any suggestions on how to get this to work or samples of servlet output to Cocoon for XSL Transformation? Thanks, Joe Hall --INCLUDED MESSAGE FROM THE COCOON ARCHIVES--- Yes, working now. I sent the following yesterday. Thanks very much for your help. Thanks to Vadim Gritsenko and David Rosenstrauch. This scheme now works. Here is what I learned that may be valuable to others who would like to write servlets that output XML and would like for the XML to be input to an XLS Transformation. The sitemap entry: map:match pattern=servlet23/* map:generate src=http://cb:8080/examples/servlet/servlet23.{1}/ map:transform src=stylesheets/servlet23/{1}/ map:serialize type=html/ /map:match - where . servlet23 is a package name; this makes the matching straightforward. . the generate src entry is the servlet as externally referencable: note that if you address it from a browser you will get xml that you can look at for debug . the stylesheet is pathed from cocoon root. - Debugging required looking at: the logs in %tomcathome%\logs and %tomcathome%\webapps\cocoon\WEB-INF\logs -- - Thanks to all developers for a great system. ---END INCLUDED MESSAGE- - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
RE: Servlets and Cocoon2.
I'm using HPAS 8.0. Cocoon and all the examples work. The xml produced from the servlet matches the xml from the JSP example and the simple-page2html.xsl. The entry in web.xml that registers the servlet seems to override the fact that cocoon is looking at the url. If I try a bogus url like http://localhost:9090/Cocoon/testcocoonproject/TestServletInvalidName then Cocoon tries to parse the output. I have both testcocoonproject.TestServlet and Cocoon running in the same webapp(same web.xml) file. Entries added to Cocoon's web.xml file: servlet servlet-nametestcocoonproject.TestServlet/servlet-name display-nametestcocoonproject.TestServlet/display-name descriptionTest Servlet/description servlet-classtestcocoonproject.TestServlet/servlet-class /servlet servlet-mapping servlet-nametestcocoonproject.TestServlet/servlet-name url-pattern/testcocoonproject/TestServlet/url-pattern /servlet-mapping !-- NOTE: I've tried leaving out the servlet-mapping and the servlet doesn't run -- -Original Message- From: Bob Garvey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 4:48 PM To: [EMAIL PROTECTED] Subject: Re: Servlets and Cocoon2. That seems to match my sitemap entry. The only difference is the /servlet/ in the URI. In my configuration I do not have any other web servers, just using Tomcat4.0. What is your servlet container? I assume that your output matches the elements of the stylesheet simple-page2html.xsl - Original Message - From: Hall, Joe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 29, 2002 3:33 PM Subject: RE: Servlets and Cocoon2. I forgot to add my servlet to the web.xml file. I now have it outputting XML to the browser but cocoon isn't translating the XML output. Is there some other configuration needed to make your servlet a pipeline? Thanks for the quick response. -Original Message- From: Bob Garvey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 4:11 PM To: [EMAIL PROTECTED] Subject: Re: Servlets and Cocoon2. I had a question about servlets in a pipeline and came up with the following a few days ago. The discussion is in the archives, I assume. Thanks to Vadim Gritsenko and David Rosenstrauch. This scheme now works. Here is what I learned that may be valuable to others who would like to write servlets that output XML and would like for the XML to be input to an XLS Transformation. The sitemap entry: map:match pattern=servlet23/* map:generate src=http://cb:8080/examples/servlet/servlet23.{1}/ map:transform src=stylesheets/servlet23/{1}/ map:serialize type=html/ /map:match - where . servlet23 is a package name; this makes the matching straightforward. . the generate src entry is the servlet as externally referencable: note that if you address it from a browser you will get xml that you can look at for debug . the stylesheet is pathed from cocoon root. - Debugging required looking at: the logs in %tomcathome%\logs and %tomcathome%\webapps\cocoon\WEB-INF\logs A distinction I see is that you do not have /servlet/ in the URI path. - Original Message - From: Hall, Joe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 29, 2002 2:55 PM Subject: Servlets and Cocoon2. I saw this message in the archives, but I can't seem to get servlets and Cocoon2 to work. I think my problem is getting the servlet to run. It's like it is not in the classpath. I have my servlet in WEB-INF\classes\testcocoonproject\TestServlet. Here's the entry from my sitemap file: map:match pattern=testcocoonproject/* map:generate src=http://localhost:9090/Cocoon/testcocoonproject.{1}/ map:transform src=stylesheets/page/simple-page2html.xsl/ map:serialize type=html/ /map:match I would expect when I enter the URL (http://localhost:9090/Cocoon/testcocoonproject/TestServlet) that the servlet would execute but I get a an error message. It picks up the testcocoonproject/*, but TestServlet yeilds the same result as any other non-existant name. org.apache.cocoon.ProcessingException: Could not read resource http://localhost:9090/Cocoon/testcocoonproject.TestServlet Do you have any suggestions on how to get this to work or samples of servlet output to Cocoon for XSL Transformation? Thanks, Joe Hall --INCLUDED MESSAGE FROM THE COCOON ARCHIVES--- Yes, working now. I sent the following yesterday. Thanks very much for your help. Thanks to Vadim Gritsenko and David Rosenstrauch. This scheme now works. Here is what I learned that may be valuable to others who would like to write servlets that output XML and would like for the XML to be input to an XLS Transformation. The sitemap entry: map:match pattern=servlet23/* map:generate
RE: Servlets and Cocoon2.
Hello, Is the package information for the servlet classes testcocoonproject ? I think just by copying the class files into a subdirectory of WEB-INF classes is not sufficient, the servlet classes should have the necessary package info ... Regds, Chiths I saw this message in the archives, but I can't seem to get servlets and Cocoon2 to work. I think my problem is getting the servlet to run. It's like it is not in the classpath. I have my servlet in WEB-INF\classes\testcocoonproject\TestServlet. Here's the entry from my sitemap file: map:match pattern=testcocoonproject/* map:generate src=http://localhost:9090/Cocoon/testcocoonproject.{1}/ map:transform src=stylesheets/page/simple-page2html.xsl/ map:serialize type=html/ /map:match I would expect when I enter the URL (http://localhost:9090/Cocoon/testcocoonproject/TestServlet) that the servlet would execute but I get a an error message. It picks up the testcocoonproject/*, but TestServlet yeilds the same result as any other non-existant name. org.apache.cocoon.ProcessingException: Could not read resource http://localhost:9090/Cocoon/testcocoonproject.TestServlet Do you have any suggestions on how to get this to work or samples of servlet output to Cocoon for XSL Transformation? Thanks, Joe Hall --INCLUDED MESSAGE FROM THE COCOON ARCHIVES--- Yes, working now. I sent the following yesterday. Thanks very much for your help. Thanks to Vadim Gritsenko and David Rosenstrauch. This scheme now works. Here is what I learned that may be valuable to others who would like to write servlets that output XML and would like for the XML to be input to an XLS Transformation. The sitemap entry: map:match pattern=servlet23/* map:generate src=http://cb:8080/examples/servlet/servlet23.{1}/ map:transform src=stylesheets/servlet23/{1}/ map:serialize type=html/ /map:match - where . servlet23 is a package name; this makes the matching straightforward. . the generate src entry is the servlet as externally referencable: note that if you address it from a browser you will get xml that you can look at for debug . the stylesheet is pathed from cocoon root. - Debugging required looking at: the logs in %tomcathome%\logs and %tomcathome%\webapps\cocoon\WEB-INF\logs --- Thanks to all developers for a great system. ---END INCLUDED MESSAGE- - Please check that your question has not already been answered in the FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]