You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2009/04/02 19:02:12 UTC
[jira] Created: (SLING-910) Overlaying of servlets
Overlaying of servlets
----------------------
Key: SLING-910
URL: https://issues.apache.org/jira/browse/SLING-910
Project: Sling
Issue Type: Improvement
Components: Servlets Resolver
Affects Versions: Servlets Resolver 2.0.4
Reporter: Carsten Ziegeler
While it is possible to overlay scripts (the resource resolver is configured with the search paths), it is not possible to overlay registered servlets. I briefly discussed this with Alex Saar and we think that this is a missing feature in Sling.
If a servlet is registered for a resource type or extension etc. it should be possible to overlay it with a different version. Maybe by specifying some ordering?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (SLING-910) Overlaying of servlets
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler reassigned SLING-910:
--------------------------------------
Assignee: Carsten Ziegeler
> Overlaying of servlets
> ----------------------
>
> Key: SLING-910
> URL: https://issues.apache.org/jira/browse/SLING-910
> Project: Sling
> Issue Type: Improvement
> Components: Servlets Resolver
> Affects Versions: Servlets Resolver 2.0.4
> Reporter: Carsten Ziegeler
> Assignee: Carsten Ziegeler
> Fix For: Servlets Resolver 2.0.6
>
>
> While it is possible to overlay scripts (the resource resolver is configured with the search paths), it is not possible to overlay registered servlets. I briefly discussed this with Alex Saar and we think that this is a missing feature in Sling.
> If a servlet is registered for a resource type or extension etc. it should be possible to overlay it with a different version. Maybe by specifying some ordering?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (SLING-910) Overlaying of servlets
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler closed SLING-910.
----------------------------------
Resolution: Fixed
Implemented as outlined above in Revision: 765086.
> Overlaying of servlets
> ----------------------
>
> Key: SLING-910
> URL: https://issues.apache.org/jira/browse/SLING-910
> Project: Sling
> Issue Type: Improvement
> Components: Servlets Resolver
> Affects Versions: Servlets Resolver 2.0.4
> Reporter: Carsten Ziegeler
> Assignee: Carsten Ziegeler
> Fix For: Servlets Resolver 2.0.6
>
>
> While it is possible to overlay scripts (the resource resolver is configured with the search paths), it is not possible to overlay registered servlets. I briefly discussed this with Alex Saar and we think that this is a missing feature in Sling.
> If a servlet is registered for a resource type or extension etc. it should be possible to overlay it with a different version. Maybe by specifying some ordering?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-910) Overlaying of servlets
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695080#action_12695080 ]
Felix Meschberger commented on SLING-910:
-----------------------------------------
No, you still register it with a resource type, but this may be an absolute path.
For example, if you register as resourceType="app/components/c1", it will be located at "/apps/app/components/c1". If you register it as "/libs/app/components/c1" it will be registered exactly there and support the actual resource type "app/component/c1".
The drawback of this is, that you are taking assumptions about the path.
if you want to configure the prefix (using /libs instead of /apps for example, but this is global !), you may configure this in the resource resolver (IIRC)
> Overlaying of servlets
> ----------------------
>
> Key: SLING-910
> URL: https://issues.apache.org/jira/browse/SLING-910
> Project: Sling
> Issue Type: Improvement
> Components: Servlets Resolver
> Affects Versions: Servlets Resolver 2.0.4
> Reporter: Carsten Ziegeler
>
> While it is possible to overlay scripts (the resource resolver is configured with the search paths), it is not possible to overlay registered servlets. I briefly discussed this with Alex Saar and we think that this is a missing feature in Sling.
> If a servlet is registered for a resource type or extension etc. it should be possible to overlay it with a different version. Maybe by specifying some ordering?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-910) Overlaying of servlets
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695090#action_12695090 ]
Carsten Ziegeler commented on SLING-910:
----------------------------------------
Ok, hmm, what about making the prefix configurable on the servlet without the need that the servlet nows the real value?
I'm not sure if this is a good idea, but what about a "prefixIndex" configuration - defaulting to 0 - which indicates the index of the prefix in the search paths of the resource resolver? If the prefixIndex is higher than the available prefixes, the last one is used.
> Overlaying of servlets
> ----------------------
>
> Key: SLING-910
> URL: https://issues.apache.org/jira/browse/SLING-910
> Project: Sling
> Issue Type: Improvement
> Components: Servlets Resolver
> Affects Versions: Servlets Resolver 2.0.4
> Reporter: Carsten Ziegeler
>
> While it is possible to overlay scripts (the resource resolver is configured with the search paths), it is not possible to overlay registered servlets. I briefly discussed this with Alex Saar and we think that this is a missing feature in Sling.
> If a servlet is registered for a resource type or extension etc. it should be possible to overlay it with a different version. Maybe by specifying some ordering?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SLING-910) Overlaying of servlets
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler updated SLING-910:
-----------------------------------
Fix Version/s: Servlets Resolver 2.0.6
> Overlaying of servlets
> ----------------------
>
> Key: SLING-910
> URL: https://issues.apache.org/jira/browse/SLING-910
> Project: Sling
> Issue Type: Improvement
> Components: Servlets Resolver
> Affects Versions: Servlets Resolver 2.0.4
> Reporter: Carsten Ziegeler
> Fix For: Servlets Resolver 2.0.6
>
>
> While it is possible to overlay scripts (the resource resolver is configured with the search paths), it is not possible to overlay registered servlets. I briefly discussed this with Alex Saar and we think that this is a missing feature in Sling.
> If a servlet is registered for a resource type or extension etc. it should be possible to overlay it with a different version. Maybe by specifying some ordering?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-910) Overlaying of servlets
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696003#action_12696003 ]
Carsten Ziegeler commented on SLING-910:
----------------------------------------
I discussed tihis with Felix a little bit more, and we came up with the following:
- we define a new single value service property "sling.servlet.prefix" which is either a string or a number
- if it is a number, it defines the index of the search paths entry. -1 can be used to always use the last entry; if the index is higher than the number of entries, the last entry is used. Index starts at 0
- if it is a string and is parseable as a number, the above logic is applied
- if it is a string starting with "/" this string is applied as prefix - regardless of the configured search paths!
- if it is any other string, the value is ignored (but a warning is logged)
The current sling servlet resolver has a configuration value for the servlet root which points to /apps - this configuration value is used as the default for the above property.
With the above changes we're compatible but more flexible.
> Overlaying of servlets
> ----------------------
>
> Key: SLING-910
> URL: https://issues.apache.org/jira/browse/SLING-910
> Project: Sling
> Issue Type: Improvement
> Components: Servlets Resolver
> Affects Versions: Servlets Resolver 2.0.4
> Reporter: Carsten Ziegeler
> Fix For: Servlets Resolver 2.0.6
>
>
> While it is possible to overlay scripts (the resource resolver is configured with the search paths), it is not possible to overlay registered servlets. I briefly discussed this with Alex Saar and we think that this is a missing feature in Sling.
> If a servlet is registered for a resource type or extension etc. it should be possible to overlay it with a different version. Maybe by specifying some ordering?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-910) Overlaying of servlets
Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696063#action_12696063 ]
Bertrand Delacretaz commented on SLING-910:
-------------------------------------------
That flexibility sounds like it might lead to "interesting" debugging sessions, as in "why is my servlet not being called to process this request?" ;-)
I'm not against implementing this, but I think the selection mechanism should be easy to debug. Adding clear RequestProgressTracker messages (SLING-3) might be sufficient.
> Overlaying of servlets
> ----------------------
>
> Key: SLING-910
> URL: https://issues.apache.org/jira/browse/SLING-910
> Project: Sling
> Issue Type: Improvement
> Components: Servlets Resolver
> Affects Versions: Servlets Resolver 2.0.4
> Reporter: Carsten Ziegeler
> Fix For: Servlets Resolver 2.0.6
>
>
> While it is possible to overlay scripts (the resource resolver is configured with the search paths), it is not possible to overlay registered servlets. I briefly discussed this with Alex Saar and we think that this is a missing feature in Sling.
> If a servlet is registered for a resource type or extension etc. it should be possible to overlay it with a different version. Maybe by specifying some ordering?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-910) Overlaying of servlets
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695063#action_12695063 ]
Felix Meschberger commented on SLING-910:
-----------------------------------------
What do you mean by overlaying servlets ? Servlets are handled exactly like scripts (internally they are handled using the extension ".servlet") ?
The problem probably is, that a servlet registered with just a resource type and extension (but not path) is located below "/apps" (default but configurable) unless the resource type is converted to an absolute path.
So if you register the servlet with a "resource type" of "/libs/someapp/components/comp1", it will be located below libs and may be overlayed in /apps.
> Overlaying of servlets
> ----------------------
>
> Key: SLING-910
> URL: https://issues.apache.org/jira/browse/SLING-910
> Project: Sling
> Issue Type: Improvement
> Components: Servlets Resolver
> Affects Versions: Servlets Resolver 2.0.4
> Reporter: Carsten Ziegeler
>
> While it is possible to overlay scripts (the resource resolver is configured with the search paths), it is not possible to overlay registered servlets. I briefly discussed this with Alex Saar and we think that this is a missing feature in Sling.
> If a servlet is registered for a resource type or extension etc. it should be possible to overlay it with a different version. Maybe by specifying some ordering?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-910) Overlaying of servlets
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696068#action_12696068 ]
Felix Meschberger commented on SLING-910:
-----------------------------------------
I agree, here is what we have/might have:
* The servlet resolver IIRC already adds into the RequestProgressTracker (and has extensive debug logs)
* The servlet resolver could plug into the web console to list the registered servlets
along with the registration paths and the configuration
> Overlaying of servlets
> ----------------------
>
> Key: SLING-910
> URL: https://issues.apache.org/jira/browse/SLING-910
> Project: Sling
> Issue Type: Improvement
> Components: Servlets Resolver
> Affects Versions: Servlets Resolver 2.0.4
> Reporter: Carsten Ziegeler
> Fix For: Servlets Resolver 2.0.6
>
>
> While it is possible to overlay scripts (the resource resolver is configured with the search paths), it is not possible to overlay registered servlets. I briefly discussed this with Alex Saar and we think that this is a missing feature in Sling.
> If a servlet is registered for a resource type or extension etc. it should be possible to overlay it with a different version. Maybe by specifying some ordering?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-910) Overlaying of servlets
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695077#action_12695077 ]
Carsten Ziegeler commented on SLING-910:
----------------------------------------
Ups, you never stop learning.
So basically I register the servlet by a path (like /libs...), instead of using the resource type, right?
If I'm using the resource type, can the servlet specify under which path it is located or where is this configuration?
> Overlaying of servlets
> ----------------------
>
> Key: SLING-910
> URL: https://issues.apache.org/jira/browse/SLING-910
> Project: Sling
> Issue Type: Improvement
> Components: Servlets Resolver
> Affects Versions: Servlets Resolver 2.0.4
> Reporter: Carsten Ziegeler
>
> While it is possible to overlay scripts (the resource resolver is configured with the search paths), it is not possible to overlay registered servlets. I briefly discussed this with Alex Saar and we think that this is a missing feature in Sling.
> If a servlet is registered for a resource type or extension etc. it should be possible to overlay it with a different version. Maybe by specifying some ordering?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (SLING-910) Overlaying of servlets
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695080#action_12695080 ]
Felix Meschberger edited comment on SLING-910 at 4/2/09 11:20 AM:
------------------------------------------------------------------
No, you still register it with a resource type, but this may be an absolute path.
For example, if you register as resourceType="app/components/c1", it will be located at "/apps/app/components/c1". If you register it as "/libs/app/components/c1" it will be registered exactly there and support the actual resource type "app/component/c1".
The drawback of this is, that you are taking assumptions about the path.
if you want to configure the prefix (using /libs instead of /apps for example, but this is global !), you may configure this in the servlet resolver (IIRC)
was (Author: fmeschbe):
No, you still register it with a resource type, but this may be an absolute path.
For example, if you register as resourceType="app/components/c1", it will be located at "/apps/app/components/c1". If you register it as "/libs/app/components/c1" it will be registered exactly there and support the actual resource type "app/component/c1".
The drawback of this is, that you are taking assumptions about the path.
if you want to configure the prefix (using /libs instead of /apps for example, but this is global !), you may configure this in the resource resolver (IIRC)
> Overlaying of servlets
> ----------------------
>
> Key: SLING-910
> URL: https://issues.apache.org/jira/browse/SLING-910
> Project: Sling
> Issue Type: Improvement
> Components: Servlets Resolver
> Affects Versions: Servlets Resolver 2.0.4
> Reporter: Carsten Ziegeler
>
> While it is possible to overlay scripts (the resource resolver is configured with the search paths), it is not possible to overlay registered servlets. I briefly discussed this with Alex Saar and we think that this is a missing feature in Sling.
> If a servlet is registered for a resource type or extension etc. it should be possible to overlay it with a different version. Maybe by specifying some ordering?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.