Hi Roman,
I've worked out a bit of hack to get this working for myself. It works well enough for me right now, but if I had time I would do it properly.
Here's what you need to do:
* Duplicate the code from the com.google.gwt.dev.shell.jetty.JettyLauncher class into your project. GWT ships with the sources, so it should be easy to find this class. I called my duplicate class JettyRealmServletLauncher.
* Add the jetty-plus-6.1.1.jar to your project classpath. (I am using Maven and used artifact org.mortbay.jetty:jetty-plus:6.1.1 with scope PROVIDED)
* In the start method in JettyRealmServletLauncher, locate the line that says server.addConnector(connector), and add your realm configuration below, in a similar manner to how you would do it in the jetty.xml file.
Mine looked like:
JAASUserRealm realm = new JAASUserRealm();
realm.setName("Realm");
realm.setLoginModuleName("LoginModule");
realm.setRoleClassNames(new String[] {
"com.xxxxxx.ldap.LDAPGroup",
"com.xxxxxx.ldap.LDAPPrincipal",
"com.xxxxxx.login.RdbmsRole" });
server.addUserRealm(realm);
Then, open up your GWT Web Application debug/run configuration in Eclipse (Run|Debug Configurations) and go to the arguments tab, where you need to add the following line:
-server com.xxxxx.client.JettyRealmServletLauncher
(Obviously you'll need to replace the FQCN with your own)
I hope this helps, let me know if you have any problems.
Ideally it would be great if the standard JettyLauncher that ships with GWT could be passed a parameter for the jetty.xml configuration file from the command line. It wouldn't be too hard to write an instance of ServletContainerLauncher that does this.
Regards,
Andrew
>> Thanks for the suggestions
>>
>> I still wished it would be possible to use internal jetty server and
>> configure it to support HTTP authentication. It would make debugging
>> of the server code a lot easier.
>>
>> -- Roman
>>
>>
>>
>>
>> > Cool trick I found on the web:
>>
>> > javascript:void(function(){var%20i,a,s;a=document.getElementsByTagName('lin k');for(i=0;i<a.length;i++){s=a[i];if(s.rel.toLowerCase().indexOf('styleshe et')>=0&&s.href)%20{var%20h=s.href.replace(/(&|%5C?)forceReload=\d+/,'');s. href=h+(h.indexOf('?')>=0?'&':'?')+'forceReload='+(new%20Date().valueOf())} }})();