Saturday, February 28, 2009

reverse GWT via DWR

This is how I've set upDWR3 to push data out to GWT 1.6. GWT1.6 is needed for the new project structure and DWR3 has json support. Both of these simplify matters greatly.

I was only able to get reverse ajax running by using techniques described in using GWT for mashups. Otherwise, GWT wasn't finding dwr even though the scripts were loaded in the main html page. This is likely due to
GWT application code being loaded in a hidden iframe.

Working from the javascript-chat example (reverse ajax) in DWR3, I modified the sample to return JSON.

public void addMessage(String text, final String callback) {


if (text != null && text.trim().length() > 0) {
messages.addFirst(new Message(text));
while (messages.size() > 10) {
messages.removeLast();
}
}

Browser.withCurrentPage(new Runnable() {
String s;
public void run() {
try {
s=JsonUtil.toJson(messages) ;
} catch (IOException e) {

e.printStackTrace();
}

ScriptSessions.addFunctionCall(callback, s);

}
});
}


Then in my onModuleLoad method for GWT, I set up DWR to load in an Iframe:

    public void onModuleLoad() {

// callbackName = reserveCallback();
callbackName = "chatGroup1";
Log.info("onModuleLoad callbackName: " + callbackName);
addDWRScripts("/reverseGWT/dwr/engine.js");
addDWRScripts("/reverseGWT/dwr/util.js");
addDWRScripts("/reverseGWT/dwr/interface/JavascriptChat.js");
setActiveReverseAjax();
setupChat(this, callbackName);
//Log.info(" setupChat: finshed");
setupChatBox(callbackName);

}



public native void addDWRScripts(String url) /*-{

var elem = document.createElement("script");
elem.setAttribute("language", "JavaScript");
elem.setAttribute("src", url);
document.getElementsByTagName("body")[0].appendChild(elem);

}-*/;


public native void setActiveReverseAjax() /*-{

try{
// a delay is needed or dwr won't have been set up properly when this is called
setTimeout("dwr.engine.setActiveReverseAjax(true)",2500);

} catch(err){
alert("setActiveReverseAjax failed :YOU WILL not be receiving pushed updates from the server though you may be able to send data and receive updates only just after data is sent. You can try increasing the delay in setActiveReverseAjax() in SampleChat.java --> Reason is: "+err );

}
}-*/;




To send a message, I hookup up a button listener to call DWR via JSNI.

Button b = new Button();

b.addListener(Events.OnClick, new Listener<BaseEvent>() {
public void handleEvent(BaseEvent be) {

addMessageScript(text.getValue(), callbackName);

}

});


    public native void addMessageScript(String text, String callbackName) /*-{

try{
//this is the call to DWR set up by addDWRScripts("/reverseGWT/dwr/interface/JavascriptChat.js");
// this results in a call to the addMessage(String text, final String callback) method in JavascriptChat.java

JavascriptChat.addMessage(text,callbackName);

}catch(err){
alert("addMessageScript err: "+err);
}
}-*/;


A JavaScript function has already been set up in the GWT onModuleLoad() method as well which will take the JSON formatted String that is returned from DWR and pass it into my GWT code.

    public native static void setupChat(SampleChat sc, String callback) /*-{

window[callback] = function(someData) {//Ljava/lang/String;
sc.@com.sample.gwt.client.SampleChat::gwtChat(Ljava/lang/String;)(someData);
// sc.@com.sample.gwt.client.SampleChat::gwtChat(Lcom/google/gwt/core/client/JavaScriptObject;)(someData);
}


}-*/;



From there, the JSON formatted String is parsed and the message retrieved:

    public void gwtChat(String jss) {
String s = jss;

JSONObject json = (JSONObject) JSONParser.parse(jss);

Label l = new Label();

try {
s = json.isObject().get("reply").isArray().get(0).isObject().get("text").isString().stringValue();

} catch (Exception e) {

e.printStackTrace();
}


Now data is being pushed from the server when other users enter a message, and you can set up your GWT client to display this pushed data how you'd like.


Notes:
Source code for this example is at reverseGWT . A deployable .war is included. To build from src, please modify build.xml to include:

<pathelement location="/your-path/gwt-user.jar" />
<pathelement location="/your-path/gwt-dev-mac.jar" />



The example is set up using GXT and gwt-log . The example really doesn't depend on using GXT in any way, and straight GWT would be fine. I just happened to be using it and so have set it up that way. Please consult the GXT, gwt-log, DWR and GWT sites for license information. This is just a proof of concept and not intended to be distributed as a usable product.

The chat example from DWR isn't necessarily thread safe as written and should probably use something from java.util.concurrent to handle the messages but this is more a post on configuration than setting up a fully functional chat system.



29 comments:

  1. Hello Shawn,
    I'm new to push technologies but have little experience with GWT.
    I'm very interested about your reverse Ajax sample,
    but have difficulties to run it.
    So, please help me with answers on following questions:
    1.Is it necessary to run project with GWT v 1.6, because I still use v.1.5.3?
    2.I try to run your sample (btw. included war runs perfectly - deployed on Glassfish v2.1), but first have trouble with -XstartOnFirstThread argument, which hasn't been recognized by Eclipse (I use GanyMede)
    3.I didn't find JavascriptChat.js anyvhere so I exctact javascript-chat.js from dwr.war file. Is that ok, or is this completly different javascript library?
    4.After I include log4j configuration file, I can run example in HOSTED mode:
    [INFO] Starting Jetty on port 8888
    [INFO] 200 - GET /reverse.html (127.0.0.1) 2274 bytes
    ...
    [INFO] 304 - GET /reverse/dwr/javascript-chat.js (127.0.0.1)

    til POST phase,
    when GWT shell returns:
    [WARN] 404 - POST /reverse/$%7BpathToDwrServlet%7D$%7BplainPollHandlerUrl%7DReverseAjax.dwr (127.0.0.1) 1458 bytes

    I don't do anithing yet with application,
    but when I push button, this message appears:
    ---------------------------
    Windows Internet Explorer
    ---------------------------
    addMessageScript err: [object Error]
    ---------------------------
    OK
    ---------------------------

    What I'm doing wrong?

    Please help with answers, because I'm pretty in a hurry with my push project... and sorry for my bad english.

    Best regards,
    Blaz

    ReplyDelete
  2. Hi,

    #1 - It should be ok I would think assuming you adapt it to the 1.5.x project structure.

    #2 - I use eclipse too Version: 3.4.1.

    #3 - This is your main issue I think. You shouldn't need javascript-chat.js

    It's not an actual file.

    The names are confusing you. I do call /reverseGWT/dwr/interface/JavascriptChat.js but that is not an actual file. The dwr servlet can recognize by the */dwr/interface/* pattern that it needs to generate the necessary javascript so you can hookup to your JavascriptChat.java file.

    The DWR example does use javascript-chat.js to set things up, but we did the set up in our GWT onModuleLoad() method so it should be good to go.

    Shawn

    P.S. To tell the truth, GAE (Google App Engine) won't support push as of now so I've put this on hold for now. Let me you how you get on though!

    ReplyDelete
  3. Hi,
    Thanks for a really quick reply.
    I'am using now 1.6 structure - just to be sure to run successfully your project in hosted mode.
    I changed in entry point class to "addDWRScripts("/reverse/dwr/interface/JavascriptChat.js");" as you suggested but now I get warning "[WARN] 404 - GET /reverse/dwr/interface/JavascriptChat.js (127.0.0.1) 1425 bytes"... followed by "[WARN] 404 - POST /reverse/$%7BpathToDwrServlet%7D$%7BplainPollHandlerUrl%7DReverseAjax.dwr (127.0.0.1) 1458 bytes" warnings.
    I do not know anything about */dwr/interface/*.
    Where is this setted?

    I'm still confused.
    Can you tell me please, what I'm doing wrong?

    Blaz

    ReplyDelete
  4. Sorry my bad. I don't have it set up correctly for hosted mode.

    What you'll have to do is change reverse.html so it can find reverse.nocache.js. (The path works for the war as you mentioned).

    Instead of :


    src="/reverseGWT/reverse/reverse.nocache.js">

    use src="/reverse/reverse.nocache.js"

    ReplyDelete
  5. It's not working.

    We have done that, but it is still not working.
    I don't think is it possible to work GWT with DWR on hosted mode ... ?

    A working example in hosted mode, that is all what I need :) ... but is not working :( ...

    If you can provide me a working example in hosted mode 1.5.3 GWT ... you will save me.

    PS:The example also cannot be deployed on Tomcat - any suggestion why

    Lp Tomaz and Blaz

    thnx

    ReplyDelete
  6. The one change to reverse.html is all it took for me to get running under hosted mode.

    I don't know your 1.5.x GWT layout but the ant file is set to launch hosted mode for 1.6.

    How are you launching hosted mode?

    Since it won't run under tomcat either, there must be something with the way you adapted it 1.5.x.

    ReplyDelete
  7. Hy Shawn,
    yours included war deploys on Tomcat OK. I apology as I say that can not be done.

    I settled project on latest 1.6.4 and Java is jdk1.6.0_13.
    I run hosted mode through yours Ant target named hosted.
    I must comment argument: jvmarg value="-XstartOnFirstThread because JVM doesn't recognize it:
    Buildfile: E:\prg\reverseGWT\build.xml
    libs:
    javac:
    hosted:
    [java] Could not create the Java virtual machine.
    [java] Unrecognized option: -XstartOnFirstThread

    BUILD FAILED
    E:\prg\reverseGWT\build.xml:48: Java returned: 1

    Total time: 306 milliseconds
    ************************************************
    Buildfile: E:\prg\reverseGWT\build.xml
    libs:
    javac:
    hosted:
    [java] 11:17:26,625 DEBUG JspRuntimeContext:104 - Parent class loader is: ContextLoader@DWR (Direct Web Remoting)
    [java] 11:17:26,629 DEBUG JspServlet:80 - Scratch dir for the JSP engine is: C:\Users\KEMPER~1\AppData\Local\Temp\Jetty_0_0_0_0_8888_war____masbuh\jsp
    [java] 11:17:26,630 DEBUG JspServlet:82 - IMPORTANT: Do not modify the generated servlets
    [java] 11:17:26,649 INFO startup:157 - Starting: DwrServlet v3.0.0.116.rc1 on jetty-6.1.x / JDK 1.6.0_13 from Sun Microsystems Inc. at
    [java] 11:17:26,650 DEBUG startup:244 - Setup: Getting parameters from defaults.properties:
    [java] 11:17:26,655 DEBUG startup:144 - - impl: url:/dto/ = org.directwebremoting.servlet.DtoHandler
    [java] 11:17:26,658 DEBUG startup:144 - - impl: url:/data/Store.js = org.directwebremoting.dojo.DwrStoreHandler
    [java] 11:17:26,666 DEBUG startup:144 - - impl: url:/call/plaincall/ = org.directwebremoting.dwrp.PlainCallHandler
    [java] 11:17:26,667 DEBUG startup:144 - - impl: url:/webwork/DWRActionUtil.js = org.directwebremoting.webwork.WebworkUtilHandler
    [java] 11:17:26,671 DEBUG startup:144 - - impl: org.directwebremoting.extend.Remoter = org.directwebremoting.impl.DefaultRemoter
    [java] 11:17:26,673 DEBUG startup:144 - - impl: org.directwebremoting.WebContextFactory$WebContextBuilder = org.directwebremoting.impl.DefaultWebContextBuilder
    [java] 11:17:26,674 DEBUG startup:144 - - impl: url:/about = org.directwebremoting.servlet.AboutHandler
    [java] 11:17:26,674 DEBUG startup:140 - - value: htmlPollHandlerUrl = /call/htmlpoll/
    [java] 11:17:26,675 DEBUG startup:144 - - impl: url:/dtoall.js = org.directwebremoting.servlet.DtoAllHandler
    [java] 11:17:26,676 DEBUG startup:140 - - value: indexHandlerUrl = /index.html
    [java] 11:17:26,749 DEBUG startup:144 - - impl: url:/call/plainpoll/ = org.directwebremoting.dwrp.PlainPollHandler
    [java] 11:17:26,750 DEBUG startup:140 - - value: utilHandlerUrl = /util.js
    [java] 11:17:26,751 DEBUG startup:140 - - value: org.directwebremoting.extend.Compressor = org.directwebremoting.impl.YahooJSCompressor, org.directwebremoting.impl.ShrinkSafeCompressor, org.directwebremoting.impl.LegacyCompressor, org.directwebremoting.impl.NullCompressor
    [java] 11:17:26,754 DEBUG startup:144 - - impl: url:/jsonrpc = org.directwebremoting.jsonrpc.JsonRpcCallHandler
    [java] 11:17:26,756 DEBUG startup:144 - - impl: url:/call/htmlcall/ = org.directwebremoting.dwrp.HtmlCallHandler
    [java] 11:17:26,757 DEBUG startup:140 - - value: maxWaitAfterWrite = 500
    [java] 11:17:26,758 DEBUG startup:140 - - value: generateDtoClasses = interface
    [java] 11:17:26,759 DEBUG startup:140 - - value: downloadHandlerUrl = /download/
    [java] 11:17:26,761 DEBUG startup:140 - - value: engineHandlerUrl = /engine.js
    [java] 11:17:26,763 DEBUG startup:144 - - impl: url:/util.js = org.directwebremoting.ui.servlet.UtilHandler
    [java] 11:17:26,764 DEBUG startup:144 - - impl: url:/call/htmlpoll/ = org.directwebremoting.dwrp.HtmlPollHandler
    [java] 11:17:26,767 DEBUG startup:144 - - impl: url:/jsonp/ = org.directwebremoting.jsonp.JsonpCallHandler
    [java] 11:17:26,771 DEBUG startup:144 - - impl: org.directwebremoting.HubFactory$HubBuilder = org.directwebremoting.impl.DefaultHubBuilder
    [java] 11:17:26,772 DEBUG startup:144 - - impl: url:/gi.js = org.directwebremoting.gi.GiHandler
    [java] 11:17:26,775 DEBUG startup:144 - - impl: org.directwebremoting.servlet.UrlProcessor = org.directwebremoting.servlet.UrlProcessor
    [java] 11:17:26,779 DEBUG startup:144 - - impl: org.directwebremoting.extend.CreatorManager = org.directwebremoting.impl.DefaultCreatorManager
    [java] 11:17:26,781 DEBUG startup:144 - - impl: url:/download/ = org.directwebremoting.servlet.DownloadHandler
    [java] 11:17:26,783 DEBUG startup:144 - - impl: org.directwebremoting.json.serialize.JsonSerializerFactory$JsonSerializerBuilder = org.directwebremoting.json.serialize.local.LocalJsonSerializerBuilder
    [java] 11:17:26,785 DEBUG startup:144 - - impl: org.directwebremoting.json.parse.JsonParserFactory$JsonParserBuilder = org.directwebremoting.json.parse.javacc.JavaccJsonParserBuilder
    [java] 11:17:26,788 DEBUG startup:144 - - impl: url:/monitor/ = org.directwebremoting.servlet.MonitorHandler
    [java] 11:17:26,792 DEBUG startup:144 - - impl: org.directwebremoting.extend.DebugPageGenerator = org.directwebremoting.impl.DefaultDebugPageGenerator
    [java] 11:17:26,792 DEBUG startup:140 - - value: plainCallHandlerUrl = /call/plaincall/
    [java] 11:17:26,794 DEBUG startup:144 - - impl: org.directwebremoting.extend.AjaxFilterManager = org.directwebremoting.impl.DefaultAjaxFilterManager
    [java] 11:17:26,802 DEBUG startup:144 - - impl: org.directwebremoting.extend.ConverterManager = org.directwebremoting.impl.DefaultConverterManager
    [java] 11:17:26,804 DEBUG startup:140 - - value: interfaceHandlerUrl = /interface/
    [java] 11:17:26,806 DEBUG startup:144 - - impl: org.directwebremoting.extend.PageNormalizer = org.directwebremoting.impl.DefaultPageNormalizer
    [java] 11:17:26,807 DEBUG startup:144 - - impl: url:/test/ = org.directwebremoting.servlet.TestHandler
    [java] 11:17:26,808 DEBUG startup:140 - - value: dtoAllHandlerUrl = /dtoall.js
    [java] 11:17:26,813 DEBUG startup:144 - - impl: org.directwebremoting.extend.DownloadManager = org.directwebremoting.impl.InMemoryDownloadManager
    [java] 11:17:26,815 DEBUG startup:144 - - impl: org.directwebremoting.ServerContextFactory$ServerContextBuilder = org.directwebremoting.impl.DefaultServerContextBuilder
    [java] 11:17:26,815 DEBUG startup:140 - - value: org.directwebremoting.extend.ContainerAbstraction = org.directwebremoting.server.servlet3.Servlet3ContainerAbstraction, org.directwebremoting.server.jetty.JettyContainerAbstraction, org.directwebremoting.server.grizzly.GrizzlyContainerAbstraction, org.directwebremoting.server.tomcat.TomcatContainerAbstraction, org.directwebremoting.server.servlet2.Servlet2ContainerAbstraction
    [java] 11:17:26,817 DEBUG startup:144 - - impl: url:/engine.js = org.directwebremoting.servlet.EngineHandler
    [java] 11:17:26,819 DEBUG startup:144 - - impl: org.directwebremoting.extend.AccessControl = org.directwebremoting.impl.DefaultAccessControl
    [java] 11:17:26,823 DEBUG startup:144 - - impl: org.directwebremoting.extend.ScriptSessionManager = org.directwebremoting.impl.DefaultScriptSessionManager
    [java] 11:17:26,823 DEBUG startup:140 - - value: htmlCallHandlerUrl = /call/htmlcall/
    [java] 11:17:26,824 DEBUG startup:144 - - impl: url:/index.html = org.directwebremoting.servlet.IndexHandler
    [java] 11:17:26,824 DEBUG startup:140 - - value: testHandlerUrl = /test/
    [java] 11:17:26,828 DEBUG startup:144 - - impl: org.directwebremoting.extend.TaskDispatcherFactory$TaskDispatcherBuilder = org.directwebremoting.impl.DefaultTaskDispatcherBuilder
    [java] 11:17:26,828 DEBUG startup:140 - - value: dtoHandlerUrl = /dto/
    [java] 11:17:26,830 DEBUG startup:144 - - impl: org.directwebremoting.extend.CallbackHelperFactory$CallbackHelperBuilder = org.directwebremoting.impl.DefaultCallbackHelperBuilder
    [java] 11:17:26,830 DEBUG startup:140 - - value: plainPollHandlerUrl = /call/plainpoll/
    [java] 11:17:26,831 DEBUG startup:140 - - value: scriptTagProtection = throw 'allowScriptTagRemoting is false.';
    [java] 11:17:26,836 DEBUG startup:144 - - impl: java.util.concurrent.ScheduledThreadPoolExecutor = org.directwebremoting.impl.AutoShutdownScheduledThreadPoolExecutor
    [java] 11:17:26,838 DEBUG startup:144 - - impl: url:/interface/ = org.directwebremoting.servlet.InterfaceHandler
    [java] 11:17:26,838 DEBUG startup:249 - Setup: Getting parameters from environment:
    [java] 11:17:26,838 DEBUG startup:144 - - impl: org.directwebremoting.Container = org.directwebremoting.impl.DefaultContainer
    [java] 11:17:26,838 DEBUG startup:144 - - impl: javax.servlet.ServletConfig = org.mortbay.jetty.servlet.ServletHolder$Config
    [java] 11:17:26,839 DEBUG startup:144 - - impl: javax.servlet.ServletContext = org.mortbay.jetty.servlet.Context$SContext
    [java] 11:17:26,839 DEBUG startup:254 - Setup: Getting parameters from ServletConfig:
    [java] 11:17:26,839 DEBUG startup:140 - - value: jsonpEnabled = true
    [java] 11:17:26,840 DEBUG startup:140 - - value: activeReverseAjaxEnabled = true
    [java] 11:17:26,840 DEBUG startup:140 - - value: maxWaitAfterWrite = -1
    [java] 11:17:26,841 DEBUG startup:140 - - value: debug = true
    [java] 11:17:26,841 DEBUG startup:140 - - value: jsonRpcEnabled = true
    [java] 11:17:26,843 DEBUG startup:140 - - value: initApplicationScopeCreatorsAtStartup = true
    [java] 11:17:26,843 DEBUG startup:140 - - value: preferDataUrlSchema = false
    [java] 11:17:26,843 DEBUG startup:257 - Setup: Applying long versions of shortcut parameters:
    [java] 11:17:26,844 DEBUG startup:260 - Setup: Resolving multiple implementations:
    [java] 11:17:26,845 DEBUG startup:393 - - Selecting a Compressor from org.directwebremoting.impl.YahooJSCompressor, org.directwebremoting.impl.ShrinkSafeCompressor, org.directwebremoting.impl.LegacyCompressor, org.directwebremoting.impl.NullCompressor
    [java] 11:17:26,846 DEBUG startup:422 - - Can't use : org.directwebremoting.impl.YahooJSCompressor to implement org.directwebremoting.extend.Compressor. This is probably not an error unless you were expecting to use it. Reason: java.lang.NoClassDefFoundError: org/mozilla/javascript/ErrorReporter
    [java] 11:17:26,848 DEBUG startup:422 - - Can't use : org.directwebremoting.impl.ShrinkSafeCompressor to implement org.directwebremoting.extend.Compressor. This is probably not an error unless you were expecting to use it. Reason: java.lang.NoClassDefFoundError: org/mozilla/javascript/ErrorReporter
    [java] 11:17:26,849 DEBUG startup:144 - - impl: org.directwebremoting.extend.Compressor = org.directwebremoting.impl.LegacyCompressor
    [java] 11:17:26,850 DEBUG startup:342 - - Selecting a ContainerAbstraction from org.directwebremoting.server.servlet3.Servlet3ContainerAbstraction, org.directwebremoting.server.jetty.JettyContainerAbstraction, org.directwebremoting.server.grizzly.GrizzlyContainerAbstraction, org.directwebremoting.server.tomcat.TomcatContainerAbstraction, org.directwebremoting.server.servlet2.Servlet2ContainerAbstraction
    [java] 11:17:26,852 DEBUG startup:144 - - impl: org.directwebremoting.extend.ContainerAbstraction = org.directwebremoting.server.jetty.JettyContainerAbstraction
    [java] 11:17:26,853 DEBUG startup:144 - - impl: org.directwebremoting.extend.ServerLoadMonitor = org.directwebremoting.impl.ThreadDroppingServerLoadMonitor
    [java] 11:17:26,854 DEBUG startup:263 - Setup: Autowire beans
    [java] 11:17:26,854 DEBUG startup:213 - - autowire: org.directwebremoting.impl.AutoShutdownScheduledThreadPoolExecutor
    [java] 11:17:26,856 DEBUG startup:265 - - no properties for: continueExistingPeriodicTasksAfterShutdownPolicy
    [java] 11:17:26,856 DEBUG startup:265 - - no properties for: executeExistingDelayedTasksAfterShutdownPolicy
    [java] 11:17:26,857 DEBUG startup:265 - - no properties for: corePoolSize
    [java] 11:17:26,857 DEBUG startup:265 - - no properties for: maximumPoolSize
    [java] 11:17:26,859 DEBUG startup:265 - - no properties for: rejectedExecutionHandler
    [java] 11:17:26,859 DEBUG startup:265 - - no properties for: threadFactory
    [java] 11:17:26,859 DEBUG startup:207 - - skipping injecting into: org.mortbay.jetty.servlet.ServletHolder$Config
    [java] 11:17:26,861 DEBUG startup:207 - - skipping injecting into: org.mortbay.jetty.servlet.Context$SContext
    [java] 11:17:26,861 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultContainer
    [java] 11:17:26,862 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultHubBuilder
    [java] 11:17:26,863 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultServerContextBuilder
    [java] 11:17:26,863 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultWebContextBuilder
    [java] 11:17:26,863 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultAccessControl
    [java] 11:17:26,864 DEBUG startup:265 - - no properties for: exposeInternals
    [java] 11:17:26,864 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultAjaxFilterManager
    [java] 11:17:26,865 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultCallbackHelperBuilder
    [java] 11:17:26,865 DEBUG startup:213 - - autowire: org.directwebremoting.impl.LegacyCompressor
    [java] 11:17:26,866 DEBUG startup:265 - - no properties for: compressionLevel
    [java] 11:17:26,866 DEBUG startup:213 - - autowire: org.directwebremoting.server.jetty.JettyContainerAbstraction
    [java] 11:17:26,866 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultConverterManager
    [java] 11:17:26,868 DEBUG startup:265 - - no properties for: converters
    [java] 11:17:26,868 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultCreatorManager
    [java] 11:17:26,871 DEBUG startup:243 - - by name: debug = true
    [java] 11:17:26,872 DEBUG startup:265 - - no properties for: creators
    [java] 11:17:26,872 DEBUG startup:243 - - by name: initApplicationScopeCreatorsAtStartup = true
    [java] 11:17:26,872 DEBUG startup:259 - - by type: servletContext = org.mortbay.jetty.servlet.Context$SContext
    [java] 11:17:26,872 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultDebugPageGenerator
    [java] 11:17:26,873 DEBUG startup:259 - - by type: converterManager = org.directwebremoting.impl.DefaultConverterManager
    [java] 11:17:26,873 DEBUG startup:259 - - by type: creatorManager = org.directwebremoting.impl.DefaultCreatorManager
    [java] 11:17:26,874 DEBUG startup:259 - - by type: accessControl = org.directwebremoting.impl.DefaultAccessControl
    [java] 11:17:26,875 DEBUG startup:232 - - by name: engineHandlerUrl = /engine.js
    [java] 11:17:26,876 DEBUG startup:232 - - by name: utilHandlerUrl = /util.js
    [java] 11:17:26,876 DEBUG startup:232 - - by name: testHandlerUrl = /test/
    [java] 11:17:26,877 DEBUG startup:232 - - by name: interfaceHandlerUrl = /interface/
    [java] 11:17:26,878 DEBUG startup:213 - - autowire: org.directwebremoting.impl.InMemoryDownloadManager
    [java] 11:17:26,879 DEBUG startup:265 - - no properties for: downloadRequestsBeforeRemove
    [java] 11:17:26,879 DEBUG startup:259 - - by type: scheduledThreadPoolExecutor = org.directwebremoting.impl.AutoShutdownScheduledThreadPoolExecutor
    [java] 11:17:26,882 DEBUG startup:232 - - by name: downloadHandlerUrl = /download/
    [java] 11:17:26,882 DEBUG startup:265 - - no properties for: purgeDownloadsAfter
    [java] 11:17:26,882 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultPageNormalizer
    [java] 11:17:26,882 DEBUG startup:265 - - no properties for: welcomeFiles
    [java] 11:17:26,884 DEBUG startup:259 - - by type: servletContext = org.mortbay.jetty.servlet.Context$SContext
    [java] 11:17:26,885 DEBUG startup:265 - - no properties for: welcomeFileList
    [java] 11:17:26,885 DEBUG startup:265 - - no properties for: normalizeIncludesQueryString
    [java] 11:17:26,885 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultRemoter
    [java] 11:17:26,888 DEBUG startup:243 - - by name: debug = true
    [java] 11:17:26,889 DEBUG startup:259 - - by type: converterManager = org.directwebremoting.impl.DefaultConverterManager
    [java] 11:17:26,889 DEBUG startup:259 - - by type: creatorManager = org.directwebremoting.impl.DefaultCreatorManager
    [java] 11:17:26,889 DEBUG startup:265 - - no properties for: useAbsolutePath
    [java] 11:17:26,889 DEBUG startup:259 - - by type: accessControl = org.directwebremoting.impl.DefaultAccessControl
    [java] 11:17:26,890 DEBUG startup:259 - - by type: ajaxFilterManager = org.directwebremoting.impl.DefaultAjaxFilterManager
    [java] 11:17:26,890 DEBUG startup:265 - - no properties for: overridePath
    [java] 11:17:26,890 DEBUG startup:265 - - no properties for: allowImpossibleTests
    [java] 11:17:26,891 DEBUG startup:265 - - no properties for: maxCallCount
    [java] 11:17:26,892 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultScriptSessionManager
    [java] 11:17:26,893 DEBUG startup:259 - - by type: pageNormalizer = org.directwebremoting.impl.DefaultPageNormalizer
    [java] 11:17:26,894 DEBUG startup:259 - - by type: scheduledThreadPoolExecutor = org.directwebremoting.impl.AutoShutdownScheduledThreadPoolExecutor
    [java] 11:17:26,894 DEBUG startup:265 - - no properties for: scriptSessionTimeout
    [java] 11:17:26,894 DEBUG startup:265 - - no properties for: scriptSessionCheckTime
    [java] 11:17:26,896 DEBUG startup:213 - - autowire: org.directwebremoting.impl.ThreadDroppingServerLoadMonitor
    [java] 11:17:26,897 DEBUG startup:265 - - no properties for: maxHitsPerSecond
    [java] 11:17:26,898 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultTaskDispatcherBuilder
    [java] 11:17:26,898 DEBUG startup:213 - - autowire: org.directwebremoting.json.parse.javacc.JavaccJsonParserBuilder
    [java] 11:17:26,898 DEBUG startup:213 - - autowire: org.directwebremoting.json.serialize.local.LocalJsonSerializerBuilder
    [java] 11:17:26,899 DEBUG startup:213 - - autowire: org.directwebremoting.servlet.UrlProcessor
    [java] 11:17:26,900 DEBUG startup:232 - - by name: indexHandlerUrl = /index.html
    [java] 11:17:26,900 DEBUG startup:213 - - autowire: org.directwebremoting.servlet.AboutHandler
    [java] 11:17:26,901 DEBUG startup:213 - - autowire: org.directwebremoting.dwrp.HtmlCallHandler
    [java] 11:17:26,901 DEBUG startup:259 - - by type: remoter = org.directwebremoting.impl.DefaultRemoter
    [java] 11:17:26,901 DEBUG startup:243 - - by name: debug = true
    [java] 11:17:26,902 DEBUG startup:265 - - no properties for: debugScriptOutput
    [java] 11:17:26,903 DEBUG startup:265 - - no properties for: jsonOutput
    [java] 11:17:26,904 DEBUG startup:259 - - by type: pageNormalizer = org.directwebremoting.impl.DefaultPageNormalizer
    [java] 11:17:26,904 DEBUG startup:259 - - by type: converterManager = org.directwebremoting.impl.DefaultConverterManager
    [java] 11:17:26,904 DEBUG startup:259 - - by type: creatorManager = org.directwebremoting.impl.DefaultCreatorManager
    [java] 11:17:26,904 DEBUG startup:265 - - no properties for: crossDomainSessionSecurity
    [java] 11:17:26,905 DEBUG startup:265 - - no properties for: allowGetForSafariButMakeForgeryEasier
    [java] 11:17:26,906 DEBUG startup:265 - - no properties for: sessionCookieName
    [java] 11:17:26,906 DEBUG startup:213 - - autowire: org.directwebremoting.dwrp.HtmlPollHandler
    [java] 11:17:26,908 DEBUG startup:265 - - no properties for: jsonOutput
    [java] 11:17:26,908 DEBUG startup:259 - - by type: pageNormalizer = org.directwebremoting.impl.DefaultPageNormalizer
    [java] 11:17:26,908 DEBUG startup:259 - - by type: converterManager = org.directwebremoting.impl.DefaultConverterManager
    [java] 11:17:26,909 DEBUG startup:265 - - no properties for: pollAndCometEnabled
    [java] 11:17:26,909 DEBUG startup:243 - - by name: activeReverseAjaxEnabled = true
    [java] 11:17:26,910 DEBUG startup:243 - - by name: maxWaitAfterWrite = -1
    [java] 11:17:26,910 DEBUG startup:259 - - by type: serverLoadMonitor = org.directwebremoting.impl.ThreadDroppingServerLoadMonitor
    [java] 11:17:26,910 DEBUG startup:259 - - by type: scriptSessionManager = org.directwebremoting.impl.DefaultScriptSessionManager
    [java] 11:17:26,910 DEBUG startup:259 - - by type: containerAbstraction = org.directwebremoting.server.jetty.JettyContainerAbstraction
    [java] 11:17:26,911 DEBUG startup:259 - - by type: scheduledThreadPoolExecutor = org.directwebremoting.impl.AutoShutdownScheduledThreadPoolExecutor
    [java] 11:17:26,912 DEBUG startup:265 - - no properties for: crossDomainSessionSecurity
    [java] 11:17:26,913 DEBUG startup:265 - - no properties for: allowGetForSafariButMakeForgeryEasier
    [java] 11:17:26,913 DEBUG startup:265 - - no properties for: sessionCookieName
    [java] 11:17:26,913 DEBUG startup:213 - - autowire: org.directwebremoting.dwrp.PlainCallHandler
    [java] 11:17:26,913 DEBUG startup:265 - - no properties for: allowScriptTagRemoting
    [java] 11:17:26,914 DEBUG startup:232 - - by name: scriptTagProtection = throw 'allowScriptTagRemoting is false.';
    [java] 11:17:26,915 DEBUG startup:259 - - by type: remoter = org.directwebremoting.impl.DefaultRemoter
    [java] 11:17:26,915 DEBUG startup:243 - - by name: debug = true
    [java] 11:17:26,916 DEBUG startup:265 - - no properties for: debugScriptOutput
    [java] 11:17:26,918 DEBUG startup:265 - - no properties for: jsonOutput
    [java] 11:17:26,918 DEBUG startup:259 - - by type: pageNormalizer = org.directwebremoting.impl.DefaultPageNormalizer
    [java] 11:17:26,918 DEBUG startup:259 - - by type: converterManager = org.directwebremoting.impl.DefaultConverterManager
    [java] 11:17:26,918 DEBUG startup:259 - - by type: creatorManager = org.directwebremoting.impl.DefaultCreatorManager
    [java] 11:17:26,919 DEBUG startup:265 - - no properties for: crossDomainSessionSecurity
    [java] 11:17:26,919 DEBUG startup:265 - - no properties for: allowGetForSafariButMakeForgeryEasier
    [java] 11:17:26,920 DEBUG startup:265 - - no properties for: sessionCookieName
    [java] 11:17:26,920 DEBUG startup:213 - - autowire: org.directwebremoting.dwrp.PlainPollHandler
    [java] 11:17:26,920 DEBUG startup:265 - - no properties for: jsonOutput
    [java] 11:17:26,920 DEBUG startup:259 - - by type: pageNormalizer = org.directwebremoting.impl.DefaultPageNormalizer
    [java] 11:17:26,921 DEBUG startup:259 - - by type: converterManager = org.directwebremoting.impl.DefaultConverterManager
    [java] 11:17:26,922 DEBUG startup:265 - - no properties for: pollAndCometEnabled
    [java] 11:17:26,923 DEBUG startup:243 - - by name: activeReverseAjaxEnabled = true
    [java] 11:17:26,923 DEBUG startup:243 - - by name: maxWaitAfterWrite = -1
    [java] 11:17:26,923 DEBUG startup:259 - - by type: serverLoadMonitor = org.directwebremoting.impl.ThreadDroppingServerLoadMonitor
    [java] 11:17:26,923 DEBUG startup:259 - - by type: scriptSessionManager = org.directwebremoting.impl.DefaultScriptSessionManager
    [java] 11:17:26,923 DEBUG startup:259 - - by type: containerAbstraction = org.directwebremoting.server.jetty.JettyContainerAbstraction
    [java] 11:17:26,925 DEBUG startup:259 - - by type: scheduledThreadPoolExecutor = org.directwebremoting.impl.AutoShutdownScheduledThreadPoolExecutor
    [java] 11:17:26,926 DEBUG startup:265 - - no properties for: crossDomainSessionSecurity
    [java] 11:17:26,926 DEBUG startup:265 - - no properties for: allowGetForSafariButMakeForgeryEasier
    [java] 11:17:26,929 DEBUG startup:265 - - no properties for: sessionCookieName
    [java] 11:17:26,930 DEBUG startup:213 - - autowire: org.directwebremoting.dojo.DwrStoreHandler
    [java] 11:17:26,930 DEBUG startup:259 - - by type: compressor = org.directwebremoting.impl.LegacyCompressor
    [java] 11:17:26,930 DEBUG startup:243 - - by name: debug = true
    [java] 11:17:26,931 DEBUG startup:265 - - no properties for: mimeType
    [java] 11:17:26,931 DEBUG startup:265 - - no properties for: ignoreLastModified
    [java] 11:17:26,931 DEBUG startup:213 - - autowire: org.directwebremoting.servlet.DownloadHandler
    [java] 11:17:26,931 DEBUG startup:259 - - by type: downloadManager = org.directwebremoting.impl.InMemoryDownloadManager
    [java] 11:17:26,932 DEBUG startup:232 - - by name: downloadHandlerUrl = /download/
    [java] 11:17:26,932 DEBUG startup:213 - - autowire: org.directwebremoting.servlet.DtoHandler
    [java] 11:17:26,932 DEBUG startup:232 - - by name: dtoHandlerUrl = /dto/
    [java] 11:17:26,935 DEBUG startup:232 - - by name: generateDtoClasses = interface
    [java] 11:17:26,936 DEBUG startup:259 - - by type: remoter = org.directwebremoting.impl.DefaultRemoter
    [java] 11:17:26,936 DEBUG startup:259 - - by type: compressor = org.directwebremoting.impl.LegacyCompressor
    [java] 11:17:26,936 DEBUG startup:243 - - by name: debug = true
    [java] 11:17:26,936 DEBUG startup:265 - - no properties for: mimeType
    [java] 11:17:26,937 DEBUG startup:265 - - no properties for: ignoreLastModified
    [java] 11:17:26,937 DEBUG startup:213 - - autowire: org.directwebremoting.servlet.DtoAllHandler
    [java] 11:17:26,937 DEBUG startup:232 - - by name: generateDtoClasses = interface
    [java] 11:17:26,938 DEBUG startup:259 - - by type: remoter = org.directwebremoting.impl.DefaultRemoter
    [java] 11:17:26,939 DEBUG startup:259 - - by type: compressor = org.directwebremoting.impl.LegacyCompressor
    [java] 11:17:26,939 DEBUG startup:243 - - by name: debug = true
    [java] 11:17:26,939 DEBUG startup:265 - - no properties for: mimeType
    [java] 11:17:26,940 DEBUG startup:265 - - no properties for: ignoreLastModified
    [java] 11:17:26,940 DEBUG startup:213 - - autowire: org.directwebremoting.servlet.EngineHandler
    [java] 11:17:26,940 DEBUG startup:259 - - by type: remoter = org.directwebremoting.impl.DefaultRemoter
    [java] 11:17:26,940 DEBUG startup:232 - - by name: scriptTagProtection = throw 'allowScriptTagRemoting is false.';
    [java] 11:17:26,940 DEBUG startup:265 - - no properties for: allowGetForSafariButMakeForgeryEasier
    [java] 11:17:26,941 DEBUG startup:265 - - no properties for: sessionCookieName
    [java] 11:17:26,941 DEBUG startup:243 - - by name: maxWaitAfterWrite = -1
    [java] 11:17:26,941 DEBUG startup:259 - - by type: serverLoadMonitor = org.directwebremoting.impl.ThreadDroppingServerLoadMonitor
    [java] 11:17:26,941 DEBUG startup:259 - - by type: scriptSessionManager = org.directwebremoting.impl.DefaultScriptSessionManager
    [java] 11:17:26,942 DEBUG startup:232 - - by name: plainCallHandlerUrl = /call/plaincall/
    [java] 11:17:26,942 DEBUG startup:232 - - by name: plainPollHandlerUrl = /call/plainpoll/
    [java] 11:17:26,943 DEBUG startup:232 - - by name: htmlCallHandlerUrl = /call/htmlcall/
    [java] 11:17:26,943 DEBUG startup:232 - - by name: htmlPollHandlerUrl = /call/htmlpoll/
    [java] 11:17:26,943 DEBUG startup:259 - - by type: compressor = org.directwebremoting.impl.LegacyCompressor
    [java] 11:17:26,944 DEBUG startup:243 - - by name: debug = true
    [java] 11:17:26,944 DEBUG startup:265 - - no properties for: mimeType
    [java] 11:17:26,945 DEBUG startup:265 - - no properties for: ignoreLastModified
    [java] 11:17:26,946 DEBUG startup:213 - - autowire: org.directwebremoting.gi.GiHandler
    [java] 11:17:26,946 DEBUG startup:259 - - by type: compressor = org.directwebremoting.impl.LegacyCompressor
    [java] 11:17:26,946 DEBUG startup:243 - - by name: debug = true
    [java] 11:17:26,946 DEBUG startup:265 - - no properties for: mimeType
    [java] 11:17:26,947 DEBUG startup:265 - - no properties for: ignoreLastModified
    [java] 11:17:26,947 DEBUG startup:213 - - autowire: org.directwebremoting.servlet.IndexHandler
    [java] 11:17:26,947 DEBUG startup:259 - - by type: debugPageGenerator = org.directwebremoting.impl.DefaultDebugPageGenerator
    [java] 11:17:26,948 DEBUG startup:213 - - autowire: org.directwebremoting.servlet.InterfaceHandler
    [java] 11:17:26,948 DEBUG startup:232 - - by name: generateDtoClasses = interface
    [java] 11:17:26,948 DEBUG startup:232 - - by name: interfaceHandlerUrl = /interface/
    [java] 11:17:26,948 DEBUG startup:259 - - by type: remoter = org.directwebremoting.impl.DefaultRemoter
    [java] 11:17:26,949 DEBUG startup:259 - - by type: compressor = org.directwebremoting.impl.LegacyCompressor
    [java] 11:17:26,949 DEBUG startup:243 - - by name: debug = true
    [java] 11:17:26,949 DEBUG startup:265 - - no properties for: mimeType
    [java] 11:17:26,949 DEBUG startup:265 - - no properties for: ignoreLastModified
    [java] 11:17:26,949 DEBUG startup:213 - - autowire: org.directwebremoting.jsonp.JsonpCallHandler
    [java] 11:17:26,950 DEBUG startup:259 - - by type: remoter = org.directwebremoting.impl.DefaultRemoter
    [java] 11:17:26,950 DEBUG startup:259 - - by type: converterManager = org.directwebremoting.impl.DefaultConverterManager
    [java] 11:17:26,950 DEBUG startup:259 - - by type: creatorManager = org.directwebremoting.impl.DefaultCreatorManager
    [java] 11:17:26,953 DEBUG startup:259 - - by type: accessControl = org.directwebremoting.impl.DefaultAccessControl
    [java] 11:17:26,953 DEBUG startup:243 - - by name: jsonpEnabled = true
    [java] 11:17:26,953 DEBUG startup:213 - - autowire: org.directwebremoting.jsonrpc.JsonRpcCallHandler
    [java] 11:17:26,954 DEBUG startup:259 - - by type: remoter = org.directwebremoting.impl.DefaultRemoter
    [java] 11:17:26,954 DEBUG startup:259 - - by type: converterManager = org.directwebremoting.impl.DefaultConverterManager
    [java] 11:17:26,954 DEBUG startup:259 - - by type: creatorManager = org.directwebremoting.impl.DefaultCreatorManager
    [java] 11:17:26,954 DEBUG startup:259 - - by type: accessControl = org.directwebremoting.impl.DefaultAccessControl
    [java] 11:17:26,955 DEBUG startup:243 - - by name: jsonRpcEnabled = true
    [java] 11:17:26,955 DEBUG startup:213 - - autowire: org.directwebremoting.servlet.MonitorHandler
    [java] 11:17:26,955 DEBUG startup:243 - - by name: debug = true
    [java] 11:17:26,955 DEBUG startup:213 - - autowire: org.directwebremoting.servlet.TestHandler
    [java] 11:17:26,956 DEBUG startup:232 - - by name: testHandlerUrl = /test/
    [java] 11:17:26,956 DEBUG startup:259 - - by type: debugPageGenerator = org.directwebremoting.impl.DefaultDebugPageGenerator
    [java] 11:17:26,956 DEBUG startup:213 - - autowire: org.directwebremoting.ui.servlet.UtilHandler
    [java] 11:17:26,956 DEBUG startup:259 - - by type: compressor = org.directwebremoting.impl.LegacyCompressor
    [java] 11:17:26,957 DEBUG startup:243 - - by name: debug = true
    [java] 11:17:26,957 DEBUG startup:265 - - no properties for: mimeType
    [java] 11:17:26,957 DEBUG startup:265 - - no properties for: ignoreLastModified
    [java] 11:17:26,957 DEBUG startup:213 - - autowire: org.directwebremoting.webwork.WebworkUtilHandler
    [java] 11:17:26,959 DEBUG startup:259 - - by type: compressor = org.directwebremoting.impl.LegacyCompressor
    [java] 11:17:26,959 DEBUG startup:243 - - by name: debug = true
    [java] 11:17:26,960 DEBUG startup:265 - - no properties for: mimeType
    [java] 11:17:26,960 DEBUG startup:265 - - no properties for: ignoreLastModified
    [java] 11:17:26,961 DEBUG startup:266 - Setup: Resolving listener implementations:
    [java] 11:17:26,962 DEBUG startup:441 - - No implementations of ScriptSessionListener to register
    [java] 11:17:26,962 DEBUG startup:269 - Setup: Initializing Factories:
    [java] 11:17:26,965 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultServerContext
    [java] 11:17:26,965 DEBUG startup:259 - - by type: servletContext = org.mortbay.jetty.servlet.Context$SContext
    [java] 11:17:26,965 DEBUG startup:259 - - by type: container = org.directwebremoting.impl.DefaultContainer
    [java] 11:17:26,965 DEBUG startup:259 - - by type: servletConfig = org.mortbay.jetty.servlet.ServletHolder$Config
    [java] 11:17:26,967 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultHub
    [java] 11:17:26,976 DEBUG startup:213 - - autowire: org.directwebremoting.json.parse.javacc.JavaccJsonParser
    [java] 11:17:26,977 DEBUG startup:213 - - autowire: org.directwebremoting.json.serialize.local.LocalJsonSerializer
    [java] 11:17:26,978 DEBUG startup:259 - - by type: converterManager = org.directwebremoting.impl.DefaultConverterManager
    [java] 11:17:26,980 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultCallbackHelper
    [java] 11:17:26,982 DEBUG startup:213 - - autowire: org.directwebremoting.impl.DefaultTaskDispatcher
    [java] 11:17:26,982 DEBUG startup:259 - - by type: scriptSessionManager = org.directwebremoting.impl.DefaultScriptSessionManager
    [java] 11:17:26,982 DEBUG startup:760 - Adding to contextMap, a serverContext called dwr-invoker
    [java] 11:17:26,986 DEBUG startup:106 - Configuring from class resource: /org/directwebremoting/dwr.xml
    [java] 11:17:27,003 DEBUG startup:55 - - adding creator type: none = class org.directwebremoting.create.NullCreator
    [java] 11:17:27,005 DEBUG startup:55 - - adding creator type: new = class org.directwebremoting.create.NewCreator
    [java] 11:17:27,007 DEBUG LocalUtil:1081 - Skipping 'pageflow' due to ClassNotFoundException on org.directwebremoting.beehive.PageFlowCreator. Cause: Beehive/Weblogic jar file not available.
    [java] 11:17:27,012 DEBUG LocalUtil:1065 - Skipping 'spring' due to NoClassDefFoundError on org.directwebremoting.spring.SpringCreator. Cause: org/springframework/beans/factory/BeanFactory
    [java] 11:17:27,015 DEBUG LocalUtil:1065 - Skipping 'script' due to NoClassDefFoundError on org.directwebremoting.create.ScriptedCreator. Cause: org/apache/bsf/BSFException
    [java] 11:17:27,017 DEBUG startup:61 - Failed to find Struts 1.2 ModuleUtils code. Falling back to 1.1 based code
    [java] 11:17:27,017 DEBUG startup:55 - - adding creator type: struts = class org.directwebremoting.struts.StrutsCreator
    [java] 11:17:27,019 DEBUG startup:64 - - adding converter type: null = org.directwebremoting.convert.NullConverter
    [java] 11:17:27,020 DEBUG startup:64 - - adding converter type: enum = org.directwebremoting.convert.EnumConverter
    [java] 11:17:27,021 DEBUG startup:64 - - adding converter type: primitive = org.directwebremoting.convert.PrimitiveConverter
    [java] 11:17:27,023 DEBUG startup:64 - - adding converter type: bignumber = org.directwebremoting.convert.BigNumberConverter
    [java] 11:17:27,024 DEBUG startup:64 - - adding converter type: string = org.directwebremoting.convert.StringConverter
    [java] 11:17:27,027 DEBUG startup:64 - - adding converter type: array = org.directwebremoting.convert.ArrayConverter
    [java] 11:17:27,034 DEBUG startup:64 - - adding converter type: map = org.directwebremoting.convert.MapConverter
    [java] 11:17:27,035 DEBUG startup:64 - - adding converter type: collection = org.directwebremoting.convert.CollectionConverter
    [java] 11:17:27,037 DEBUG startup:64 - - adding converter type: date = org.directwebremoting.convert.DateConverter
    [java] 11:17:27,042 DEBUG startup:64 - - adding converter type: dom = org.directwebremoting.convert.DOMConverter
    [java] 11:17:27,046 DEBUG startup:64 - - adding converter type: dom4j = org.directwebremoting.convert.DOM4JConverter
    [java] 11:17:27,047 DEBUG startup:64 - - adding converter type: jdom = org.directwebremoting.convert.JDOMConverter
    [java] 11:17:27,048 DEBUG startup:64 - - adding converter type: xom = org.directwebremoting.convert.XOMConverter
    [java] 11:17:27,049 DEBUG startup:64 - - adding converter type: servlet = org.directwebremoting.convert.ServletConverter
    [java] 11:17:27,053 DEBUG startup:64 - - adding converter type: bean = org.directwebremoting.convert.BeanConverter
    [java] 11:17:27,054 DEBUG startup:64 - - adding converter type: object = org.directwebremoting.convert.ObjectConverter
    [java] 11:17:27,055 DEBUG startup:64 - - adding converter type: hibernate2 = org.directwebremoting.hibernate.H2BeanConverter
    [java] 11:17:27,057 DEBUG startup:64 - - adding converter type: hibernate3 = org.directwebremoting.hibernate.H3BeanConverter
    [java] 11:17:27,058 DEBUG startup:64 - - adding converter type: url = org.directwebremoting.convert.URLConverter
    [java] 11:17:27,059 DEBUG startup:64 - - adding converter type: exception = org.directwebremoting.convert.ExceptionConverter
    [java] 11:17:27,060 DEBUG startup:64 - - adding converter type: miniException = org.directwebremoting.convert.MinimalistExceptionConverter
    [java] 11:17:27,062 DEBUG startup:64 - - adding converter type: file = org.directwebremoting.convert.FileConverter
    [java] 11:17:27,063 DEBUG startup:64 - - adding converter type: context = org.directwebremoting.convert.ContextConverter
    [java] 11:17:27,063 DEBUG startup:64 - - adding converter type: stringWrapper = org.directwebremoting.convert.StringWrapperConverter
    [java] 11:17:27,064 DEBUG startup:64 - - adding converter type: raw = org.directwebremoting.convert.RawConverter
    [java] 11:17:27,066 DEBUG startup:64 - - adding converter type: proxyFunction = org.directwebremoting.convert.JavascriptFunctionConverter
    [java] 11:17:27,067 DEBUG startup:64 - - adding converter type: proxyObject = org.directwebremoting.convert.JavascriptObjectConverter
    [java] 11:17:27,068 DEBUG startup:64 - - adding converter type: proxyInterface = org.directwebremoting.convert.ProxyInterfaceConverter
    [java] 11:17:27,070 DEBUG startup:64 - - adding converter type: locale = org.directwebremoting.convert.LocaleConverter
    [java] 11:17:27,071 DEBUG startup:64 - - adding converter type: currency = org.directwebremoting.convert.CurrencyConverter
    [java] 11:17:27,072 DEBUG startup:64 - - adding converter type: jsx3uri = jsx3.net.URIResolverConverter
    [java] 11:17:27,073 DEBUG startup:64 - - adding converter type: jsx3doc = jsx3.xml.CdfDocumentConverter
    [java] 11:17:27,076 DEBUG startup:114 - - adding converter: NullConverter for void
    [java] 11:17:27,077 DEBUG startup:114 - - adding converter: NullConverter for java.lang.Void
    [java] 11:17:27,077 DEBUG startup:114 - - adding converter: MinimalistExceptionConverter for java.lang.Throwable
    [java] 11:17:27,078 DEBUG startup:114 - - adding converter: PrimitiveConverter for boolean
    [java] 11:17:27,078 DEBUG startup:114 - - adding converter: PrimitiveConverter for byte
    [java] 11:17:27,078 DEBUG startup:114 - - adding converter: PrimitiveConverter for short
    [java] 11:17:27,079 DEBUG startup:114 - - adding converter: PrimitiveConverter for int
    [java] 11:17:27,079 DEBUG startup:114 - - adding converter: PrimitiveConverter for long
    [java] 11:17:27,080 DEBUG startup:114 - - adding converter: PrimitiveConverter for float
    [java] 11:17:27,081 DEBUG startup:114 - - adding converter: PrimitiveConverter for double
    [java] 11:17:27,081 DEBUG startup:114 - - adding converter: PrimitiveConverter for char
    [java] 11:17:27,082 DEBUG startup:114 - - adding converter: PrimitiveConverter for java.lang.Boolean
    [java] 11:17:27,082 DEBUG startup:114 - - adding converter: PrimitiveConverter for java.lang.Byte
    [java] 11:17:27,083 DEBUG startup:114 - - adding converter: PrimitiveConverter for java.lang.Short
    [java] 11:17:27,084 DEBUG startup:114 - - adding converter: PrimitiveConverter for java.lang.Integer
    [java] 11:17:27,084 DEBUG startup:114 - - adding converter: PrimitiveConverter for java.lang.Long
    [java] 11:17:27,084 DEBUG startup:114 - - adding converter: PrimitiveConverter for java.lang.Float
    [java] 11:17:27,085 DEBUG startup:114 - - adding converter: PrimitiveConverter for java.lang.Double
    [java] 11:17:27,086 DEBUG startup:114 - - adding converter: PrimitiveConverter for java.lang.Character
    [java] 11:17:27,086 DEBUG startup:114 - - adding converter: BigNumberConverter for java.math.BigInteger
    [java] 11:17:27,087 DEBUG startup:114 - - adding converter: BigNumberConverter for java.math.BigDecimal
    [java] 11:17:27,087 DEBUG startup:114 - - adding converter: StringConverter for java.lang.String
    [java] 11:17:27,088 DEBUG startup:114 - - adding converter: DateConverter for java.util.Date
    [java] 11:17:27,088 DEBUG startup:114 - - adding converter: DateConverter for java.sql.Date
    [java] 11:17:27,088 DEBUG startup:114 - - adding converter: DateConverter for java.sql.Time
    [java] 11:17:27,090 DEBUG startup:114 - - adding converter: DateConverter for java.sql.Timestamp
    [java] 11:17:27,090 DEBUG startup:114 - - adding converter: DateConverter for java.util.Calendar
    [java] 11:17:27,091 DEBUG startup:114 - - adding converter: URLConverter for java.net.URL
    [java] 11:17:27,093 DEBUG startup:114 - - adding converter: LocaleConverter for java.util.Locale
    [java] 11:17:27,094 DEBUG startup:114 - - adding converter: CurrencyConverter for java.util.Currency
    [java] 11:17:27,094 DEBUG startup:114 - - adding converter: ArrayConverter for [Z
    [java] 11:17:27,095 DEBUG startup:114 - - adding converter: FileConverter for [B
    [java] 11:17:27,095 DEBUG startup:114 - - adding converter: ArrayConverter for [S
    [java] 11:17:27,096 DEBUG startup:114 - - adding converter: ArrayConverter for [I
    [java] 11:17:27,096 DEBUG startup:114 - - adding converter: ArrayConverter for [J
    [java] 11:17:27,096 DEBUG startup:114 - - adding converter: ArrayConverter for [F
    [java] 11:17:27,097 DEBUG startup:114 - - adding converter: ArrayConverter for [D
    [java] 11:17:27,098 DEBUG startup:114 - - adding converter: ArrayConverter for [C
    [java] 11:17:27,098 DEBUG startup:114 - - adding converter: ArrayConverter for [L*
    [java] 11:17:27,098 DEBUG startup:114 - - adding converter: CollectionConverter for java.util.Collection
    [java] 11:17:27,099 DEBUG startup:114 - - adding converter: MapConverter for java.util.Map
    [java] 11:17:27,101 DEBUG startup:114 - - adding converter: DOMConverter for org.w3c.dom.Node
    [java] 11:17:27,103 DEBUG startup:114 - - adding converter: DOMConverter for org.w3c.dom.Element
    [java] 11:17:27,104 DEBUG startup:114 - - adding converter: DOMConverter for org.w3c.dom.Document
    [java] 11:17:27,105 DEBUG startup:114 - - adding converter: DOM4JConverter for org.dom4j.Document
    [java] 11:17:27,105 DEBUG startup:114 - - adding converter: DOM4JConverter for org.dom4j.Element
    [java] 11:17:27,106 DEBUG startup:114 - - adding converter: DOM4JConverter for org.dom4j.Node
    [java] 11:17:27,106 DEBUG startup:114 - - adding converter: JDOMConverter for org.jdom.Document
    [java] 11:17:27,108 DEBUG startup:114 - - adding converter: JDOMConverter for org.jdom.Element
    [java] 11:17:27,108 DEBUG startup:114 - - adding converter: XOMConverter for nu.xom.Document
    [java] 11:17:27,108 DEBUG startup:114 - - adding converter: XOMConverter for nu.xom.Element
    [java] 11:17:27,109 DEBUG startup:114 - - adding converter: XOMConverter for nu.xom.Node
    [java] 11:17:27,109 DEBUG startup:114 - - adding converter: ServletConverter for javax.servlet.ServletConfig
    [java] 11:17:27,110 DEBUG startup:114 - - adding converter: ServletConverter for javax.servlet.ServletContext
    [java] 11:17:27,111 DEBUG startup:114 - - adding converter: ServletConverter for javax.servlet.http.HttpServletRequest
    [java] 11:17:27,114 DEBUG startup:114 - - adding converter: ServletConverter for javax.servlet.http.HttpServletResponse
    [java] 11:17:27,115 DEBUG startup:114 - - adding converter: ServletConverter for javax.servlet.http.HttpSession
    [java] 11:17:27,115 DEBUG startup:114 - - adding converter: FileConverter for java.io.InputStream
    [java] 11:17:27,118 DEBUG startup:114 - - adding converter: FileConverter for java.awt.image.BufferedImage
    [java] 11:17:27,118 DEBUG startup:114 - - adding converter: URIResolverConverter for jsx3.net.URIResolver
    [java] 11:17:27,119 DEBUG startup:114 - - adding converter: CdfDocumentConverter for jsx3.xml.CdfDocument
    [java] 11:17:27,119 DEBUG startup:114 - - adding converter: ExceptionConverter for org.directwebremoting.io.DwrConvertedException
    [java] 11:17:27,120 DEBUG startup:114 - - adding converter: FileConverter for org.directwebremoting.io.FileTransfer
    [java] 11:17:27,120 DEBUG startup:114 - - adding converter: BeanConverter for org.directwebremoting.io.Item
    [java] 11:17:27,121 DEBUG startup:114 - - adding converter: BeanConverter for org.directwebremoting.io.ItemUpdate
    [java] 11:17:27,122 DEBUG startup:114 - - adding converter: BeanConverter for org.directwebremoting.io.MatchedItems
    [java] 11:17:27,122 DEBUG startup:114 - - adding converter: JavascriptFunctionConverter for org.directwebremoting.io.JavascriptFunction
    [java] 11:17:27,123 DEBUG startup:114 - - adding converter: JavascriptObjectConverter for org.directwebremoting.io.JavascriptObject
    [java] 11:17:27,124 DEBUG startup:114 - - adding converter: RawConverter for org.directwebremoting.io.RawData
    [java] 11:17:27,124 DEBUG startup:114 - - adding converter: BeanConverter for org.directwebremoting.io.StoreRegion
    [java] 11:17:27,125 DEBUG startup:114 - - adding converter: ProxyInterfaceConverter for org.directwebremoting.io.StoreChangeListener
    [java] 11:17:27,127 DEBUG startup:114 - - adding converter: NullConverter for org.directwebremoting.datasync.StoreProvider
    [java] 11:17:27,127 DEBUG startup:114 - - adding converter: BeanConverter for org.directwebremoting.jsonrpc.io.JsonRpcError
    [java] 11:17:27,128 DEBUG startup:114 - - adding converter: BeanConverter for org.directwebremoting.jsonrpc.io.JsonRpcResponse
    [java] 11:17:27,129 DEBUG startup:114 - - adding converter: BeanConverter for org.directwebremoting.io.SortCriterion
    [java] 11:17:27,129 DEBUG startup:114 - - adding converter: StringWrapperConverter for org.directwebremoting.io.StringWrapper
    [java] 11:17:27,131 DEBUG startup:104 - - adding creator: NewCreator for __System
    [java] 11:17:27,132 DEBUG startup:127 - Created new __System, stored in application.
    [java] 11:17:27,133 DEBUG startup:104 - - adding creator: NewCreator for __Data
    [java] 11:17:27,134 DEBUG startup:127 - Created new __Data, stored in application.
    [java] 11:17:27,135 DEBUG startup:80 - Configuring from servlet resource: /WEB-INF/dwr.xml
    [java] 11:17:27,144 DEBUG startup:104 - - adding creator: NewCreator for JavascriptChat
    [java] 11:17:27,146 DEBUG startup:127 - Created new JavascriptChat, stored in application.
    [java] 11:17:27,146 DEBUG startup:114 - - adding converter: BeanConverter for com.sample.gwt.server.dwr.Message
    [java] 11:17:27,147 DEBUG startup:114 - - adding converter: ExceptionConverter for java.lang.Exception
    [java] 11:17:27,147 DEBUG startup:114 - - adding converter: BeanConverter for java.lang.StackTraceElement
    [java] 11:17:27,149 DEBUG startup:657 - Java5 AnnotationsConfigurator enabled

    ************************************************
    In hosted mode browser I have:
    [INFO] Starting Jetty on port 8888
    [INFO] 304 - GET /reverse.html (127.0.0.1)
    [INFO] 304 - GET /reverse.css (127.0.0.1)
    [INFO] 200 - GET /reverse/reverse.nocache.js (127.0.0.1) 4940 bytes
    [INFO] 304 - GET /reverse/clear.cache.gif (127.0.0.1)
    [INFO] 304 - GET /reverse/hosted.html?reverse (127.0.0.1)
    [INFO] 304 - GET /reverse/gwt/standard/standard.css (127.0.0.1)
    [WARN] 404 - GET /reverse/dwr/util.js (127.0.0.1) 1405 bytes
    [WARN] 404 - GET /reverse/dwr/interface/JavascriptChat.js (127.0.0.1) 1425 bytes
    [WARN] 404 - GET /reverse/dwr/engine.js (127.0.0.1) 1407 bytes

    It can't find javascript libraries.

    ************************************************


    Build seems ok:
    Buildfile: E:\prg\reverseGWT\build.xml
    libs:
    javac:
    gwtc:
    [java] Compiling module com.sample.gwt.reverse
    [java] Compiling 5 permutations
    [java] Permutation compile succeeded
    [java] Linking into war
    [java] Link succeeded
    [java] Compilation succeeded -- 25,761s
    build:
    build_war:
    [war] Building war: E:\prg\reverseGWT\reverseGWT.war
    BUILD SUCCESSFUL
    Total time: 28 seconds

    .... but when deployed on Tomcat and running with
    http://localhost:8079/reverseGWT/reverse.html
    ... nothing happen!?
    I didn't find anything at Tomcat 6.0 logs.

    ************************************************
    Can you please answer on these questions too:

    What is this -XstartOnFirstThread for? Is it necessary?

    Why it doesen't find js libraries?

    Log says:Starting: DwrServlet v3.0.0.116.rc1 on jetty-6.1.x / JDK 1.6.0_13 from Sun Microsystems Inc.
    Where is this Yetty specified in code? Does Yetty serves as default HTTP connector in this case?

    Best regards,
    Blaz

    ReplyDelete
  8. commenting out jvmarg value="-XstartOnFirstThread" is fine. It's a mac specific requirement for GWT.

    Ok, so you are not finding these:
    [WARN] 404 - GET /reverse/dwr/util.js (127.0.0.1) 1405 bytes
    [WARN] 404 - GET /reverse/dwr/interface/JavascriptChat.js (127.0.0.1) 1425 bytes
    [WARN] 404 - GET /reverse/dwr/engine.js (127.0.0.1) 1407 bytes

    What's in your onModuleLoad?

    This works for me in hosted mode -

    onModuleLoad() {

    // callbackName = reserveCallback();
    callbackName = "chatGroup1";
    Log.info("onModuleLoad callbackName: " + callbackName);
    addDWRScripts("/reverseGWT/dwr/engine.js");
    addDWRScripts("/reverseGWT/dwr/util.js");
    addDWRScripts("/reverseGWT/dwr/interface/JavascriptChat.js");
    setActiveReverseAjax();
    setupChat(this, callbackName);
    //Log.info(" setupChat: finshed");
    setupChatBox(callbackName);

    }

    Remember in reverse.html you'll need:

    For hosted-

    use src="/reverse/reverse.nocache.js"

    For Tomcat- src="/reverseGWT/reverse/reverse.nocache.js">

    Jetty is the default container for 1.6. It's not Tomcat for hosted mode anymore.

    ReplyDelete
  9. Ooops, try it like this:

    HOSTED

    onModuleLoad() {

    // callbackName = reserveCallback();
    callbackName = "chatGroup1";
    Log.info("onModuleLoad callbackName: " + callbackName);
    addDWRScripts("/reverseGWT/dwr/engine.js");
    addDWRScripts("/reverseGWT/dwr/util.js");
    addDWRScripts("/reverseGWT/dwr/interface/JavascriptChat.js");
    setActiveReverseAjax();
    setupChat(this, callbackName);
    //Log.info(" setupChat: finshed");
    setupChatBox(callbackName);

    }

    Remember in reverse.html you'll need:

    For hosted -reverse.html
    src="/reverse/reverse.nocache.js"

    onModuleLoad() {

    // callbackName = reserveCallback();
    callbackName = "chatGroup1";
    Log.info("onModuleLoad callbackName: " + callbackName);
    addDWRScripts("/dwr/engine.js");
    addDWRScripts("/dwr/util.js");
    addDWRScripts("/dwr/interface/JavascriptChat.js");
    setActiveReverseAjax();
    setupChat(this, callbackName);
    //Log.info(" setupChat: finshed");
    setupChatBox(callbackName);

    }

    For Tomcat- reverse.html --
    src="/reverseGWT/reverse/reverse.nocache.js">

    onModuleLoad() {

    // callbackName = reserveCallback();
    callbackName = "chatGroup1";
    Log.info("onModuleLoad callbackName: " + callbackName);
    addDWRScripts("/reverseGWT/dwr/engine.js");
    addDWRScripts("/reverseGWT/dwr/util.js");
    addDWRScripts("/reverseGWT/dwr/interface/JavascriptChat.js");
    setActiveReverseAjax();
    setupChat(this, callbackName);
    //Log.info(" setupChat: finshed");
    setupChatBox(callbackName);

    }

    ReplyDelete
  10. Hi,
    thanks for your advice.
    We are one step closer now:
    I use
    onModuleLoad() {
    // callbackName = reserveCallback();
    callbackName = "chatGroup1";
    Log.info("onModuleLoad callbackName: " + callbackName);
    addDWRScripts("/dwr/engine.js");
    addDWRScripts("/dwr/util.js");
    addDWRScripts("/dwr/interface/JavascriptChat.js");
    setActiveReverseAjax();
    setupChat(this, callbackName);
    //Log.info(" setupChat: finshed");
    setupChatBox(callbackName);
    }

    ... and now runs in HOSTED ok,
    but if I open another client, let say Mozila
    under http://localhost:8888/reverse.html,
    this client doesn't find js libraries,
    as I catch this in HOSTED browser:

    [WARN] 404 - GET /reverse/dwr/interface/JavascriptChat.js (127.0.0.1) 1425 bytes
    [WARN] 404 - GET /reverse/dwr/engine.js (127.0.0.1) 1407 bytes
    [WARN] 404 - GET /reverse/dwr/util.js (127.0.0.1) 1405 bytes

    This new client runs in the same servlet container - Jetty, or am I wrong?
    Do you have any idea why?

    Thank you very much for your help!

    Best regards,
    Blaz

    ReplyDelete
  11. Hello Shawn and Blaž I have worked on a project http://www.qtrans.eu – and we have it in GWT 1.5.x. I tried your example Shawn and it is working perfectly – I deployed it on GlassFish and Tomcat.
    Very nice ... I like the functionality.
    In Qtrans project we have also chat implemented, but ... – pooling :( ... not nice ... I would like to have DWR :)
    So – I tried to do an example in 1.5.x (our project is in 1.5.3 – we will go to 1.6., but not for now), but ... damn – here I have problems.
    For me – I tried Shawns example, I can’t make it work on 1.5.x. – in hosted mode …
    Blaž, Shawn – if somebody will get it working under 1.5.x – if you could please post me a link.
    Thank you very much
    Have a nice day

    ReplyDelete
  12. Hello Shawn Blaž

    I have managed to set up the project in 1.5.3, and I get the UI
    ... but then an error occurs:

    Line: 0
    Error:'dwr' in undefined

    Does anybody have any idea - I feel I am so close :)
    Thanx

    ReplyDelete
  13. Hi Blaz,

    >I catch this in HOSTED browser:

    [WARN] 404 - GET /reverse/dwr/interface/JavascriptChat.js (127.0.0.1) 1425 bytes
    ...

    > Do you have any idea why?

    I'm not an expert on GWT and don't really know the internal details of how Hosted mode works. I would just used hosted mode to develop the UI and then test deploy to make sure the push function is working. I wonder also if you could launch more than one hosted browser.

    ReplyDelete
  14. Hi etransporteu,

    > Error:'dwr' in undefined

    I think a script isn't being found.

    Can you confirm by firebug or in hosted mode that all scripts are found.

    In hosted mode you can:

    1) right click
    2) select inspect element
    3) look at resources and see if all the scripts are found.

    it's probably /dwr/engine.js

    you might try

    onModuleLoad() {
    // callbackName = reserveCallback();
    callbackName = "chatGroup1";
    Log.info("onModuleLoad callbackName: " + callbackName);
    addDWRScripts("/dwr/engine.js");
    addDWRScripts("/dwr/util.js");
    addDWRScripts("/dwr/interface/JavascriptChat.js");
    setActiveReverseAjax();
    setupChat(this, callbackName);
    //Log.info(" setupChat: finshed");
    setupChatBox(callbackName);
    }

    ReplyDelete
  15. Hi
    If i write
    public void onModuleLoad()
    {

    callbackName = "chatGroup1";
    addDWRScripts("/dwr/engine.js");
    addDWRScripts("/dwr/util.js");
    addDWRScripts("/dwr/interface/JavascriptChat.js");
    setActiveReverseAjax();
    setupChat(this, callbackName);
    //Log.info(" setupChat: finshed");
    setupChatBox(callbackName);
    }
    Then I get Error
    [TRACE] Loading module 'dwr'
    [ERROR] Unable to find 'dwr.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
    [TRACE] The development shell servlet received a request for 'engine.js' in module 'dwr.gwt.xml'
    [TRACE] Loading module 'dwr'
    [ERROR] Unable to find 'dwr.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
    And then the same for util.js and JavascriptChat.js

    OK ... so it has to be ...
    public void onModuleLoad()
    {

    callbackName = "chatGroup1";
    addDWRScripts("/reverse/dwr/engine.js");
    addDWRScripts("/reverse/dwr/util.js");
    addDWRScripts("/reverse/dwr/interface/JavascriptChat.js");
    setActiveReverseAjax();
    setupChat(this, callbackName);
    //Log.info(" setupChat: finshed");
    setupChatBox(callbackName);
    }

    But then ... I recive Error ... whith is strange for me ... Loading module 'reverseGWT'
    ?
    You are also right – via FireBug ... I can see – that I don't load engine.js, util.js and JavascriptChat.js - but servlet is configured OK – and I have dwr.jar in my lib folder.
    Where are those javasripts – in dwr.jar ... – especially JavascriptChat.js?
    I think for this example, I don't need to change dwr.xml.
    [TRACE] Loading module 'reverseGWT'
    [ERROR] Unable to find 'reverseGWT.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
    [TRACE] The development shell servlet received a request for 'dwr/call/plaincall/__System.pageLoaded.dwr' in module 'reverseGWT.gwt.xml'
    [TRACE] Loading module 'reverseGWT'
    [ERROR] Unable to find 'reverseGWT.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?

    I don't quite understand what is happening here, now I know, that I have to use reverse everywhere, but where to use reverse GWT ... I am confused.
    I hope we I am closer
    BR

    ReplyDelete
  16. I think now I am really close, because, now I don’t have anything else wrong – I am just not able to load javascripts

    [TRACE] The development shell servlet received a request for 'dwr/util.js' in module 'reverse.gwt.xml'
    [WARN] Resource not found: dwr/util.js; (could a file be missing from the public path or a servlet tag misconfigured in module reverse.gwt.xml ?)
    [TRACE] The development shell servlet received a request for 'dwr/engine.js' in module 'reverse.gwt.xml'
    [WARN] Resource not found: dwr/engine.js; (could a file be missing from the public path or a servlet tag misconfigured in module reverse.gwt.xml ?)
    [TRACE] The development shell servlet received a request for 'dwr/interface/JavascriptChat.js' in module 'reverse.gwt.xml'
    [WARN] Resource not found: dwr/interface/JavascriptChat.js; (could a file be missing from the public path or a servlet tag misconfigured in module reverse.gwt.xml ?)


    So … maybe a small explanation … how to set this, where do they come from :( …


    Sorry I am realy new to DWR – maybe I have stupid question, sometimes it is nice – If somebody is willing to help you – to just ask. So thnx again

    At my place it is 2:45 am, when this will start working, I will go to sleep, he he … it’s nice feature

    BR

    ReplyDelete
  17. What is happening is that the dwr scripts (in dwr.jar) are not being found.

    I am not sure how you set up your project when you moved it to 1.5.x but

    the calls are set up in SampleChat.java

    For the war, the app is reverseGWT so we use

    addDWRScripts("/reverseGWT/dwr/engine.js");
    addDWRScripts("/reverseGWT/dwr/util.js");
    addDWRScripts("/reverseGWT/dwr/interface/JavascriptChat.js");

    For hosted mode, the is running in the root dir so we don't seem to need /reverseGWT

    So the steps are:

    1) we need to find gwt in reverse.html

    src="/reverse/reverse.nocache.js">
    or /reverseGWT/reverse/reverse.nocache.js
    depending on your enviroment.

    2) GWT will set up the dwr scripts
    with addDWRScripts("/reverseGWT/dwr/engine.js");
    addDWRScripts("/reverseGWT/dwr/util.js");
    addDWRScripts("/reverseGWT/dwr/interface/JavascriptChat.js");

    again depending on your environment you'll need to adust the paths so the dwr servlet will recognize /dwr/* and route it properly. That is set up in web.xml and doesn't need to be changed.

    ReplyDelete
  18. YES, you are completely right – that is the problem.
    This first part is OK – I am able to get hosted page ...
    1) we need to find gwt in reverse.html

    src="/reverse/reverse.nocache.js"}
    or /reverseGWT/reverse/reverse.nocache.js
    depending on your environment.

    But I can't get right
    2) GWT will set up the dwr scripts
    with addDWRScripts("/reverseGWT/dwr/engine.js");
    addDWRScripts("/reverseGWT/dwr/util.js");
    addDWRScripts("/reverseGWT/dwr/interface/JavascriptChat.js");

    The problem is in setting up - reverse.gwt.xml setup – I recive an Error
    [TRACE] The development shell servlet received a request for 'dwr/engine.js' in module 'reverse.gwt.xml'
    [WARN] Resource not found: dwr/engine.js; (could a file be missing from the public path or a {servlet} tag miss configured in module reverse.gwt.xml ?)
    [TRACE] The development shell servlet received a request for 'dwr/util.js' in module 'reverse.gwt.xml'
    [WARN] Resource not found: dwr/util.js; (could a file be missing from the public path or a {servlet} tag miss configured in module reverse.gwt.xml ?)
    [TRACE] The development shell servlet received a request for 'dwr/interface/JavascriptChat.js' in module 'reverse.gwt.xml'
    [WARN] Resource not found: dwr/interface/JavascriptChat.js; (could a file be missing from the public path or a {servlet} tag miss configured in module reverse.gwt.xml ?)

    But in reverse.gwt.xml I have configuration for DWR –
    It lokls like this -
    {servlet path='/dwr/*' class='org.directwebremoting.servlet.DwrServlet' /}

    The

    Complete reverse.gwt.xml is (i have changed < with { and > with } – for being able to post)
    {?xml version="1.0" encoding="UTF-8"?}
    {!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.6.0/distro-source/core/src/gwt-module.dtd"}
    {module rename-to='reverse'}
    {!-- Inherit the core Web Toolkit stuff. --}
    {inherits name='com.google.gwt.user.User' /}

    {!-- Inherit the default GWT style sheet. You can change --}
    {!-- the theme of your GWT application by uncommenting --}
    {!-- any one of the following lines. --}
    {inherits name='com.google.gwt.user.theme.standard.Standard' /}
    {!-- {inherits name='com.google.gwt.user.theme.chrome.Chrome'/} --}
    {!-- {inherits name='com.google.gwt.user.theme.dark.Dark'/} --}

    {!-- Other module inherits --}
    {inherits name='com.google.gwt.json.JSON' /}
    {inherits name='com.google.gwt.http.HTTP' /}
    {inherits name='com.extjs.gxt.ui.GXT' /}


    {!-- Specify the app entry point class. --}
    {servlet path='/dwr/*' class='org.directwebremoting.servlet.DwrServlet' /}
    {entry-point class='com.sample.gwt.client.SampleChat' /}
    {/module}


    Can you help me with the configuration file ?
    How to setup, that Hosted Mode will see DWR javasripts ?!?, will see DWR

    ReplyDelete
  19. So I think the only question now is:

    - [TRACE] The development shell servlet received a request for 'dwr/engine.js' in module 'reverse.gwt.xml'
    - [WARN] Resource not found: dwr/engine.js; (could a file be missing from the public path or a {servlet} tag misconfigured in module reverse.gwt.xml ?)

    In which configuration we have to write … and what we have to write?

    ReplyDelete
  20. Hi Shawn, Blaž

    I have extracted JavaSripts ... but know I receive Errors:


    [TRACE] The development shell servlet received a request for 'dwr/call/plaincall/__System.pageLoaded.dwr' in module 'reverse.gwt.xml'
    [WARN] Resource not found: dwr/call/plaincall/__System.pageLoaded.dwr; (could a file be missing from the public path or a {servlet} tag misconfigured in module reverse.gwt.xml ?)



    and then continues ... the same Error

    [TRACE] The development shell servlet received a request for 'dwr/call/plainpoll/ReverseAjax.dwr' in module 'reverse.gwt.xml'
    [WARN] Resource not found: dwr/call/plainpoll/ReverseAjax.dwr; (could a file be missing from the public path or a {servlet} tag misconfigured in module reverse.gwt.xml ?)



    On and on ... so something is OK now :) ...


    But still - post requests ... are not working ... - the same thing is in deploy



    Here your suggestion was right - in deploy you just add the name of the WAR file in public void onModuleLoad()

    Any idea for that Error ?

    BR

    ReplyDelete
  21. Hi,

    >>The development shell servlet received a request for 'dwr/call/plaincall/

    O.K. this means there is a path issue. The GWT servlet shouldn't be recieving that call.

    >>But in reverse.gwt.xml I have configuration for DWR –
    It lokls like this -
    {servlet path='/dwr/*' class='org.directwebremoting.servlet.DwrServlet' /}

    I don't have anything like that and wouldn't expect you to either.

    As I said, you'll have to change the path here:
    with addDWRScripts("/reverseGWT/dwr/engine.js");

    try with

    /reverseGWT/dwr/engine.js
    /reverse/dwr/engine.js
    /reverseGWT/reverse/dwr/engine.js
    /dwr/engine.js

    If none of those work, then you'll have to look at your set up. web.xml is where the servlet is defined.

    You really shouldn't worry about this:

    [WARN] Resource not found: dwr/engine.js; (could a file be missing from the public path or a {servlet} tag miss configured in module reverse.gwt.xml ?)

    Once you get the path right, the dwr servlet will be picking up the calls and GWT will never get the request for dwr/engine.js

    ReplyDelete
  22. Shawn thanx - problem from GWT - to server solved. Like you said ... once this is done it's working OK ...


    working nicely - like you described ...

    But now - new problem ... backwards ... POST for ReverseAjax.dwr:

    [TRACE] The development shell servlet received a request for 'dwr/call/plaincall/__System.pageLoaded.dwr' in module 'reverse.gwt.xml'
    [WARN] Resource not found: dwr/call/plaincall/__System.pageLoaded.dwr; (could a file be missing from the public path or a {servlet} tag misconfigured in module reverse.gwt.xml ?)


    This ... is pain in the ass, I can't make it work :(

    I can deploy the project, and it woks then on tomcat ... not a problem, but hosted mode ... strange, strange ...


    [TRACE] The development shell servlet received a request for 'dwr/call/plaincall/__System.pageLoaded.dwr' in module 'reverse.gwt.xml'
    [WARN] Resource not found: dwr/call/plaincall/__System.pageLoaded.dwr; (could a file be missing from the public path or a {servlet} tag misconfigured in module reverse.gwt.xml ?)


    What else to configure ... - maybe it is not possible in 1.5.x ... ?

    ReplyDelete
  23. If I have aplication deployed and I call:
    http://localhost:8080/dwr/index.html

    i recive

    Classes known to DWR:

    * JavascriptChat (com.sample.gwt.server.dwr.JavascriptChat)


    Gold question ... how to call that in hosted mode, how to configure ... I think it's related.

    BR

    ReplyDelete
  24. Shawn, Blaž
    For me the problem is now:

    [TRACE] Loading module 'dwr'
    [ERROR] Unable to find 'dwr.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?


    How (and where) to include and how to configure dwr.gwt.xml ... I think ...

    What is the content of dwr.gwt.xml - can you give an example ?

    If this is so ... we had a long walk :) ... I had it

    ReplyDelete
  25. Hello Shawn, Blaž


    We have solved push - via another iframe - and separated hidden frame in hosted.html.

    Then via JSNI - call from JS to GWT.

    It works, it is simple to manage ... and so on - suitable for our case, where we now have
    – Client >> Server via GWT
    – Server >> Client via DWR ... in another WAR ...
    DWR is cool :)


    If anybody will solve the case with 1.5.3, please post, but at the end, we will all have to go on 1.6.


    BR

    ReplyDelete
  26. Hi Shawn,

    Are you able to share the example project again if possible?

    The link to the project at koyuru.com isn't available?

    Eggsy

    ReplyDelete
  27. try it again. the link should work now

    ReplyDelete
  28. Thats great thank you Shaun.

    ReplyDelete
  29. This is really great stuff!

    Is there a trick to only 'call' a certain session in JavascriptChat? Let's say you want to send a private message?

    ReplyDelete

Followers