[jboss-jira] [JBoss JIRA] Commented: (JBAS-4253) ServletContext().getRealPath("/") is returning null
Remy Maucherat (JIRA)
jira-events at lists.jboss.org
Mon Mar 26 20:45:56 EDT 2007
[ http://jira.jboss.com/jira/browse/JBAS-4253?page=comments#action_12357399 ]
Remy Maucherat commented on JBAS-4253:
--------------------------------------
getRealPath may return null, and will return the file path only when Tomcat is run from the filesystem (the VFS is not the filesystem, so the result is normal).
> ServletContext().getRealPath("/") is returning null
> ---------------------------------------------------
>
> Key: JBAS-4253
> URL: http://jira.jboss.com/jira/browse/JBAS-4253
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Web (Tomcat) service
> Reporter: Scott M Stark
> Assigned To: Remy Maucherat
> Fix For: JBossAS-5.0.0.Beta2
>
>
> The following call:
> String realPath = getServletContext().getRealPath("/");
> is failing due to a null path being returned. I assume this is a vfs integration issue.
> <testcase classname="org.jboss.test.web.test.WebIntegrationUnitTestCase" name="testRealPath" time="0.15">
> ?
> <error message="Expected reply code:200, actual=500" type="java.io.IOException">
> java.io.IOException: Expected reply code:200, actual=500
> at org.jboss.test.util.web.HttpUtils.accessURL(HttpUtils.java:137)
> at org.jboss.test.util.web.HttpUtils.accessURL(HttpUtils.java:108)
> at org.jboss.test.util.web.HttpUtils.accessURL(HttpUtils.java:96)
> at org.jboss.test.util.web.HttpUtils.accessURL(HttpUtils.java:82)
> at org.jboss.test.web.test.WebIntegrationUnitTestCase.testRealPath(WebIntegrationUnitTestCase.java:67)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> at junit.extensions.TestSetup.run(TestSetup.java:23)
> </error>
> </testcase>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list