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 services.
It was something like mytestproject
and wanted to change it to finalprojectname
I went to the mytestproject.gwt.xml
file and changed
<module rename-to='mytestproject'>
to <module rename-to='finalprojectname'>
I then ran it through and got an error that [ERROR] Unable to find 'org/ediscovery/gwt/mytestproject.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
I then changed mytestproject.gwt.xml
to finalprojectname.gwt.xml
but still got the same result.
I've looked through every possible file and can't find why it thinks the project is still named mytestproject
. I have cleaned and rebuilt the project, etc but still the same. I am still fairly new to Java so maybe I am missing something obvious. I would greatly appreciate if anyone can offer any advice. Thanks
To rename a project from "mytestproject" to "finalprojectname":
In your .gwt.xml file, changerename-to="mytestproject"
torename-to="finalprojectname"
.
In your .html file, changesrc="mytestproject/mytestproject.nocache.js"
tosrc="finalprojectname/finalprojectname.nocache.js"
(note the double replacement!)
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".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With