GWT Super Development Mode with Tomcat server
已回答
Hello!
I am trying to setup GWT Super Development Mode in IntelliJ Idea. I am using GWT 2.7. However, as we are using Tomcat server for development, I don't want to use the buit-in Jetty server. What I tried:
- I created a GWT configuration, checked "Use Super Dev Mode", selected the right module. However, this deploys whole my server side code to the built-in server, attempts to initialize Spring and so on. I want it to serve just the Javascript!
- I tried adding "-noserver" and "-war" options, the latter pointing to some unrelated directory. This allowed me to use the bookmarklet development mode, where I must hit recompile manually
- I attempted to set -launcherDir to the artifact location, but I got "Unknown argument: -launcherDir"
What am I doing wrong? How to achieve automatic recompilation of GWT with external server?
请先登录再写评论。
You need to use Tomcat run/debug configuration with the exploded war. See also https://www.jetbrains.com/help/idea/updating-applications-on-application-servers.html .
https://stackoverflow.com/a/5993773/104891
In IntelliJ IDEA it's possible to create a new GWT project with Tomcat using the wizard, you can check how it's configured (artifacts, run/debug configuration, deployment, etc).
I tried the second approach and set up my workspace like in the preconfigured examples and it worked. Thank you!
Serge Baranov I am using IJ Ultimate 2020.1, Tomcat 7 and GWT 2.9.0
I created a Sample App wusing the GWT wizard and when I run it, get this error:
Try adding gwt-dev-*.jar to the module dependencies: https://www.jetbrains.com/help/idea/working-with-module-dependencies.html#add-a-new-dependency.
Serge Baranov Does the Intellij GWT plugin have a maven option? I actually prefer the maven option as that is how my employer will deploy it.