GWT, Eclipse Plugin how to rename project along with .gwt.xml file? Am getting error when try to do so

后端 未结 1 1969
甜味超标
甜味超标 2020-12-30 12:33

I\'ve spent a while searching on this and nothing that I find seems relevant specifically to my issue. I am making RPC calls so I wanted to change the path to one of my web

相关标签:
1条回答
  • 2020-12-30 13:10

    To rename a project from "mytestproject" to "finalprojectname":

    1. In your .gwt.xml file, change
      rename-to="mytestproject" to
      rename-to="finalprojectname".

    2. In your .html file, change
      src="mytestproject/mytestproject.nocache.js" to
      src="finalprojectname/finalprojectname.nocache.js" (note the double replacement!)

    3. In your web.xml file, adjust paths like
      <url-pattern>/mytestproject/greet</url-pattern> to
      <url-pattern>/finalprojectname/greet</url-pattern>

    Anything else (like renaming packages, or renaming the .gwt.xml file) is optional.

    If you do choose to rename your .gwt.xml file afterwards, then it's necessary to delete the output folder (war/finalprojectname). In Eclipse, also delete your old Run Configuration, and then create a new one by using "Run As > Web Application".

    0 讨论(0)
提交回复
热议问题