felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1720508 - in /felix/trunk/http/base: DEPENDENCIES LICENSE NOTICE src/main/java/org/apache/felix/http/base/internal/console/HttpServicePlugin.java
Date Thu, 17 Dec 2015 10:25:22 GMT
Author: cziegeler
Date: Thu Dec 17 10:25:22 2015
New Revision: 1720508

URL: http://svn.apache.org/viewvc?rev=1720508&view=rev
Log:
FELIX-5144 : Test resolving in web console plugin can only be used once

Removed:
    felix/trunk/http/base/DEPENDENCIES
    felix/trunk/http/base/LICENSE
    felix/trunk/http/base/NOTICE
Modified:
    felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/console/HttpServicePlugin.java

Modified: felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/console/HttpServicePlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/console/HttpServicePlugin.java?rev=1720508&r1=1720507&r2=1720508&view=diff
==============================================================================
--- felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/console/HttpServicePlugin.java
(original)
+++ felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/console/HttpServicePlugin.java
Thu Dec 17 10:25:22 2015
@@ -212,7 +212,11 @@ public class HttpServicePlugin extends H
 
         final PrintWriter pw = resp.getWriter();
 
-        printForm(pw, req.getParameter(ATTR_TEST), req.getParameter(ATTR_MSG));
+        String path = req.getContextPath() + req.getServletPath();
+        if ( req.getPathInfo() != null ) {
+            path = path + req.getPathInfo();
+        }
+        printForm(pw, req.getParameter(ATTR_TEST), req.getParameter(ATTR_MSG), path);
 
         printRuntimeDetails(pw, dto.serviceDTO);
 
@@ -233,7 +237,7 @@ public class HttpServicePlugin extends H
         pw.println("<br/>");
     }
 
-    private void printForm(final PrintWriter pw, final String value, final String msg)
+    private void printForm(final PrintWriter pw, final String value, final String msg, final
String path)
     {
         pw.println("<table class='content' cellpadding='0' cellspacing='0' width='100%'>");
 
@@ -248,7 +252,9 @@ public class HttpServicePlugin extends H
         pw.println("<tr class='content'>");
         pw.println("<td class='content'>Test</td>");
         pw.print("<td class='content' colspan='2'>");
-        pw.print("<form method='post'>");
+        pw.print("<form method='POST' action='");
+        pw.print(path);
+        pw.print("'>");
         pw.print("<input type='text' name='" + ATTR_TEST + "' value='");
         if (value != null) {
             pw.print(escapeXml(value));



Mime
View raw message