开发者

GWT-RPC Unable to access servlet

I integrated my gwt module in to existing web application and deployed on jboss.

when I trying to hit gwt_servlet then I am getting error message on failure method of asynccallback i.e. The requested resource (/warFileName/GWTAPPS/myGwtModuleName/GWTServletName) is not available.

My war contain is as follows

GWTAPPS :

myGwtModuleName(folder) : (folder contains -->)advanced,css,gwt,images folder and some *.cache.png files myGwtModule.html, myGwtModule.css

WEB-INF -> deploy - myGwtModuleName

I copied compiled gwt_servlet file into /warFileName/GWTAPPS/myGwtModuleName/ still getting same error i.e resource not available.

Is it necessary to crate WEB-INF/classes(copied *.class file) folder into myGwtModuleName ?. like warfilename\GWTAPPS\mygwtmodule\WEB-INF\classes

Also getting sometime exception in deployment

java.lang.NoClassDefFoundError: com/google/gwt/user/client/rpc/RemoteService

**gwt_servlet entry made in web.xml # **

This web.xml not present in gwtmodule is this problem ?

< servlet> < servlet-name>GWTServletName< /servlet-name> < servlet-class>ui.mygwtmodule.server.BasicUpdateServiceImpl < /servlet-class> < /servlet> < servlet-mapping >

< servlet-name>GWTServletName< /servlet-name>
< url-pattern>/GWTServletName< /url-pattern>
< /servlet-mapping>

also used url pattern like myGwtModuleName/GWTServletName

RemoteServiceRelativePath added in BasicUpdateService

@RemoteServiceRelativePath("GWTServletName")

public interface BasicUpdateServi开发者_StackOverflowce extends RemoteService

Created a remote service proxy to talk to the server-side GWTMassUpdate service.

private final BasicUpdateServiceAsync basicUpdateService = GWT .create(BasicUpdateService.class);

Server call

basicMassUpdateService.makeServreCall("vaibhav", new AsyncCallback() {

                    @Override
                    public void onSuccess(String result) {
                      Window.alert("Result = "+result);                         
                    }

                    @Override
                    public void onFailure(Throwable caught) {
                         Window.alert("On Failure  :"+caught);
                        //  No resource available :-|
                    }
                });

Any help or guidance in this matter would be appreciated


"Is it necessary to crate WEB-INF/classes(copied *.class file) folder into myGwtModuleName ?"

Yes.

Why arent you using maven or ant for the deployment and build steps of your projects? You loose much time by doing it by hand, and it is more error prone, like these errors.

Id suggest you invest in packaging the gwt application in your war using maven or ant, and focus on developing the gwt application.


Unless you're doing some nasty things, deployment should be as easy as copying the whole "war" folder around.

Note: you can safely exclude WEB-INF/deploy from the process, as it's only needed for stacktrace deobfuscation, if you setup "remote logging" with the java.util.logging client-side emulation)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜