Add GWT module to existing web project

已回答

Hi,

I played successfully with a GWT project started from scratch (with generated sample app).

Next I want to test how to bring a plain JEE webapp (using servlets and JSPs) to GWT. My Idea is to replace the GUI with GWT and reuse parts of the server code.

I added a GWT module to my project (including the sample app). But If I try to run the GWT sample app using the generated Run config, I get the error:

The code server is ready at http://127.0.0.1:9876/
Code server started in 13.56 s ms
2018-09-23 15:20:50.637:INFO:oejs.Server:main: jetty-9.2.z-SNAPSHOT
2018-09-23 15:20:52.070:WARN:oejs.BaseHolder:main:
java.lang.ClassNotFoundException: com.GWT4.server.GWT4ServiceImpl
    at java.lang.ClassLoader.findClass(ClassLoader.java:531)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:427)

 

In another test  I came up to this error

The code server is ready at http://127.0.0.1:9876/
Code server started in 15.11 s ms
[main] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@58bf2533{HTTP/1.1}{127.0.0.1:9876}
[main] INFO org.eclipse.jetty.server.Server - Started @15729ms
[main] INFO org.eclipse.jetty.server.Server - jetty-9.2.z-SNAPSHOT
Starting Jetty on port 8888
   [WARN] Failed startup of context c.g.g.d.s.j.WebAppContextWithReload@2a976909{/,file:/C:/Users/suedkamp/.IntelliJIdea2018.1/system/gwt/ipp-head-gwt.7c7ca53b/gwt4.8ea381f3/run/www/,STARTING}{C:\Users\suedkamp\.IntelliJIdea2018.1\system\gwt\ipp-head-gwt.7c7ca53b\gwt4.8ea381f3\run\www}
java.util.zip.ZipException: unexpected EOF
    at java.util.zip.ZipInputStream.read(ZipInputStream.java:213)
    at java.util.jar.JarInputStream.read(JarInputStream.java:207)
    at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:139)
    at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:117)
    at java.util.jar.JarInputStream.getNextEntry(JarInputStream.java:142)
    at java.util.jar.JarInputStream.getNextJarEntry(JarInputStream.java:179)

What is wrong? Are there any resources/examples/HowTos on what I want to achieve?

Thanks

Michael

0

Hello.

Could you please provide a project example?

0

I fear I can't because I have only our complex existing project, I'll now try to do it the other way round. I start with the GWT sample project from the assistant and integrate my existing sources afterwards.

0

请先登录再写评论。