Showing posts with label gwt. Show all posts
Showing posts with label gwt. Show all posts

Wednesday, October 22, 2008

How to run (develop) GWT with JBOSS or how to serve symbolic links with jboss as static content

To serve static content under JBOSS 4.2.2, you should put it inside ROOT.war folder (deploy/jboss-web.deployer/ROOT.war).
Very often necessary to make an links to the some content, but not actually to copy it.
For this reason linux users do ln -s, to create an symbolic link to folder.

By default jboss ignoring those created links.
To fix this, you should add < DefaultContext allowLinking="true" > to the server.xml file.

Hope it helps to everybody, who is trying to run GWT compiler with JBOSS server.

Tuesday, October 21, 2008

How to develop GWT without server

In the last project, i worked, we did GWT client connected with server using RESTfull API.
So, we have completly separate server and client. It has some benefits, if for example you have an server API, which is reusable with other clients, not like GWT.

So, the main problem is how to connect GWT with Server from configuration point of view.
create some bash file, like noserver.sh

#!/bin/sh
APPDIR=`dirname $0`;
GWT_HOME='/usr/local/tools/gwt-linux-1.5.2/'
java -Xmx256M -cp "$APPDIR/src/lib/gwt-log-2.5.2.jar:$APPDIR/src:$APPDIR/bin:/usr/local/tools/gwt-linux-1.5.2/gwt-user.jar:$GWT_HOME/gwt-dev-linux.jar" com.google.gwt.dev.GWTShell -out "$APPDIR/www" -noserver -port 8080 "$@" com.example.Main/Main.html;


then you need to setup some server: jboss, tomcat, jetty to serve statically a folder
inside your gwt projects, something like www.

after you did it, run your server.

Then run the nserver.sh to run GWT.