Re: Replace ujax: prefix to sling:
Bertrand Delacretaz schrieb: On Mon, Mar 31, 2008 at 11:32 AM, Carsten Ziegeler [EMAIL PROTECTED] wrote: I think we should do this renaming asap. Do we already have a jira issue for this? Yes, https://issues.apache.org/jira/browse/SLING-326, but it needs to be updated according to this thread. -Bertrand Ah thanks. I've updated the issue. So, we go for sling/servlets-post for the current ujax stuff and have sling/servlets-default for the get stuff? Carsten -- Carsten Ziegeler [EMAIL PROTECTED]
Re: Replace ujax: prefix to sling:
Felix Meschberger schrieb: I agree 100%. Are you going to do this ? Otherwise, I could start doing this this afternoon. I would to it tomorrow :) So if you want to do it today... :) Carsten -- Carsten Ziegeler [EMAIL PROTECTED]
Re: Registering a Servlet Filter
On Fri, Mar 28, 2008 at 9:07 PM, Bertrand Delacretaz [EMAIL PROTECTED] wrote: On Fri, Mar 28, 2008 at 4:52 PM, Vidar Ramdal [EMAIL PROTECTED] wrote: ... So, is there a way to use a servlet filter with Sling?... Yes, see the ZipFilter example: http://svn.apache.org/repos/asf/incubator/sling/trunk/sling/sample/src/main/java/org/apache/sling/sample/filter/ZipFilter.java Thanks, I got the filter running. However, in order for it to be useful, I need to invoke it in a regular servlet container fashion - that is, BEFORE any servlets get to handle the request. The Sling (and I assume OSGi?) way is to let a servlet take care of invoking filters. In Sling's case, that seems to be SlingMainServlet. Now, this is not what I want, because SlingMainServlet#service(HttpServletRequest, HttpServletResponse) resolves the resource before invoking filters. My filter is designed to manipulate the request so that Sling will resolve to a different resource (based on the HTTP host header, as outlined in https://issues.apache.org/jira/browse/SLING-249). So I would like to let the filter process the request before SlingMainServlet gets to it. How can I accomplish that (if possible)? -- Vidar S. Ramdal [EMAIL PROTECTED] - http://www.idium.no Akersgata 16, N-0158 Oslo, Norway
Re: Registering a Servlet Filter
On Mon, Mar 31, 2008 at 2:34 PM, Vidar Ramdal [EMAIL PROTECTED] wrote: ... So I would like to let the filter process the request before SlingMainServlet gets to it. How can I accomplish that (if possible)?... The easiest seems to be for your filter to be declared in web.xml. I'd suggest first patching the launchpad/webapp web.xml to test your idea, and if that works you could create your own webapp, either by overlaying your own web.xml using the maven-war-plugin, or creating a completely new webapp using the launchpad one as an example. -Bertrand
Re: Does Sling use Apache BSF or a similar model for scripting language support.
Hi Bertrand, Thanks, i will have a look at it. :-). janandith. On 3/31/08, Bertrand Delacretaz [EMAIL PROTECTED] wrote: Hi Janadith, On Sun, Mar 30, 2008 at 8:24 PM, janandith jayawardena [EMAIL PROTECTED] wrote: ... Does this mean Sling uses Apache BSF for scripting language support or a similar model... Yes and no ;-) Sling scripting is based on the JSR 223 javax.script.* interfaces, provided by the BSF 3.0 beta release. So we do use BSF, but not the old BSF-specific interfaces. ... If so is it also an OSGi bundle Yes, each scripting engine is provided as an OSGi bundle, but to be usable as a scripting engine the bundle has to include a services/javax.script.ScriptEngineFactory file that gives the name of the ScriptEngineFactory that implements the language. The velocity script engine (in scripting/velocity) is probably the simplest example. ... Can i use the Apache BSF manual as a reference to the Sling scripting/api Probably not, I haven't checked but I guess that manual describes the old BSF API. Better look at the javax.script APIs, for example at http://java.sun.com/javase/6/docs/api/javax/script/package-summary.html - but BSF, being in beta, might not implement all of that. -Bertrand
Re: Replace ujax: prefix to sling:
Hi, Am Montag, den 31.03.2008, 12:07 +0200 schrieb Carsten Ziegeler: Bertrand Delacretaz schrieb: On Mon, Mar 31, 2008 at 11:32 AM, Carsten Ziegeler [EMAIL PROTECTED] wrote: I think we should do this renaming asap. Do we already have a jira issue for this? Yes, https://issues.apache.org/jira/browse/SLING-326, but it needs to be updated according to this thread. -Bertrand Ah thanks. I've updated the issue. So, we go for sling/servlets-post for the current ujax stuff and have sling/servlets-default for the get stuff? Basically agree. But then as the servlets-default are GET servlets, why not also change servlets-default to servlets-get ? (And yes, the servlets-standard should really be dropped ;-) ) Regards Felix
Re: Registering a Servlet Filter
On Mon, Mar 31, 2008 at 3:25 PM, Bertrand Delacretaz [EMAIL PROTECTED] wrote: On Mon, Mar 31, 2008 at 3:10 PM, Felix Meschberger [EMAIL PROTECTED] wrote: Am Montag, den 31.03.2008, 14:52 +0200 schrieb Bertrand Delacretaz: ...The easiest seems to be for your filter to be declared in web.xml ... This is certainly a possibility, but I would not go this route as it leaves Sling and makes it impossible to be used in the standalone launchpad/app case... In addition it is impossible to manage, ie configure and updated the filter Agreed - I was suggesting a here and now solution, but I agree that it is not really integrated with Sling. OK - how about introducing a new filter.scope - e.g. prerequest, and alter SlingMainServlet so that it invokes prerequest filters before passing the request to the ResourceResolver? As I said before, though, I'm not too enthusiastic about SLING-249, as httpd's mod_proxy handles that very nicely. I wouldn't add complexity to Sling to handle that, unless that complexity is cleanly isolated in a component like a filter. Errr, I'm not too enthusiastic about mod_proxy :) As mod_proxy would have to live outside Sling, it would not be able to intercept sling.include requests. So that a request from a browser to http://www.domain.com/path would yield a different result than sling.include(/path). In a perfect world (tm), the host information would still be available for handling the sling.include request. -- Vidar S. Ramdal [EMAIL PROTECTED] - http://www.idium.no Akersgata 16, N-0158 Oslo, Norway
Re: Registering a Servlet Filter
On Mon, Mar 31, 2008 at 3:36 PM, Vidar Ramdal [EMAIL PROTECTED] wrote: ... Errr, I'm not too enthusiastic about mod_proxy :) As mod_proxy would have to live outside Sling, it would not be able to intercept sling.include requests. So that a request from a browser to http://www.domain.com/path would yield a different result than sling.include(/path) Good point - I'm starting to be convinced ;-) -Bertrand
Re: Registering a Servlet Filter
Hi, Am Montag, den 31.03.2008, 15:36 +0200 schrieb Vidar Ramdal: On Mon, Mar 31, 2008 at 3:25 PM, Bertrand Delacretaz [EMAIL PROTECTED] wrote: On Mon, Mar 31, 2008 at 3:10 PM, Felix Meschberger [EMAIL PROTECTED] wrote: Am Montag, den 31.03.2008, 14:52 +0200 schrieb Bertrand Delacretaz: ...The easiest seems to be for your filter to be declared in web.xml ... This is certainly a possibility, but I would not go this route as it leaves Sling and makes it impossible to be used in the standalone launchpad/app case... In addition it is impossible to manage, ie configure and updated the filter Agreed - I was suggesting a here and now solution, but I agree that it is not really integrated with Sling. OK - how about introducing a new filter.scope - e.g. prerequest, and alter SlingMainServlet so that it invokes prerequest filters before passing the request to the ResourceResolver? Sounds interesting. Such a filter would be defined to get the original request and response objects from the servlet container. That is they would be HttpServletRequest/Response and not SlingHttpServletRequest/Response. Would that suit your needs ? An issue with patch, would of course be very welcome ;-) Regards Felix
[jira] Commented: (SLING-317) Rename /classes to /var/classes
[ https://issues.apache.org/jira/browse/SLING-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12583698#action_12583698 ] Felix Meschberger commented on SLING-317: - This patch looks good to me can probably be applied. The JspC plugin currently by default compiles into target/classes which gets into the root of the bundle. This is not suitable for the BundleResourceProvider for the moment. I had a prototype for this, which allowed for prefix mapping when providing bundle resources, such as /org/apache/jasper/sample=/var/classes/org/apache/jasper/sample would provide anything under /org/apache/jasper/sample in the bundle to resources under /var/classes/org/apache/jasper/sample. Otherwise, we could just compile the JSP classes such that the appear below /var/classes in the bundle. But then we could not use normal bundle classloaders to load these JSPs any more. So the path mapping allong above lines probably is better. WDYT ? Rename /classes to /var/classes --- Key: SLING-317 URL: https://issues.apache.org/jira/browse/SLING-317 Project: Sling Issue Type: Improvement Reporter: Bertrand Delacretaz Priority: Minor Attachments: SLING-317.patch Currently the JSP engine uses /classes to store compiled classes, as discussed on list this will be moved to /var/classes. The idea is to use /var for transient stuff that is not usually interesting to developers -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: Registering a Servlet Filter
Hi, Am Montag, den 31.03.2008, 16:07 +0200 schrieb Vidar Ramdal: On Mon, Mar 31, 2008 at 3:54 PM, Felix Meschberger [EMAIL PROTECTED] wrote: OK - how about introducing a new filter.scope - e.g. prerequest, and alter SlingMainServlet so that it invokes prerequest filters before passing the request to the ResourceResolver? Sounds interesting. Such a filter would be defined to get the original request and response objects from the servlet container. That is they would be HttpServletRequest/Response and not SlingHttpServletRequest/Response. Would that suit your needs ? Ah ... but this would be a catch 22, wouldn't it, as the sling.include scenario will still be a problem: So that a request from a browser to http://www.domain.com/path would yield a different result than sling.include(/path). Or am I missing something here? Yes and no ;-) If you use SlingScriptHelper.include which takes a path, you would somehow have to guard the ResourceResolver returned from the SlingHttpServletRequest which is used to resolve the path to a resource. In this respect, this would have to be considered, yes. What could also be done to runt the prerequest filters with incompletely setup SlingHttpServletRequest/Response objects. This would mean the request.getResource() might return null in this stadium. This would allow a filter to overwrite the SlingHttpServletRequest.getResourceResolver() method to wrap the ResourceResolver with some special functionality ... Regards Felix
Re: Request: Create Default Render for XML
...nevertheless, if someone creates a patch to support an XML default rendering (with tests) I guess we' accept it. sure. the problem is that anything else than JCR docview or JCR system view does not make sense Agreed, and that's also easy to implement I guess, using the JCR Session.export*View methods (am I being subtle enough in suggesting that someone could send a patch for that? ;-) not that easy. the problem is that the 'depth' information cannot easily be included. so you need to provide some proxy ContentHandler that supreses elements deeper than the specified level. ...i suggest the following syntax: path.level.type.xml where level is the depth of the export, and type is either 'docview' or 'sysview' with 'sysview' as default Agree with that. -- toby
[jira] Updated: (SLING-326) Rena me µjax to sling client library
[ https://issues.apache.org/jira/browse/SLING-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carsten Ziegeler updated SLING-326: --- Assignee: Carsten Ziegeler Remaining Estimate: 0h Original Estimate: 0h Rename µjax to sling client library - Key: SLING-326 URL: https://issues.apache.org/jira/browse/SLING-326 Project: Sling Issue Type: Improvement Reporter: Bertrand Delacretaz Assignee: Carsten Ziegeler Priority: Minor Original Estimate: 0h Remaining Estimate: 0h As discussed recently [1], reducing the number of names for the different sling components should help people make sense of it. The idea is to rename the µjax stuff to sling client library, and I suppose the UjaxPostServlet can be renamed to SlingPostServlet? There were some discussions about using catapult for the name, but that's so good a name that we'll keep it in store for later ;-) [1] http://markmail.org/message/5yeuwlbsj6m7da6o -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (SLING-326) Rena me µjax to sling client library
[ https://issues.apache.org/jira/browse/SLING-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carsten Ziegeler updated SLING-326: --- Renamed sling/ujax module to sling/servlets-post Renamed /ujax/ujax.js to /sling/sling.js Rename µjax to sling client library - Key: SLING-326 URL: https://issues.apache.org/jira/browse/SLING-326 Project: Sling Issue Type: Improvement Reporter: Bertrand Delacretaz Assignee: Carsten Ziegeler Priority: Minor Original Estimate: 0h Remaining Estimate: 0h As discussed recently [1], reducing the number of names for the different sling components should help people make sense of it. The idea is to rename the µjax stuff to sling client library, and I suppose the UjaxPostServlet can be renamed to SlingPostServlet? There were some discussions about using catapult for the name, but that's so good a name that we'll keep it in store for later ;-) [1] http://markmail.org/message/5yeuwlbsj6m7da6o -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (SLING-326) Rena me µjax to sling client library
[ https://issues.apache.org/jira/browse/SLING-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carsten Ziegeler updated SLING-326: --- Renamed package to *.servlets.post.* Renamed Ujax* classes to Sling* Rename µjax to sling client library - Key: SLING-326 URL: https://issues.apache.org/jira/browse/SLING-326 Project: Sling Issue Type: Improvement Reporter: Bertrand Delacretaz Assignee: Carsten Ziegeler Priority: Minor Original Estimate: 0h Remaining Estimate: 0h As discussed recently [1], reducing the number of names for the different sling components should help people make sense of it. The idea is to rename the µjax stuff to sling client library, and I suppose the UjaxPostServlet can be renamed to SlingPostServlet? There were some discussions about using catapult for the name, but that's so good a name that we'll keep it in store for later ;-) [1] http://markmail.org/message/5yeuwlbsj6m7da6o -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (SLING-326) Rena me µjax to sling client library
[ https://issues.apache.org/jira/browse/SLING-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carsten Ziegeler updated SLING-326: --- Renamed all references from ujax to sling. There are some remaining items which will be discussed on the mailing list. Rename µjax to sling client library - Key: SLING-326 URL: https://issues.apache.org/jira/browse/SLING-326 Project: Sling Issue Type: Improvement Reporter: Bertrand Delacretaz Assignee: Carsten Ziegeler Priority: Minor Original Estimate: 0h Remaining Estimate: 0h As discussed recently [1], reducing the number of names for the different sling components should help people make sense of it. The idea is to rename the µjax stuff to sling client library, and I suppose the UjaxPostServlet can be renamed to SlingPostServlet? There were some discussions about using catapult for the name, but that's so good a name that we'll keep it in store for later ;-) [1] http://markmail.org/message/5yeuwlbsj6m7da6o -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: Replace ujax: prefix to sling:
Ok, I renamed the ujax stuff to servlets post and renamed all references to sling as well. The integration tests pass. There are at least two remaining issues: a) what about the dojo-ujax module? b) the SlingInfoServlet is currently mounted at /ujax. I didn't want to change this to /sling as at this path the console is mounted. What do we want to do here? Carsten -- Carsten Ziegeler [EMAIL PROTECTED]
Re: Replace ujax: prefix to sling:
On Mon, Mar 31, 2008 at 6:43 PM, Carsten Ziegeler [EMAIL PROTECTED] wrote: ... b) the SlingInfoServlet is currently mounted at /ujax. I didn't want to change this to /sling as at this path the console is mounted. What do we want to do here?... /slinginfo maybe? -Bertrand