Re: How to get HTTP authentication working in hosted mode using GWT 1.6
Hello Christoph Thanks for posting your solution. I tried it with a simple HashUserRealm and it worked perfectly. Best regards, Roman On Jun 29, 9:55 am, cschoett wrote: > Hi Roman, > > I had the same issue after upgrading to GWT 1.6 and after a lot of > trial and error I found a solution. > You must add a jetty-web.xml to your configuration. Put it in the > beside your web.xml file. > > My confifiguration looks like the following: > > > "http://jetty.mortbay.org/configure.dtd";> > > > > > > class="org.mortbay.jetty.security.JDBCUserRealm"> > your realm > name > name="config">jdbcRealm.properties > > > > > > > In the referenced jdbcRealm.properties the realm is configured (db > access, user and role tables). You should find out how to configure > this in the jetty documentation. > > This is the cleanest solution I found and it works for me without > problems. > > Regards, > Christoph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How to get HTTP authentication working in hosted mode using GWT 1.6
Hi Roman, I had the same issue after upgrading to GWT 1.6 and after a lot of trial and error I found a solution. You must add a jetty-web.xml to your configuration. Put it in the beside your web.xml file. My confifiguration looks like the following: http://jetty.mortbay.org/configure.dtd";> your realm name jdbcRealm.properties In the referenced jdbcRealm.properties the realm is configured (db access, user and role tables). You should find out how to configure this in the jetty documentation. This is the cleanest solution I found and it works for me without problems. Regards, Christoph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How to get HTTP authentication working in hosted mode using GWT 1.6
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.xx.ldap.LDAPGroup", "com.xx.ldap.LDAPPrincipal", "com.xx.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.x.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 On Apr 3, 5:47 pm, Roman wrote: >> 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 >> >> On Apr 3, 5:33 pm, Vitali Lovich wrote: >> >> >> >> > Cool trick I found on the web: >> >> > javascript:void(function(){var%20i,a,s;a=document.getElementsByTagName('lin k');for(i=0;i=0&&s.href)%20{var%20h=s.href.replace(/(&|%5C?)forceReload=\d+/,'');s. href=h+(h.indexOf('?')>=0?'&':'?')+'forceReload='+(new%20Date().valueOf())} }})(); >> >> > Refreshes your CSS without reloading your page. Pretty useful with >> > GWT apps since refreshing them regularly can cause problems. >> >> > On Fri, Apr 3, 2009 at 11:31 AM, rudolf michael wrote: >> > > if you changed the static files like .css, .html and others then yes you >> > > will need to re-deploy the war to see the changes in your hosted mod >> > > browser. >> > > But if you did change the .java files, then you will see the changes on the >> > > fly. means that no need to re-delpoy your war, just refresh your hosted mode >> > > browser. >> >> > > regards, >> > > ruds >> >> > > On Fri, Apr 3, 2009 at 6:27 PM, Roman wrote: >> >> > >> Thanks, for your reply. >> >> > >> This would mean, that I could only debug the client code in Eclipse >> > >> and that the war file needs to be rebuilt and deployed every time I >> > >> change the server code, right? >> >> > >> -- Roman >> >> > >> On Apr 3, 5:00 pm, rudolf michael wrote: >> > >> > Hello, >> > >> > You can always change your shell command params to point to any other >> > >> > Servlet container/app server. >> > >> > i dont think that the Jetty server which comes with the toolkit has >> > >> > support >> > >> > for such thing. >> > >> > in you shell-cmd.bat, add the following: >> > >> > com.google.gwt.dev.GWTShell -noserver -port 8080 >> > >> > where 8080 is your app server that your war is hosted. >> >> > >> > On Fri, Apr 3, 2009 at 5:51 PM, Roman wrote: >> >> > >> > > Hello >> >> > >> > > In my web.xml file I'm using the following configuration to enable >> > >> > > HTTP authentication for my app: >> >> > >> > > >> > >> > > >> > >> > > Demo Application >> > >> > > /* >> > >> > > >> > >> > > >> > >> > > sol >> > >> > > >> > >> > > >> >> > >> > > >> > >> > >BASIC >> > >> > >Demo authentication >> > >> > > >> >> > >> > > For web mode I have configured a suitable realm in my tomcat server >> > >> > > and got HTTP authentication working. >> >> > >> > > Now I would like to use HTTP authentication also in hosted mode using >> > >> > > the embedded Jetty server (for debugging). >> >> > >> > > Can anybody tell me how to proceed or help me to locate the >> > >> > > configuration files for the embedded Jetty server? >> >> > >> > > Thanks and regards, >> > >> > > Roman --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more option
Re: How to get HTTP authentication working in hosted mode using GWT 1.6
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 On Apr 3, 5:33 pm, Vitali Lovich wrote: > Cool trick I found on the web: > > javascript:void(function(){var%20i,a,s;a=document.getElementsByTagName('link');for(i=0;i=0&&s.href)%20{var%20h=s.href.replace(/(&|%5C?)forceReload=\d+/,'');s.href=h+(h.indexOf('?')>=0?'&':'?')+'forceReload='+(new%20Date().valueOf())}}})(); > > Refreshes your CSS without reloading your page. Pretty useful with > GWT apps since refreshing them regularly can cause problems. > > On Fri, Apr 3, 2009 at 11:31 AM, rudolf michael wrote: > > if you changed the static files like .css, .html and others then yes you > > will need to re-deploy the war to see the changes in your hosted mod > > browser. > > But if you did change the .java files, then you will see the changes on the > > fly. means that no need to re-delpoy your war, just refresh your hosted mode > > browser. > > > regards, > > ruds > > > On Fri, Apr 3, 2009 at 6:27 PM, Roman wrote: > > >> Thanks, for your reply. > > >> This would mean, that I could only debug the client code in Eclipse > >> and that the war file needs to be rebuilt and deployed every time I > >> change the server code, right? > > >> -- Roman > > >> On Apr 3, 5:00 pm, rudolf michael wrote: > >> > Hello, > >> > You can always change your shell command params to point to any other > >> > Servlet container/app server. > >> > i dont think that the Jetty server which comes with the toolkit has > >> > support > >> > for such thing. > >> > in you shell-cmd.bat, add the following: > >> > com.google.gwt.dev.GWTShell -noserver -port 8080 > >> > where 8080 is your app server that your war is hosted. > > >> > On Fri, Apr 3, 2009 at 5:51 PM, Roman wrote: > > >> > > Hello > > >> > > In my web.xml file I'm using the following configuration to enable > >> > > HTTP authentication for my app: > > >> > > > >> > > > >> > > Demo Application > >> > > /* > >> > > > >> > > > >> > > sol > >> > > > >> > > > > >> > > > >> > > BASIC > >> > > Demo authentication > >> > > > > >> > > For web mode I have configured a suitable realm in my tomcat server > >> > > and got HTTP authentication working. > > >> > > Now I would like to use HTTP authentication also in hosted mode using > >> > > the embedded Jetty server (for debugging). > > >> > > Can anybody tell me how to proceed or help me to locate the > >> > > configuration files for the embedded Jetty server? > > >> > > Thanks and regards, > >> > > Roman --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How to get HTTP authentication working in hosted mode using GWT 1.6
Cool trick I found on the web: javascript:void(function(){var%20i,a,s;a=document.getElementsByTagName('link');for(i=0;i=0&&s.href)%20{var%20h=s.href.replace(/(&|%5C?)forceReload=\d+/,'');s.href=h+(h.indexOf('?')>=0?'&':'?')+'forceReload='+(new%20Date().valueOf())}}})(); Refreshes your CSS without reloading your page. Pretty useful with GWT apps since refreshing them regularly can cause problems. On Fri, Apr 3, 2009 at 11:31 AM, rudolf michael wrote: > if you changed the static files like .css, .html and others then yes you > will need to re-deploy the war to see the changes in your hosted mod > browser. > But if you did change the .java files, then you will see the changes on the > fly. means that no need to re-delpoy your war, just refresh your hosted mode > browser. > > regards, > ruds > > On Fri, Apr 3, 2009 at 6:27 PM, Roman wrote: >> >> Thanks, for your reply. >> >> This would mean, that I could only debug the client code in Eclipse >> and that the war file needs to be rebuilt and deployed every time I >> change the server code, right? >> >> -- Roman >> >> On Apr 3, 5:00 pm, rudolf michael wrote: >> > Hello, >> > You can always change your shell command params to point to any other >> > Servlet container/app server. >> > i dont think that the Jetty server which comes with the toolkit has >> > support >> > for such thing. >> > in you shell-cmd.bat, add the following: >> > com.google.gwt.dev.GWTShell -noserver -port 8080 >> > where 8080 is your app server that your war is hosted. >> > >> > On Fri, Apr 3, 2009 at 5:51 PM, Roman wrote: >> > >> > > Hello >> > >> > > In my web.xml file I'm using the following configuration to enable >> > > HTTP authentication for my app: >> > >> > > >> > > >> > > Demo Application >> > > /* >> > > >> > > >> > > sol >> > > >> > > >> > >> > > >> > > BASIC >> > > Demo authentication >> > > >> > >> > > For web mode I have configured a suitable realm in my tomcat server >> > > and got HTTP authentication working. >> > >> > > Now I would like to use HTTP authentication also in hosted mode using >> > > the embedded Jetty server (for debugging). >> > >> > > Can anybody tell me how to proceed or help me to locate the >> > > configuration files for the embedded Jetty server? >> > >> > > Thanks and regards, >> > > Roman >> > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How to get HTTP authentication working in hosted mode using GWT 1.6
if you changed the static files like .css, .html and others then yes you will need to re-deploy the war to see the changes in your hosted mod browser. But if you did change the .java files, then you will see the changes on the fly. means that no need to re-delpoy your war, just refresh your hosted mode browser. regards, ruds On Fri, Apr 3, 2009 at 6:27 PM, Roman wrote: > > Thanks, for your reply. > > This would mean, that I could only debug the client code in Eclipse > and that the war file needs to be rebuilt and deployed every time I > change the server code, right? > > -- Roman > > On Apr 3, 5:00 pm, rudolf michael wrote: > > Hello, > > You can always change your shell command params to point to any other > > Servlet container/app server. > > i dont think that the Jetty server which comes with the toolkit has > support > > for such thing. > > in you shell-cmd.bat, add the following: > > com.google.gwt.dev.GWTShell -noserver -port 8080 > > where 8080 is your app server that your war is hosted. > > > > On Fri, Apr 3, 2009 at 5:51 PM, Roman wrote: > > > > > Hello > > > > > In my web.xml file I'm using the following configuration to enable > > > HTTP authentication for my app: > > > > > > > > > > > Demo Application > > > /* > > > > > > > > > sol > > > > > > > > > > > > > >BASIC > > >Demo authentication > > > > > > > > For web mode I have configured a suitable realm in my tomcat server > > > and got HTTP authentication working. > > > > > Now I would like to use HTTP authentication also in hosted mode using > > > the embedded Jetty server (for debugging). > > > > > Can anybody tell me how to proceed or help me to locate the > > > configuration files for the embedded Jetty server? > > > > > Thanks and regards, > > > Roman > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How to get HTTP authentication working in hosted mode using GWT 1.6
Thanks, for your reply. This would mean, that I could only debug the client code in Eclipse and that the war file needs to be rebuilt and deployed every time I change the server code, right? -- Roman On Apr 3, 5:00 pm, rudolf michael wrote: > Hello, > You can always change your shell command params to point to any other > Servlet container/app server. > i dont think that the Jetty server which comes with the toolkit has support > for such thing. > in you shell-cmd.bat, add the following: > com.google.gwt.dev.GWTShell -noserver -port 8080 > where 8080 is your app server that your war is hosted. > > On Fri, Apr 3, 2009 at 5:51 PM, Roman wrote: > > > Hello > > > In my web.xml file I'm using the following configuration to enable > > HTTP authentication for my app: > > > > > > > Demo Application > > /* > > > > > > sol > > > > > > > > > BASIC > > Demo authentication > > > > > For web mode I have configured a suitable realm in my tomcat server > > and got HTTP authentication working. > > > Now I would like to use HTTP authentication also in hosted mode using > > the embedded Jetty server (for debugging). > > > Can anybody tell me how to proceed or help me to locate the > > configuration files for the embedded Jetty server? > > > Thanks and regards, > > Roman --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: How to get HTTP authentication working in hosted mode using GWT 1.6
Hello, You can always change your shell command params to point to any other Servlet container/app server. i dont think that the Jetty server which comes with the toolkit has support for such thing. in you shell-cmd.bat, add the following: com.google.gwt.dev.GWTShell -noserver -port 8080 where 8080 is your app server that your war is hosted. On Fri, Apr 3, 2009 at 5:51 PM, Roman wrote: > > Hello > > In my web.xml file I'm using the following configuration to enable > HTTP authentication for my app: > > > > Demo Application > /* > > > sol > > > > >BASIC >Demo authentication > > > For web mode I have configured a suitable realm in my tomcat server > and got HTTP authentication working. > > Now I would like to use HTTP authentication also in hosted mode using > the embedded Jetty server (for debugging). > > Can anybody tell me how to proceed or help me to locate the > configuration files for the embedded Jetty server? > > Thanks and regards, > Roman > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
How to get HTTP authentication working in hosted mode using GWT 1.6
Hello In my web.xml file I'm using the following configuration to enable HTTP authentication for my app: Demo Application /* sol BASIC Demo authentication For web mode I have configured a suitable realm in my tomcat server and got HTTP authentication working. Now I would like to use HTTP authentication also in hosted mode using the embedded Jetty server (for debugging). Can anybody tell me how to proceed or help me to locate the configuration files for the embedded Jetty server? Thanks and regards, Roman --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---