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

Bug 328239

Summary: Static Web project created with space in name shows error on Context Root setting project property page
Product: [WebTools] WTP Java EE Tools Reporter: Nick Sandonato <nsand.dev>
Component: wst.webAssignee: Aidyl Kareh <amkareh>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: amkareh, ccc, jsholl
Version: unspecifiedFlags: cbridgha: review+
Target Milestone: 3.2.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed Patch ccc: iplog+

Description Nick Sandonato CLA 2010-10-20 07:43:21 EDT
Steps to reproduce:
1. Create a new Static Web Project with a space in the project name.  For instance 'my project'.
2. Right click the static web project and select Properties.
3. Go to the Web Project Settings page.

Problem: There is an error shown on the page "Context Root cannot contain whitespace".  The New Static Web Project wizard will allow you to press "Finish" when the project name contains a space; however, if you hit "Next", it will display this error and will not let you press Finish. If you then press "Back" the "Finish" button is still disabled. I think if the project name has a space, the user should always have to press "Next" to confirm the context root name and not be given the option of "Finish" until it has been resolved.
Comment 1 Aidyl Kareh CLA 2010-12-03 11:59:31 EST
Created attachment 184482 [details]
Proposed Patch

For consistency with the behavior of the Dynamic Web Project, this patch updates the code so that if the project name field in the New Static Web Project dialog contains a space, the context root value will be the same project name value but replacing any spaces with an underscore character.
Comment 2 Jason Sholl CLA 2010-12-03 12:13:29 EST
Code checked into 32M and HEAD for WTP 3.2.3 and 3.3
Comment 3 Chuck Bridgham CLA 2010-12-05 14:44:18 EST
approved