Java

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • friendly URL restart redirects to /app

    7 answers - 1011 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    I followed the instructions on friendly urls for T4, and it works just fine
    except for one thing.
    The exception page correctly links to '/restart.do', but when you follow the
    link it gets redirected to '/app' rather than '/'
    Is this a bug or didn't I configure it correctly?
    <contribution configuration-id="tapestry.url.ServiceEncoders">
    <direct-service-encoder id="direct" stateless-extension="direct"
    stateful-extension="sdirect"/>
    <page-service-encoder id="page" extension="htm" service="page"/>
    <page-service-encoder id="external" extension="external"
    service="external"/>
    <asset-encoder id="asset" path="/assets"/>
    <extension-encoder id="ext" extension="do" after="*"/>
    </contribution>
    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
  • No.1 | | 1902 bytes | |

    This is not directly related to your question but are your pages all named
    html? I ask because I saw this:
    <page-service-encoder id="page" extension="htm" service="page"/>
    I've found a bug in T4 where your extension might be htm, but Tapestry
    expects all templates to be named .html.

    Mike

    Michael Grundvig
    Electrotank, Inc
    http://www.electrotank.com

    Message
    From: "hv @ Fashion Content" <info (AT) fashioncontent (DOT) com>
    To: <users (AT) tapestry (DOT) apache.org>
    Sent: Sunday, June 25, 2006 8:16 AM
    Subject: friendly URL restart redirects to /app


    >I followed the instructions on friendly urls for T4, and it works just fine
    >except for one thing.
    >

    The exception page correctly links to '/restart.do', but when you follow
    the link it gets redirected to '/app' rather than '/'

    Is this a bug or didn't I configure it correctly?

    <contribution configuration-id="tapestry.url.ServiceEncoders">

    <direct-service-encoder id="direct" stateless-extension="direct"
    stateful-extension="sdirect"/>

    <page-service-encoder id="page" extension="htm" service="page"/>

    <page-service-encoder id="external" extension="external"
    service="external"/>

    <asset-encoder id="asset" path="/assets"/>

    <extension-encoder id="ext" extension="do" after="*"/>

    </contribution>
    >
    >
    >
    >


    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
  • No.2 | | 3223 bytes | |

    All my templates are named .html, so I can actually access the template in
    parallel with the page service.

    I don't consider it a bug, and you can change it. ServiceEncoders deal with
    how URLs are interpreted not how files/resources are named.

    In Tap3 you would change it in the .application file, I guess you can now
    change it in hivemodule.xml as well if you want.

    In Tap4 there is a new PageSource thing, which I guess means that you can
    completely change how templates are handled if you like.

    Henrik

    "Mike Grundvig" <mike (AT) electrotank (DOT) comskrev i en meddelelse
    news:041b01c69861$4c76edb0$6401a8c0@MIKEDESKTP
    This is not directly related to your question but are your pages all named
    .html? I ask because I saw this:
    <page-service-encoder id="page" extension="htm" service="page"/>
    I've found a bug in T4 where your extension might be htm, but Tapestry
    expects all templates to be named .html.

    Mike

    Michael Grundvig
    Electrotank, Inc
    http://www.electrotank.com
    --
    Message
    From: "hv @ Fashion Content" <info (AT) fashioncontent (DOT) com>
    To: <users (AT) tapestry (DOT) apache.org>
    Sent: Sunday, June 25, 2006 8:16 AM
    Subject: friendly URL restart redirects to /app
    >
    >
    >>I followed the instructions on friendly urls for T4, and it works just
    >>fine except for one thing.
    >>

    >The exception page correctly links to '/restart.do', but when you follow
    >the link it gets redirected to '/app' rather than '/'
    >>

    >Is this a bug or didn't I configure it correctly?
    >>

    ><contribution configuration-id="tapestry.url.ServiceEncoders">
    >>

    ><direct-service-encoder id="direct" stateless-extension="direct"
    >stateful-extension="sdirect"/>
    >>

    ><page-service-encoder id="page" extension="htm" service="page"/>
    >>

    ><page-service-encoder id="external" extension="external"
    >service="external"/>
    >>

    ><asset-encoder id="asset" path="/assets"/>
    >>

    ><extension-encoder id="ext" extension="do" after="*"/>
    >>

    ></contribution>
    >>
    >>
    >>
    >>

    >
    >To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    >For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
    >>
    >>

    >
    >
    >


    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
  • No.3 | | 3882 bytes | |

    Short of re-writing some of the internal guts of Tapestry, templates have to
    end in the .HTML extension (or you have to rename all the internal Tapestry
    templates to your new extension). That's what I was referring to. I brought
    this up only so you wouldn't be caught by surprise like I was.

    Michael Grundvig
    Electrotank, Inc
    http://www.electrotank.com

    Message
    From: "hv @ Fashion Content" <info (AT) fashioncontent (DOT) com>
    To: <users (AT) tapestry (DOT) apache.org>
    Sent: Sunday, June 25, 2006 10:07 AM
    Subject: Re: friendly URL restart redirects to /app

    All my templates are named .html, so I can actually access the template in
    parallel with the page service.

    I don't consider it a bug, and you can change it. ServiceEncoders deal
    with how URLs are interpreted not how files/resources are named.

    In Tap3 you would change it in the .application file, I guess you can now
    change it in hivemodule.xml as well if you want.

    In Tap4 there is a new PageSource thing, which I guess means that you can
    completely change how templates are handled if you like.

    Henrik

    "Mike Grundvig" <mike (AT) electrotank (DOT) comskrev i en meddelelse
    news:041b01c69861$4c76edb0$6401a8c0@MIKEDESKTP
    >This is not directly related to your question but are your pages all
    >named .html? I ask because I saw this:
    ><page-service-encoder id="page" extension="htm" service="page"/>
    >I've found a bug in T4 where your extension might be htm, but Tapestry
    >expects all templates to be named .html.
    >>

    >Mike
    >>

    >Michael Grundvig
    >Electrotank, Inc
    >http://www.electrotank.com
    >>
    >>

    >Message
    >From: "hv @ Fashion Content" <info (AT) fashioncontent (DOT) com>
    >To: <users (AT) tapestry (DOT) apache.org>
    >Sent: Sunday, June 25, 2006 8:16 AM
    >Subject: friendly URL restart redirects to /app
    >>
    >>

    I followed the instructions on friendly urls for T4, and it works just
    fine except for one thing.

    The exception page correctly links to '/restart.do', but when you follow
    the link it gets redirected to '/app' rather than '/'

    Is this a bug or didn't I configure it correctly?

    <contribution configuration-id="tapestry.url.ServiceEncoders">

    <direct-service-encoder id="direct" stateless-extension="direct"
    stateful-extension="sdirect"/>

    <page-service-encoder id="page" extension="htm" service="page"/>

    <page-service-encoder id="external" extension="external"
    service="external"/>

    <asset-encoder id="asset" path="/assets"/>

    <extension-encoder id="ext" extension="do" after="*"/>

    </contribution>

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org


    >>
    >>
    >>

    >
    >To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    >For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
    >>
    >>

    >
    >
    >
    >


    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
  • No.4 | | 2215 bytes | |

    Would the following be fix the redirect?

    <implementation service-id="tapestry.services.Restart">

    <invoke-factory service-id="hivemind.BuilderFactory" model="singleton" >

    <construct class="RestartService" >
    <set-service property="request"
    service-id="" />
    <set-service property="response"
    service-id="" />
    <set-object property="servletPath" value="literal:/" />
    <set-object property="linkFactory" value="infrastructure:linkFactory" />
    </construct>
    </invoke-factory>

    </implementation>

    <contribution configuration-id="hivemind.FactoryDefaults">

    <default symbol="" value="/"/>

    </contribution>

    change Restart service to act like Home service

    Henrik

    "hv @ Fashion Content" <info (AT) fashioncontent (DOT) comskrev i en meddelelse
    news:e7m2ae$dmi$1 (AT) sea (DOT) gmane.org
    >I followed the instructions on friendly urls for T4, and it works just fine
    >except for one thing.
    >

    The exception page correctly links to '/restart.do', but when you follow
    the link it gets redirected to '/app' rather than '/'

    Is this a bug or didn't I configure it correctly?

    <contribution configuration-id="tapestry.url.ServiceEncoders">

    <direct-service-encoder id="direct" stateless-extension="direct"
    stateful-extension="sdirect"/>

    <page-service-encoder id="page" extension="htm" service="page"/>

    <page-service-encoder id="external" extension="external"
    service="external"/>

    <asset-encoder id="asset" path="/assets"/>

    <extension-encoder id="ext" extension="do" after="*"/>

    </contribution>
    >
    >
    >
    >


    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
  • No.5 | | 4604 bytes | |

    Thanks for the advice, but you are actually wrong. It is quite trivial to
    change the Tapestry defaults.

    The default you are talking about can be changed by a <metaline in the
    webapp.application file or by a <contributionin your applications
    hivemodule.xml

    I see on the dev list that Howard already replied :)

    Henrik

    "Mike Grundvig" <mike (AT) electrotank (DOT) comskrev i en meddelelse
    news:046a01c6986a$5f529200$6401a8c0@MIKEDESKTP
    Short of re-writing some of the internal guts of Tapestry, templates have
    to end in the .HTML extension (or you have to rename all the internal
    Tapestry templates to your new extension). That's what I was referring to.
    I brought this up only so you wouldn't be caught by surprise like I was.

    Michael Grundvig
    Electrotank, Inc
    http://www.electrotank.com
    --
    Message
    From: "hv @ Fashion Content" <info (AT) fashioncontent (DOT) com>
    To: <users (AT) tapestry (DOT) apache.org>
    Sent: Sunday, June 25, 2006 10:07 AM
    Subject: Re: friendly URL restart redirects to /app
    >
    >
    >All my templates are named .html, so I can actually access the template
    >in parallel with the page service.
    >>

    >I don't consider it a bug, and you can change it. ServiceEncoders deal
    >with how URLs are interpreted not how files/resources are named.
    >>

    >In Tap3 you would change it in the .application file, I guess you can now
    >change it in hivemodule.xml as well if you want.
    >>

    >
    >>

    >In Tap4 there is a new PageSource thing, which I guess means that you can
    >completely change how templates are handled if you like.
    >>

    >Henrik
    >>

    >"Mike Grundvig" <mike (AT) electrotank (DOT) comskrev i en meddelelse
    >news:041b01c69861$4c76edb0$6401a8c0@MIKEDESKTP

    This is not directly related to your question but are your pages all
    named .html? I ask because I saw this:
    <page-service-encoder id="page" extension="htm" service="page"/>
    I've found a bug in T4 where your extension might be htm, but Tapestry
    expects all templates to be named .html.

    Mike

    Michael Grundvig
    Electrotank, Inc
    http://www.electrotank.com

    Message
    From: "hv @ Fashion Content" <info (AT) fashioncontent (DOT) com>
    To: <users (AT) tapestry (DOT) apache.org>
    Sent: Sunday, June 25, 2006 8:16 AM
    Subject: friendly URL restart redirects to /app

    I followed the instructions on friendly urls for T4, and it works just
    fine except for one thing.

    The exception page correctly links to '/restart.do', but when you
    follow the link it gets redirected to '/app' rather than '/'

    Is this a bug or didn't I configure it correctly?

    <contribution configuration-id="tapestry.url.ServiceEncoders">

    <direct-service-encoder id="direct" stateless-extension="direct"
    stateful-extension="sdirect"/>

    <page-service-encoder id="page" extension="htm" service="page"/>

    <page-service-encoder id="external" extension="external"
    service="external"/>

    <asset-encoder id="asset" path="/assets"/>

    <extension-encoder id="ext" extension="do" after="*"/>

    </contribution>

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org


    >>
    >>
    >>
    >>

    >
    >To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    >For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
    >>
    >>

    >
    >
    >


    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
  • No.6 | | 1282 bytes | |

    Restart service clears the session and redirects to
    the Tapestry Servlet (which is usually /app)

    It's quite easy to create your own restart service and do
    other stuff
    See

    From "hv @ Fashion Content" <info (AT) fashioncontent (DOT) com>:

    I followed the instructions on friendly urls for T4, and it works just fine
    except for one thing.

    The exception page correctly links to '/restart.do', but when you follow the

    link it gets redirected to '/app' rather than '/'

    Is this a bug or didn't I configure it correctly?

    <contribution configuration-id="tapestry.url.ServiceEncoders">

    <direct-service-encoder id="direct" stateless-extension="direct"
    stateful-extension="sdirect"/>

    <page-service-encoder id="page" extension="htm" service="page"/>

    <page-service-encoder id="external" extension="external"
    service="external"/>

    <asset-encoder id="asset" path="/assets"/>

    <extension-encoder id="ext" extension="do" after="*"/>

    </contribution>

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
  • No.7 | | 5117 bytes | |

    Yes, Mr. Ship just posted that on the Dev forum. I'm very glad to be
    incorrect. This will save me a ton of time :)

    Michael Grundvig
    Electrotank, Inc
    http://www.electrotank.com

    Message
    From: "hv @ Fashion Content" <info (AT) fashioncontent (DOT) com>
    To: <users (AT) tapestry (DOT) apache.org>
    Sent: Sunday, June 25, 2006 11:03 AM
    Subject: Re: friendly URL restart redirects to /app

    Thanks for the advice, but you are actually wrong. It is quite trivial to
    change the Tapestry defaults.

    The default you are talking about can be changed by a <metaline in the
    webapp.application file or by a <contributionin your applications
    hivemodule.xml

    I see on the dev list that Howard already replied :)

    Henrik

    "Mike Grundvig" <mike (AT) electrotank (DOT) comskrev i en meddelelse
    news:046a01c6986a$5f529200$6401a8c0@MIKEDESKTP
    >Short of re-writing some of the internal guts of Tapestry, templates have
    >to end in the .HTML extension (or you have to rename all the internal
    >Tapestry templates to your new extension). That's what I was referring
    >to. I brought this up only so you wouldn't be caught by surprise like I
    >was.
    >>

    >Michael Grundvig
    >Electrotank, Inc
    >http://www.electrotank.com
    >>
    >>

    >Message
    >From: "hv @ Fashion Content" <info (AT) fashioncontent (DOT) com>
    >To: <users (AT) tapestry (DOT) apache.org>
    >Sent: Sunday, June 25, 2006 10:07 AM
    >Subject: Re: friendly URL restart redirects to /app
    >>
    >>

    All my templates are named .html, so I can actually access the template
    in parallel with the page service.

    I don't consider it a bug, and you can change it. ServiceEncoders deal
    with how URLs are interpreted not how files/resources are named.

    In Tap3 you would change it in the .application file, I guess you can
    now change it in hivemodule.xml as well if you want.

    In Tap4 there is a new PageSource thing, which I guess means that you
    can completely change how templates are handled if you like.

    Henrik

    "Mike Grundvig" <mike (AT) electrotank (DOT) comskrev i en meddelelse
    news:041b01c69861$4c76edb0$6401a8c0@MIKEDESKTP
    This is not directly related to your question but are your pages all
    named .html? I ask because I saw this:
    <page-service-encoder id="page" extension="htm" service="page"/>
    I've found a bug in T4 where your extension might be htm, but Tapestry
    expects all templates to be named .html.

    Mike

    Michael Grundvig
    Electrotank, Inc
    http://www.electrotank.com

    Message
    From: "hv @ Fashion Content" <info (AT) fashioncontent (DOT) com>
    To: <users (AT) tapestry (DOT) apache.org>
    Sent: Sunday, June 25, 2006 8:16 AM
    Subject: friendly URL restart redirects to /app

    I followed the instructions on friendly urls for T4, and it works just
    fine except for one thing.

    The exception page correctly links to '/restart.do', but when you
    follow the link it gets redirected to '/app' rather than '/'

    Is this a bug or didn't I configure it correctly?

    <contribution configuration-id="tapestry.url.ServiceEncoders">

    <direct-service-encoder id="direct" stateless-extension="direct"
    stateful-extension="sdirect"/>

    <page-service-encoder id="page" extension="htm" service="page"/>

    <page-service-encoder id="external" extension="external"
    service="external"/>

    <asset-encoder id="asset" path="/assets"/>

    <extension-encoder id="ext" extension="do" after="*"/>

    </contribution>

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org


    >>
    >>
    >>

    >
    >To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    >For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org
    >>
    >>

    >
    >
    >
    >


    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org

    To unsubscribe, e-mail: users-unsubscribe (AT) tapestry (DOT) apache.org
    For additional commands, e-mail: users-help (AT) tapestry (DOT) apache.org

Re: friendly URL restart redirects to /app


max 4000 letters.
Your nickname that display:
In order to stop the spam: 9 + 8 =
QUESTION ON "Java"

EMSDN.COM