Ah ok.  That explains why I see it sometimes and not others.  This is
what I ended up doing:

Link link = pageRenderLinkSource.createPageRenderLinkWithContext("page",
context);
link.removeParameter("jsessionid");
return link;

Any problems with that?

Mark

On Fri, Feb 25, 2011 at 4:28 PM, Josh Canfield <joshcanfi...@gmail.com> wrote:
>> Any idea on how to prevent these session ids from being part of the
>> links created in this manner?
>
> You'll get a session id if you try to persist anything into the
> session, for instance if you use @ApplicationState as a page securing
> mechanisms might do.
>
> Tapestry calls encodeRedirectURL when you get the url out of the Link,
> if your application container uses url rewriting then it will append
> the jsessionid if the app server hasn't seen that cookies work.
>
> You could configure your app server to not do url rewriting, which may
> lead to things not working for users that don't want your cookies.
> or
> You could write a PageRenderLinkTransformer which returns a
> StatelessLink (copy LinkImpl and rename it) which never calls the
> encodeRedirectURL..
> or
> something else that isn't fresh off the top of my head!
>
> Good luck!
> Josh
>
> On Fri, Feb 25, 2011 at 1:24 PM, Mark <mark-li...@xeric.net> wrote:
>> I am using:
>>
>> Link link = pageRenderLinkSource.createPageRenderLinkWithContext("PageName",
>> pageContext);
>>
>> To get a link to a page with a particular context that ties into a
>> Facebook share component.  This has worked well, but now I'm
>> occasionally seeing it rendered with a jsessionid.  Which of course I
>> do not want in order to share it on facebook.
>>
>> It appears that that jsessionid started showing up once I started
>> securing certain pages of the application, but I'm not sure if that is
>> what is causing it.
>>
>> Any idea on how to prevent these session ids from being part of the
>> links created in this manner?
>>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to