The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

jesse.johnson (4) [Avatar] Offline
#1
I'm having issues testing the .properties for alternate languages with IE 6.0. I completed the examples through section 3.4.2 and hosted mode works without a hitch. Testing in Firefox with the above subject string yields the Swedish version of the Dashboard but not so with IE6. IE gives me a message: "Cannot find file'[my path]/Dashboard.html%3Flocale=sv'"

Should I be using a different modifier for IE to test with? I'm fairly versed in Java but new to web programming.

Eclipse 3.3
GWT 1.4
Firefox 2.0
IE 6.0

Jesse

p.s. I'm thrilled with the possibilities presented in this book through gwt and the ease of execution.
adam.tacy (269) [Avatar] Offline
#2
Re: ?locale=sv
Hi Jesse,

You use the same approach with all browsers, so it is a bit strange it is not working. If it is working in hosted mode then you can be fairly sure that everything is tied together ok in your Java code; and similarly if it is working in Firefox in web mode then the compiler has managed to generate the various permutations required.

Are you developing on a Windows platform? If so, then as it is working in hosted mode then it is working on IE, at least in this case - as GWT uses that browser in Windows hosted mode (so you can also discount IE as being the problem).

Which really just leaves the final variable of deployment - how are you running web mode - through a web server or by just loading the files directly?

Are you just using the URL to change locales or some code? Are you using "?locale=sv" or "%3Flocale=sv"? Is the mypath value correct (dumb question I know, but just checking!)?

//Adam
jesse.johnson (4) [Avatar] Offline
#3
Re: ?locale=sv
Win XP pro sp2
Firefox set to default browser
Running web mode directly
using: '?locale=sv'
mypath: windows generated path of Dashboard.html location

After using the command 'Dashboard-compile' I launched the Dashboard.html file from the generated www folder and appended the modifier to the end. Again Firefox worked fine and displayed the sv content. IE converted my modifier to %3Flocale=sv and generated the error message

Jesse
robert.hanson (173) [Avatar] Offline
#4
Re: ?locale=sv
Adam is the locale expert, so I hope that he will jump in again, but I do have one question... how are you loading the page into IE? If you are trying to load the file off of the file system, as opposed to via a web server, I might expect that you could have some trouble. The issue being that the file:// protocol doesn't allow for a querystring in the URI (as far as I know).

I might be wrong, but just throwing it out there. I tend to avoid IE whenever possible smilie

As an alternative, you could try adding the locale property inside of the HTML page bu adding this to the <head>. It removes the need to specify the locale in the URL.

<meta name="gwt:property" content="locale=sv">
jesse.johnson (4) [Avatar] Offline
#5
Re: ?locale=sv
Ok I found the problem. But I'm not sure why IE is working this way when I double click on an .html file. Any how, when you posted about the file:// protocol, I realized that that was exactly what I needed. IE was opening my .html file with the address as an "Explorer" window:

Csmilieocuments and SettingsitjjohnDesktopwwworg.gwtbook.DashboardDashboard.html

This works fine for the default page and locale but when I apended the locale modifier as the book suggested...it failed.

Csmilieocuments and SettingsitjjohnDesktopwwworg.gwtbook.DashboardDashboard.html?locale=sv

To make this work I appended the file protocol to the beginning of the address and the following second line was produced which worked correctly, displaying the requested locale:

file:///Csmilieocuments and SettingsitjjohnDesktopwwworg.gwtbook.DashboardDashboard.html?locale=sv
file:///C:/Documents%20and%20Settings/itjjohn/Desktop/www/org.gwtbook.Dashboard/Dashboard.html?locale=sv

This explains why Firefox and the hosted browser (based on IE) worked. Firefox was using the file protocol right off the bat.

Thanks for your help guys. I look forward to finishing the book. I have a lot of projects in mind to implement.

Jesse