You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Ian Boston <ie...@tfd.co.uk> on 2009/07/06 06:51:07 UTC
Selectors on non existent resources
Hi,
Am I right in thinking a post to a non existent resource will not get
routed to a servlet with a selector, and type of sling/default/servlet
or do I need to add the resource type of sling/nonexistent/servlet to
get it routed.
Below are some tracebacks, in both cases the selectorString is empty.
I would prefer not to mount this servlet at a static site (or use 2
posts to make the node appear and then use the createsite selector on
the node)
Any ideas/suggestions ?
Ian
I get the following trackback
0 (2009-07-06 05:46:41) Starting Request Processing
0 (2009-07-06 05:46:41) Method=POST, PathInfo=/
newtest23214232343.createsite
308 (2009-07-06 05:46:41) Starting ResourceResolution
316 (2009-07-06 05:46:41) URI=/newtest23214232343.createsite
resolves to Resource=NonExistingResource, path=/
newtest23214232343.createsite, elapsed = 8ms
316 (2009-07-06 05:46:41) Resource Path Info:
SlingRequestPathInfo: path='/newtest23214232343.createsite',
selectorString='null', extension='null', suffix='null'
316 (2009-07-06 05:46:41) Starting ServletResolution
316 (2009-07-06 05:46:41) Starting
resolverServlet(NonExistingResource, path=/
newtest23214232343.createsite)
316 (2009-07-06 05:46:41) Using Servlet
org.apache.sling.servlets.post.impl.SlingPostServlet, elapsed = 0ms
316 (2009-07-06 05:46:41) URI=/newtest23214232343.createsite
handled by
Servlet=org.apache.sling.servlets.post.impl.SlingPostServlet, elapsed
= 0ms
316 (2009-07-06 05:46:41) Applying request filters
316 (2009-07-06 05:46:41) Calling filter:
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
316 (2009-07-06 05:46:41) Starting
org.apache.sling.servlets.post.impl.SlingPostServlet#0
366 (2009-07-06 05:46:41)
org.apache.sling.servlets.post.impl.SlingPostServlet#0, elapsed = 50ms
366 (2009-07-06 05:46:41) Request Processing ends, elapsed = 366ms
for curl -Ftest=test http://admin:admin@localhost:8080/newtest23214232343.createsite
and
0 (2009-07-06 05:47:56) Starting Request Processing
0 (2009-07-06 05:47:56) Method=POST, PathInfo=/
newtest2322343.createsite.json
316 (2009-07-06 05:47:56) Starting ResourceResolution
325 (2009-07-06 05:47:56) URI=/newtest2322343.createsite.json
resolves to Resource=NonExistingResource, path=/
newtest2322343.createsite.json, elapsed = 9ms
325 (2009-07-06 05:47:56) Resource Path Info:
SlingRequestPathInfo: path='/newtest2322343.createsite.json',
selectorString='null', extension='null', suffix='null'
325 (2009-07-06 05:47:56) Starting ServletResolution
325 (2009-07-06 05:47:56) Starting
resolverServlet(NonExistingResource, path=/
newtest2322343.createsite.json)
325 (2009-07-06 05:47:56) Using Servlet
org.apache.sling.servlets.post.impl.SlingPostServlet, elapsed = 0ms
325 (2009-07-06 05:47:56) URI=/newtest2322343.createsite.json
handled by
Servlet=org.apache.sling.servlets.post.impl.SlingPostServlet, elapsed
= 0ms
325 (2009-07-06 05:47:56) Applying request filters
325 (2009-07-06 05:47:56) Calling filter:
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
325 (2009-07-06 05:47:56) Starting
org.apache.sling.servlets.post.impl.SlingPostServlet#0
358 (2009-07-06 05:47:56)
org.apache.sling.servlets.post.impl.SlingPostServlet#0, elapsed = 33ms
358 (2009-07-06 05:47:56) Request Processing ends, elapsed = 358ms
for
curl -Ftest=test http://admin:admin@localhost:8080/newtest2322343.createsite.json
Re: Selectors on non existent resources
Posted by Ian Boston <ie...@tfd.co.uk>.
On 6 Jul 2009, at 11:01, Alexander Klimetschek wrote:
> On Mon, Jul 6, 2009 at 6:51 AM, Ian Boston<ie...@tfd.co.uk> wrote:
>> Am I right in thinking a post to a non existent resource will not
>> get routed
>> to a servlet with a selector, and type of sling/default/servlet
>> or do I need to add the resource type of sling/nonexistent/servlet
>> to get it
>> routed.
>
> See this (still open) bug with a patch to add selector support:
> https://issues.apache.org/jira/browse/SLING-864
I see, same issue
I guess since its been there since 2.0.2, its not scheduled to be
applied ?
Thank you,
Ian
>
> Regards,
> Alex
>
> --
> Alexander Klimetschek
> alexander.klimetschek@day.com
Re: Selectors on non existent resources
Posted by Alexander Klimetschek <ak...@day.com>.
On Mon, Jul 6, 2009 at 6:51 AM, Ian Boston<ie...@tfd.co.uk> wrote:
> Am I right in thinking a post to a non existent resource will not get routed
> to a servlet with a selector, and type of sling/default/servlet
> or do I need to add the resource type of sling/nonexistent/servlet to get it
> routed.
See this (still open) bug with a patch to add selector support:
https://issues.apache.org/jira/browse/SLING-864
Regards,
Alex
--
Alexander Klimetschek
alexander.klimetschek@day.com