That didn't work but prepending the jsessionid to the URL did,
I made my own version of resource link and prepended the id in the getURL()
method
protected final CharSequence getURL()
{
CharSequence temp = urlFor(IResourceListener.INTERFACE);
PrependingStringBuffer prep = new
PrependingStringBuffer(temp.toString());
prep.prepend(";jsessionid=" + this.getSession().getId());
return prep.toString();
}
Probably not much use to most people but nice to know it works anyway,
hopefully google will fix android and I can remove it as its a bit of a
dirty hack really (not holding my breath on that one though)
Nino.Martinez wrote:
>
> Add an attribute appender?
>
> I dont think tomcat cares where the jsessionid identifier are placed..
>
> chris888 wrote:
>> OK I see that in tomcat I can disable cookies for the entire web app by
>> a
>> setting int the context.xml. This is no good for me as I cant disable
>> cookies on such a global scale as the other apps we have running will
>> want
>> to use cookies
>>
>> Can I not manipulate the Link object in some way to include the session
>> id?
>>
>>
>> chris888 wrote:
>>
>>> Do you have any idea how i do that with Tomcat?
>>>
>>> I'm also reticent to do that unless I can do it for just android so I
>>> must
>>> be able to do it programatically based on the user agent or something
>>>
>>>
>>> Nino.Martinez wrote:
>>>
>>>> As Igor stated, you just have to enforce the servlet containers url
>>>> rewrite facility. It will just happen automatically.
>>>>
>>>> chris888 wrote:
>>>>
>>>>> OK forget that I just tried disabling cookies on the browser and it
>>>>> worked
>>>>> OK.
>>>>>
>>>>> So now I would really like to try just adding the sesion id to the
>>>>> link
>>>>> URL,
>>>>> can I do this by manipulating the webmarkupcontainer? do you think it
>>>>> would
>>>>> work if i am mixing cookie and url session tracking?
>>>>>
>>>>> I tried adding a valuemap to the resourcelink but it then wants a
>>>>> shared
>>>>> resourcereference rather than a resource and I'm not sure thats the
>>>>> route to
>>>>> go down as that would add a parameter after the '?' and i think I need
>>>>> it
>>>>> before, here is the markup generated with cookies disabled in the
>>>>> browser
>>>>>
>>>>> ;jsessionid=E47FF1C037EFEAA8BC6408308A5270DA?wicket:interface=:0:messagelistrow:1:playmessagelink::IResourceListener::
>>>>> Unknown
>>>>>
>>>>>
>>>>> Below is the code that creates the list of links, (the
>>>>> VxsWASMessageResource
>>>>> extends DynamicWebResource that returns a stream in the
>>>>> getResourceState)
>>>>>
>>>>>
>>>>> VxsMessageIterator iter = pageList.iterator();
>>>>> RepeatingView rv = new
>>>>> RepeatingView("messagelistrow");
>>>>> add(rv);
>>>>>
>>>>> int count = 0;
>>>>> do {
>>>>> VxsVoiceMessage message =
>>>>> (VxsVoiceMessage)iter.next();
>>>>>
>>>>> WebMarkupContainer parent = new
>>>>> WebMarkupContainer(rv.newChildId());
>>>>> rv.add(parent);
>>>>>
>>>>> // Add the resource link
>>>>> ResourceLink link = new
>>>>> ResourceLink("playmessagelink", new
>>>>> VxsWASMessageResource(pageList.indexOf(message)));
>>>>> parent.add(link);
>>>>> link.add(new Label("fromlabel",
>>>>> message.getFromAddress().getPersonal()));
>>>>>
>>>>> count++;
>>>>>
>>>>> } while (iter.hasNext() && count < 6);
>>>>>
>>>>>
>>>>> Any ideas how to get the session id in there?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> igor.vaynberg wrote:
>>>>>
>>>>>
>>>>>> well, what you can do is disable session cookie tracking on your
>>>>>> servlet container. that way sessionid will be written into every url.
>>>>>>
>>>>>> -igor
>>>>>>
>>>>>> On Fri, Oct 24, 2008 at 11:00 AM, chris888 <[EMAIL PROTECTED]>
>>>>>> wrote:
>>>>>>
>>>>>>
>>>>>>> thanks for the lightning fast reply
>>>>>>>
>>>>>>> I'm guessing that the media player does not know about the browsers
>>>>>>> cookie
>>>>>>> so cant send it.
>>>>>>> How can I tell for sure if it is or not?
>>>>>>>
>>>>>>> On the browser requests object I see that a session id is requested
>>>>>>> and
>>>>>>> requestedSessionCookie is true
>>>>>>> When the media player requests they are null and false
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> igor.vaynberg wrote:
>>>>>>>
>>>>>>>
>>>>>>>> the jsessionid should be there only during the first request. after
>>>>>>>> the first request the container switches to using the session
>>>>>>>> cookie.
>>>>>>>> is the cookie set on the android end? is it being sent back?
>>>>>>>>
>>>>>>>> -igor
>>>>>>>>
>>>>>>>> On Fri, Oct 24, 2008 at 10:48 AM, chris888
>>>>>>>> <[EMAIL PROTECTED]>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>> I have a fairly simple wicket page that displays a list of links
>>>>>>>>> that
>>>>>>>>> are
>>>>>>>>> DynamicWebResource links to MP3 streams. This works fine on most
>>>>>>>>> platforms I
>>>>>>>>> am running on (the link either plays in the browser or media
>>>>>>>>> player
>>>>>>>>> opens
>>>>>>>>> to
>>>>>>>>> play the link) but on Android I find that when the media player
>>>>>>>>> opens
>>>>>>>>> it
>>>>>>>>> makes requests on a different session and by tracing back through
>>>>>>>>> the
>>>>>>>>> code I
>>>>>>>>> see that the requestedSessionID on the request is null.
>>>>>>>>>
>>>>>>>>> Is there a way to put the jsessionId on the ResourceLink URL?
>>>>>>>>> might
>>>>>>>>> that
>>>>>>>>> possibly allow wicket to pick up the correct session?
>>>>>>>>>
>>>>>>>>> Or any other suggestions very welcome
>>>>>>>>>
>>>>>>>>> Cheers :)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> View this message in context:
>>>>>>>>> http://www.nabble.com/No-session-requested-when-playing-MP3-resource-link-tp20154778p20154778.html
>>>>>>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://www.nabble.com/No-session-requested-when-playing-MP3-resource-link-tp20154778p20155020.html
>>>>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>> --
>>>> -Wicket for love
>>>>
>>>> Nino Martinez Wael
>>>> Java Specialist @ Jayway DK
>>>> http://www.jayway.dk
>>>> +45 2936 7684
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>
> --
> -Wicket for love
>
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/No-session-requested-when-playing-MP3-resource-link-tp20154778p20190789.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]