You can make 2 modules, one for the login widget and one more for the admin widget. Each widget will embed itself in a div depending on which html (or jsp) page you need.
For example, create * .gwt.xml for each module, for example: login.gwt.xml and admin.gwt.xml. These files must be created in the root directory of your gwt, for example com.gwt.example.
Then create an Entry Point class for each (each class will implement EntryPoint ). For example, Login.java might look like this:
package com.gwt.example.myproject.client;
public class Login implements EntryPoint {
public void onModuleLoad() {
... create loginWidget ..
RootPanel.get("my-login-div").add(loginWidget);
}
}
So, now that you are compiling gwt, it should create a bunch of files in war/com.gwt.example. You are interested in com.gwt.example.login.nocache.jsand com.gwt.example.admin.nocache.js.
js- html / jsp .
, html, :
<html>
....other stuff...
<script type="text/javascript" language="javascript" src="com.gwt.example.login.nocache.js"></script>
....other stuff....
<div id="my-login-widget"></div>
....the rest of your html markup....
</html>
, html, gwt javascript, , onModuleLoad, div id = "my-login-widget" .
Spring Security, , , , Spring ajax.