-
1. Re: Seam GWT example not working
feroza Oct 28, 2008 12:52 AM (in response to feroza)Sorry forgot to mention that GWT is version mac 1.5.2
Feroza
-
2. Re: Seam GWT example not working
dan.j.allen Nov 5, 2008 7:20 AM (in response to feroza)Technically we have never claimed to support hosted mode for this example. The readme.txt file advises you to check the GWT docs. If you happen to get it worked, please share the instructions by filing a JIRA or creating a knowledgebase page. Thanks!
-
3. Re: Seam GWT example not working
olikaf Nov 26, 2008 5:16 PM (in response to feroza)It works for me :-)
I had some issue wich looks like yours, though.
To call the service, I had to change the code to get the good URL.
Instead of
http://localhost:8080/seampagination/seam/resource/gwt/seampagination.gwt.catalog.ManageCatalog/,
I had
http://localhost:8080/seampagination/gwt/seampagination.gwt.catalog.ManageCatalog/seam/resourceGWT.getModuleBaseURL() returns http://localhost:8080/seampagination/gwt/seampagination.gwt.catalog.ManageCatalog...
So I changed the code to retrieve the service interface :
private CatalogServiceAsync getService() { String endpointURL = GWT.getHostPageBaseURL() + "seam/resource/gwt"; CatalogServiceAsync svc = (CatalogServiceAsync) GWT.create(CatalogService.class); //endpointURL = "http://localhost:8080/seampagination/seam/resource/gwt/seampagination.gwt.catalog.ManageCatalog/"; ((ServiceDefTarget) svc).setServiceEntryPoint(endpointURL); Log.debug("GWT.getModuleBaseURL() = " + GWT.getModuleBaseURL()); Log.debug("GWT.getHostPageBaseURL() = "+GWT.getHostPageBaseURL()); Log.debug("endpointURL = " + endpointURL); Log.debug("svc = " + svc); return svc; }
Using getHostPageBaseURL() did the trick for me.
Next, for the Hosted mode.
First, I deploy my application. It's an EAR, with a WAR and an EJB. The GWT Service client and server code is in the WAR.
The server code is a seam component, as described in the seam remote documentation.Then, I use the following command :
java -Xmx256M -cp "$APPDIR/src/java:$APPDIR/web:$APPDIR/lib/gwt-log-2.5.3.jar:/home/ofe/dev/gwt-linux-1.5.3/gwt-user.jar:/home/ofe/dev/gwt-linux-1.5.3/gwt-dev-linux.jar" com.google.gwt.dev.GWTShell -out "$APPDIR/web" "$@" http://localhost:8080/seampagination/welcomeGWT.html
And it works fine.
Any change in the GWT modules code is taken into account.
Of course, a change in the server code means a redeployment....BTW, I use glassfish under Linux.