Re: Worthwhile to create a Sling CMS?

2016-01-19 Thread Ondrej Florian
Hi Sandro,

Having yet another CMS for 'normal' people like Wix may not be worthwhile.
HOWEVER, going into verticals may be much more interesting.

I personally think the Sling could be great data integration platform.
- imagine modeling SAP or SF data as resources...
- being able to 'mix' those resources into a web pages or reports
- build forms / workflows 

...this also takes you very close to document/knowledge management :-)


Ondrej


On 19/01/2016 14:46, "Sandro Boehme"  wrote:

>Am 19.01.16 um 14:35 schrieb Bertrand Delacretaz:
>> Hi Sandro,
>>
>> On Tue, Jan 19, 2016 at 2:25 PM, Sandro Boehme  wrote:
>>> ...It would help me a big deal if some of you could tell me if they would 
>>> use
>>> this kind of CMS or if the know people who would use it as that validates
>>> (or invalidates) my effort!..
>>
>> I don't need to host a CMS myself these days, so wouldn't use that,
>> but I think a Sling-based CMS would be a great showcase of what Sling
>> can do.
>>
>> -Bertrand
>>
>
>Thanks for your feedback Bertrand! Would you use it and maybe develop 
>components for it if it would be available immediately as a service in 
>the web (e.g. like Wix)? What CMS would you personally use instead? Or 
>what other superior offering is there in your opinion?
>
>Best,
>
>Sandro


Re: Sling Posthandling - thougts about the current behavior

2013-07-04 Thread Ondrej Florian
...what about using POST.jsp for validations, implementing custom behavior etc.

in POST.jsp

* add / remove / modify / handle post parameters
* call the default POST servlet to do the actually persistence
* handle any errors

---
The reason why it doesn't work at the moment is that:
- post parameters are not mutable
- it is hard to call the default implementation (perhaps I just don't know how)
- exceptions coming from the POST servlet may not be detailed enough in order 
to provide error handling on granularity needed

I think approach could be very useful for intercepting other requests as 
well,without need to write custom filters.

Ondrej

On 26 Jun 2013, at 12:35, Dominik Süß  wrote:

> Hi everyone,
> 
> within the last weeks I spent some time on a project that is heavily
> relying on data being submitted by users of the system and setting up
> complex structures, users, groups and ACLs based on the operations
> performed by a user. I reallized that a lot of those things could be done
> by utilizing the SlingPostServlet and extending it by custom Postprocessors
> and custom operations. This worked out well but I realized some things that
> I'm not so happy with and would like to start off a discussion how the
> handling of Posts, and therefore the interactive part of Sling could be
> improved.
> 
> Here the points that I think are "discussabble":
> a) (non-Brainer) Postoperations and Postprocessors are rarely covered by
> documentation (Postprocessors are marked as TBD) this gives the impression
> of not being ready for productive usage so the gap should be closed
> b) Postoperations and Postprocessors are always defined and called global
> so it is up to the developer to check and skip processing (Blacklisting
> approach) which is errorprone if this manual check is not restrictive
> enough (can lead to subtle regressions in completely different areas of the
> app) - I'd propose to have a declarative approach that is a
> whitelistapproach based on path and propably even by resourceType (here
> comes the clash between posted resourceType and potentially already
> existing resourceType
> c) Sometimes data submitted should just be used as parameters for
> postprocessors or operations and not persisted. Using the dot-slash
> prefixing does give such options, but since the "./" notation acts as kind
> of a magic trigger of behaviour I'd prefer to have a way to annotate such
> fields (like name@ignore or @noPersistance)
> 
> All in all the web is moving in a direction where almost no page is
> delivered with options to interact with the the webpage - so Sling should
> try to give developers the tools to do this wireing without having the dev
> to write boilerplatecode for those checks over and over again and enabling
> them to implement complete interactive userstories up to a certain point of
> complexity in a standardized way.
> 
> WDYT?
> 
> Best regards
> Dominik



Re: RESTed - node 'explorer' for the Sling

2013-06-03 Thread Ondrej Florian
Hi Dan,

yes, that would be great!

I am cleaning up the codebase right now.
The main things is to remove all JSP scriptlets and use JSTL instead.

...that should be done by end of the week.

It would be great if we could start compiling list of feature the node browser 
should have. 
WDYT ?

Ondrej

On 3 Jun 2013, at 16:25, Daniel Platon  wrote:

> Hello,
> 
> Big +11 from me on this one.
> I would also like to help out, if you're ok with it.
> 
> __
> Dan
> 
> 
> 
> --
> View this message in context: 
> http://apache-sling.73963.n3.nabble.com/RESTed-node-explorer-for-the-Sling-tp4022914p4024312.html
> Sent from the Sling - Dev mailing list archive at Nabble.com.



[jira] [Resolved] (SLING-2864) taglib 1.3 function's signature is invalid

2013-05-23 Thread Ondrej Florian (JIRA)

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

Ondrej Florian resolved SLING-2864.
---

   Resolution: Fixed
Fix Version/s: Scripting JST 2.0.8

attached patch has been applied

> taglib 1.3 function's signature is invalid
> --
>
> Key: SLING-2864
> URL: https://issues.apache.org/jira/browse/SLING-2864
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Ondrej Florian
>Priority: Minor
> Fix For: Scripting JST 2.0.8
>
> Attachments: taglib13.tld.patch
>
>
> when using taglib 1.3 function e.g.
> <%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.3"; %>
>  value="${sling:getResource(resourceResolver,'/')}" />
> I am getting exception:
> Invalid syntax for function signature in TLD. Tag Library: sling, Function: 
> getResource (500)
> 
> this is cased by invalid signature declarations in the tld file.
> for example:
>   org.apache.sling.api.resource.Resource
>   
> getResource(org.apache.sling.api.resource.ResourceResolver,
>   java.lang.String)
>   
> should be defined without any white space characters
> org.apache.sling.api.resource.Resource 
> getResource(org.apache.sling.api.resource.ResourceResolver,java.lang.String)
> NOTE: the JIRA appears to wrap the line anyways, basically the signature 
> should be on one line, no nice printing

--
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


Re: getting JSTL to work

2013-05-23 Thread Ondrej Florian
Hi Dan,

I found another issue which prevents JSTL to work correctly.

in launchpad/builder/src/main/bundles/list.xml
- org.apache.sling.scripting.jsp.jstl was missing
- org.apache.sling.scripting.jsp.taglib has wrong version

I added required patch to SLING-2863
=> https://issues.apache.org/jira/secure/attachment/12584550/list.xml.patch

Ondrej

On 9 May 2013, at 17:11, Dan Klco  wrote:

> Ondrej,
> 
> Thank you for all of the investigation and patch.   I have tested and 
> committed the patch you provided, it looks good.  
> 
> Please let me know if you find anything else.  This new Resource Access Tag 
> API is still pretty new.
> 
> Thanks again!
> 
> -Dan
> 
> -Original Message-
> From: Ondrej Florian [mailto:onfl...@gmail.com] 
> Sent: Thursday, May 09, 2013 9:17 AM
> To: dev@sling.apache.org
> Subject: Re: support for JSTL 1.2 
> 
> Hi Dan,
> 
> I backtracked and re-tested everything again, and yes you are right, the JSTL 
> 1.1 should be sufficient (it works with the EL and the functions correctly).
> The real cause of the problems I've been having is documented in JIRA under 
> SLING-2863 and SLING-2864.
> I also provided a patch to fix it in SLING-2864
> 
> Thanks,
> Ondrej 
> 
> On 8 May 2013, at 21:42, Dan Klco  wrote:
> 
>> Ondrej,
>> 
>> This sounds interesting, though it seems like Expression Language support 
>> was added in JSTL 1.1, so it should be supported currently.  Could you 
>> please create an issue and attach a patch file for the proposed change?  
>> 
>> It looks like the dependency being referenced is GlassFish's JSTL 
>> implementation, are there any concerns about including it as it is licensed 
>> under the CDDL (https://jstl.java.net/)? 
>> 
>> From what I have read, it seems like binaries licensed under the CDDL can be 
>> included in Apache projects, however since we re-wrap the Jar in a bundle I 
>> don't know if it might be problematic.  Additionally, I think we will need 
>> to include a notice that a CDDL license work has been included in Sling:
>> http://www.apache.org/legal/3party.html#category-b
>> 
>> -Dan
>> 
>> -Original Message-
>> From: Ondrej Florian [mailto:onfl...@gmail.com]
>> Sent: Wednesday, May 08, 2013 1:26 PM
>> To: dev@sling.apache.org
>> Subject: support for JSTL 1.2
>> 
>> Hi,
>> 
>> I'd like to contribute pom.xml for JSTL 1.2.1.
>> As far as I can see, the Sling supports 1.1.2 at the moment which doesn't 
>> seem to work with the JSP EL.
>> 
>> 
>> -
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 2013.0.3272 / Virus Database: 3162/6287 - Release Date: 04/30/13 
>> Internal Virus Database is out of date.
>> 
> 
> 
> 
> -
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2013.0.3272 / Virus Database: 3162/6287 - Release Date: 04/30/13 
> Internal Virus Database is out of date.
> 



[jira] [Updated] (SLING-2863) unable to use taglib version 1.3 out of the box

2013-05-23 Thread Ondrej Florian (JIRA)

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

Ondrej Florian updated SLING-2863:
--

Attachment: list.xml.patch

- adds org.apache.sling.scripting.jsp.jstl
- changes version of org.apache.sling.scripting.jsp.taglib from 2.1.8 to 
2.1.9-SNAPSHOT

> unable to use taglib version 1.3 out of the box
> ---
>
> Key: SLING-2863
> URL: https://issues.apache.org/jira/browse/SLING-2863
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>        Reporter: Ondrej Florian
>Priority: Minor
> Attachments: list.xml.patch, taglib13.tld.patch
>
>
> while trying to use taglib 1.3 :
> <%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.3"; %>
> I am getting error:
> The absolute uri: http://sling.apache.org/taglibs/sling/1.3 cannot be 
> resolved in either web.xml or the jar files deployed with this application 
> (500)
> ---
> the problem seems to be in the header of the taglib13.tld definition (please 
> see the attached patch)

--
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


Re: support for JSTL 1.2

2013-05-09 Thread Ondrej Florian
Many Thanks Dan,

just a little comment; 

shouldn't we make the naming of functions / tags more consistent?
e.g. there is a function listChildResources but the tag is called listChildren

I know this is small thing, but I would try to make the naming to fit the one 
used by the Resource API whenever possible.
What do you think?

BTW: I can go through the code and make appropriate changes - if you agree

Ondrej

On 9 May 2013, at 17:11, Dan Klco  wrote:

> Ondrej,
> 
> Thank you for all of the investigation and patch.   I have tested and 
> committed the patch you provided, it looks good.  
> 
> Please let me know if you find anything else.  This new Resource Access Tag 
> API is still pretty new.
> 
> Thanks again!
> 
> -Dan
> 
> -Original Message-
> From: Ondrej Florian [mailto:onfl...@gmail.com] 
> Sent: Thursday, May 09, 2013 9:17 AM
> To: dev@sling.apache.org
> Subject: Re: support for JSTL 1.2 
> 
> Hi Dan,
> 
> I backtracked and re-tested everything again, and yes you are right, the JSTL 
> 1.1 should be sufficient (it works with the EL and the functions correctly).
> The real cause of the problems I've been having is documented in JIRA under 
> SLING-2863 and SLING-2864.
> I also provided a patch to fix it in SLING-2864
> 
> Thanks,
> Ondrej 
> 
> On 8 May 2013, at 21:42, Dan Klco  wrote:
> 
>> Ondrej,
>> 
>> This sounds interesting, though it seems like Expression Language support 
>> was added in JSTL 1.1, so it should be supported currently.  Could you 
>> please create an issue and attach a patch file for the proposed change?  
>> 
>> It looks like the dependency being referenced is GlassFish's JSTL 
>> implementation, are there any concerns about including it as it is licensed 
>> under the CDDL (https://jstl.java.net/)? 
>> 
>> From what I have read, it seems like binaries licensed under the CDDL can be 
>> included in Apache projects, however since we re-wrap the Jar in a bundle I 
>> don't know if it might be problematic.  Additionally, I think we will need 
>> to include a notice that a CDDL license work has been included in Sling:
>> http://www.apache.org/legal/3party.html#category-b
>> 
>> -Dan
>> 
>> -Original Message-
>> From: Ondrej Florian [mailto:onfl...@gmail.com]
>> Sent: Wednesday, May 08, 2013 1:26 PM
>> To: dev@sling.apache.org
>> Subject: support for JSTL 1.2
>> 
>> Hi,
>> 
>> I'd like to contribute pom.xml for JSTL 1.2.1.
>> As far as I can see, the Sling supports 1.1.2 at the moment which doesn't 
>> seem to work with the JSP EL.
>> 
>> 
>> -
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 2013.0.3272 / Virus Database: 3162/6287 - Release Date: 04/30/13 
>> Internal Virus Database is out of date.
>> 
> 
> 
> 
> -
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2013.0.3272 / Virus Database: 3162/6287 - Release Date: 04/30/13 
> Internal Virus Database is out of date.
> 



Re: support for JSTL 1.2

2013-05-09 Thread Ondrej Florian
Hi Dan,

I backtracked and re-tested everything again, and yes you are right, the JSTL 
1.1 should be sufficient (it works with the EL and the functions correctly).
The real cause of the problems I've been having is documented in JIRA under 
SLING-2863 and SLING-2864.
I also provided a patch to fix it in SLING-2864

Thanks,
Ondrej 

On 8 May 2013, at 21:42, Dan Klco  wrote:

> Ondrej,
> 
> This sounds interesting, though it seems like Expression Language support was 
> added in JSTL 1.1, so it should be supported currently.  Could you please 
> create an issue and attach a patch file for the proposed change?  
> 
> It looks like the dependency being referenced is GlassFish's JSTL 
> implementation, are there any concerns about including it as it is licensed 
> under the CDDL (https://jstl.java.net/)? 
> 
> From what I have read, it seems like binaries licensed under the CDDL can be 
> included in Apache projects, however since we re-wrap the Jar in a bundle I 
> don't know if it might be problematic.  Additionally, I think we will need to 
> include a notice that a CDDL license work has been included in Sling:
> http://www.apache.org/legal/3party.html#category-b
> 
> -Dan
> 
> -Original Message-
> From: Ondrej Florian [mailto:onfl...@gmail.com] 
> Sent: Wednesday, May 08, 2013 1:26 PM
> To: dev@sling.apache.org
> Subject: support for JSTL 1.2 
> 
> Hi,
> 
> I'd like to contribute pom.xml for JSTL 1.2.1.
> As far as I can see, the Sling supports 1.1.2 at the moment which doesn't 
> seem to work with the JSP EL.
> 
> 
> -
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2013.0.3272 / Virus Database: 3162/6287 - Release Date: 04/30/13 
> Internal Virus Database is out of date.
> 



[jira] [Commented] (SLING-2863) unable to use taglib version 1.3 out of the box

2013-05-09 Thread Ondrej Florian (JIRA)

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

Ondrej Florian commented on SLING-2863:
---

the patch attached to the SLING-2864 contains all necessary changes to make 
taglib 1.3 work

> unable to use taglib version 1.3 out of the box
> ---
>
> Key: SLING-2863
> URL: https://issues.apache.org/jira/browse/SLING-2863
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>    Reporter: Ondrej Florian
>Priority: Minor
> Attachments: taglib13.tld.patch
>
>
> while trying to use taglib 1.3 :
> <%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.3"; %>
> I am getting error:
> The absolute uri: http://sling.apache.org/taglibs/sling/1.3 cannot be 
> resolved in either web.xml or the jar files deployed with this application 
> (500)
> ---
> the problem seems to be in the header of the taglib13.tld definition (please 
> see the attached patch)

--
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] [Updated] (SLING-2864) taglib 1.3 function's signature is invalid

2013-05-09 Thread Ondrej Florian (JIRA)

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

Ondrej Florian updated SLING-2864:
--

Attachment: taglib13.tld.patch

This patch contains all necessary changes to the taglib13.tld file , including 
fixed header from SLING-2863

> taglib 1.3 function's signature is invalid
> --
>
> Key: SLING-2864
> URL: https://issues.apache.org/jira/browse/SLING-2864
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Ondrej Florian
>Priority: Minor
> Attachments: taglib13.tld.patch
>
>
> when using taglib 1.3 function e.g.
> <%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.3"; %>
>  value="${sling:getResource(resourceResolver,'/')}" />
> I am getting exception:
> Invalid syntax for function signature in TLD. Tag Library: sling, Function: 
> getResource (500)
> 
> this is cased by invalid signature declarations in the tld file.
> for example:
>   org.apache.sling.api.resource.Resource
>   
> getResource(org.apache.sling.api.resource.ResourceResolver,
>   java.lang.String)
>   
> should be defined without any white space characters
> org.apache.sling.api.resource.Resource 
> getResource(org.apache.sling.api.resource.ResourceResolver,java.lang.String)
> NOTE: the JIRA appears to wrap the line anyways, basically the signature 
> should be on one line, no nice printing

--
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] [Created] (SLING-2864) taglib 1.3 function's signature is invalid

2013-05-09 Thread Ondrej Florian (JIRA)
Ondrej Florian created SLING-2864:
-

 Summary: taglib 1.3 function's signature is invalid
 Key: SLING-2864
 URL: https://issues.apache.org/jira/browse/SLING-2864
 Project: Sling
  Issue Type: Bug
  Components: Scripting
Reporter: Ondrej Florian
Priority: Minor


when using taglib 1.3 function e.g.

<%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.3"; %>


I am getting exception:
Invalid syntax for function signature in TLD. Tag Library: sling, Function: 
getResource (500)


this is cased by invalid signature declarations in the tld file.
for example:
org.apache.sling.api.resource.Resource

getResource(org.apache.sling.api.resource.ResourceResolver,
java.lang.String)


should be defined without any white space characters

org.apache.sling.api.resource.Resource 
getResource(org.apache.sling.api.resource.ResourceResolver,java.lang.String)

NOTE: the JIRA appears to wrap the line anyways, basically the signature should 
be on one line, no nice printing

--
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] [Updated] (SLING-2863) unable to use taglib version 1.3 out of the box

2013-05-09 Thread Ondrej Florian (JIRA)

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

Ondrej Florian updated SLING-2863:
--

Attachment: taglib13.tld.patch

> unable to use taglib version 1.3 out of the box
> ---
>
> Key: SLING-2863
> URL: https://issues.apache.org/jira/browse/SLING-2863
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>        Reporter: Ondrej Florian
>Priority: Minor
> Attachments: taglib13.tld.patch
>
>
> while trying to use taglib 1.3 :
> <%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.3"; %>
> I am getting error:
> The absolute uri: http://sling.apache.org/taglibs/sling/1.3 cannot be 
> resolved in either web.xml or the jar files deployed with this application 
> (500)
> ---
> the problem seems to be in the header of the taglib13.tld definition (please 
> see the attached patch)

--
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] [Updated] (SLING-2862) Firefox browser send text file mime type as plain/text instead of text/plain

2013-05-09 Thread Ondrej Florian (JIRA)

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

Ondrej Florian updated SLING-2862:
--

Attachment: taglib13.tld.patch

> Firefox browser send text file mime type as plain/text instead of text/plain
> 
>
> Key: SLING-2862
> URL: https://issues.apache.org/jira/browse/SLING-2862
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>        Reporter: Ondrej Florian
>Priority: Minor
>  Labels: patch
> Attachments: SlingFileUploadHandler.java.patch
>
>
> When uploading a text file, Firebug browser sets mime type to plain/text 
> instead of text/plain.
> This cases a text files not be handled correctly (e.g. during indexing).
> Although this is problem of a browser rather then Sling itself, it should be 
> handled 'somehow'.
> I added quick hack to change the mime mapping in upload servlet itself, 
> however proper solution would be to just ignore the mime type send by a 
> browser and try to guess it from the data itself.

--
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] [Updated] (SLING-2862) Firefox browser send text file mime type as plain/text instead of text/plain

2013-05-09 Thread Ondrej Florian (JIRA)

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

Ondrej Florian updated SLING-2862:
--

Attachment: (was: taglib13.tld.patch)

> Firefox browser send text file mime type as plain/text instead of text/plain
> 
>
> Key: SLING-2862
> URL: https://issues.apache.org/jira/browse/SLING-2862
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>        Reporter: Ondrej Florian
>Priority: Minor
>  Labels: patch
> Attachments: SlingFileUploadHandler.java.patch
>
>
> When uploading a text file, Firebug browser sets mime type to plain/text 
> instead of text/plain.
> This cases a text files not be handled correctly (e.g. during indexing).
> Although this is problem of a browser rather then Sling itself, it should be 
> handled 'somehow'.
> I added quick hack to change the mime mapping in upload servlet itself, 
> however proper solution would be to just ignore the mime type send by a 
> browser and try to guess it from the data itself.

--
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] [Created] (SLING-2863) unable to use taglib version 1.3 out of the box

2013-05-09 Thread Ondrej Florian (JIRA)
Ondrej Florian created SLING-2863:
-

 Summary: unable to use taglib version 1.3 out of the box
 Key: SLING-2863
 URL: https://issues.apache.org/jira/browse/SLING-2863
 Project: Sling
  Issue Type: Bug
  Components: Scripting
Reporter: Ondrej Florian
Priority: Minor


while trying to use taglib 1.3 :
<%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.3"; %>

I am getting error:
The absolute uri: http://sling.apache.org/taglibs/sling/1.3 cannot be resolved 
in either web.xml or the jar files deployed with this application (500)
---

the problem seems to be in the header of the taglib13.tld definition (please 
see the attached patch)


--
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] [Updated] (SLING-2862) Firefox browser send text file mime type as plain/text instead of text/plain

2013-05-09 Thread Ondrej Florian (JIRA)

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

Ondrej Florian updated SLING-2862:
--

Attachment: SlingFileUploadHandler.java.patch

> Firefox browser send text file mime type as plain/text instead of text/plain
> 
>
> Key: SLING-2862
> URL: https://issues.apache.org/jira/browse/SLING-2862
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>        Reporter: Ondrej Florian
>Priority: Minor
>  Labels: patch
> Attachments: SlingFileUploadHandler.java.patch
>
>
> When uploading a text file, Firebug browser sets mime type to plain/text 
> instead of text/plain.
> This cases a text files not be handled correctly (e.g. during indexing).
> Although this is problem of a browser rather then Sling itself, it should be 
> handled 'somehow'.
> I added quick hack to change the mime mapping in upload servlet itself, 
> however proper solution would be to just ignore the mime type send by a 
> browser and try to guess it from the data itself.

--
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] [Created] (SLING-2862) Firefox browser send text file mime type as plain/text instead of text/plain

2013-05-09 Thread Ondrej Florian (JIRA)
Ondrej Florian created SLING-2862:
-

 Summary: Firefox browser send text file mime type as plain/text 
instead of text/plain
 Key: SLING-2862
 URL: https://issues.apache.org/jira/browse/SLING-2862
 Project: Sling
  Issue Type: Bug
  Components: Servlets
Reporter: Ondrej Florian
Priority: Minor


When uploading a text file, Firebug browser sets mime type to plain/text 
instead of text/plain.
This cases a text files not be handled correctly (e.g. during indexing).

Although this is problem of a browser rather then Sling itself, it should be 
handled 'somehow'.
I added quick hack to change the mime mapping in upload servlet itself, however 
proper solution would be to just ignore the mime type send by a browser and try 
to guess it from the data itself.

--
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


Re: support for JSTL 1.2 (SLING-2648)

2013-05-08 Thread Ondrej Florian
another issue is with the function declarations 

OLD

findResources

org.apache.sling.scripting.jsp.taglib.SlingFunctions

java.util.Iterator

findResources(org.apache.sling.api.resource.ResourceResolver,
java.lang.String, java.lang.String)



NEW


findResources

org.apache.sling.scripting.jsp.taglib.SlingFunctions
java.util.Iterator 
findResources(org.apache.sling.api.resource.ResourceResolver, java.lang.String, 
java.lang.String)


==> the function-signature must be on the same line

...so should I fix these issues as well?

Ondrej 


On 8 May 2013, at 22:48, Dan Klco  wrote:

> Ondrej,
> 
> From the code snippet you specified it looks like the version attribute and 
> the XSD version did not match in the old copy of the code.  I would image 
> that would be the source of the issue you described.
> 
> -Dan
> 
> -Original Message-
> From: Ondrej Florian [mailto:onfl...@gmail.com] 
> Sent: Wednesday, May 08, 2013 4:36 PM
> To: dev@sling.apache.org
> Subject: Re: support for JSTL 1.2 (SLING-2648)
> 
> Hi Dan,
> 
> I am also facing problems getting 'resource tags' working 
> (https://issues.apache.org/jira/browse/SLING-2648).
> I ended up changing the taglib tld which seem to fix the problem.
> 
> ...I am just wondering whether these are genuine bugs I am facing or whether 
> there is something wrong with my build (I did a clean checkout and build 
> today) 
> 
> OLD:
> http://java.sun.com/xml/ns/j2ee"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd";
>   version="2.0">
> 
> NEW:
> http://java.sun.com/xml/ns/j2ee"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
> http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd";
>   version="2.1">
> 
> 
> 
> On 8 May 2013, at 21:42, Dan Klco  wrote:
> 
>> Ondrej,
>> 
>> This sounds interesting, though it seems like Expression Language support 
>> was added in JSTL 1.1, so it should be supported currently.  Could you 
>> please create an issue and attach a patch file for the proposed change?  
>> 
>> It looks like the dependency being referenced is GlassFish's JSTL 
>> implementation, are there any concerns about including it as it is licensed 
>> under the CDDL (https://jstl.java.net/)? 
>> 
>> From what I have read, it seems like binaries licensed under the CDDL can be 
>> included in Apache projects, however since we re-wrap the Jar in a bundle I 
>> don't know if it might be problematic.  Additionally, I think we will need 
>> to include a notice that a CDDL license work has been included in Sling:
>> http://www.apache.org/legal/3party.html#category-b
>> 
>> -Dan
>> 
>> -Original Message-
>> From: Ondrej Florian [mailto:onfl...@gmail.com]
>> Sent: Wednesday, May 08, 2013 1:26 PM
>> To: dev@sling.apache.org
>> Subject: support for JSTL 1.2
>> 
>> Hi,
>> 
>> I'd like to contribute pom.xml for JSTL 1.2.1.
>> As far as I can see, the Sling supports 1.1.2 at the moment which doesn't 
>> seem to work with the JSP EL.
>> 
>> 
>> -
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 2013.0.3272 / Virus Database: 3162/6287 - Release Date: 04/30/13 
>> Internal Virus Database is out of date.
>> 
> 
> 
> -
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2013.0.3272 / Virus Database: 3162/6287 - Release Date: 04/30/13 
> Internal Virus Database is out of date.
> 



Re: support for JSTL 1.2 (SLING-2648)

2013-05-08 Thread Ondrej Florian
Hi Dan,

I am also facing problems getting 'resource tags' working 
(https://issues.apache.org/jira/browse/SLING-2648).
I ended up changing the taglib tld which seem to fix the problem.

...I am just wondering whether these are genuine bugs I am facing or whether 
there is something wrong with my build (I did a clean checkout and build today) 

OLD:
http://java.sun.com/xml/ns/j2ee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd";
version="2.0">

NEW:
http://java.sun.com/xml/ns/j2ee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd";
version="2.1">



On 8 May 2013, at 21:42, Dan Klco  wrote:

> Ondrej,
> 
> This sounds interesting, though it seems like Expression Language support was 
> added in JSTL 1.1, so it should be supported currently.  Could you please 
> create an issue and attach a patch file for the proposed change?  
> 
> It looks like the dependency being referenced is GlassFish's JSTL 
> implementation, are there any concerns about including it as it is licensed 
> under the CDDL (https://jstl.java.net/)? 
> 
> From what I have read, it seems like binaries licensed under the CDDL can be 
> included in Apache projects, however since we re-wrap the Jar in a bundle I 
> don't know if it might be problematic.  Additionally, I think we will need to 
> include a notice that a CDDL license work has been included in Sling:
> http://www.apache.org/legal/3party.html#category-b
> 
> -Dan
> 
> -Original Message-
> From: Ondrej Florian [mailto:onfl...@gmail.com] 
> Sent: Wednesday, May 08, 2013 1:26 PM
> To: dev@sling.apache.org
> Subject: support for JSTL 1.2 
> 
> Hi,
> 
> I'd like to contribute pom.xml for JSTL 1.2.1.
> As far as I can see, the Sling supports 1.1.2 at the moment which doesn't 
> seem to work with the JSP EL.
> 
> 
> -
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2013.0.3272 / Virus Database: 3162/6287 - Release Date: 04/30/13 
> Internal Virus Database is out of date.
> 



Re: support for JSTL 1.2

2013-05-08 Thread Ondrej Florian
Hi Dan,

I added 1.2 because I just could't get JSTL 1.1 working with EL in Sling.
e.g.  would not work. 

...maybe I am doing something wrong?

On 8 May 2013, at 21:42, Dan Klco  wrote:

> Ondrej,
> 
> This sounds interesting, though it seems like Expression Language support was 
> added in JSTL 1.1, so it should be supported currently.  Could you please 
> create an issue and attach a patch file for the proposed change?  
> 
> It looks like the dependency being referenced is GlassFish's JSTL 
> implementation, are there any concerns about including it as it is licensed 
> under the CDDL (https://jstl.java.net/)? 
> 
> From what I have read, it seems like binaries licensed under the CDDL can be 
> included in Apache projects, however since we re-wrap the Jar in a bundle I 
> don't know if it might be problematic.  Additionally, I think we will need to 
> include a notice that a CDDL license work has been included in Sling:
> http://www.apache.org/legal/3party.html#category-b
> 
> -Dan
> 
> -Original Message-
> From: Ondrej Florian [mailto:onfl...@gmail.com] 
> Sent: Wednesday, May 08, 2013 1:26 PM
> To: dev@sling.apache.org
> Subject: support for JSTL 1.2 
> 
> Hi,
> 
> I'd like to contribute pom.xml for JSTL 1.2.1.
> As far as I can see, the Sling supports 1.1.2 at the moment which doesn't 
> seem to work with the JSP EL.
> 
> 
> -
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2013.0.3272 / Virus Database: 3162/6287 - Release Date: 04/30/13 
> Internal Virus Database is out of date.
> 



support for JSTL 1.2

2013-05-08 Thread Ondrej Florian
Hi,

I'd like to contribute pom.xml for JSTL 1.2.1.
As far as I can see, the Sling supports 1.1.2 at the moment which doesn't seem 
to work with the JSP EL.



pom.xml
Description: XML document


Re: RESTed - node 'explorer' for the Sling

2013-04-10 Thread Ondrej Florian
I definitely believe the Sling deserves to have better node explorer then
it does now.

Would it be based on the RESTed? I would be thrilled to have it in there,
however this is something the community needs to decide on.

Having said that, I am very much willing to help out in any case.



In my opinion, the node explorer is most likely the first thing new user is
exposed to.
The curl command line access is cool, but the appreciation of it comes much
later down the line.

I actually didn't start to appreciate the power and beauty of the Sling (I
knew, tried it and failed before) until I had an access to the CQ with
CRXDE-lite which enabled me to easily see the content itself. The Sling is
content driven, everything is content, we all know that. But it didn't
really sinked in for me until I was actually able to see it visually.

My rational for creating the RESTed was not just to have a node browser but
also quick and customizable user interface to the content. I do use it
personally as kind of free-form database (along the like of EverNote /
SimpleNote / DevonThink).

I think this would be the killer 'use case' for the Sling actually. I'll
release some of this stuff later on... perhaps it could be used to inspire
others.

Ondrej



On Wed, Apr 10, 2013 at 1:43 PM, Bertrand Delacretaz  wrote:

> Hi Ondrej,
>
> On Tue, Apr 9, 2013 at 10:51 PM, Ondrej Florian  wrote:
> > ...The first one is RESTed and it is basically a node 'explorer' with
> potential to become a base for simple development environment.
> > You'll find it here => https://github.com/onflapp/RESTed ...
>
> I briefly tested it (create a node with sling:resourceType, create
> folders and add a rendering script to it), works very well and the
> interface is very intuitive and looks good!
>
> Do people think we should have this in Sling, assuming Ondrej is
> interested in maintaining it here? I do.
>
> -Bertrand
>


RESTed - node 'explorer' for the Sling

2013-04-09 Thread Ondrej Florian
Hi There,

I just thought I should release some of the code I had in my closed for a while 
as it may be useful to the wider Sling community.

The first one is RESTed and it is basically a node 'explorer' with potential to 
become a base for simple development environment. 

You'll find it here => https://github.com/onflapp/RESTed

What makes it interesting is that it is build using selectors and JSP's only 
(no javascript).
This makes it to fit into the Sling itself rather nicely and it also makes it 
very simple and lean.

The UI itself is 'pure' HTML, styled with bootstrap CSS. But this is no hard 
requirement.
If you take the bootstrap away, the app will continue to work without any 
problem, although I would not call it pretty.

RESTed is functional but the source code is not in the best shape as it grew 
kind of organically over long period of time.
This is the only reason why it lives in its own repository, I do not intended 
to create separate project out of it.
I just took Bertrand's advice and released it early rather then never.

Perhaps it could be used as a starting point for the new Sling explorer or just 
as a proof of concept to test different approaches. 

Ondrej

P.S. sorry for the cheesy name - it just means REST editor - or something like 
that ;-)

Re: running Apache Sling on the Raspberry Pi

2013-03-27 Thread Ondrej Florian
...I thought as raspberry's goal is to teach kids about computers, raspberry + 
Apache Sling could be great way to teach kids about the 'cloud' :-).

but we would need some kind of web-based IDE (kind of like CRXDE-lite) to make 
it easier to develop apps for it.

Ondrej

On 27 Mar 2013, at 10:36, Bertrand Delacretaz  wrote:

> On Wed, Mar 27, 2013 at 10:10 AM, Ondrej Florian  wrote:
>> I've been playing with my Raspberry Pi (http://www.raspberrypi.org) and I 
>> managed to install
>> and run Apache Sling on it...
> 
> Fantastic - three cheers!
> 
> -Bertrand



running Apache Sling on the Raspberry Pi

2013-03-27 Thread Ondrej Florian
Hi there,

I've been playing with my Raspberry Pi (http://www.raspberrypi.org) and I 
managed to install and run Apache Sling on it.
Although I didn't expect anything spectacular at first (I just tried it 
because, em... why not? :-), it is actually very usable.

This makes me think it could prove to be very useful for creating user 
interfaces for embedded applications 
(e.g. home automation, industrial process controllers, etc.)

In case anyone is interested, this is the way you do it:

- install the Raspbian “wheezy” (the latest one with the support for hardware 
floating point)
- apply any updates
- get the Oracle JDK 8 for ARM from here 
http://jdk8.java.net/fxarmpreview/index.html
- this will get you Java version with the hardware floating point
'official' version of the JDK 7 support soft-fp only (it is slower and 
you'll need custom Raspbian to run it)

- build the latest Apache Sling (the version 6 doesn't seem to support JDK 8)
- install it and run it (hopefully)

In order to free more memory, you may want to disable various services running 
in the background such as NTP, DHCP client, sshd, etc.
This can get you additional 20 - 40M
If there is enough interest, I may create 'boot to Apache Sling distribution'.

Ondrej