[jira] Updated: (SLING-1003) Integration of 3rd party servlet filters problematic

2009-06-18 Thread Christian Sprecher (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Sprecher updated SLING-1003:
--

Attachment: RequestData.diff

Patch for RequestData#unwrap(SlingHttpServletRequest): 
*foreign* ServletWrappers are allowed.

Please test it carefully! It runs both with and without the webcastellum 
filter, but I only tested it in standard configuration, i.e. no special filters 
enabled

> Integration of 3rd party servlet filters problematic
> 
>
> Key: SLING-1003
> URL: https://issues.apache.org/jira/browse/SLING-1003
> Project: Sling
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: Engine 2.0.4
> Environment: Windows Vista, 
> java version "1.6.0_13"
> Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
> Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
>Reporter: Christian Sprecher
>Assignee: Felix Meschberger
>Priority: Minor
> Fix For: Engine 2.0.6
>
> Attachments: RequestData.diff, SlingWebCastellum-1.0.jar
>
>
> There is a problem within the chain handling: the 3rd party filter uses it's 
> own wrapper for requests and response, and supplies it to the chain in the 
> chain.doFilter() call. This leads to a ClassCastException on line 54 of 
> AbstractSlingFilterChain:
> ...
>RequestProgressTracker tracker = ((SlingHttpServletRequest) 
> request).getRequestProgressTracker();
> ...
> I am not sure if this cast is valid in the context of a filter chain. On the 
> other hand I am not sure wether such a use case (filter that manipulates 
> request and response) has a chance to run in Sling.
> ==> Please note that this servlet filter needs to run as early as possible in 
> the filter chain
> java.lang.ClassCastException: org.webcastellum.RequestWrapper cannot be cast 
> to
> org.apache.sling.api.SlingHttpServletRequest
>at 
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter
> (AbstractSlingFilterChain.java:54)
>at 
> org.webcastellum.WebCastellumFilter.internalDoFilter(WebCastellumFilt
> er.java:2610)
>at 
> org.webcastellum.WebCastellumFilter.doFilter(WebCastellumFilter.java:
> 1710)

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



[jira] Commented: (SLING-1003) Integration of 3rd party servlet filters problematic

2009-06-16 Thread Christian Sprecher (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720162#action_12720162
 ] 

Christian Sprecher commented on SLING-1003:
---

To be honest, I cannot follow you there :). But anyways:

I do see 

java.lang.ClassCastException: org.webcastellum.RequestWrapper cannot be cast to 
org.apache.sling.api.SlingHttpServletRequest
at 
org.apache.sling.api.wrappers.SlingHttpServletRequestWrapper.getSlingRequest(SlingHttpServletRequestWrapper.java:56)
at 
org.apache.sling.engine.impl.request.RequestData.unwrap(RequestData.java:317)


When I look at your change:


 @Override
+public SlingHttpServletRequest getSlingRequest() {
+// overwrite base class getSlingRequest since that method
+// calls getRequest which is overwritten here to return the
+// HttpServletRequest - we have to get the actual underlying
+// request object which is available from the base class
+return (SlingHttpServletRequest) super.getRequest();
+}

You still cast it onto SlingHttpServletRequest, why?

I do not know enough of the source code, but maybe a hint:

When I debug the whole stuff in RequestData#unwrap, I do see the following 
thing:

request.getRequest() ==> org.webcastellum.requestwrap...@97eb44
request.getRequest().getRequest() ==> 
org.apache.sling.engine.impl.slinghttpservletrequesti...@1a60a71

So I *think* (wild guessing of course), that we are interested in the later 
result when unwrapping. The WebCastellum filter itself already wrapps the 
(Sling)Request in a custom wrapper.


Sorry to be such a pain, and thx in advance







> Integration of 3rd party servlet filters problematic
> 
>
> Key: SLING-1003
> URL: https://issues.apache.org/jira/browse/SLING-1003
> Project: Sling
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: Engine 2.0.4
> Environment: Windows Vista, 
> java version "1.6.0_13"
> Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
> Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
>Reporter: Christian Sprecher
>Assignee: Felix Meschberger
>Priority: Minor
> Fix For: Engine 2.0.6
>
> Attachments: SlingWebCastellum-1.0.jar
>
>
> There is a problem within the chain handling: the 3rd party filter uses it's 
> own wrapper for requests and response, and supplies it to the chain in the 
> chain.doFilter() call. This leads to a ClassCastException on line 54 of 
> AbstractSlingFilterChain:
> ...
>RequestProgressTracker tracker = ((SlingHttpServletRequest) 
> request).getRequestProgressTracker();
> ...
> I am not sure if this cast is valid in the context of a filter chain. On the 
> other hand I am not sure wether such a use case (filter that manipulates 
> request and response) has a chance to run in Sling.
> ==> Please note that this servlet filter needs to run as early as possible in 
> the filter chain
> java.lang.ClassCastException: org.webcastellum.RequestWrapper cannot be cast 
> to
> org.apache.sling.api.SlingHttpServletRequest
>at 
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter
> (AbstractSlingFilterChain.java:54)
>at 
> org.webcastellum.WebCastellumFilter.internalDoFilter(WebCastellumFilt
> er.java:2610)
>at 
> org.webcastellum.WebCastellumFilter.doFilter(WebCastellumFilter.java:
> 1710)

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



[jira] Reopened: (SLING-1003) Integration of 3rd party servlet filters problematic

2009-06-16 Thread Christian Sprecher (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Sprecher reopened SLING-1003:
---


see comments above

> Integration of 3rd party servlet filters problematic
> 
>
> Key: SLING-1003
> URL: https://issues.apache.org/jira/browse/SLING-1003
> Project: Sling
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: Engine 2.0.4
> Environment: Windows Vista, 
> java version "1.6.0_13"
> Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
> Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
>Reporter: Christian Sprecher
>Assignee: Felix Meschberger
>Priority: Minor
> Fix For: Engine 2.0.6
>
> Attachments: SlingWebCastellum-1.0.jar
>
>
> There is a problem within the chain handling: the 3rd party filter uses it's 
> own wrapper for requests and response, and supplies it to the chain in the 
> chain.doFilter() call. This leads to a ClassCastException on line 54 of 
> AbstractSlingFilterChain:
> ...
>RequestProgressTracker tracker = ((SlingHttpServletRequest) 
> request).getRequestProgressTracker();
> ...
> I am not sure if this cast is valid in the context of a filter chain. On the 
> other hand I am not sure wether such a use case (filter that manipulates 
> request and response) has a chance to run in Sling.
> ==> Please note that this servlet filter needs to run as early as possible in 
> the filter chain
> java.lang.ClassCastException: org.webcastellum.RequestWrapper cannot be cast 
> to
> org.apache.sling.api.SlingHttpServletRequest
>at 
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter
> (AbstractSlingFilterChain.java:54)
>at 
> org.webcastellum.WebCastellumFilter.internalDoFilter(WebCastellumFilt
> er.java:2610)
>at 
> org.webcastellum.WebCastellumFilter.doFilter(WebCastellumFilter.java:
> 1710)

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



[jira] Updated: (SLING-1003) Integration of 3rd party servlet filters problematic

2009-06-14 Thread Christian Sprecher (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-1003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Sprecher updated SLING-1003:
--

Attachment: SlingWebCastellum-1.0.jar

The corpus delicti: OSGI-fied WebCastellum version. Creates a Component named
org.webcastellum.WebCastellumFilter, which needs to be started explicitely

> Integration of 3rd party servlet filters problematic
> 
>
> Key: SLING-1003
> URL: https://issues.apache.org/jira/browse/SLING-1003
> Project: Sling
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: Engine 2.0.4
> Environment: Windows Vista, 
> java version "1.6.0_13"
> Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
> Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
>Reporter: Christian Sprecher
>Assignee: Felix Meschberger
>Priority: Minor
> Fix For: Engine 2.0.6
>
> Attachments: SlingWebCastellum-1.0.jar
>
>
> There is a problem within the chain handling: the 3rd party filter uses it's 
> own wrapper for requests and response, and supplies it to the chain in the 
> chain.doFilter() call. This leads to a ClassCastException on line 54 of 
> AbstractSlingFilterChain:
> ...
>RequestProgressTracker tracker = ((SlingHttpServletRequest) 
> request).getRequestProgressTracker();
> ...
> I am not sure if this cast is valid in the context of a filter chain. On the 
> other hand I am not sure wether such a use case (filter that manipulates 
> request and response) has a chance to run in Sling.
> ==> Please note that this servlet filter needs to run as early as possible in 
> the filter chain
> java.lang.ClassCastException: org.webcastellum.RequestWrapper cannot be cast 
> to
> org.apache.sling.api.SlingHttpServletRequest
>at 
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter
> (AbstractSlingFilterChain.java:54)
>at 
> org.webcastellum.WebCastellumFilter.internalDoFilter(WebCastellumFilt
> er.java:2610)
>at 
> org.webcastellum.WebCastellumFilter.doFilter(WebCastellumFilter.java:
> 1710)

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



[jira] Commented: (SLING-1003) Integration of 3rd party servlet filters problematic

2009-06-14 Thread Christian Sprecher (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-1003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719312#action_12719312
 ] 

Christian Sprecher commented on SLING-1003:
---

Hmm, one step further, but still not there, I think:

java.lang.ClassCastException: org.webcastellum.RequestWrapper cannot be cast to
org.apache.sling.api.SlingHttpServletRequest
at 
org.apache.sling.api.wrappers.SlingHttpServletRequestWrapper.getSlingRequest(SlingHttpServletRequestWrapper.java:56)
at 
org.apache.sling.engine.impl.request.RequestData.unwrap(RequestData.java:317)
at 
org.apache.sling.engine.impl.request.RequestData.getRequestData(RequestData.java:401)
at 
org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:496)
at 
org.apache.sling.engine.impl.SlingMainServlet.processRequest(SlingMainServlet.java:430)
at 
org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:48)
at 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:63)
at 
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:59)
at 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:54)
at 
org.webcastellum.WebCastellumFilter.internalDoFilter(WebCastellumFilter.java:2611)
at 
org.webcastellum.WebCastellumFilter.doFilter(WebCastellumFilter.java:1711)
at 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:54)
at 
org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:317)
at 
org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:192)

Hmm, kind of makes sense: 
api.wrappers.SlingHttpServletRequestWrapper.SlingHttpServletRequest#getSlingRequest()
 always returns a SlingHttpServletRequest

org.apache.sling.engine.impl.request.RequestData#unwrap(
SlingHttpServletRequest request) {
while (request instanceof SlingHttpServletRequestWrapper) {
request = ((SlingHttpServletRequestWrapper) 
request).getSlingRequest();
}

if (request instanceof SlingHttpServletRequestImpl) {
return (SlingHttpServletRequestImpl) request;
}

throw new IllegalArgumentException(
"SlingHttpServletRequest not of correct type");
}

I.e. we are deep into Sling land here, already. I am unsure where to exactly do 
the difference ...


> Integration of 3rd party servlet filters problematic
> 
>
> Key: SLING-1003
> URL: https://issues.apache.org/jira/browse/SLING-1003
> Project: Sling
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: Engine 2.0.4
> Environment: Windows Vista, 
> java version "1.6.0_13"
> Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
> Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
>Reporter: Christian Sprecher
>Assignee: Felix Meschberger
>Priority: Minor
> Fix For: Engine 2.0.6
>
>
> There is a problem within the chain handling: the 3rd party filter uses it's 
> own wrapper for requests and response, and supplies it to the chain in the 
> chain.doFilter() call. This leads to a ClassCastException on line 54 of 
> AbstractSlingFilterChain:
> ...
>RequestProgressTracker tracker = ((SlingHttpServletRequest) 
> request).getRequestProgressTracker();
> ...
> I am not sure if this cast is valid in the context of a filter chain. On the 
> other hand I am not sure wether such a use case (filter that manipulates 
> request and response) has a chance to run in Sling.
> ==> Please note that this servlet filter needs to run as early as possible in 
> the filter chain
> java.lang.ClassCastException: org.webcastellum.RequestWrapper cannot be cast 
> to
> org.apache.sling.api.SlingHttpServletRequest
>at 
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter
> (AbstractSlingFilterChain.java:54)
>at 
> org.webcastellum.WebCastellumFilter.internalDoFilter(WebCastellumFilt
> er.java:2610)
>at 
> org.webcastellum.WebCastellumFilter.doFilter(WebCastellumFilter.java:
> 1710)

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



[jira] Created: (SLING-1003) Integration of 3rd party servlet filters problematic

2009-06-11 Thread Christian Sprecher (JIRA)
Integration of 3rd party servlet filters problematic


 Key: SLING-1003
 URL: https://issues.apache.org/jira/browse/SLING-1003
 Project: Sling
  Issue Type: Bug
  Components: Engine
Affects Versions: Engine 2.0.4
 Environment: Windows Vista, 
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Client VM (build 11.3-b02, mixed mode, sharing)
Reporter: Christian Sprecher
Priority: Minor


There is a problem within the chain handling: the 3rd party filter uses it's 
own wrapper for requests and response, and supplies it to the chain in the 
chain.doFilter() call. This leads to a ClassCastException on line 54 of 
AbstractSlingFilterChain:
...
   RequestProgressTracker tracker = ((SlingHttpServletRequest) 
request).getRequestProgressTracker();
...

I am not sure if this cast is valid in the context of a filter chain. On the 
other hand I am not sure wether such a use case (filter that manipulates 
request and response) has a chance to run in Sling.

==> Please note that this servlet filter needs to run as early as possible in 
the filter chain


java.lang.ClassCastException: org.webcastellum.RequestWrapper cannot be cast to
org.apache.sling.api.SlingHttpServletRequest
   at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter
(AbstractSlingFilterChain.java:54)
   at org.webcastellum.WebCastellumFilter.internalDoFilter(WebCastellumFilt
er.java:2610)
   at org.webcastellum.WebCastellumFilter.doFilter(WebCastellumFilter.java:
1710)


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



[jira] Commented: (SLING-315) Groovy support

2008-12-12 Thread Christian Sprecher (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12655994#action_12655994
 ] 

Christian Sprecher commented on SLING-315:
--

superb work, thank you all!

> Groovy support
> --
>
> Key: SLING-315
> URL: https://issues.apache.org/jira/browse/SLING-315
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Affects Versions: 3
> Environment: all
>Reporter: Christian Sprecher
>Assignee: Felix Meschberger
>Priority: Minor
> Attachments: diff.txt, groovy-engine-1.0.jar, groovy.tar.gz, pom.xml
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Implement Groovy as an option for scripting language support. A patch with a 
> possible implementation will be attached

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



[jira] Closed: (SLING-315) Groovy support

2008-12-12 Thread Christian Sprecher (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Sprecher closed SLING-315.



> Groovy support
> --
>
> Key: SLING-315
> URL: https://issues.apache.org/jira/browse/SLING-315
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Affects Versions: 3
> Environment: all
>Reporter: Christian Sprecher
>Assignee: Felix Meschberger
>Priority: Minor
> Attachments: diff.txt, groovy-engine-1.0.jar, groovy.tar.gz, pom.xml
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Implement Groovy as an option for scripting language support. A patch with a 
> possible implementation will be attached

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



[jira] Commented: (SLING-315) Groovy support

2008-12-09 Thread Christian Sprecher (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654931#action_12654931
 ] 

Christian Sprecher commented on SLING-315:
--

Ok, I have tested it. It works.

Now, what is the best strategy when you try to access JCR classes like 
QueryManager from within a Groovy script?
I.e. I have a fully functional groovy plugin, which I don't want to change. But 
still I want to access additional classes. What is OSGI best practise in such 
cases?


> Groovy support
> --
>
> Key: SLING-315
> URL: https://issues.apache.org/jira/browse/SLING-315
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Affects Versions: 3
> Environment: all
>Reporter: Christian Sprecher
>Assignee: Felix Meschberger
>Priority: Minor
> Attachments: diff.txt, groovy-engine-1.0.jar, groovy.tar.gz, pom.xml
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Implement Groovy as an option for scripting language support. A patch with a 
> possible implementation will be attached

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



[jira] Commented: (SLING-315) Groovy support

2008-12-09 Thread Christian Sprecher (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654795#action_12654795
 ] 

Christian Sprecher commented on SLING-315:
--

Ah, my bad, I didn't read the whole explanations, and tried it with Groovy 
1.6-beta-2, sorry for the confusion.

Definitely looking forward to try this at home :).

> Groovy support
> --
>
> Key: SLING-315
> URL: https://issues.apache.org/jira/browse/SLING-315
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Affects Versions: 3
> Environment: all
>Reporter: Christian Sprecher
>Assignee: Felix Meschberger
>Priority: Minor
> Attachments: diff.txt, groovy-engine-1.0.jar, groovy.tar.gz, pom.xml
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Implement Groovy as an option for scripting language support. A patch with a 
> possible implementation will be attached

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



[jira] Commented: (SLING-315) Groovy support

2008-12-08 Thread Christian Sprecher (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654572#action_12654572
 ] 

Christian Sprecher commented on SLING-315:
--

Hey guys

I am unsure on how to use the plain 1.6 jar within Sling: while the bundle 
installs without any problems, I am not able to create a .groovy script and to 
use it. I tried it with installing the 1.6-beta-2 groovy-all.jar (didnt work) 
and again with my proposed pom.xml (with the downloaded scripting engine). 

Did anyone succeed in using *.groovy scripts with "only" the groovy-all.jar?

> Groovy support
> --
>
> Key: SLING-315
> URL: https://issues.apache.org/jira/browse/SLING-315
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Affects Versions: 3
> Environment: all
>Reporter: Christian Sprecher
>Assignee: Felix Meschberger
>Priority: Minor
> Attachments: diff.txt, groovy-engine-1.0.jar, groovy.tar.gz, pom.xml
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Implement Groovy as an option for scripting language support. A patch with a 
> possible implementation will be attached

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



[jira] Updated: (SLING-315) Groovy support

2008-03-08 Thread Christian Sprecher (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Sprecher updated SLING-315:
-

Attachment: groovy.tar.gz

the whole sling/scripting/groovy project

> Groovy support
> --
>
> Key: SLING-315
> URL: https://issues.apache.org/jira/browse/SLING-315
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Affects Versions: 2.0.0
> Environment: all
>Reporter: Christian Sprecher
>Priority: Minor
> Attachments: diff.txt, groovy-engine-1.0.jar, groovy.tar.gz
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Implement Groovy as an option for scripting language support. A patch with a 
> possible implementation will be attached

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



[jira] Commented: (SLING-315) Groovy support

2008-03-08 Thread Christian Sprecher (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576587#action_12576587
 ] 

Christian Sprecher commented on SLING-315:
--

from the sling/scripting/groovy/src/main/resources/META-INF/NOTICE file




Apache Sling Groovy Scripting Support
Copyright 2007 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

This product includes software developed at
Groovy project in The Codehaus (http://groovy.codehaus.org/).

=
Current state
=
* pure groovy JSR 223-support, i.e. no special html markup handled
* makes use of groovy-engine.jar file found at 
https://scripting.dev.java.net/files/documents/4957/37593/jsr223-engines.zip
(unfortunately not found in any maven repository)

==
How to use/How to test
==
* first have the sling/scripting/groovy project created and deployed (mvn clean 
install)
* first time you have to add groovy-engine to your local repository
* change sling/launchpad/launchpad-webapp/pom.xml to use the groovy scripting 
engine:

groovy
groovy-all
1.0

* startup jetty (mvn jetty:run) and check, if the groovy support is activated:
check under http://localhost:/sling/list
wether  "Sling - Scripting - Groovy Support" is set
* then follow the steps under 
http://incubator.apache.org/sling/site/discover-sling-in-15-minutes.html
* but instead of building a html.esp, create a html.groovy containing one line
println resource.node.getProperty("title").string
* therefore the last step reads as
curl -X PUT -d @html.groovy http://admin:[EMAIL 
PROTECTED]:/dav/default/apps/foo/bar/html.groovy
* navigating to http://localhost:/content/mynode.html shows groovy in 
action ...


Is that all?

Yeah, at the moment. Please note that not one line of code had to be written to 
enable groovy support. This is nice. 

===
Whats next?
===
* please someone check the pom.xml. There are many explicit excludes in the 
bundle plugin, this smells
* Groovy Servlet Pages (gsp) support
* do not use groovy-all.jar (dependency clean-up)
* some kickass sample to have the crowd go "wow" (some gpath magic might well 
do it)

> Groovy support
> --
>
> Key: SLING-315
> URL: https://issues.apache.org/jira/browse/SLING-315
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Affects Versions: 2.0.0
> Environment: all
>Reporter: Christian Sprecher
>Priority: Minor
> Attachments: diff.txt, groovy-engine-1.0.jar
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Implement Groovy as an option for scripting language support. A patch with a 
> possible implementation will be attached

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



[jira] Updated: (SLING-315) Groovy support

2008-03-08 Thread Christian Sprecher (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Sprecher updated SLING-315:
-

Attachment: groovy-engine-1.0.jar

Groovy ScriptEngine implementation, originally from 
https://scripting.dev.java.net/files/documents/4957/37593/jsr223-engines.zip.


> Groovy support
> --
>
> Key: SLING-315
> URL: https://issues.apache.org/jira/browse/SLING-315
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Affects Versions: 2.0.0
> Environment: all
>Reporter: Christian Sprecher
>Priority: Minor
> Attachments: diff.txt, groovy-engine-1.0.jar
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Implement Groovy as an option for scripting language support. A patch with a 
> possible implementation will be attached

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



[jira] Updated: (SLING-315) Groovy support

2008-03-08 Thread Christian Sprecher (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Sprecher updated SLING-315:
-

Attachment: diff.txt

Patch containing a project in sling/scripting/groovy which enables groovy 
support. No additional source code is needed

> Groovy support
> --
>
> Key: SLING-315
> URL: https://issues.apache.org/jira/browse/SLING-315
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Affects Versions: 2.0.0
> Environment: all
>Reporter: Christian Sprecher
>Priority: Minor
> Attachments: diff.txt
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Implement Groovy as an option for scripting language support. A patch with a 
> possible implementation will be attached

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



[jira] Created: (SLING-315) Groovy support

2008-03-08 Thread Christian Sprecher (JIRA)
Groovy support
--

 Key: SLING-315
 URL: https://issues.apache.org/jira/browse/SLING-315
 Project: Sling
  Issue Type: New Feature
  Components: Scripting
Affects Versions: 2.0.0
 Environment: all
Reporter: Christian Sprecher
Priority: Minor


Implement Groovy as an option for scripting language support. A patch with a 
possible implementation will be attached

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