[417874] Create a WebContent link to the dynamic web project's
actual web content folder, for easier navigation.
Signed-off-by: Nitin Dahyabhai <thatnitind@gmail.com>
Change-Id: I1273e1b6592e8e00fa45ef91df45a2489489a639
diff --git a/docs/org.eclipse.jst.j2ee.doc.user/.project b/docs/org.eclipse.jst.j2ee.doc.user/.project
index 86d9408..ac1280e 100644
--- a/docs/org.eclipse.jst.j2ee.doc.user/.project
+++ b/docs/org.eclipse.jst.j2ee.doc.user/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>Copy of org.eclipse.jst.j2ee.doc.user</name>
+ <name>org.eclipse.jst.j2ee.doc.user</name>
<comment></comment>
<projects>
</projects>
diff --git a/docs/org.eclipse.jst.j2ee.doc.user/topics/tcreatingawebproject.dita b/docs/org.eclipse.jst.j2ee.doc.user/topics/tcreatingawebproject.dita
index 434fa96..eb89300 100644
--- a/docs/org.eclipse.jst.j2ee.doc.user/topics/tcreatingawebproject.dita
+++ b/docs/org.eclipse.jst.j2ee.doc.user/topics/tcreatingawebproject.dita
@@ -52,12 +52,12 @@
accept the default value.</cmd></step>
<step><cmd>In the <uicontrol>Content Directory:</uicontrol> field,
specify a folder for your source files or accept the default value
-(WebContent).</cmd></step>
+(src/main/webapp).</cmd></step>
<step><cmd>In the <uicontrol>Java Source Directory</uicontrol> field,
specify a folder for your source files or accept the default value
-(src).</cmd></step>
+(src/main/java).</cmd></step>
<step><cmd>In the <uicontrol>Output Folder:</uicontrol> field, specify
-a folder for your output files or accept the default value (WebContent/WEB-INF/classes).</cmd>
+a folder for your output files or accept the default value (build/classes).</cmd>
<info></info></step>
<step><cmd>Click <uicontrol>Finish</uicontrol>.</cmd></step>
</steps>
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java
index ae858db..b346f98 100644
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java
+++ b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java
@@ -1,5 +1,5 @@
/******************************************************************************
- * Copyright (c) 2005, 2011 BEA Systems, Inc. and others
+ * Copyright (c) 2005, 2021 BEA Systems, Inc. and others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -23,6 +23,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
@@ -142,7 +143,11 @@
WebArtifactEdit.createDeploymentDescriptor(project, nVer);
}
}
-
+
+ if (!contentdir.equals(pjpath.addTrailingSeparator().append("WebContent"))) { //$NON-NLS-1$
+ project.getFolder("WebContent").createLink(new Path("PROJECT_LOC").append(contentdir.removeFirstSegments(1)), IResource.NONE, null); //$NON-NLS-1$//$NON-NLS-2$
+ }
+
// Set entries for src folders
final IVirtualFolder jsrc = c.getRootFolder().getFolder("/WEB-INF/classes"); //$NON-NLS-1$
final IClasspathEntry[] cp = jproj.getRawClasspath();
diff --git a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java
index f0aa978..a293649 100644
--- a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java
+++ b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2020 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -118,7 +118,6 @@
/**
* @return
- * @deprecated
*/
public String getStaticWebContentFolderName() {
return getString(Keys.STATIC_WEB_CONTENT);
@@ -148,7 +147,6 @@
/**
* @param value
- * @deprecated
*/
public void setStaticWebContentFolderName(String value) {
getInstancePreferenceNode(J2EEPlugin.PLUGIN_ID).put(Keys.STATIC_WEB_CONTENT, value);