Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 143621 - GenericServer "Run On Server" using wrong URL for when context root is changed
Summary: GenericServer "Run On Server" using wrong URL for when context root is changed
Status: CLOSED FIXED
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: jst.server (show other bugs)
Version: 1.0.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Gorkem Ercan CLA
QA Contact: Tim deBoer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-24 19:04 EDT by Danny Ju CLA
Modified: 2017-10-11 16:02 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Danny Ju CLA 2006-05-24 19:04:32 EDT
- create a dynamic web project "test1"
- create index.jsp to web app root
- create a new Generic server, e.g. JBoss in Server view
- Change the project context root to something different from the project name
- Right click the project, select "Run As"\"Run On Server"
- Server is started but the internal browser pointing to a wrong URL and
page is not found.
- Note: Same test case is working on Tomcat.

The problem is in:
GenericServer.getModuleRootURL(IModule) {
  ...
  url += "/"+module.getName();
  ...
}

context root should be used to generate the URL
Comment 1 Gorkem Ercan CLA 2006-05-25 06:42:08 EDT
I have released a fix for it to the HEAD. The fix is simple involving using the context root instead of module name.
Comment 2 Gorkem Ercan CLA 2006-05-27 13:24:34 EDT
Fix is Released for 1.5 RC4 
Comment 3 Danny Ju CLA 2006-09-26 15:09:39 EDT
Verified and the URL is now generated with new context root in 1.5.1.
Comment 4 Danny Ju CLA 2006-09-26 15:16:23 EDT
Note:
Even URL is now consistent with project setting,
user may not be able see the page because most 
application server uses the WAR file name as
context path to deploy the WAR generated by Generic server publisher.

Unless a context root is specified explictly. e.g. for JBoss:  
jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
	<context-root>/TestWeb3</context-root>
</jboss-web>

But this is out of the scope of this bug and more a responsibility of 
user. May deserve some documentation though.
Comment 5 John Lanuti CLA 2006-11-28 15:38:37 EST
This is part of a mass update to close out all stale WTP defects already verified by the reporter but awaiting closure by the assignee.  If you feel this defect was closed inappropriately, please reopen.

Thanks, John Lanuti
Comment 6 Eclipse Genie CLA 2017-10-11 16:02:23 EDT
New Gerrit change created: https://git.eclipse.org/r/107865