You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2008/02/07 10:49:08 UTC

[jira] Created: (SLING-233) UjaxPostServlet should care to find an appropriate parent location for new nodes

UjaxPostServlet should care to find an appropriate parent location for new nodes
--------------------------------------------------------------------------------

                 Key: SLING-233
                 URL: https://issues.apache.org/jira/browse/SLING-233
             Project: Sling
          Issue Type: Improvement
          Components: Launchpad
            Reporter: Felix Meschberger
            Assignee: Felix Meschberger
             Fix For: 2.0.0


When the UjaxPostServlet is called with an URL not resolving to an existing resource, it just takes the missing resource path as the path of the node to handle.

This may be a problem in case the ResourceResolver applies a mapping, such as:

       /* ==> /content/*   - try every path below /content/
       /* ==> /*      - try every path unmodified

The intent of this is to first locate resources below the /content/ node and only then unmodified. This way, the primary web site content may be stored below /content but still be accessed as if it would be located just below root.

Consider a POST request to /home/intro where the /home page does not exist (yet). In this case currently, the /home/intro node would be created as requested. If the /home page would be located at /content/home, the new node would be created as /content/home/intro.

To work around this problem, I suggest to modify the servlet, such that in the case of a missing resource such as /home/intro or /home/* the request path is walked up until a resource can be resolved. In the example POST to /home/intro with a missing /content/home resource, the post servlet would go up to "/" which resolves to "/content" (assuming /content exists of course) and thus would create the new node under /content/home automatically also creating the intermediate /content/home node.

To be able to still create nodes at the exact path, I propose the introduction of a control parameter ujax:parentMatch:

      ujax:parentMatch == "exact"  --> use the request path as node path as is without resolving a parent
      ujax:parentMatch == "resolve"  --> resolve a parent node and have intermediate nodes created accordingly

The default value if the ujax:parentMatch parameter is missing is "resolve".

WDYT ?

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


[jira] Commented: (SLING-233) UjaxPostServlet should care to find an appropriate parent location for new nodes

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

Felix Meschberger commented on SLING-233:
-----------------------------------------

There is not much enthusiasm in this proposal and in fact no requirement has ever been raised in this respect.

So I suggest we write this issue off and close it won't fix..

> UjaxPostServlet should care to find an appropriate parent location for new nodes
> --------------------------------------------------------------------------------
>
>                 Key: SLING-233
>                 URL: https://issues.apache.org/jira/browse/SLING-233
>             Project: Sling
>          Issue Type: Improvement
>          Components: Launchpad
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> When the UjaxPostServlet is called with an URL not resolving to an existing resource, it just takes the missing resource path as the path of the node to handle.
> This may be a problem in case the ResourceResolver applies a mapping, such as:
>        /* ==> /content/*   - try every path below /content/
>        /* ==> /*      - try every path unmodified
> The intent of this is to first locate resources below the /content/ node and only then unmodified. This way, the primary web site content may be stored below /content but still be accessed as if it would be located just below root.
> Consider a POST request to /home/intro where the /home page does not exist (yet). In this case currently, the /home/intro node would be created as requested. If the /home page would be located at /content/home, the new node would be created as /content/home/intro.
> To work around this problem, I suggest to modify the servlet, such that in the case of a missing resource such as /home/intro or /home/* the request path is walked up until a resource can be resolved. In the example POST to /home/intro with a missing /content/home resource, the post servlet would go up to "/" which resolves to "/content" (assuming /content exists of course) and thus would create the new node under /content/home automatically also creating the intermediate /content/home node.
> To be able to still create nodes at the exact path, I propose the introduction of a control parameter ujax:parentMatch:
>       ujax:parentMatch == "exact"  --> use the request path as node path as is without resolving a parent
>       ujax:parentMatch == "resolve"  --> resolve a parent node and have intermediate nodes created accordingly
> The default value if the ujax:parentMatch parameter is missing is "resolve".
> WDYT ?

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


[jira] Commented: (SLING-233) UjaxPostServlet should care to find an appropriate parent location for new nodes

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

Bertrand Delacretaz commented on SLING-233:
-------------------------------------------

Agree about wontfix, we can always reopen if the need comes

> UjaxPostServlet should care to find an appropriate parent location for new nodes
> --------------------------------------------------------------------------------
>
>                 Key: SLING-233
>                 URL: https://issues.apache.org/jira/browse/SLING-233
>             Project: Sling
>          Issue Type: Improvement
>          Components: Launchpad
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> When the UjaxPostServlet is called with an URL not resolving to an existing resource, it just takes the missing resource path as the path of the node to handle.
> This may be a problem in case the ResourceResolver applies a mapping, such as:
>        /* ==> /content/*   - try every path below /content/
>        /* ==> /*      - try every path unmodified
> The intent of this is to first locate resources below the /content/ node and only then unmodified. This way, the primary web site content may be stored below /content but still be accessed as if it would be located just below root.
> Consider a POST request to /home/intro where the /home page does not exist (yet). In this case currently, the /home/intro node would be created as requested. If the /home page would be located at /content/home, the new node would be created as /content/home/intro.
> To work around this problem, I suggest to modify the servlet, such that in the case of a missing resource such as /home/intro or /home/* the request path is walked up until a resource can be resolved. In the example POST to /home/intro with a missing /content/home resource, the post servlet would go up to "/" which resolves to "/content" (assuming /content exists of course) and thus would create the new node under /content/home automatically also creating the intermediate /content/home node.
> To be able to still create nodes at the exact path, I propose the introduction of a control parameter ujax:parentMatch:
>       ujax:parentMatch == "exact"  --> use the request path as node path as is without resolving a parent
>       ujax:parentMatch == "resolve"  --> resolve a parent node and have intermediate nodes created accordingly
> The default value if the ujax:parentMatch parameter is missing is "resolve".
> WDYT ?

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


[jira] Commented: (SLING-233) UjaxPostServlet should care to find an appropriate parent location for new nodes

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

Bertrand Delacretaz commented on SLING-233:
-------------------------------------------

Sounds reasonable - I don't like searching in multiple content paths too much, but as this can be disabled by configuration what you propose is certainly ok.

> UjaxPostServlet should care to find an appropriate parent location for new nodes
> --------------------------------------------------------------------------------
>
>                 Key: SLING-233
>                 URL: https://issues.apache.org/jira/browse/SLING-233
>             Project: Sling
>          Issue Type: Improvement
>          Components: Launchpad
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> When the UjaxPostServlet is called with an URL not resolving to an existing resource, it just takes the missing resource path as the path of the node to handle.
> This may be a problem in case the ResourceResolver applies a mapping, such as:
>        /* ==> /content/*   - try every path below /content/
>        /* ==> /*      - try every path unmodified
> The intent of this is to first locate resources below the /content/ node and only then unmodified. This way, the primary web site content may be stored below /content but still be accessed as if it would be located just below root.
> Consider a POST request to /home/intro where the /home page does not exist (yet). In this case currently, the /home/intro node would be created as requested. If the /home page would be located at /content/home, the new node would be created as /content/home/intro.
> To work around this problem, I suggest to modify the servlet, such that in the case of a missing resource such as /home/intro or /home/* the request path is walked up until a resource can be resolved. In the example POST to /home/intro with a missing /content/home resource, the post servlet would go up to "/" which resolves to "/content" (assuming /content exists of course) and thus would create the new node under /content/home automatically also creating the intermediate /content/home node.
> To be able to still create nodes at the exact path, I propose the introduction of a control parameter ujax:parentMatch:
>       ujax:parentMatch == "exact"  --> use the request path as node path as is without resolving a parent
>       ujax:parentMatch == "resolve"  --> resolve a parent node and have intermediate nodes created accordingly
> The default value if the ujax:parentMatch parameter is missing is "resolve".
> WDYT ?

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


[jira] Commented: (SLING-233) UjaxPostServlet should care to find an appropriate parent location for new nodes

Posted by "Tobias Bocanegra (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566536#action_12566536 ] 

Tobias Bocanegra commented on SLING-233:
----------------------------------------

i think that clients of the ujax post servlet know where to store the content and probably always post on the correct url. i would suggest that exact is the default.

> UjaxPostServlet should care to find an appropriate parent location for new nodes
> --------------------------------------------------------------------------------
>
>                 Key: SLING-233
>                 URL: https://issues.apache.org/jira/browse/SLING-233
>             Project: Sling
>          Issue Type: Improvement
>          Components: Launchpad
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>
> When the UjaxPostServlet is called with an URL not resolving to an existing resource, it just takes the missing resource path as the path of the node to handle.
> This may be a problem in case the ResourceResolver applies a mapping, such as:
>        /* ==> /content/*   - try every path below /content/
>        /* ==> /*      - try every path unmodified
> The intent of this is to first locate resources below the /content/ node and only then unmodified. This way, the primary web site content may be stored below /content but still be accessed as if it would be located just below root.
> Consider a POST request to /home/intro where the /home page does not exist (yet). In this case currently, the /home/intro node would be created as requested. If the /home page would be located at /content/home, the new node would be created as /content/home/intro.
> To work around this problem, I suggest to modify the servlet, such that in the case of a missing resource such as /home/intro or /home/* the request path is walked up until a resource can be resolved. In the example POST to /home/intro with a missing /content/home resource, the post servlet would go up to "/" which resolves to "/content" (assuming /content exists of course) and thus would create the new node under /content/home automatically also creating the intermediate /content/home node.
> To be able to still create nodes at the exact path, I propose the introduction of a control parameter ujax:parentMatch:
>       ujax:parentMatch == "exact"  --> use the request path as node path as is without resolving a parent
>       ujax:parentMatch == "resolve"  --> resolve a parent node and have intermediate nodes created accordingly
> The default value if the ujax:parentMatch parameter is missing is "resolve".
> WDYT ?

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


[jira] Closed: (SLING-233) UjaxPostServlet should care to find an appropriate parent location for new nodes

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

Felix Meschberger closed SLING-233.
-----------------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: 2.0.0)

Closing it won't fix for now, as there is no real requirement. If a requirement is coming along, we might reopen and see what can be done.

> UjaxPostServlet should care to find an appropriate parent location for new nodes
> --------------------------------------------------------------------------------
>
>                 Key: SLING-233
>                 URL: https://issues.apache.org/jira/browse/SLING-233
>             Project: Sling
>          Issue Type: Improvement
>          Components: Launchpad
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>
> When the UjaxPostServlet is called with an URL not resolving to an existing resource, it just takes the missing resource path as the path of the node to handle.
> This may be a problem in case the ResourceResolver applies a mapping, such as:
>        /* ==> /content/*   - try every path below /content/
>        /* ==> /*      - try every path unmodified
> The intent of this is to first locate resources below the /content/ node and only then unmodified. This way, the primary web site content may be stored below /content but still be accessed as if it would be located just below root.
> Consider a POST request to /home/intro where the /home page does not exist (yet). In this case currently, the /home/intro node would be created as requested. If the /home page would be located at /content/home, the new node would be created as /content/home/intro.
> To work around this problem, I suggest to modify the servlet, such that in the case of a missing resource such as /home/intro or /home/* the request path is walked up until a resource can be resolved. In the example POST to /home/intro with a missing /content/home resource, the post servlet would go up to "/" which resolves to "/content" (assuming /content exists of course) and thus would create the new node under /content/home automatically also creating the intermediate /content/home node.
> To be able to still create nodes at the exact path, I propose the introduction of a control parameter ujax:parentMatch:
>       ujax:parentMatch == "exact"  --> use the request path as node path as is without resolving a parent
>       ujax:parentMatch == "resolve"  --> resolve a parent node and have intermediate nodes created accordingly
> The default value if the ujax:parentMatch parameter is missing is "resolve".
> WDYT ?

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