You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andreas Andreou <an...@di.uoa.gr> on 2006/02/22 18:25:06 UTC

Re: Friendly URLs after button pressed

You generally don't want users bookmarking pages generated
after a post request (no matter how friendly you make the post url).

The idea is to do a redirect-after-post

albartell wrote:

>Hi All,
>
>I am implementing friendly URL's in an attempt to make pages easy to gain
>access to. For instance I want someone to be able to bookmark the following
>url: http://localhost:8080/rxs/TrialKey.html. I have implemented the
>contribution in hivemodule.xml as shown below.
>
>After selecting the button on TrialKey.html(shown below) it executes my
>doTrialKey method correctly, but when it returns to the page the url looks
>like this: http://localhost:8080/rxs/TrialKey,form.direct. That would be
>fine if the user could bookmark that value, but if I try to go to that url
>directly I get a stale link exception. 
>
>If I take the direct-service-encoder out of the mix then when I press the
>button it produces this url: http://localhost:8080/rxs/app
>
>So I guess my question is... Is there a way to make friendly urls
>friendlier? :-)
>Aaron Bartell
>
>-----hivemodule.xml-----
><module id="rxs" version="1.0.0" package="com.rxs.pages">
>	<contribution configuration-id="tapestry.url.ServiceEncoders">
>		<page-service-encoder id="page" extension="html"
>service="page" />
>	</contribution>
>	<contribution configuration-id="tapestry.url.ServiceEncoders">
>		<direct-service-encoder id="direct"
>stateless-extension="direct" stateful-extension="sdirect" />
>	</contribution>
></module>
>
>-----TrialKey.html-----
><html jwcid="@Shell" title="RXS">
><head>
></head>
>
><body jwcid="@Body">
><form jwcid="form@Form" success="listener:doSubmit"> 
><input type="submit" jwcid="submit@Submit" action="listener:doTrialKey"
>value="Get Trial Key"/>
><span jwcid="@Insert" value="ognl:key"/>
></form>
></body>
></html>
>
> 
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org