You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Vidar S. Ramdal (JIRA)" <ji...@apache.org> on 2009/07/31 13:24:14 UTC

[jira] Created: (SLING-1069) Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions

Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions
---------------------------------------------------------------------------------------------

                 Key: SLING-1069
                 URL: https://issues.apache.org/jira/browse/SLING-1069
             Project: Sling
          Issue Type: Bug
          Components: Servlets Resolver
    Affects Versions: Servlets Resolver 2.0.4
            Reporter: Vidar S. Ramdal
             Fix For: Servlets Resolver 2.0.8


A servlet registered with 
 @scr.property name="sling.servlet.extensions" value="html"
 @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default"
in the Javadoc, responds to all requests, in effect ignoring the "sling.servlet.extensions" property.

To reproduce:
1. Install servlet from attachment (coming up)
2. Let the browser fetch /somenode.json

Expected result:
The server returns the JSON rendering of /somenode

Actual result:
The server returns "Rogue Servlet"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SLING-1069) Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved SLING-1069.
--------------------------------------

    Fix Version/s: Servlets Resolver 2.0.10
                       (was: Servlets Resolver 2.1.0)
       Resolution: Fixed

This can be considered resolved.

> Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions
> ---------------------------------------------------------------------------------------------
>
>                 Key: SLING-1069
>                 URL: https://issues.apache.org/jira/browse/SLING-1069
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets
>    Affects Versions: Servlets Resolver 2.0.4
>            Reporter: Vidar S. Ramdal
>            Assignee: Felix Meschberger
>             Fix For: Servlets Resolver 2.0.10
>
>         Attachments: RogueServlet.java, SLING-1069-fmeschbe.patch, SLING-1069-test.patch, SLING-1069.patch
>
>
> A servlet registered with 
>  @scr.property name="sling.servlet.extensions" value="html"
>  @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default"
> in the Javadoc, responds to all requests, in effect ignoring the "sling.servlet.extensions" property.
> To reproduce:
> 1. Install servlet from attachment (coming up)
> 2. Let the browser fetch /somenode.json
> Expected result:
> The server returns the JSON rendering of /somenode
> Actual result:
> The server returns "Rogue Servlet"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-1069) Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertrand Delacretaz updated SLING-1069:
---------------------------------------

    Attachment: SLING-1069-test.patch

Integration tests for this change - currently fails, but saving here for future use.

Playing with that shows that there's a deeper issue: it seems like all servlet registration parameters are ORed, whereas ANDing them seems much more logical from the user's point of view. I'll discuss that on the dev list.

> Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions
> ---------------------------------------------------------------------------------------------
>
>                 Key: SLING-1069
>                 URL: https://issues.apache.org/jira/browse/SLING-1069
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets Resolver
>    Affects Versions: Servlets Resolver 2.0.4
>            Reporter: Vidar S. Ramdal
>             Fix For: Servlets Resolver 2.0.8
>
>         Attachments: RogueServlet.java, SLING-1069-test.patch, SLING-1069.patch
>
>
> A servlet registered with 
>  @scr.property name="sling.servlet.extensions" value="html"
>  @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default"
> in the Javadoc, responds to all requests, in effect ignoring the "sling.servlet.extensions" property.
> To reproduce:
> 1. Install servlet from attachment (coming up)
> 2. Let the browser fetch /somenode.json
> Expected result:
> The server returns the JSON rendering of /somenode
> Actual result:
> The server returns "Rogue Servlet"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SLING-1069) Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed SLING-1069.
------------------------------------


Closes issue after bundle release.

> Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions
> ---------------------------------------------------------------------------------------------
>
>                 Key: SLING-1069
>                 URL: https://issues.apache.org/jira/browse/SLING-1069
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets
>    Affects Versions: Servlets Resolver 2.0.4
>            Reporter: Vidar S. Ramdal
>            Assignee: Felix Meschberger
>             Fix For: Servlets Resolver 2.1.0
>
>         Attachments: RogueServlet.java, SLING-1069-fmeschbe.patch, SLING-1069-test.patch, SLING-1069.patch
>
>
> A servlet registered with 
>  @scr.property name="sling.servlet.extensions" value="html"
>  @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default"
> in the Javadoc, responds to all requests, in effect ignoring the "sling.servlet.extensions" property.
> To reproduce:
> 1. Install servlet from attachment (coming up)
> 2. Let the browser fetch /somenode.json
> Expected result:
> The server returns the JSON rendering of /somenode
> Actual result:
> The server returns "Rogue Servlet"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-1069) Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12915329#action_12915329 ] 

Felix Meschberger commented on SLING-1069:
------------------------------------------

Commited to Rev. 1001774:

  - Bertrand's integration test enhancement (actually the HtmlDefaultServlet starts disabled and is enabled by the testcase for the duration of the test case to not influence (in a bad way) the other integration tests)
  - My own patch with some unit tests ensuring proper permutation of registration properties

> Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions
> ---------------------------------------------------------------------------------------------
>
>                 Key: SLING-1069
>                 URL: https://issues.apache.org/jira/browse/SLING-1069
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets
>    Affects Versions: Servlets Resolver 2.0.4
>            Reporter: Vidar S. Ramdal
>            Assignee: Felix Meschberger
>             Fix For: Servlets Resolver 2.1.0
>
>         Attachments: RogueServlet.java, SLING-1069-fmeschbe.patch, SLING-1069-test.patch, SLING-1069.patch
>
>
> A servlet registered with 
>  @scr.property name="sling.servlet.extensions" value="html"
>  @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default"
> in the Javadoc, responds to all requests, in effect ignoring the "sling.servlet.extensions" property.
> To reproduce:
> 1. Install servlet from attachment (coming up)
> 2. Let the browser fetch /somenode.json
> Expected result:
> The server returns the JSON rendering of /somenode
> Actual result:
> The server returns "Rogue Servlet"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-1069) Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions

Posted by "Vidar S. Ramdal (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vidar S. Ramdal updated SLING-1069:
-----------------------------------

    Attachment: RogueServlet.java

Attaching code for a servlet as described.

> Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions
> ---------------------------------------------------------------------------------------------
>
>                 Key: SLING-1069
>                 URL: https://issues.apache.org/jira/browse/SLING-1069
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets Resolver
>    Affects Versions: Servlets Resolver 2.0.4
>            Reporter: Vidar S. Ramdal
>             Fix For: Servlets Resolver 2.0.8
>
>         Attachments: RogueServlet.java
>
>
> A servlet registered with 
>  @scr.property name="sling.servlet.extensions" value="html"
>  @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default"
> in the Javadoc, responds to all requests, in effect ignoring the "sling.servlet.extensions" property.
> To reproduce:
> 1. Install servlet from attachment (coming up)
> 2. Let the browser fetch /somenode.json
> Expected result:
> The server returns the JSON rendering of /somenode
> Actual result:
> The server returns "Rogue Servlet"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-1069) Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions

Posted by "Vidar S. Ramdal (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vidar S. Ramdal updated SLING-1069:
-----------------------------------

    Attachment: SLING-1069.patch

Proposed patch. This patch is subject to more testing before being committed. Please see http://markmail.org/thread/fm4vk6pu23wx3r7n for background.

> Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions
> ---------------------------------------------------------------------------------------------
>
>                 Key: SLING-1069
>                 URL: https://issues.apache.org/jira/browse/SLING-1069
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets Resolver
>    Affects Versions: Servlets Resolver 2.0.4
>            Reporter: Vidar S. Ramdal
>             Fix For: Servlets Resolver 2.0.8
>
>         Attachments: RogueServlet.java, SLING-1069.patch
>
>
> A servlet registered with 
>  @scr.property name="sling.servlet.extensions" value="html"
>  @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default"
> in the Javadoc, responds to all requests, in effect ignoring the "sling.servlet.extensions" property.
> To reproduce:
> 1. Install servlet from attachment (coming up)
> 2. Let the browser fetch /somenode.json
> Expected result:
> The server returns the JSON rendering of /somenode
> Actual result:
> The server returns "Rogue Servlet"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-1069) Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler updated SLING-1069:
------------------------------------

    Fix Version/s:     (was: Servlets Resolver 2.0.8)
                   Servlets Resolver 2.0.10

As we didn't come to a conclusion yet I'll move this issue to the next version to not block the release

> Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions
> ---------------------------------------------------------------------------------------------
>
>                 Key: SLING-1069
>                 URL: https://issues.apache.org/jira/browse/SLING-1069
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets
>    Affects Versions: Servlets Resolver 2.0.4
>            Reporter: Vidar S. Ramdal
>             Fix For: Servlets Resolver 2.0.10
>
>         Attachments: RogueServlet.java, SLING-1069-test.patch, SLING-1069.patch
>
>
> A servlet registered with 
>  @scr.property name="sling.servlet.extensions" value="html"
>  @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default"
> in the Javadoc, responds to all requests, in effect ignoring the "sling.servlet.extensions" property.
> To reproduce:
> 1. Install servlet from attachment (coming up)
> 2. Let the browser fetch /somenode.json
> Expected result:
> The server returns the JSON rendering of /somenode
> Actual result:
> The server returns "Rogue Servlet"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SLING-1069) Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned SLING-1069:
----------------------------------------

    Assignee: Felix Meschberger

> Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions
> ---------------------------------------------------------------------------------------------
>
>                 Key: SLING-1069
>                 URL: https://issues.apache.org/jira/browse/SLING-1069
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets
>    Affects Versions: Servlets Resolver 2.0.4
>            Reporter: Vidar S. Ramdal
>            Assignee: Felix Meschberger
>             Fix For: Servlets Resolver 2.1.0
>
>         Attachments: RogueServlet.java, SLING-1069-fmeschbe.patch, SLING-1069-test.patch, SLING-1069.patch
>
>
> A servlet registered with 
>  @scr.property name="sling.servlet.extensions" value="html"
>  @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default"
> in the Javadoc, responds to all requests, in effect ignoring the "sling.servlet.extensions" property.
> To reproduce:
> 1. Install servlet from attachment (coming up)
> 2. Let the browser fetch /somenode.json
> Expected result:
> The server returns the JSON rendering of /somenode
> Actual result:
> The server returns "Rogue Servlet"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-1069) Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-1069:
-------------------------------------

    Attachment: SLING-1069-fmeschbe.patch

Alternate patch to ensure a full permutation of all selectors, extensions and methods declared are registered.

Thus the RogueServlet defined as

     resourceTypes = sling/servlet/default
     methods = [ GET, POST ]
     extensions = [ html, htm ]

would be registered as

     sling/servlet/default.html.GET
     sling/servlet/default.htm.GET
     sling/servlet/default.html.POST
     sling/servlet/default.htm.POST

> Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions
> ---------------------------------------------------------------------------------------------
>
>                 Key: SLING-1069
>                 URL: https://issues.apache.org/jira/browse/SLING-1069
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets
>    Affects Versions: Servlets Resolver 2.0.4
>            Reporter: Vidar S. Ramdal
>             Fix For: Servlets Resolver 2.1.0
>
>         Attachments: RogueServlet.java, SLING-1069-fmeschbe.patch, SLING-1069-test.patch, SLING-1069.patch
>
>
> A servlet registered with 
>  @scr.property name="sling.servlet.extensions" value="html"
>  @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default"
> in the Javadoc, responds to all requests, in effect ignoring the "sling.servlet.extensions" property.
> To reproduce:
> 1. Install servlet from attachment (coming up)
> 2. Let the browser fetch /somenode.json
> Expected result:
> The server returns the JSON rendering of /somenode
> Actual result:
> The server returns "Rogue Servlet"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SLING-1069) Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-1069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738313#action_12738313 ] 

Bertrand Delacretaz commented on SLING-1069:
--------------------------------------------

Note that tests like [1] can be used for such cases, using test servlets defined in [2].

[1]  http://svn.apache.org/repos/asf/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolution/ExtensionServletTest.java

[2] http://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/servlets

> Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions
> ---------------------------------------------------------------------------------------------
>
>                 Key: SLING-1069
>                 URL: https://issues.apache.org/jira/browse/SLING-1069
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets Resolver
>    Affects Versions: Servlets Resolver 2.0.4
>            Reporter: Vidar S. Ramdal
>             Fix For: Servlets Resolver 2.0.8
>
>         Attachments: RogueServlet.java
>
>
> A servlet registered with 
>  @scr.property name="sling.servlet.extensions" value="html"
>  @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default"
> in the Javadoc, responds to all requests, in effect ignoring the "sling.servlet.extensions" property.
> To reproduce:
> 1. Install servlet from attachment (coming up)
> 2. Let the browser fetch /somenode.json
> Expected result:
> The server returns the JSON rendering of /somenode
> Actual result:
> The server returns "Rogue Servlet"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SLING-1069) Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions

Posted by "Justin Edelson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-1069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Edelson updated SLING-1069:
----------------------------------

    Fix Version/s: Servlets Resolver 2.1.0
                       (was: Servlets Resolver 2.0.10)

> Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions
> ---------------------------------------------------------------------------------------------
>
>                 Key: SLING-1069
>                 URL: https://issues.apache.org/jira/browse/SLING-1069
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets
>    Affects Versions: Servlets Resolver 2.0.4
>            Reporter: Vidar S. Ramdal
>             Fix For: Servlets Resolver 2.1.0
>
>         Attachments: RogueServlet.java, SLING-1069-test.patch, SLING-1069.patch
>
>
> A servlet registered with 
>  @scr.property name="sling.servlet.extensions" value="html"
>  @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default"
> in the Javadoc, responds to all requests, in effect ignoring the "sling.servlet.extensions" property.
> To reproduce:
> 1. Install servlet from attachment (coming up)
> 2. Let the browser fetch /somenode.json
> Expected result:
> The server returns the JSON rendering of /somenode
> Actual result:
> The server returns "Rogue Servlet"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.