Community
Participate
Working Groups
Build Identifier: 2.1.0-RELEASE HttpServletRequest.getRealPath() returns null when running under Virgo 2.1.0-RELEASE; returned an absolute path in dm server 2.0.0-RELEASE. Reproducible: Always
Created attachment 182500 [details] Project, build of example case illustrating the issue (including built bundle in target) Attached is an Eclipse & maven2 test project, already built. Deploy and hit it with http://localhost/testbundle in the browser, then look at results in log file (or on console in 2.1.0). 2.0.0-RELEASE results: 2010-11-05 09:48:42.511|http-80-1|DEBUG|com.annealsoft.test.TestServlet .doGet:15|************** REAL PATH: C:\Insight\dmserver\work\osgi\configuration\org.eclipse.osgi \bundles\38\data\store\org.eclipse.osgi\bundles\99\1\bundlef ile\. 2.1.0-RELEASE results: 09:41:07.333|http-80-1|DEBUG|com.annealsoft.test.TestServlet .doGet:15|************** REAL PATH: null
Thanks for raising this bug and providing the testcase!
A workaround - I don't know what this returns in 2.0.0, but getRealPath() in dm server 2.1.0 returns null for "." but a correct real path for "/".
Created attachment 182887 [details] patch proposal Hi Glyn, I want to propose a patch for this issue. I'm looking forward to your comments. Regards Violeta
Thanks Violeta! The patch looks good to me and is very unlikely to regress the fix that introduced this bug (the ability to supply web.xml in a fragment). I have recorded bug 329979 to add a suitable integration test, but this is not urgent and is not really related to this fix. There are no new files in the patch, so please would you confirm you wrote 100% of the code and have the right to donate it to Eclipse. Assigning to Chris for integration into Gemini Web. (Chris: I've asked the necessary IP question above. Please don't push the commit until Violeta confirms. Also, please ensure Violeta is the author of the commit.)
Changing the product to Gemini Web as that is where the bug and the fix reside.
Setting target Gemini Web milestone.
(In reply to comment #7) > Setting target Gemini Web milestone. I confirm that I wrote 100% of the code and I have the right to donate it to Eclipse.
Thanks for patch. I have applied it to gemini web, all the tests passed and I have pushed.
Done