an error with gwt-multipage?

25 views
Skip to first unread message

mjfan80

unread,
Dec 15, 2010, 9:41:47 AM12/15/10
to gwt-multipage
I think there is a problem here

I have a project written with GWT

The "normal address" of my application is
http://localhost:8080/HelpDeskGwt/
but in some occasion it would be
http://localhost:8080/HelpDeskGwt/?viarible=value

now i need a "external" page to have a gwt widget... so i try with
this gwt-multipage framework to provide a new entrypoint for that
"external" page

this page is
http://localhost:8080/HelpDeskGwt/fax/show?variable1=value&variable2=value

i try this
on the "principal" entrypoint i set
@UrlPatternEntryPoint(value = "/*([?].*){0,1}")
and in the other page i set
@UrlPatternEntryPoint(value = ".*/fax/show.*")

now, if i go to
http://localhost:8080/HelpDeskGwt
or
http://localhost:8080/HelpDeskGwt/
or
http://localhost:8080/HelpDeskGwt/?
it's working well and the entruypoint is "taken"
but here
http://localhost:8080/HelpDeskGwt/?viarible=value
i get the menu that ask me to chose the entrypoint

why???

Brian Reilly

unread,
Dec 15, 2010, 8:19:09 PM12/15/10
to gwt-mu...@googlegroups.com
I'm doing some testing to try to reproduce this. Does having the entry
point with the ".*/fax/show.*" pattern make any difference? You
mention having it set up, but all of your example URLs seem like they
should match to what you called your "principal" entry point with the
"/*([?].*){0,1}" pattern.

Also, if you get a chance and could let me know what
GWT.getModuleBaseURL() returns in your project, that could be helpful.
I suspect it's http://localhost:8080/HelpDeskGwt/, but I want to be
sure. Thanks.

-Brian

> --
> Sie haben diese Nachricht erhalten, da Sie der Google Groups-Gruppe gwt-multipage beigetreten sind.
> Wenn Sie Nachrichten in dieser Gruppe posten möchten, senden Sie eine E-Mail an gwt-mu...@googlegroups.com.
> Wenn Sie aus dieser Gruppe austreten möchten, senden Sie eine E-Mail an gwt-multipag...@googlegroups.com.
> Besuchen Sie die Gruppe unter http://groups.google.com/group/gwt-multipage?hl=de, um weitere Optionen zu erhalten.
>
>

mjfan80

unread,
Dec 21, 2010, 4:35:38 AM12/21/10
to gwt-multipage
Maybe i just found where is the problem
GWT.getModuleBaseURL() doesn't give me, as i thought and you guessed,
http://localhost:8080/HelpDeskGwt, but
http://localhost:8080/HelpDeskGwt/gwt/com.fdlservizi.sse.HelpDeskGWT/

but i suppose there is no problem, as the framework check the relative
put after the base url...
but then i found the real problem

i try to log this code, used by the framework:

String moduleBaseURL = GWT.getModuleBaseURL();
GWT.log("GWT.getModuleBaseURL():" + moduleBaseURL);
String href = Window.Location.getHref();
int endIndex = moduleBaseURL.lastIndexOf("/",
moduleBaseURL.length()-2);
String getRelativePath = href.substring(endIndex+1, href.length());
GWT.log("getRelativePath: " + getRelativePath);

and that's is what is printed
[INFO] GWT.getModuleBaseURL():http://localhost:8080/HelpDeskGwt/gwt/
com.fdlservizi.sse.HelpDeskGWT/
[INFO] getRelativePath: .codesvr=127.0.0.1:9997

so the problem is that the code delete the '?'

but i need to check the '?'...


On Dec 16, 2:19 am, Brian Reilly <brian.irei...@gmail.com> wrote:
> I'm doing some testing to try to reproduce this. Does having the entry
> point with the ".*/fax/show.*" pattern make any difference? You
> mention having it set up, but all of your example URLs seem like they
> should match to what you called your "principal" entry point with the
> "/*([?].*){0,1}" pattern.
>
> Also, if you get a chance and could let me know what
> GWT.getModuleBaseURL() returns in your project, that could be helpful.
> I suspect it'shttp://localhost:8080/HelpDeskGwt/, but I want to be
> sure. Thanks.
>
> -Brian
>
>
>
>
>
>
>
> On Wed, Dec 15, 2010 at 9:41 AM, mjfan80 <mjfa...@gmail.com> wrote:
> > I think there is a problem here
>
> > I have a project written with GWT
>
> > The "normal address" of my application is
> >http://localhost:8080/HelpDeskGwt/
> > but in some occasion it would be
> >http://localhost:8080/HelpDeskGwt/?viarible=value
>
> > now i need a "external" page to have a gwt widget... so i try with
> > this gwt-multipage framework to provide a new entrypoint for that
> > "external" page
>
> > this page is
> >http://localhost:8080/HelpDeskGwt/fax/show?variable1=value&variable2=...
>
> > i try this
> > on the "principal" entrypoint i set
> > @UrlPatternEntryPoint(value = "/*([?].*){0,1}")
> > and in the other page i set
> > @UrlPatternEntryPoint(value = ".*/fax/show.*")
>
> > now, if i go to
> >http://localhost:8080/HelpDeskGwt
> > or
> >http://localhost:8080/HelpDeskGwt/
> > or
> >http://localhost:8080/HelpDeskGwt/?
> > it's working well and the entruypoint is "taken"
> > but here
> >http://localhost:8080/HelpDeskGwt/?viarible=value
> > i get the menu that ask me to chose the entrypoint
>
> > why???
>
> > --
> > Sie haben diese Nachricht erhalten, da Sie der Google Groups-Gruppe gwt-multipage beigetreten sind.
> > Wenn Sie Nachrichten in dieser Gruppe posten möchten, senden Sie eine E-Mail an gwt-mu...@googlegroups.com.
> > Wenn Sie aus dieser Gruppe austreten möchten, senden Sie eine E-Mail an gwt-multipag...@googlegroups.com.
> > Besuchen Sie die Gruppe unterhttp://groups.google.com/group/gwt-multipage?hl=de, um weitere Optionen zu erhalten.

mjfan80

unread,
Dec 21, 2010, 5:27:06 AM12/21/10
to gwt-multipage
i made a mistake in the previus mail
the error comes because of the difference beetween
GWT.getModuleBaseURL() and Window.Location.getHref()
getModuleBaseURL()= http://localhost:8080/HelpDeskGwt/gwt/com.fdlservizi.sse.HelpDeskGWT/
getHref= http://localhost:8080/HelpDeskGwt/?gwt.codesvr=127.0.0.1:9997

so there's a problem when the code do href.substring(endIndex+1,
href.length()), when the endIndex is taken from the modulebase url

On Dec 21, 10:35 am, mjfan80 <mjfa...@gmail.com> wrote:
> Maybe i just found where is the problem
> GWT.getModuleBaseURL() doesn't give me, as i thought and you guessed,http://localhost:8080/HelpDeskGwt, buthttp://localhost:8080/HelpDeskGwt/gwt/com.fdlservizi.sse.HelpDeskGWT/
Reply all
Reply to author
Forward
0 new messages