I have a GWT application which when I deploy locally homepage after running the application is localhost:8888/myapp.html but when we deploy it to the server, after the application running its homepage is 107.20.239.198:8080/myapp/myapp.html.
Now all the relating paths my application fail. Places where I require the exact path, I cant get that. As now the path is different. For example when I click in a particular widget in my application -> It redirects to the path ‘/# + “place no.1” + “place no.2” ‘
But now it fails when deployed on the server as now it requires the path -> ‘/myapp/# + “place no.1” + “place no.2” ‘.
So how can I make it generic, so that I can handle both the conditions.
Can anyone help me with this ?
P.S. I hope I am able to express my problem well, else you can comment it so that I can explain it better.
From your local url as you mentioned above, it looks like you are running it on
AppEngine‘s server. Better you deploy your application onTomcatfirst on your local. And make sure everything is working fine. These are the few methods which you can use to get therelative/absolute urlswhen your application starts up.Hope it helps.