891011121314
public class GreetingServiceStub extends RemoteServiceServlet implements GreetingService { @Override public User greetServer(String name) { return new User(name, "Hello " + name + ", Welcome to GWT"); }
1415161718192021
private ServletContext servletContext; public User greetServer(String user) { String serverInfo = getServletContext().getServerInfo(); return new User(user, "Hello my dear, " + user + "!<br><br>I am running " + serverInfo + ".<br>"); }