Hey Sean,

2009/7/10 Sean Chittenden <[email protected]>:

>> Wt will automatically map a browser URL of /signup to /#/signup ?
>
> It doesn't, but I would like it to (right now /signup is a 404 by default).
>  If I bookmark or type in: /#/signup, I see just "GET / HTTP/1.1" in the
> server logs.  That I bookmarked the signup page is completely lost, but, if
> I bookmark the non-javascript version, such as:
> "/?_=/signup&wtd=Gm3iw7tZjrKwO0q7" then things work provided the wtd session
> id is still valid.  If the session id is invalid, then I'm shown the
> contents of / and not my signup WContainerWidget.

This is a problem related to a deployment at the root ("/") of your server.

There are no written rules of how to handle this, and the built-in
httpd handles only requests to "/" by the application. This means that
internal paths do not work in that case. The alternative would be to
have the built-in httpd direct all URLs to the application (appearing
as internal paths), but that might be inconvenient too as you are no
longer able to deploy images.

The choice of other web frameworks it to define a set of URLs that you
want to handle by the application, and all others are handled are
treated as static files. That approach does not work nicely with Wt's
widget-centric point of view (although it seems that you would not
mind this?). I am unsure if this would be possible when deploying as a
FastCGI application: you would need to define these mappings in the
server configuration ? Therefore, I would be reluctant to provide an
implementation for the built-in httpd (even if that would be
relatively straight forward).

The solution IMO is not to deploy the application at the root, but at
a real URL (like the Wt homepage does). Then, this issue does not
exist: you can still serve static files, and your internal paths are
nicely handled, both in the "/app/path" and "/app/#path" forms.

> Improvements to the path API would be most welcome.  It feels like I've
> spent more time trying to get the above pathing problems figured out than I
> have writing my application.  :)

Suggestions are definitely welcome!

Regards,
koen

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to