You could break the dependency by introducing an interface, providing one implementation in the all-Java app that uses URLEncoder/URLDecord, and providing another implementation in GWT that uses GWT's URL class. It should be pretty straightforward and I think it solves your problem.
Ian On Tue, May 26, 2009 at 11:30 PM, TimOnGmail <[email protected]> wrote: > > Hi all... > > I have a class that I'd like to use in GWT, and have it work both in a > freestanding Java app, and in GWT. The problem is, it needs to do > some URL encoding, but GWT's URL class does it's encoding/decoding in > a native method (in Javascript), and URLEncoder/URLDecoder in Java are > not allowed in GWT. > > Does anyone know if a Java class out there on the web that implements > a good-enough URL encoding/decoding mechanism and which does not > depend on any disallowed classes? > > - Tim > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
