On Fri, Jun 8, 2012 at 8:46 PM, John Tamplin <[email protected]> wrote:
> On Fri, Jun 8, 2012 at 2:26 PM, Brian Slesinsky <[email protected]> wrote:
>>
>> I'm definitely interested in getting simple servlets to run in Super
>> Dev Mode in a way similar to classic Dev Mode. I haven't investigated,
>> so I don't know if it's better to reuse the existing implementation or
>> write a fresh one and leave behind some crud.
>>
>> I don't think we want to try too hard to provide a servlet container
>> that works for arbitrary web apps. Typically it's better to use a
>> separate process for anything complicated and avoid classpath/class
>> loader issues. For example, for App Engine, you'll want to be using
>> its own dev_appserver command.
>>
>> But perhaps I'm biased by how we do things within Google?
>
>
> For my personal app, I launch my jetty-based server separately, and use
> -noserver for DevMode.

I do the same, and I believe it's the way to go for "complex
projects", but it raises the barrier to entry for "simple projects"
(like the ones in the samples).
ServletContainerLauncher is simple enough to be reused here. The
default implementation based on Jetty 6 could be pushed in a separate
JAR and the SuperDevMode would warn users if it finds a
WEB-INF/web.xml, isn't run in -noserver mode, isn't launched with a
specific ServletContainerLauncher, and the default implementation is
not found in the classpath. Alternately, it could be bundled in
gwt-user.jar in the SDK (though not on Maven).

FYI, Gerrit (which I wouldn't qualify as a "simple project") uses the
ServletContainerLauncher for DevMode.
Apache Wave on the other hand, starts its own server and uses
-noserver, but this is because it's not a "war project": Wave comes
with its own HTTP/WebSockets server (using Jetty 7), configured
entirely from code. Gerrit has an "executable war", but can be
deployed in any servlet container, so the ServletContainerLauncher is
OK.

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to