Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 369017

Summary: Provide api for determining web context root providing related ear project
Product: [WebTools] WTP Java EE Tools Reporter: Chuck Bridgham <cbridgha>
Component: jst.j2eeAssignee: Chuck Bridgham <cbridgha>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: enhancement    
Priority: P3 CC: ccc, neil.hauge, raghunathan.srinivasan
Version: 3.3.1Flags: cbridgha: pmc_approved? (david_williams)
raghunathan.srinivasan: pmc_approved+
cbridgha: pmc_approved? (naci.dai)
cbridgha: pmc_approved? (deboer)
neil.hauge: pmc_approved+
cbridgha: pmc_approved? (kaloyan)
cbridgha: pmc_approved? (cbridgha)
Target Milestone: 3.3.2   
Hardware: PC   
OS: Windows 7   
Whiteboard: PMC
Bug Depends on: 353941    
Bug Blocks:    

Description Chuck Bridgham CLA 2012-01-18 20:06:51 EST
+++ This bug was initially created as a clone of Bug #353941 +++

No API currently exists on "WebUtilities" class to return the web context root based on either the component property if standalone, or via the Ear module's property.
Comment 1 Chuck Bridgham CLA 2012-01-18 20:07:41 EST
I realized this api was never put in 3.3.2 or HEAD stream....
Comment 2 Chuck Bridgham CLA 2012-01-18 20:09:38 EST
We can use the same patch from other stream   https://bugs.eclipse.org/bugs/attachment.cgi?id=202929&action=diff
Comment 3 Chuck Bridgham CLA 2012-01-18 20:15:49 EST
It is adding api so I'll add PMC flags...


Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such.
new API - so flagging for PMC approval


Is there a work-around? If so, why do you believe the work-around is insufficient?
This is a utility api

How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added?

Yes Junit added


Give a brief technical overview. Who has reviewed this fix?
Carl Anderson has reviewed the code.  This utility simply checks if the WAR is contained inside the Ear passed, if not, it will return the setting from the web component file, if contained, it will return the context root specified in the Ear DD xml file.


What is the risk associated with this fix?
None
Comment 4 Raghunathan Srinivasan CLA 2012-01-18 20:32:52 EST
Assuming you have reviewed and approved!
Comment 5 Chuck Bridgham CLA 2012-01-24 10:38:00 EST
Committed to both 3.3 and HEAD streams