[jira] [Commented] (SLING-2726) allow simple wildcards in servlet paths
[ https://issues.apache.org/jira/browse/SLING-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13578332#comment-13578332 ] Alexander Klimetschek commented on SLING-2726: -- Even if the change would be technically simple, it would be a step in the wrong direction. allow simple wildcards in servlet paths --- Key: SLING-2726 URL: https://issues.apache.org/jira/browse/SLING-2726 Project: Sling Issue Type: Improvement Components: Servlets Reporter: Nicolas Peltier Priority: Minor While i'm a big fan/evangelist of sling unique servlet management. I tend to think this would be nice to allow minimum wildcard for servlet paths, i.e. /a/b/* (no suffix), as some use cases can't be cover right now with jcr based resources + path servlets. Basically every resource model where you don't need a jcr node for (while it's very convenient most of the time). I'm thinking for example of having a profile servlet with a nice public /profile/jdoe.html url. Right now my possibilities are * to create a flat tree of fake user nodes under a profile node just for the sake of my urls (don't need righs handling, don't need other verbs for the same resource), * to have tons of vanityUrls (not meant for that kind of usage) * to create my own ResourceProvider that map that kind of URLs to existing jcr resources. * to switch to /profile.jdoe.html, or /profile.html?uid=jdoe And i tend to think a tiny wildcard in a path parameter would be nicer :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2726) allow simple wildcards in servlet paths
[ https://issues.apache.org/jira/browse/SLING-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13577409#comment-13577409 ] Carsten Ziegeler commented on SLING-2726: - I'm not against doing such a simple resource provider, however I'm not sure if it really helps in this use case. I'm not in favour of allowing wild cards in registration as this is contradicting the idea of the resource tree a little bit and I'm definitly against mixing data (= resources) with their rendering (servlets/scripts). As I noted above, if the resource approach does not work for a use case, there is still the possibility to register a servlet using the http service (not the Sling engine) and implement the logic here. As this is an OSGi service it can access the resource resolver and get resources from the tree. This is very simple and straightforward. allow simple wildcards in servlet paths --- Key: SLING-2726 URL: https://issues.apache.org/jira/browse/SLING-2726 Project: Sling Issue Type: Improvement Components: Servlets Reporter: Nicolas Peltier Priority: Minor While i'm a big fan/evangelist of sling unique servlet management. I tend to think this would be nice to allow minimum wildcard for servlet paths, i.e. /a/b/* (no suffix), as some use cases can't be cover right now with jcr based resources + path servlets. Basically every resource model where you don't need a jcr node for (while it's very convenient most of the time). I'm thinking for example of having a profile servlet with a nice public /profile/jdoe.html url. Right now my possibilities are * to create a flat tree of fake user nodes under a profile node just for the sake of my urls (don't need righs handling, don't need other verbs for the same resource), * to have tons of vanityUrls (not meant for that kind of usage) * to create my own ResourceProvider that map that kind of URLs to existing jcr resources. * to switch to /profile.jdoe.html, or /profile.html?uid=jdoe And i tend to think a tiny wildcard in a path parameter would be nicer :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2726) allow simple wildcards in servlet paths
[ https://issues.apache.org/jira/browse/SLING-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13577551#comment-13577551 ] Nicolas Peltier commented on SLING-2726: What i like with jcr based one vs. http service is i have ACLs management for free. I can still connect to the repo in my service and test my rights against a JCR node. @Alex, interesting approach, will look into that. ok, looks like this bug can be closed. May be another one for easily creating ResourceProvider should be done? allow simple wildcards in servlet paths --- Key: SLING-2726 URL: https://issues.apache.org/jira/browse/SLING-2726 Project: Sling Issue Type: Improvement Components: Servlets Reporter: Nicolas Peltier Priority: Minor While i'm a big fan/evangelist of sling unique servlet management. I tend to think this would be nice to allow minimum wildcard for servlet paths, i.e. /a/b/* (no suffix), as some use cases can't be cover right now with jcr based resources + path servlets. Basically every resource model where you don't need a jcr node for (while it's very convenient most of the time). I'm thinking for example of having a profile servlet with a nice public /profile/jdoe.html url. Right now my possibilities are * to create a flat tree of fake user nodes under a profile node just for the sake of my urls (don't need righs handling, don't need other verbs for the same resource), * to have tons of vanityUrls (not meant for that kind of usage) * to create my own ResourceProvider that map that kind of URLs to existing jcr resources. * to switch to /profile.jdoe.html, or /profile.html?uid=jdoe And i tend to think a tiny wildcard in a path parameter would be nicer :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2726) allow simple wildcards in servlet paths
[ https://issues.apache.org/jira/browse/SLING-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13577562#comment-13577562 ] Carsten Ziegeler commented on SLING-2726: - Just for completeness :) if you write a servlet and register it with the http service, you can get the resource resolver and get nodes from the repository, so ACLs can be used allow simple wildcards in servlet paths --- Key: SLING-2726 URL: https://issues.apache.org/jira/browse/SLING-2726 Project: Sling Issue Type: Improvement Components: Servlets Reporter: Nicolas Peltier Priority: Minor While i'm a big fan/evangelist of sling unique servlet management. I tend to think this would be nice to allow minimum wildcard for servlet paths, i.e. /a/b/* (no suffix), as some use cases can't be cover right now with jcr based resources + path servlets. Basically every resource model where you don't need a jcr node for (while it's very convenient most of the time). I'm thinking for example of having a profile servlet with a nice public /profile/jdoe.html url. Right now my possibilities are * to create a flat tree of fake user nodes under a profile node just for the sake of my urls (don't need righs handling, don't need other verbs for the same resource), * to have tons of vanityUrls (not meant for that kind of usage) * to create my own ResourceProvider that map that kind of URLs to existing jcr resources. * to switch to /profile.jdoe.html, or /profile.html?uid=jdoe And i tend to think a tiny wildcard in a path parameter would be nicer :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2726) allow simple wildcards in servlet paths
[ https://issues.apache.org/jira/browse/SLING-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13578182#comment-13578182 ] Felix Meschberger commented on SLING-2726: -- I am inclined to accept this request. The change is really minimal and we just have to improve on the ServletResourceProvider.getResource method: This currently checks for path equality. With wildcard or prefix support we would check for prefix equality. We could implement this requiring an additional service property to be set such that existing servlets are still handled with equality test only, while new implementations may request the new behaviour. allow simple wildcards in servlet paths --- Key: SLING-2726 URL: https://issues.apache.org/jira/browse/SLING-2726 Project: Sling Issue Type: Improvement Components: Servlets Reporter: Nicolas Peltier Priority: Minor While i'm a big fan/evangelist of sling unique servlet management. I tend to think this would be nice to allow minimum wildcard for servlet paths, i.e. /a/b/* (no suffix), as some use cases can't be cover right now with jcr based resources + path servlets. Basically every resource model where you don't need a jcr node for (while it's very convenient most of the time). I'm thinking for example of having a profile servlet with a nice public /profile/jdoe.html url. Right now my possibilities are * to create a flat tree of fake user nodes under a profile node just for the sake of my urls (don't need righs handling, don't need other verbs for the same resource), * to have tons of vanityUrls (not meant for that kind of usage) * to create my own ResourceProvider that map that kind of URLs to existing jcr resources. * to switch to /profile.jdoe.html, or /profile.html?uid=jdoe And i tend to think a tiny wildcard in a path parameter would be nicer :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2726) allow simple wildcards in servlet paths
[ https://issues.apache.org/jira/browse/SLING-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13578206#comment-13578206 ] Carsten Ziegeler commented on SLING-2726: - I still think we should not do this :) we mix data and rendering into a single piece: the servlet - which is contradictionary to what Sling is about. allow simple wildcards in servlet paths --- Key: SLING-2726 URL: https://issues.apache.org/jira/browse/SLING-2726 Project: Sling Issue Type: Improvement Components: Servlets Reporter: Nicolas Peltier Priority: Minor While i'm a big fan/evangelist of sling unique servlet management. I tend to think this would be nice to allow minimum wildcard for servlet paths, i.e. /a/b/* (no suffix), as some use cases can't be cover right now with jcr based resources + path servlets. Basically every resource model where you don't need a jcr node for (while it's very convenient most of the time). I'm thinking for example of having a profile servlet with a nice public /profile/jdoe.html url. Right now my possibilities are * to create a flat tree of fake user nodes under a profile node just for the sake of my urls (don't need righs handling, don't need other verbs for the same resource), * to have tons of vanityUrls (not meant for that kind of usage) * to create my own ResourceProvider that map that kind of URLs to existing jcr resources. * to switch to /profile.jdoe.html, or /profile.html?uid=jdoe And i tend to think a tiny wildcard in a path parameter would be nicer :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2726) allow simple wildcards in servlet paths
[ https://issues.apache.org/jira/browse/SLING-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13576497#comment-13576497 ] Nicolas Peltier commented on SLING-2726: have a specific node type on which you can't add any children, let say /a/b/c is of that type. then /a/b/c(/*)? would be handled by c's renderer. allow simple wildcards in servlet paths --- Key: SLING-2726 URL: https://issues.apache.org/jira/browse/SLING-2726 Project: Sling Issue Type: Improvement Components: Servlets Reporter: Nicolas Peltier Priority: Minor While i'm a big fan/evangelist of sling unique servlet management. I tend to think this would be nice to allow minimum wildcard for servlet paths, i.e. /a/b/* (no suffix), as some use cases can't be cover right now with jcr based resources + path servlets. Basically every resource model where you don't need a jcr node for (while it's very convenient most of the time). I'm thinking for example of having a profile servlet with a nice public /profile/jdoe.html url. Right now my possibilities are * to create a flat tree of fake user nodes under a profile node just for the sake of my urls (don't need righs handling, don't need other verbs for the same resource), * to have tons of vanityUrls (not meant for that kind of usage) * to create my own ResourceProvider that map that kind of URLs to existing jcr resources. * to switch to /profile.jdoe.html, or /profile.html?uid=jdoe And i tend to think a tiny wildcard in a path parameter would be nicer :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2726) allow simple wildcards in servlet paths
[ https://issues.apache.org/jira/browse/SLING-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13576504#comment-13576504 ] Carsten Ziegeler commented on SLING-2726: - You could do this with requesting /a/b/c.html/* and evaluate the postfix in the renderer for c. allow simple wildcards in servlet paths --- Key: SLING-2726 URL: https://issues.apache.org/jira/browse/SLING-2726 Project: Sling Issue Type: Improvement Components: Servlets Reporter: Nicolas Peltier Priority: Minor While i'm a big fan/evangelist of sling unique servlet management. I tend to think this would be nice to allow minimum wildcard for servlet paths, i.e. /a/b/* (no suffix), as some use cases can't be cover right now with jcr based resources + path servlets. Basically every resource model where you don't need a jcr node for (while it's very convenient most of the time). I'm thinking for example of having a profile servlet with a nice public /profile/jdoe.html url. Right now my possibilities are * to create a flat tree of fake user nodes under a profile node just for the sake of my urls (don't need righs handling, don't need other verbs for the same resource), * to have tons of vanityUrls (not meant for that kind of usage) * to create my own ResourceProvider that map that kind of URLs to existing jcr resources. * to switch to /profile.jdoe.html, or /profile.html?uid=jdoe And i tend to think a tiny wildcard in a path parameter would be nicer :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2726) allow simple wildcards in servlet paths
[ https://issues.apache.org/jira/browse/SLING-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13576522#comment-13576522 ] Nicolas Peltier commented on SLING-2726: yes, but then it's not the same handling to have /a/b/c.html/d and /a/b/c/d.html (url form cache layers) allow simple wildcards in servlet paths --- Key: SLING-2726 URL: https://issues.apache.org/jira/browse/SLING-2726 Project: Sling Issue Type: Improvement Components: Servlets Reporter: Nicolas Peltier Priority: Minor While i'm a big fan/evangelist of sling unique servlet management. I tend to think this would be nice to allow minimum wildcard for servlet paths, i.e. /a/b/* (no suffix), as some use cases can't be cover right now with jcr based resources + path servlets. Basically every resource model where you don't need a jcr node for (while it's very convenient most of the time). I'm thinking for example of having a profile servlet with a nice public /profile/jdoe.html url. Right now my possibilities are * to create a flat tree of fake user nodes under a profile node just for the sake of my urls (don't need righs handling, don't need other verbs for the same resource), * to have tons of vanityUrls (not meant for that kind of usage) * to create my own ResourceProvider that map that kind of URLs to existing jcr resources. * to switch to /profile.jdoe.html, or /profile.html?uid=jdoe And i tend to think a tiny wildcard in a path parameter would be nicer :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2726) allow simple wildcards in servlet paths
[ https://issues.apache.org/jira/browse/SLING-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13576869#comment-13576869 ] Alexander Klimetschek commented on SLING-2726: -- You could use /profile.html/a/b/c/d And using the selector (e.g. using the user id) or addressing the user node (/home/users/peter.profile.html) should be viable solutions as well. And you could probably also use a /etc/map configuration with a wildcard a la /profile/.*.html = /home/users/$1.html -1 on adding wildcards to Sling's engine - don't forget that Sling addresses resources and not the script. Hence creating the resources (nodes) should be the default approach, then maybe some specific servlet/redirect as above and lastly maybe a custom resource provider. allow simple wildcards in servlet paths --- Key: SLING-2726 URL: https://issues.apache.org/jira/browse/SLING-2726 Project: Sling Issue Type: Improvement Components: Servlets Reporter: Nicolas Peltier Priority: Minor While i'm a big fan/evangelist of sling unique servlet management. I tend to think this would be nice to allow minimum wildcard for servlet paths, i.e. /a/b/* (no suffix), as some use cases can't be cover right now with jcr based resources + path servlets. Basically every resource model where you don't need a jcr node for (while it's very convenient most of the time). I'm thinking for example of having a profile servlet with a nice public /profile/jdoe.html url. Right now my possibilities are * to create a flat tree of fake user nodes under a profile node just for the sake of my urls (don't need righs handling, don't need other verbs for the same resource), * to have tons of vanityUrls (not meant for that kind of usage) * to create my own ResourceProvider that map that kind of URLs to existing jcr resources. * to switch to /profile.jdoe.html, or /profile.html?uid=jdoe And i tend to think a tiny wildcard in a path parameter would be nicer :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2726) allow simple wildcards in servlet paths
[ https://issues.apache.org/jira/browse/SLING-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13577321#comment-13577321 ] Justin Edelson commented on SLING-2726: --- While you *can* use suffixes, that may produce URLs which are unacceptable to stakeholders (whether these are good or bad reasons doesn't matter IMHO). Using rewriting rules should be considered a workaround and something worth avoiding. While I agree that adding wildcards to Sling's engine isn't necessary or appropriate, I do think that there's a legitimate problem here - some Sling users feel overly constrained by the use of the resource tree to define their URL space. I think the right solution (or at least a right solution) lies in making ResourceProviders easier to create. Similar to the way the FS Resource Provider works, what if we added a configuration factory-based provider? Something like a SimpleResourceProvider which would get configured with a root path, a resourceType, and (maybe) a set of key/value pairs. allow simple wildcards in servlet paths --- Key: SLING-2726 URL: https://issues.apache.org/jira/browse/SLING-2726 Project: Sling Issue Type: Improvement Components: Servlets Reporter: Nicolas Peltier Priority: Minor While i'm a big fan/evangelist of sling unique servlet management. I tend to think this would be nice to allow minimum wildcard for servlet paths, i.e. /a/b/* (no suffix), as some use cases can't be cover right now with jcr based resources + path servlets. Basically every resource model where you don't need a jcr node for (while it's very convenient most of the time). I'm thinking for example of having a profile servlet with a nice public /profile/jdoe.html url. Right now my possibilities are * to create a flat tree of fake user nodes under a profile node just for the sake of my urls (don't need righs handling, don't need other verbs for the same resource), * to have tons of vanityUrls (not meant for that kind of usage) * to create my own ResourceProvider that map that kind of URLs to existing jcr resources. * to switch to /profile.jdoe.html, or /profile.html?uid=jdoe And i tend to think a tiny wildcard in a path parameter would be nicer :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2726) allow simple wildcards in servlet paths
[ https://issues.apache.org/jira/browse/SLING-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13575682#comment-13575682 ] Carsten Ziegeler commented on SLING-2726: - I think this would be a little bit against the general principles of Sling where we a request is targeting a resource and once the resource is found in the tree, a script is called to generate the response for this resource. Sure, right now we have this mechanism which allows you to mount a servlet at some specific path, but this servlet is mounted as a resource into the resource tree and it returns the correct resource type so the servlet is then also picked by the script resolution. So, although a little bit stretched, the resource resolution mechanism and rendering still works following the basic principles. If we would allow a Sling servlet to be mounted through a wild card, this would get more blurry. So I think, if you want to represent your data (profiles) as resources, a resource provider is the way to go; it's very simple to implement. Another option would be to register your servlet outside of Sling directly with the http service. I think it depends on the exact use case which way is the better one allow simple wildcards in servlet paths --- Key: SLING-2726 URL: https://issues.apache.org/jira/browse/SLING-2726 Project: Sling Issue Type: Improvement Components: Servlets Reporter: Nicolas Peltier Priority: Minor While i'm a big fan/evangelist of sling unique servlet management. I tend to think this would be nice to allow minimum wildcard for servlet paths, i.e. /a/b/* (no suffix), as some use cases can't be cover right now with jcr based resources + path servlets. Basically every resource model where you don't need a jcr node for (while it's very convenient most of the time). I'm thinking for example of having a profile servlet with a nice public /profile/jdoe.html url. Right now my possibilities are * to create a flat tree of fake user nodes under a profile node just for the sake of my urls (don't need righs handling, don't need other verbs for the same resource), * to have tons of vanityUrls (not meant for that kind of usage) * to create my own ResourceProvider that map that kind of URLs to existing jcr resources. * to switch to /profile.jdoe.html, or /profile.html?uid=jdoe And i tend to think a tiny wildcard in a path parameter would be nicer :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2726) allow simple wildcards in servlet paths
[ https://issues.apache.org/jira/browse/SLING-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13575722#comment-13575722 ] Nicolas Peltier commented on SLING-2726: I see. Wouldn't that be possible to add resource tree as a possible resource type (in addition to servlets and jcr based resource)? A jcr based resource, that handles every descendent? allow simple wildcards in servlet paths --- Key: SLING-2726 URL: https://issues.apache.org/jira/browse/SLING-2726 Project: Sling Issue Type: Improvement Components: Servlets Reporter: Nicolas Peltier Priority: Minor While i'm a big fan/evangelist of sling unique servlet management. I tend to think this would be nice to allow minimum wildcard for servlet paths, i.e. /a/b/* (no suffix), as some use cases can't be cover right now with jcr based resources + path servlets. Basically every resource model where you don't need a jcr node for (while it's very convenient most of the time). I'm thinking for example of having a profile servlet with a nice public /profile/jdoe.html url. Right now my possibilities are * to create a flat tree of fake user nodes under a profile node just for the sake of my urls (don't need righs handling, don't need other verbs for the same resource), * to have tons of vanityUrls (not meant for that kind of usage) * to create my own ResourceProvider that map that kind of URLs to existing jcr resources. * to switch to /profile.jdoe.html, or /profile.html?uid=jdoe And i tend to think a tiny wildcard in a path parameter would be nicer :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2726) allow simple wildcards in servlet paths
[ https://issues.apache.org/jira/browse/SLING-2726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13575725#comment-13575725 ] Carsten Ziegeler commented on SLING-2726: - Can you please elaborate a little bit on your idea? allow simple wildcards in servlet paths --- Key: SLING-2726 URL: https://issues.apache.org/jira/browse/SLING-2726 Project: Sling Issue Type: Improvement Components: Servlets Reporter: Nicolas Peltier Priority: Minor While i'm a big fan/evangelist of sling unique servlet management. I tend to think this would be nice to allow minimum wildcard for servlet paths, i.e. /a/b/* (no suffix), as some use cases can't be cover right now with jcr based resources + path servlets. Basically every resource model where you don't need a jcr node for (while it's very convenient most of the time). I'm thinking for example of having a profile servlet with a nice public /profile/jdoe.html url. Right now my possibilities are * to create a flat tree of fake user nodes under a profile node just for the sake of my urls (don't need righs handling, don't need other verbs for the same resource), * to have tons of vanityUrls (not meant for that kind of usage) * to create my own ResourceProvider that map that kind of URLs to existing jcr resources. * to switch to /profile.jdoe.html, or /profile.html?uid=jdoe And i tend to think a tiny wildcard in a path parameter would be nicer :-) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira