Eclipse & Tomcat: How to specify which folder is served from the project?

前端 未结 5 1389
北恋
北恋 2021-01-05 06:48

I\'m using Eclipse 3.4 and Tomcat 5.5 and I have a Dynamic Web Project set up. I can access it from http://127.0.0.1:8080/project/ but by default it serves files from WebCon

5条回答
  •  灰色年华
    2021-01-05 07:33

    In the project folder, there should be a file under the .settings folder named org.eclipse.wst.common.component that contains an XML fragment like this:

    
        
        
    

    You should be able to change the source-path under wb-resource to your share folder. I'd make these changes with the Eclipse project closed to be safe.

    This is a setting that you pick when you first create the Dynamic Web Project in Eclipse - I can't find how to change the value in an existing project thru Eclipse itself.

    If you want the share folder to be mapped to a different path when deployed, such as /share/ in your webapp, you can probably just add another wb-resource element.

提交回复
热议问题