cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r562800 - in /cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice: components/ServletSource.java postable/components/ServletServiceSerializer.java
Date Sun, 05 Aug 2007 01:51:12 GMT
Author: vgritsenko
Date: Sat Aug  4 18:51:11 2007
New Revision: 562800

URL: http://svn.apache.org/viewvc?view=rev&rev=562800
Log:
add HUGE fixme to the servlet source - it's not working
wrap javadoc a bit - too long

Modified:
    cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/ServletSource.java
    cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/postable/components/ServletServiceSerializer.java

Modified: cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/ServletSource.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/ServletSource.java?view=diff&rev=562800&r1=562799&r2=562800
==============================================================================
--- cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/ServletSource.java
(original)
+++ cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/components/ServletSource.java
Sat Aug  4 18:51:11 2007
@@ -77,10 +77,18 @@
 	public InputStream getInputStream() throws IOException, SourceException {
 		try {
 			connect();
-			//FIXME: This is not the most elegant solution
-			if (servletConnection.getResponseCode() != HttpServletResponse.SC_OK) {
+			// FIXME: This is not the most elegant solution
+            if (servletConnection.getResponseCode() != HttpServletResponse.SC_OK) {
 				//most probably, servlet returned 304 (not modified) and we need to perform second request
to get data
-				servletConnection = new ServletConnection(location);
+
+                //
+                // FIXME This does not work: previous instance of servletConnection
+                //       most probably had non empty requestBody. Re-instantiating
+                //       it results in new servletConnection with null requestBody
+                //       and, as a result, GET request instead of POST.
+                //
+
+                servletConnection = new ServletConnection(location);
 				servletConnection.connect();
 			}
 			return this.servletConnection.getInputStream();

Modified: cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/postable/components/ServletServiceSerializer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/postable/components/ServletServiceSerializer.java?view=diff&rev=562800&r1=562799&r2=562800
==============================================================================
--- cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/postable/components/ServletServiceSerializer.java
(original)
+++ cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/postable/components/ServletServiceSerializer.java
Sat Aug  4 18:51:11 2007
@@ -40,14 +40,17 @@
 import org.xml.sax.SAXException;
 
 /**
- * <p>The serializer takes only <code>service</code> parameter that should
contain the URL of the called service.<br>
- * Use <code>servlet:</code> source for that purpose.</p>
+ * <p>The serializer takes only <code>service</code> parameter that should
+ * contain the URL of the called service.</p>
+ *
+ * <p>Use <code>servlet:</code> source for that purpose.</p>
  * 
  * <p>FIXME: Provide a link to the documents discussing servlet (and sitemap) services.</p>
  * 
  * @cocoon.sitemap.component.documentation
- * The <code>ServletServiceSerializer</code> POSTs its input data to a called
service. Result of the serialization is a data returned
- * by the called service.
+ * The <code>ServletServiceSerializer</code> POSTs its input data to a called
+ * service. Result of the serialization is a data returned by the called
+ * service.
  * @cocoon.sitemap.component.name servletService  
  */
 public class ServletServiceSerializer extends AbstractSerializer implements SitemapModelComponent
{
@@ -63,7 +66,8 @@
         this.enableLogging(new CLLoggerWrapper(this.logger));
     }
 
-	public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par)
throws ProcessingException, SAXException, IOException {
+	public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par)
+    throws ProcessingException, SAXException, IOException {
 		String service;
 		try {
 			service = par.getParameter("service");



Mime
View raw message