Erlang Mailing Lists

Author Message

<  Yaws mailing list  ~  Greedy appmods

Guest
Posted: Fri Sep 15, 2006 12:04 am Reply with quote
Guest
Hi,

Yaws looks great, though i'm not really a fan of the JSP way of doing things and so am planning to use appmods for all of the resources in my application. One problem I see is that application modules are greedy with path segments. I understand this was intended as a feature, but it would make my life a lot easier if I could work around it. Do I need to hack the source, or did i miss something? Also, how would i put an appmod at "/"? I tried {"/", module} and {"", module}?

--
Moe Aboulkheir

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
rsaccon
Posted: Fri Sep 15, 2006 12:19 am Reply with quote
User Joined: 09 Aug 2006 Posts: 144
This was discussed recently on this list, the workaround I use to
achieve something like that is using a conditional (for anything else
that static assets) mod_rewrite.

On 9/14/06, Moe Aboulkheir <moe@divmod.com> wrote:
> Hi,
>
> Yaws looks great, though i'm not really a fan of the JSP way of doing things and so am planning to use appmods for all of the resources in my application. One problem I see is that application modules are greedy with path segments. I understand this was intended as a feature, but it would make my life a lot easier if I could work around it. Do I need to hack the source, or did i miss something? Also, how would i put an appmod at "/"? I tried {"/", module} and {"", module}?
>
> --
> Moe Aboulkheir
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Erlyaws-list mailing list
> Erlyaws-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
>


--
Roberto Saccon

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
View user's profile Send private message
Guest
Posted: Fri Sep 15, 2006 12:38 am Reply with quote
Guest
I simply use a conditional for static assets if the url is prefixed
with static as in www.blah.com/static/rentcheck/whatever.js
I also treat all paths that end in *.* as static. We will see how
that plays out...

On 9/14/06, Roberto Saccon <rsaccon@gmail.com> wrote:
> This was discussed recently on this list, the workaround I use to
> achieve something like that is using a conditional (for anything else
> that static assets) mod_rewrite.
>
> On 9/14/06, Moe Aboulkheir <moe@divmod.com> wrote:
> > Hi,
> >
> > Yaws looks great, though i'm not really a fan of the JSP way of doing things and so am planning to use appmods for all of the resources in my application. One problem I see is that application modules are greedy with path segments. I understand this was intended as a feature, but it would make my life a lot easier if I could work around it. Do I need to hack the source, or did i miss something? Also, how would i put an appmod at "/"? I tried {"/", module} and {"", module}?
> >
> > --
> > Moe Aboulkheir
> >
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > Erlyaws-list mailing list
> > Erlyaws-list@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/erlyaws-list
> >
>
>
> --
> Roberto Saccon
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Erlyaws-list mailing list
> Erlyaws-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
Guest
Posted: Sun Sep 17, 2006 3:36 pm Reply with quote
Guest
Moe Aboulkheir wrote:
> Hi,
>
> Yaws looks great, though i'm not really a fan of the JSP way of doing things and so am planning to use appmods for all of the resources in my application. One problem I see is that application modules are greedy with path segments. I understand this was intended as a feature, but it would make my life a lot easier if I could work around it. Do I need to hack the source, or did i miss something?

What do you mean by "greedy" here.


> Also, how would i put an appmod at "/"? I tried {"/", module} and {"", module}?
>
> -

This got broken some time ago. It should work with latest Yaws release
though.


klacke

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
Guest
Posted: Mon Sep 18, 2006 6:34 pm Reply with quote
Guest
On Sun, 17 Sep 2006 17:31:50 +0200, Claes Wikstrom <klacke@tail-f.com> wrote:
>Moe Aboulkheir wrote:
>>Hi,
>>
>>Yaws looks great, though i'm not really a fan of the JSP way of doing
>>things and so am planning to use appmods for all of the resources in my
>>application. One problem I see is that application modules are greedy with
>>path segments. I understand this was intended as a feature, but it would
>>make my life a lot easier if I could work around it. Do I need to hack the
>>source, or did i miss something?
>
>What do you mean by "greedy" here.

I mean that at appmod at /foo will assimilate any path of which that is a prefix. It's an awful solution, but what I did to solve this was adding a rewrite rule that converts slashes (except the leading and possibly trailing ones) in paths into colons if the path does not start with /static, so /shopping-cart/foo/ becomes /shopping-cart:foo/, so i can add my appmods as:

{"/shopping-cart", shopping_cart}, {"/shopping-cart:foo", foo}

I looked at the source, but i'm very new to erlang and didn't feel comfortable changing anything.

--
Moe Aboulkheir

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
Guest
Posted: Mon Sep 18, 2006 8:53 pm Reply with quote
Guest
Maybe not exactly what you are looking after,
but the Yaws applications handler handles "Yapps"
at URLs like http://xxx/shopping-cart/
these applications may have "private" appmods like foo

http://xxx/shopping-cart/foo

only visible for that application.

See: http://yaws.hyber.org/yapp_intro.yaws
for more info.

Regards
Mikael

Mon 18 Sep 2006 20:33 Moe Aboulkheir wrote:
> ..
> I mean that at appmod at /foo will assimilate any path of which that is a
> prefix. It's an awful solution, but what I did to solve this was adding a
> rewrite rule that converts slashes (except the leading and possibly
> trailing ones) in paths into colons if the path does not start with
> /static, so /shopping-cart/foo/ becomes /shopping-cart:foo/, so i can add
> my appmods as:
>
> {"/shopping-cart", shopping_cart}, {"/shopping-cart:foo", foo}
>
> I looked at the source, but i'm very new to erlang and didn't feel
> comfortable changing anything.
>
> --
> Moe Aboulkheir


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum