setRegular and setExtra not working

All others add-ons (Secure FTP, SCP, Flickr, scripts ...).

setRegular and setExtra not working

Postby jmrico » Sun Apr 17, 2011 11:28 pm

We need to change some sessionID based on what the user clicks or types on our upload page, where the applet is embeded.

We figured setExtra and setRegular are meant just for this purpose but we can't get it to work. Even though the parameter gets updated (we check it with javascript and getExtra to confirm it has indeed been updated) the applet starts the upload with the original values.

1. we define default cookie value in html page code (via paramX valueX)
2. the user fires some event wich updates cookie value via setExtra
3. we check value has been updated via getExtra: it has
4. when transfer is started applet sends default cookie value ignoring the update via setExtra

Any help for us? Is there other workaround for changing cookies based
on user input without refreshing page (which would negate any input user has made).

PD: we also tried sharing cookies with the browser via cookiesource:jse but is no good either, (aparently) the applet reads cookies when it loads instead of when the upload is triggered, so if we update a browser cookie after applet has loaded, it wouldn't know about it.

Posts: 4
Joined: Thu Mar 25, 2010 2:10 am

Re: setRegular and setExtra not working

Postby jmrico » Sat Apr 23, 2011 12:19 pm

Any chance there's any help for us? anybody?
Posts: 4
Joined: Thu Mar 25, 2010 2:10 am

Re: setRegular and setExtra not working

Postby support » Sun Apr 24, 2011 2:11 pm

Why not relying on cookie updated by Set-Cookie from server-side?
JFileUpload works as any HTTP client. If cookie (such as sessionid) is updated by server-side then it will be taken into account.
User avatar
Posts: 1501
Joined: Sun Jan 27, 2008 6:19 pm

Return to Others


Sitemap | Privacy Statement | Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc.
in the U.S. and other countries. All other company and/or product names are the property of their respective owners.