You can use any package structure you want. Your server classes can be in any package but you must make sure that the GWT compiler does not see them. The GWT compiler only sees code that is included using <source path="...."> in your *.gwt.xml file. By default GWT compiler looks in the package called "client" next to the *.gwt.xml file (most not be top level)
-- So for example you could do
/MyProject
/src
/main
/java
/com
/company
/src
/main
/java
/com
/company
/web
WebApp.gwt.xml
ServletTest.java
AnotherServerClass.java
ServletTest.java
AnotherServerClass.java
with WebApp.gwt.xml having <source path="web"/>. You can also move WebApp.gwt.xml into /web and then change it to <source path="" />. That makes it easier to exclude /web from your final *.war file as you don't need to deploy your GWT sources to the server.
The <source> tag also allows you to exclude certain files and folders, so you have quite some flexibility.
-- J.
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment