Re: Is there a Java URL encoder class that can be used in both Java/Javascript?

2009-05-27 Thread Jason Essington
perhaps you could use GWT.isClient() to decide which implementation to use, the GWT version in a GWT environment or the java version in a JVM? -jason On May 27, 2009, at 12:30 AM, TimOnGmail wrote: > > Hi all... > > I have a class that I'd like to use in GWT, and have it work both in a > free

Re: Is there a Java URL encoder class that can be used in both Java/Javascript?

2009-05-27 Thread Thomas Broyer
On 27 mai, 08:30, TimOnGmail 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 Javascrip

Re: Is there a Java URL encoder class that can be used in both Java/Javascript?

2009-05-26 Thread Ian Petersen
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,

Is there a Java URL encoder class that can be used in both Java/Javascript?

2009-05-26 Thread TimOnGmail
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 allo