You have several options actually.

To do exactly what you are trying to, you would use something like:

public interface RuntimeParameters {
        public static final String PAGE_URL = "http://blablabla";;
}

and then use RuntimeParameters.PAGE_URL.

However, this is probably not what you actually want to do. A much better idea 
generally is to use 
the page location or module location URL as the prefix for your page (and make 
sure that the page 
has the same name in each environment). You can do this in GWT with:

GWT.getHostPageBaseURL() - to get the directory URL for the HTML page, or
GWT.getModuleBaseURL() - to the the directory URL of the JavaScript files

So something like:
final String pageUrl = GWT.getHostPageBaseURL() + "users.php";
Is far preferred to changing variable names between builds.

Generally it's considered a good idea to keep all of your environments as 
similar as possible. If 
you run Apache with PHP in production, you should generally run it locally for 
development as well 
(this is why GWT supports the '-noserver' option).

I hope this helps a bit.
//Jason

tedpottel wrote:
> Hi
> 
> I may have already posted this, but cannot find it.
> 
> I’n using Ajax code, I have 3 different servers the php file is in,
> depending on what I’m debugging. I have the Jiffy server when
> debugging within eclipse, then I have my local Apache server, when I’m
> trying to debug the php code, and a different server name for
> production run.
> 
> C and PHP has a  define statement, whare I could have something like
> #define server /local/
> And include it in all my files.
> 
> Is there a way to do this in java, so I can easly switch the server
> name, without having to change it superbly in all my classes?
> 
> Ted Define
> 
> > 
> 

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to