You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Jarek Gawor (JIRA)" <ji...@apache.org> on 2010/12/28 03:51:45 UTC

[jira] Created: (GERONIMO-5743) ServletContext.getRealPath() returns null

ServletContext.getRealPath() returns null
-----------------------------------------

                 Key: GERONIMO-5743
                 URL: https://issues.apache.org/jira/browse/GERONIMO-5743
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: web
    Affects Versions: 3.0-M2
            Reporter: Jarek Gawor


In 3.0 M1 and trunk, ServletContext.getRealPath() returns null. In previous versions of Geronimo a real path was returned. Returning null is ok from specification point of view but it breaks compatibility for applications. It also looks like there are a number of web applications that rely on the getRealPath() to return a non-null value. One such application is Nexus web app.



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


[jira] [Updated] (GERONIMO-5743) ServletContext.getRealPath() returns null

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

Ivan updated GERONIMO-5743:
---------------------------

    Affects Version/s:     (was: 3.0-M2)
                       3.0-M1
        Fix Version/s: 3.0
             Assignee: Ivan

> ServletContext.getRealPath() returns null
> -----------------------------------------
>
>                 Key: GERONIMO-5743
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5743
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: web
>    Affects Versions: 3.0-M1
>            Reporter: Jarek Gawor
>            Assignee: Ivan
>             Fix For: 3.0
>
>
> In 3.0 M1 and trunk, ServletContext.getRealPath() returns null. In previous versions of Geronimo a real path was returned. Returning null is ok from specification point of view but it breaks compatibility for applications. It also looks like there are a number of web applications that rely on the getRealPath() to return a non-null value. One such application is Nexus web app.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GERONIMO-5743) ServletContext.getRealPath() returns null

Posted by "Ivan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-5743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085509#comment-13085509 ] 

Ivan commented on GERONIMO-5743:
--------------------------------

Will come up a temporary solution for this, as it is related to some other aspects, such as how the applications are kept in Geronimo, etc.
The idea is that : 
a. in the first application start up, all the contents will be extracted to a temporary directory, also turn to use a directory context implementation.
b. A flag file contains the last modification time of the application bundle is kept, which will be used to detect whether it is required to update the contents in the temporary folder.
c. Hardcode Geronimo system artifacts there, so that it could be used to avoid extract those console web applications.
d. By default, the extract action will be take effect, and a context value could be configured in the web.xml to turn off this function.
e. Based on the extracted directory, it is possible to update the application files immediately in the debug mode
f. I am thinking to use a DeploymentWatcher to remove the extracted applications, but need to record some information somewhere, like artifact id to temp directory path.

> ServletContext.getRealPath() returns null
> -----------------------------------------
>
>                 Key: GERONIMO-5743
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5743
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: web
>    Affects Versions: 3.0-M1
>            Reporter: Jarek Gawor
>            Assignee: Ivan
>             Fix For: 3.0
>
>
> In 3.0 M1 and trunk, ServletContext.getRealPath() returns null. In previous versions of Geronimo a real path was returned. Returning null is ok from specification point of view but it breaks compatibility for applications. It also looks like there are a number of web applications that rely on the getRealPath() to return a non-null value. One such application is Nexus web app.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GERONIMO-5743) ServletContext.getRealPath() returns null

Posted by "Ivan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-5743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085744#comment-13085744 ] 

Ivan commented on GERONIMO-5743:
--------------------------------

Commit first steps to trunk at . The clean up function mentioned in item f is not implemented yet.
Two properties are introduced, org.apache.geronimo.webapplication.stage and org.apache.geronimo.webapplication.getrealpath.support, both of them could be configured in two ways :
a. Use -D**** while starting the Geronimo server
b. Configure it as context-param for the web application in the web.xml
The option b has the high priority.
org.apache.geronimo.webapplication.stage can be configured with production and development, and its default value is production if it is not configured. While it is configured with development, the contents of the whole application will be extracted to the temp directory, and that directory is used for resource searching for each web request.
org.apache.geronimo.webapplication.getrealpath.support can be configured with true or false, and its default value is true. While its values is true, all the web application contents will be extracted to the temp folder, and the application could use getRealPath to get the actual physical path for the specified resource, the File instance will be always returned even if the target resource does not exist.

> ServletContext.getRealPath() returns null
> -----------------------------------------
>
>                 Key: GERONIMO-5743
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5743
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: web
>    Affects Versions: 3.0-M1
>            Reporter: Jarek Gawor
>            Assignee: Ivan
>             Fix For: 3.0
>
>
> In 3.0 M1 and trunk, ServletContext.getRealPath() returns null. In previous versions of Geronimo a real path was returned. Returning null is ok from specification point of view but it breaks compatibility for applications. It also looks like there are a number of web applications that rely on the getRealPath() to return a non-null value. One such application is Nexus web app.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GERONIMO-5743) ServletContext.getRealPath() returns null

Posted by "Ivan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-5743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13095796#comment-13095796 ] 

Ivan commented on GERONIMO-5743:
--------------------------------

Commit changes to trunk at r1164356, a deployment watcher is added to delete the temporary directories while undeploying the applications.

> ServletContext.getRealPath() returns null
> -----------------------------------------
>
>                 Key: GERONIMO-5743
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5743
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: web
>    Affects Versions: 3.0-M1
>            Reporter: Jarek Gawor
>            Assignee: Ivan
>             Fix For: 3.0
>
>
> In 3.0 M1 and trunk, ServletContext.getRealPath() returns null. In previous versions of Geronimo a real path was returned. Returning null is ok from specification point of view but it breaks compatibility for applications. It also looks like there are a number of web applications that rely on the getRealPath() to return a non-null value. One such application is Nexus web app.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GERONIMO-5743) ServletContext.getRealPath() returns null

Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-5743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085387#comment-13085387 ] 

Kevan Miller commented on GERONIMO-5743:
----------------------------------------

In my opinion, we need to treat this as a high priority. Many apps assume that getRealPath() will provide a meaningful result (non-null and usable). We're going to need to resolve this issue...

> ServletContext.getRealPath() returns null
> -----------------------------------------
>
>                 Key: GERONIMO-5743
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5743
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: web
>    Affects Versions: 3.0-M2
>            Reporter: Jarek Gawor
>
> In 3.0 M1 and trunk, ServletContext.getRealPath() returns null. In previous versions of Geronimo a real path was returned. Returning null is ok from specification point of view but it breaks compatibility for applications. It also looks like there are a number of web applications that rely on the getRealPath() to return a non-null value. One such application is Nexus web app.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (GERONIMO-5743) ServletContext.getRealPath() returns null

Posted by "Jay D. McHugh (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jay D. McHugh updated GERONIMO-5743:
------------------------------------

    Comment: was deleted

(was: Is this happening for Tomcat or Jetty (or both)?

And, is it returning null when you do not send it a parameter - or when there is a parameter passed in too?)

> ServletContext.getRealPath() returns null
> -----------------------------------------
>
>                 Key: GERONIMO-5743
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5743
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: web
>    Affects Versions: 3.0-M1
>            Reporter: Jarek Gawor
>            Assignee: Ivan
>             Fix For: 3.0
>
>
> In 3.0 M1 and trunk, ServletContext.getRealPath() returns null. In previous versions of Geronimo a real path was returned. Returning null is ok from specification point of view but it breaks compatibility for applications. It also looks like there are a number of web applications that rely on the getRealPath() to return a non-null value. One such application is Nexus web app.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (GERONIMO-5743) ServletContext.getRealPath() returns null

Posted by "Jay D. McHugh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-5743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085915#comment-13085915 ] 

Jay D. McHugh commented on GERONIMO-5743:
-----------------------------------------

Is this happening for Tomcat or Jetty (or both)?

And, is it returning null when you do not send it a parameter - or when there is a parameter passed in too?

> ServletContext.getRealPath() returns null
> -----------------------------------------
>
>                 Key: GERONIMO-5743
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5743
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: web
>    Affects Versions: 3.0-M1
>            Reporter: Jarek Gawor
>            Assignee: Ivan
>             Fix For: 3.0
>
>
> In 3.0 M1 and trunk, ServletContext.getRealPath() returns null. In previous versions of Geronimo a real path was returned. Returning null is ok from specification point of view but it breaks compatibility for applications. It also looks like there are a number of web applications that rely on the getRealPath() to return a non-null value. One such application is Nexus web app.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (GERONIMO-5743) ServletContext.getRealPath() returns null

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

Forrest Xia updated GERONIMO-5743:
----------------------------------

    Fix Version/s:     (was: 3.0.0)
                   3.0.1
    
> ServletContext.getRealPath() returns null
> -----------------------------------------
>
>                 Key: GERONIMO-5743
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5743
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: web
>    Affects Versions: 3.0-M1
>            Reporter: Jarek Gawor
>            Assignee: Ivan
>             Fix For: 3.0.1
>
>
> In 3.0 M1 and trunk, ServletContext.getRealPath() returns null. In previous versions of Geronimo a real path was returned. Returning null is ok from specification point of view but it breaks compatibility for applications. It also looks like there are a number of web applications that rely on the getRealPath() to return a non-null value. One such application is Nexus web app.

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