example
project structure
test
/n1
/n2
/gwt.html (host page)
/org.test.Main (all the gwt stuff)
/test.html (the page i am trying to open)
EntryPoint.java
....
public void onModuleLoad() {
final Button button = new Button("open new page");
button.addClickListener(new ClickListener(){
public void onClick(Widget w) {
//seems to use host page url
Window.open("./test.html", "", "");
}
});
RootPanel.get().add(button);
}
....
IE button click gives
http://localhost:8080/test/org.test.Main/test.html
firefox button click gives
http://localhost:8080/test/n1/n2/test.html
using gwt 1.3.3, java app server
what am i doing wrong here?? did i forget to set some startup params
or is this a bug??
Any tips would be helpful.
Thanks,
Given the dir structure you provided, I think this is what you want.
Window.open(GWT.getHostPageBaseURL() + "/../test.html", "", "");