Bookmarkable urls

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Bookmarkable urls

Dave
Hi there,

I've a question on bookmarkable urls.

My server is: ZnZincServerAdaptor startOn:9090 .

And I have an application, myapp, configured this way:

application := WADispatcher default handlerAt: 'myapp'.
application preferenceAt: #serverPath put: '/'.
WADispatcher default defaultName: 'myapp' .


So when I point my browser to http://localhost:9090 everyhting is fine, but I'd like to have a bookmarkable url like: http://localhost:9090/whatever, unfortunately that url does not go through myapp, I know it because if I put a breakpoint in myapp>>initalRequest: my browser does not stop, instead if I point to http://localhost:9090/myapp/whatever it does.

How can I get rid of "myapp"? I already looked at updateUrl: and WABrowser and Pier searching for hints, but it's really obscure to me.
Thanks
 Dav
Reply | Threaded
Open this post in threaded view
|

Re: Bookmarkable urls

Dave
Nobody can help me?
Dave
Reply | Threaded
Open this post in threaded view
|

Re: Bookmarkable urls

John McKeon
Hi Dave
You might want to look at the Seaside-REST package.
John

On Wednesday, October 10, 2012, Dav <[hidden email]> wrote:
> Nobody can help me?
> Dave
>
>
>
> --
> View this message in context: http://forum.world.st/Bookmarkable-urls-tp4650731p4650746.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

--
jmck.seasidehosting.st

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Bookmarkable urls

Dave
Hi John,

 :-)

Thanks for you suggestion, I forgot to mention seaside-rest in my previous list.

So is it so difficult nobody cannot explain me briefly?
Dave  

John McKeon wrote
Hi Dave
You might want to look at the Seaside-REST package.
John

On Wednesday, October 10, 2012, Dav <[hidden email]> wrote:
> Nobody can help me?
> Dave
>
>
>
> --
> View this message in context:
http://forum.world.st/Bookmarkable-urls-tp4650731p4650746.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

--
jmck.seasidehosting.st

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Bookmarkable urls

Paul DeBruicker
In reply to this post by Dave
Its probably happening because when you access

http://localhost:9090/whatever

the default WADispatcher looks for the app configured to respond to that
path (/whatever) and finds nothing.

When you access the above address does it open your default app or
respond with "Not Found /whatever" ?


Put a halt in the

WADispatcher>>#handleFiltered:

and follow the execution up and down the stack to see whats happening.


I think starting an instance of the ZnZincServerAdaptor like this:

        | adaptor |
        adaptor := ZnZincServerAdaptor startOn: 9091.
        adaptor default server register.
        adaptor default requestHandler: (WAAdmin defaultDispatcher handlers at:
'myApp')


Should, for that port (9091), direct all requests to your app,  bypass
the default WADispatcher, and fix your issues.


This can also be helpful to be able to run the config & status apps on a
port that's only available on the host system rather than one proxied to
by apache or nginx.






On 10/10/2012 08:04 AM, Dav wrote:

> Hi there,
>
> I've a question on bookmarkable urls.
>
> My server is: ZnZincServerAdaptor startOn:9090 .
>
> And I have an application, myapp, configured this way:
>
> application := WADispatcher default handlerAt: 'myapp'.
> application preferenceAt: #serverPath put: '/'.
> WADispatcher default defaultName: 'myapp' .
>
>
> So when I point my browser to http://localhost:9090 everyhting is fine, but
> I'd like to have a bookmarkable url like: http://localhost:9090/whatever,
> unfortunately that url does not go through myapp, I know it because if I put
> a breakpoint in myapp>>initalRequest: my browser does not stop, instead if I
> point to http://localhost:9090/myapp/whatever it does.
>
> How can I get rid of "myapp"? I already looked at updateUrl: and WABrowser
> and Pier searching for hints, but it's really obscure to me.
> Thanks
>   Dav
>
>
>
> --
> View this message in context: http://forum.world.st/Bookmarkable-urls-tp4650731.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Bookmarkable urls

Paul DeBruicker
In reply to this post by Dave
On 10/10/2012 03:29 PM, Dav wrote:
> So is it so difficult nobody cannot explain me briefly?
> Dave


Not if you can read the code and follow its execution with the
debugger......



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Bookmarkable urls

Dave
In reply to this post by Paul DeBruicker
Hi Paul

On Oct 11, 2012, at 0:37, "Paul DeBruicker [via Smalltalk]" <[hidden email]> wrote:

Its probably happening because when you access

http://localhost:9090/whatever

the default WADispatcher looks for the app configured to respond to that
path (/whatever) and finds nothing.

When you access the above address does it open your default app or
respond with "Not Found /whatever" ?


It replies with not found.


Put a halt in the

WADispatcher>>#handleFiltered:

and follow the execution up and down the stack to see whats happening.


I'll do it.


I think starting an instance of the ZnZincServerAdaptor like this:

        | adaptor |
        adaptor := ZnZincServerAdaptor startOn: 9091.
        adaptor default server register.
        adaptor default requestHandler: (WAAdmin defaultDispatcher handlers at:
'myApp')
Should, for that port (9091), direct all requests to your app,  bypass
the default WADispatcher, and fix your issues.


Good I also try to start the adapter as you suggest, thanks
Dave


This can also be helpful to be able to run the config & status apps on a
port that's only available on the host system rather than one proxied to
by apache or nginx.






On 10/10/2012 08:04 AM, Dav wrote:

> Hi there,
>
> I've a question on bookmarkable urls.
>
> My server is: ZnZincServerAdaptor startOn:9090 .
>
> And I have an application, myapp, configured this way:
>
> application := WADispatcher default handlerAt: 'myapp'.
> application preferenceAt: #serverPath put: '/'.
> WADispatcher default defaultName: 'myapp' .
>
>
> So when I point my browser to http://localhost:9090 everyhting is fine, but
> I'd like to have a bookmarkable url like: http://localhost:9090/whatever,
> unfortunately that url does not go through myapp, I know it because if I put
> a breakpoint in myapp>>initalRequest: my browser does not stop, instead if I
> point to http://localhost:9090/myapp/whatever it does.
>
> How can I get rid of "myapp"? I already looked at updateUrl: and WABrowser
> and Pier searching for hints, but it's really obscure to me.
> Thanks
>   Dav
>
>
>
> --
> View this message in context: http://forum.world.st/Bookmarkable-urls-tp4650731.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Bookmarkable-urls-tp4650731p4650756.html
To unsubscribe from Bookmarkable urls, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Bookmarkable urls

Dave
In reply to this post by Paul DeBruicker
Unfortunately that code is not really simple to read nor to follow. 
Moreover you have to know where to place a breakpoint otherwise you are lost in several branches and method calls.
FAQs on seaside.st don't help a lot.
Seaside book, that I bought, lack to delve this issue.
And finally I didn't find a clue searching in seaside mailing list.

Dave

On Oct 11, 2012, at 0:38, "Paul DeBruicker [via Smalltalk]" <[hidden email]> wrote:

On 10/10/2012 03:29 PM, Dav wrote:
> So is it so difficult nobody cannot explain me briefly?
> Dave


Not if you can read the code and follow its execution with the
debugger......



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Bookmarkable-urls-tp4650731p4650757.html
To unsubscribe from Bookmarkable urls, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Bookmarkable urls

Dave
In reply to this post by Paul DeBruicker
Paul DeBruicker wrote
I think starting an instance of the ZnZincServerAdaptor like this:

        | adaptor |
        adaptor := ZnZincServerAdaptor startOn: 9091.
        adaptor default server register.
        adaptor default requestHandler: (WAAdmin defaultDispatcher handlers at:
'myApp')


Should, for that port (9091), direct all requests to your app,  bypass
the default WADispatcher, and fix your issues.
Hi Paul,
 It works. Every request goes to my app.
Thanks
 Dave