Maven-generated GWT Servlet not Responding -
i used gwt maven plug-in (version 2.3.0) generate gwt project. nice thing maven plug-in takes care of generating async part of service. appears work servlet not responding both when running in hosted mode (running in jetty) , when deploying resulting war tomcat.
my problem servlet not responding. onsuccess()
callback invoked null
values. pretty copied tutorial gwt homepage, service created in way:
final statusserviceasync statusservice = gwt.create(statusservice.class);
here service interface:
@remoteservicerelativepath("status") public interface statusservice extends remoteservice { string getstatus(string someinput); }
as mentioned, async counterpart generated maven plug-in. web.xml looks this:
<servlet> <servlet-name>statusservlet</servlet-name> <servlet-class>my.package.statusserviceimpl</servlet-class> </servlet> <servlet-mapping> <servlet-name>statusservlet</servlet-name> <url-pattern>/statusboard/status</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>statusboard.html</welcome-file> </welcome-file-list>
at first, thought configuration totally wrong played around little bit. when changed <servlet-class>
value, servlet container logged classnotfoundexception
. changed @remoteservicerelativepath
got error. configuration can't totally wrong.
here server-side code (i stripped down see nothing else go wrong):
public class statusserviceimpl extends remoteserviceservlet implements statusservice { private static final long serialversionuid = 3317511632727461036l; @override public string getstatus(final string someinput) { return someinput; } }
sorry forgot detail sometimes, debugger doesn't recognize breakpoint in servlet. when does, returned value still null
.
any ideas appreciated!
by default, gwt app has base url module name. if have used "rename-to" attribute in gwt.xml file, value base url. in case, looking @ web.xml entries, module should named "statusboard." or change url "rename-to" value.
Comments
Post a Comment