You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Dominique Pfister (JIRA)" <ji...@apache.org> on 2008/11/05 17:53:44 UTC

[jira] Created: (SLING-720) Set jcr:mimetype to text/x-java-source for generated java files

Set jcr:mimetype to text/x-java-source for generated java files
---------------------------------------------------------------

                 Key: SLING-720
                 URL: https://issues.apache.org/jira/browse/SLING-720
             Project: Sling
          Issue Type: Bug
          Components: Scripting JSP
            Reporter: Dominique Pfister
            Priority: Minor


We have a web-based repository browser that will return nt:files via HTTP with the content-type derived from the jcr:content subnode's jcr:mimeType property. In Sling's JSP Scripting engine, files generated by JSP transpilation/compilation will always have their mime type set to "application/octet-stream" (see org.apache.sling.scripting.jsp.RepositoryOutpuStream). If jcr:mimeType could be changed to "text/x-java-source" for generated java files, they would be displayed directly inside the web browser.

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


[jira] Resolved: (SLING-720) Set jcr:mimetype to text/x-java-source for generated java files

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved SLING-720.
-------------------------------------

       Resolution: Fixed
    Fix Version/s:  Commons Mime 2.0.4
                   Scripting JSP 2.0.4

Thanks for reporting the issue. With the fixes mentioned above, the issue should be fixed.

Please close this issue, if this is ok for you. Thanks.

> Set jcr:mimetype to text/x-java-source for generated java files
> ---------------------------------------------------------------
>
>                 Key: SLING-720
>                 URL: https://issues.apache.org/jira/browse/SLING-720
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting JSP
>    Affects Versions: Commons Mime 2.0.2, Scripting JSP 2.0.2
>            Reporter: Dominique Pfister
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For: Scripting JSP 2.0.4,  Commons Mime 2.0.4
>
>
> We have a web-based repository browser that will return nt:files via HTTP with the content-type derived from the jcr:content subnode's jcr:mimeType property. In Sling's JSP Scripting engine, files generated by JSP transpilation/compilation will always have their mime type set to "application/octet-stream" (see org.apache.sling.scripting.jsp.RepositoryOutpuStream). If jcr:mimeType could be changed to "text/x-java-source" for generated java files, they would be displayed directly inside the web browser.

-- 
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-720) Set jcr:mimetype to text/x-java-source for generated java files

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669360#action_12669360 ] 

fmeschbe edited comment on SLING-720 at 2/1/09 1:15 AM:
-----------------------------------------------------------------

Very good idea. Thanks.

I created issue SLING-847 to keep track of this.

      was (Author: fmeschbe):
    Very good idea. Thanks.

I craated issue SLING-847 to keep track of this.
  
> Set jcr:mimetype to text/x-java-source for generated java files
> ---------------------------------------------------------------
>
>                 Key: SLING-720
>                 URL: https://issues.apache.org/jira/browse/SLING-720
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting JSP
>    Affects Versions: Commons Mime 2.0.2, Scripting JSP 2.0.2
>            Reporter: Dominique Pfister
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For: Scripting JSP 2.0.4,  Commons Mime 2.0.4
>
>
> We have a web-based repository browser that will return nt:files via HTTP with the content-type derived from the jcr:content subnode's jcr:mimeType property. In Sling's JSP Scripting engine, files generated by JSP transpilation/compilation will always have their mime type set to "application/octet-stream" (see org.apache.sling.scripting.jsp.RepositoryOutpuStream). If jcr:mimeType could be changed to "text/x-java-source" for generated java files, they would be displayed directly inside the web browser.

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


[jira] Commented: (SLING-720) Set jcr:mimetype to text/x-java-source for generated java files

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645395#action_12645395 ] 

Felix Meschberger commented on SLING-720:
-----------------------------------------

Extended the SlingIOProvider in scripting/jsp to use the ServletContext to try to derive a MIME type for created files in Rev. 711770.

> Set jcr:mimetype to text/x-java-source for generated java files
> ---------------------------------------------------------------
>
>                 Key: SLING-720
>                 URL: https://issues.apache.org/jira/browse/SLING-720
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting JSP
>    Affects Versions: Commons Mime 2.0.2, Scripting JSP 2.0.2
>            Reporter: Dominique Pfister
>            Assignee: Felix Meschberger
>            Priority: Minor
>
> We have a web-based repository browser that will return nt:files via HTTP with the content-type derived from the jcr:content subnode's jcr:mimeType property. In Sling's JSP Scripting engine, files generated by JSP transpilation/compilation will always have their mime type set to "application/octet-stream" (see org.apache.sling.scripting.jsp.RepositoryOutpuStream). If jcr:mimeType could be changed to "text/x-java-source" for generated java files, they would be displayed directly inside the web browser.

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


[jira] Closed: (SLING-720) Set jcr:mimetype to text/x-java-source for generated java files

Posted by "Dominique Pfister (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dominique Pfister closed SLING-720.
-----------------------------------


Verified, resources are now delivered with the correct mime-type. Thanks!

> Set jcr:mimetype to text/x-java-source for generated java files
> ---------------------------------------------------------------
>
>                 Key: SLING-720
>                 URL: https://issues.apache.org/jira/browse/SLING-720
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting JSP
>    Affects Versions: Commons Mime 2.0.2, Scripting JSP 2.0.2
>            Reporter: Dominique Pfister
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For: Scripting JSP 2.0.4,  Commons Mime 2.0.4
>
>
> We have a web-based repository browser that will return nt:files via HTTP with the content-type derived from the jcr:content subnode's jcr:mimeType property. In Sling's JSP Scripting engine, files generated by JSP transpilation/compilation will always have their mime type set to "application/octet-stream" (see org.apache.sling.scripting.jsp.RepositoryOutpuStream). If jcr:mimeType could be changed to "text/x-java-source" for generated java files, they would be displayed directly inside the web browser.

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


[jira] Commented: (SLING-720) Set jcr:mimetype to text/x-java-source for generated java files

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645393#action_12645393 ] 

Felix Meschberger commented on SLING-720:
-----------------------------------------

Modified the commons/mime mapping of the .java extension to text/x-java-source (was text/plain) in Rev. 711769

> Set jcr:mimetype to text/x-java-source for generated java files
> ---------------------------------------------------------------
>
>                 Key: SLING-720
>                 URL: https://issues.apache.org/jira/browse/SLING-720
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting JSP
>            Reporter: Dominique Pfister
>            Assignee: Felix Meschberger
>            Priority: Minor
>
> We have a web-based repository browser that will return nt:files via HTTP with the content-type derived from the jcr:content subnode's jcr:mimeType property. In Sling's JSP Scripting engine, files generated by JSP transpilation/compilation will always have their mime type set to "application/octet-stream" (see org.apache.sling.scripting.jsp.RepositoryOutpuStream). If jcr:mimeType could be changed to "text/x-java-source" for generated java files, they would be displayed directly inside the web browser.

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


[jira] Commented: (SLING-720) Set jcr:mimetype to text/x-java-source for generated java files

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669360#action_12669360 ] 

Felix Meschberger commented on SLING-720:
-----------------------------------------

Very good idea. Thanks.

I craated issue SLING-847 to keep track of this.

> Set jcr:mimetype to text/x-java-source for generated java files
> ---------------------------------------------------------------
>
>                 Key: SLING-720
>                 URL: https://issues.apache.org/jira/browse/SLING-720
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting JSP
>    Affects Versions: Commons Mime 2.0.2, Scripting JSP 2.0.2
>            Reporter: Dominique Pfister
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For: Scripting JSP 2.0.4,  Commons Mime 2.0.4
>
>
> We have a web-based repository browser that will return nt:files via HTTP with the content-type derived from the jcr:content subnode's jcr:mimeType property. In Sling's JSP Scripting engine, files generated by JSP transpilation/compilation will always have their mime type set to "application/octet-stream" (see org.apache.sling.scripting.jsp.RepositoryOutpuStream). If jcr:mimeType could be changed to "text/x-java-source" for generated java files, they would be displayed directly inside the web browser.

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


[jira] Assigned: (SLING-720) Set jcr:mimetype to text/x-java-source for generated java files

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned SLING-720:
---------------------------------------

    Assignee: Felix Meschberger

> Set jcr:mimetype to text/x-java-source for generated java files
> ---------------------------------------------------------------
>
>                 Key: SLING-720
>                 URL: https://issues.apache.org/jira/browse/SLING-720
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting JSP
>            Reporter: Dominique Pfister
>            Assignee: Felix Meschberger
>            Priority: Minor
>
> We have a web-based repository browser that will return nt:files via HTTP with the content-type derived from the jcr:content subnode's jcr:mimeType property. In Sling's JSP Scripting engine, files generated by JSP transpilation/compilation will always have their mime type set to "application/octet-stream" (see org.apache.sling.scripting.jsp.RepositoryOutpuStream). If jcr:mimeType could be changed to "text/x-java-source" for generated java files, they would be displayed directly inside the web browser.

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


[jira] Updated: (SLING-720) Set jcr:mimetype to text/x-java-source for generated java files

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated SLING-720:
------------------------------------

    Affects Version/s: Commons Mime 2.0.2
                       Scripting JSP 2.0.2

Affects scripting/jsp because the SlingIOProvider just assigns application/octet-stream to all files created and affactes commons/mime because the .java extension maps to the incorrect MIME type.

> Set jcr:mimetype to text/x-java-source for generated java files
> ---------------------------------------------------------------
>
>                 Key: SLING-720
>                 URL: https://issues.apache.org/jira/browse/SLING-720
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting JSP
>    Affects Versions: Commons Mime 2.0.2, Scripting JSP 2.0.2
>            Reporter: Dominique Pfister
>            Assignee: Felix Meschberger
>            Priority: Minor
>
> We have a web-based repository browser that will return nt:files via HTTP with the content-type derived from the jcr:content subnode's jcr:mimeType property. In Sling's JSP Scripting engine, files generated by JSP transpilation/compilation will always have their mime type set to "application/octet-stream" (see org.apache.sling.scripting.jsp.RepositoryOutpuStream). If jcr:mimeType could be changed to "text/x-java-source" for generated java files, they would be displayed directly inside the web browser.

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


[jira] Commented: (SLING-720) Set jcr:mimetype to text/x-java-source for generated java files

Posted by "James P. White (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669150#action_12669150 ] 

James P. White commented on SLING-720:
--------------------------------------

This seems to call for a more general solution for the related problem of the MIME type for scripts.

{{javax.script.ScriptEngineFactory}} provides {{getMimeTypes() }} and {{getExtensions()}} which could/should be used to provide the proper mapping for installed scripts.

> Set jcr:mimetype to text/x-java-source for generated java files
> ---------------------------------------------------------------
>
>                 Key: SLING-720
>                 URL: https://issues.apache.org/jira/browse/SLING-720
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting JSP
>    Affects Versions: Commons Mime 2.0.2, Scripting JSP 2.0.2
>            Reporter: Dominique Pfister
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For: Scripting JSP 2.0.4,  Commons Mime 2.0.4
>
>
> We have a web-based repository browser that will return nt:files via HTTP with the content-type derived from the jcr:content subnode's jcr:mimeType property. In Sling's JSP Scripting engine, files generated by JSP transpilation/compilation will always have their mime type set to "application/octet-stream" (see org.apache.sling.scripting.jsp.RepositoryOutpuStream). If jcr:mimeType could be changed to "text/x-java-source" for generated java files, they would be displayed directly inside the web browser.

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