Multiple mappings in one application


the story:

We create some Vaadin applications (portlets and widgets). Some of them need special operations on request (special security e.g. additional logging, checks etc.) - we write custom servlet to do this, some of them not need and we use standard application servlet. But… at this moment we would like to put it together in one application.

My questions are:

  • is this possible to configure widgets to use differed web.xml mappings?
  • is there any method to configure URL used by client site engine to call server?


widget A call server:8080/app/widgetA?UIDL…
widget B call server:8080/app/widgetB?UIDL…


Not really. The ApplicationConnection class collects and manages all update requests from all widgets and sends them in one UIDL request using the URL “/context/app/UIDL”. Separating the requests from different widgets may be possible, but could be rather hard and I’d look for other options first.

If you want to transmit some extra information to the server, you can extend the widgets as well as their server-side counterparts and send the additional information with updateVariable() calls. One side effect with this is that it would also send all other pending data immediately, which may be undesired.

If you want to have some special widgets that communicate to the server
the Vaadin UIDL communications, that is always possible. They can freely make calls to the same server, either to a different servlet or the same servlet. If to same servlet, you can handle such calls with a URIHandler in the Vaadin application.

I don’t really know what your needs are, perhaps such solutions are not the best ones for your needs.