Reputation: 410
I have a showcase project to display custom widgets I create. In my showcase project I used the eclipse GWT Library Wizard to create a library to better separate the widget code so it can be more reusable. One of my widgets uses some RPC calls and therefore I need to map the servlets. If you are just writing the widget in the main project you would do it in the web.xml under the war folder. However I am not sure what the best practice is and where I should put the servlet definitions and url mapping. Should I create a separate project for the library?
Upvotes: 0
Views: 119
Reputation: 9741
Normally the published library with the widget should include the classes with client and server classes.
You dont have to provide any web.xml file in your deliverable, since it is responsibility of the application developer to setup correctly the server container, and maybe they use a different approach to route requests to servlets (guice-web, spring, etc).
You can take a look to my gwtupload.jar library which includes widgets and servlets.
Of course you could split your library in two .jar files one for the widget and another for the servlet code, but IMO it complicates the setup of a project and you have to maintain and distribute two files which could cause version problems etc.
Upvotes: 2