Hello everybody,
I already started coding some small applications using backends on
LAMP and creating the frontend UI with GWT, I already know how to
overcome the same origin issue while testing locally, and of course I
have some working knowledge of Java, but now I need some advices about
some unclear points -- or maybe they're clear and I am blind :)

1. Deployment
Suppose I have my backend application -- e.g. a web site rendering
engine, not exactly what you'd call a backend but we'll make it work
for this example by supposing it also has an engine to take data from
a client application and store them in a database that will be used
for rendering -- residing at localhost/mywebsite/. Now, suppose I want
to write the administration panel, so I set up a GWT project called
mywebsiteAdmin with the appropriate assumptions and configurations,
and start coding. Everything works, I'm ready to compile the project
and deploy it to my remote webserver. Now suppose that I already have
the backend installed at www.mywebsite.com and I want the admin
interface to be available at www.mywebsite.com/admin/. First of all, I
take all the relevant files from mywebsiteAdmin/war/ and put them into
localhost/mywebsite/admin/. Then I upload this directory to my remote
server and launch it. Oops, I hardcoded the url to which to make
remote requests, which is localhost/mywebsite/remotelistener.php.
Let's go and change it, but how? If I locally run the application from
the project's url, I get something like 
http://localhost/mywebsiteAdmin/war/MywebsiteAdmin.html,
but if I try to locally run it from the backend's url I get something
like http://localhost/mywebsite/admin/MywebsiteAdmin.html (which is
also quite ugly, but of course I can rename that file to index.html
and ignore it) and finally when I go remote, I get
www.mywebsite.com/admin/MywebsiteAdmin.html (of course I can still
rename it to index.html) and here comes the point. My remote listener
is both at localhost/mywebsite/remotelistener.php and at
www.mywebsite/remotelistener.php and my admin application can be at a
large variety of different urls.
Solution: have the location to be discovered automatically by the GWT
frontend. Wait. I hope you see the difficulty by yourselves, because
I've already seen it for an entire day now trying to make some regexp/
conditions to do the job. No success.
Solution 2: have a config file that tells me where the remote listener
is. No, wait. How can I retrieve a remote file if I can't make
requests? Beside this, I'd rather not have my users have to edit two
separate files, because the only way I see this working (not too
hopeful, though) is having the file put together with the admin
application. Of course I can have these two files created via some
sort of install procedure, but I'd rather keep this as a last resort.

Other ideas?
--~--~---------~--~----~------------~-------~--~----~
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