The project name in the address bar is still the original project name "issue when you re-publish the project rename in Eclipse

Source: Internet
Author: User
Tags addchild tomcat server

Reprinted from: http://www.cnblogs.com/chenxueling/p/5474717.html

Copy the 20170331-JAVAEE-SSH project and rename it to 20170407-javaee-ssh.

Run the JSP in 20170407-JAVAEE-SSH project, the result error is as follows:

severity: ContainerBase.addChild:start:
org.apache.catalina.LifecycleException:Failed to start component [Standardengine[catalina]. Standardhost[localhost]. STANDARDCONTEXT[/20170331-JAVAEE-SSH]]
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:162)
At Org.apache.catalina.core.ContainerBase.addChildInternal (containerbase.java:725)
At Org.apache.catalina.core.ContainerBase.addChild (containerbase.java:701)
At Org.apache.catalina.core.StandardHost.addChild (standardhost.java:717)
At Org.apache.catalina.startup.HostConfig.deployDescriptor (hostconfig.java:587)
At Org.apache.catalina.startup.hostconfig$deploydescriptor.run (hostconfig.java:1798)
At Java.util.concurrent.executors$runnableadapter.call (executors.java:511)
At Java.util.concurrent.FutureTask.run (futuretask.java:266)
At Java.util.concurrent.ThreadPoolExecutor.runWorker (threadpoolexecutor.java:1142)
At Java.util.concurrent.threadpoolexecutor$worker.run (threadpoolexecutor.java:617)
At Java.lang.Thread.run (thread.java:745)
caused by:org.apache.catalina.LifecycleException:Failed to start component [[email protected]
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:162)
At Org.apache.catalina.core.StandardContext.resourcesStart (standardcontext.java:4969)
At Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5099)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:145)
... Ten more
caused By:java.lang.IllegalArgumentException:The main resource set specified [E:\apache-tomcat-8.0.37\webapps\ 20170331-JAVAEE-SSH] is not valid
At Org.apache.catalina.webresources.StandardRoot.createMainResourceSet (standardroot.java:727)
At Org.apache.catalina.webresources.StandardRoot.startInternal (standardroot.java:688)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:145)
... More

The page information is as follows:

You can see that the running path to the project after replication is still the previous project.

Workaround:

First, click on the new project, right--->properties-->web project Settings-->context root, and change to the target name.

The second step: after the completion of the above method, run the project, you will find the address bar is still the old project name, you need to change by the following settings:

Enter the workspace of the project, open the. settting folder, open the Org.eclipse.wst.common.component file with Notepad, and change the three places of the file to the target name:

Step three: Tomcat in the servers directory. Config directory, locate the Server.xml, locate the context node, and change the Docbase,path project name to the target:

At this point, the modification is finished, but please be patient to read the next "special instructions", because if you run the project directly at this time ten will have "eggs":

When you republish the project, you will notice that the following error occurred when you were unable to publish the item:

Could not load the Tomcat server configuration At/servers/tomcat v7.0 Server at Localhost-config. The configuration may be corrupt or incomplete.

Special Note:

For the "egg" you encounter, the solution is very simple, that is, delete the current servers, refresh the current project, and then publish.

The project name in the address bar is still the original project name "issue when you re-publish the project rename in Eclipse

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.