GeeCON Prague 2014*
The moose likes Swing / AWT / SWT and the fly likes set cookie to jwebbrowser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "set cookie to jwebbrowser" Watch "set cookie to jwebbrowser" New topic
Author

set cookie to jwebbrowser

ramesh kancherla
Ranch Hand

Joined: May 01, 2008
Posts: 124
I am using chrriis.dj.nativeswing.ui.JWebBrowser

for displaying web page in to jframe i am using webbrowser.setURL(url)

but i have to set cookie to that url how can i do it

my url like "http://live.instacoll.com/instasecure/getDocPreferences.do?"

cookie like this JSESSIONID=1468F79FF6507C3A5EF5C3CD7BC23960.server1

can anyone please help me

Thanks & Regards
Ramesh K
Steven Wall
Greenhorn

Joined: Nov 04, 2007
Posts: 22
You should be able to take the URL then add a semicolon and then add the session id.

For example:

String url = "http://www.abc.com;JSESSIONID=123456789"


SCJP, SCWCD
ramesh kancherla
Ranch Hand

Joined: May 01, 2008
Posts: 124
i am using DJ Native swing web browser. this web browser does not contains setcookie method. so i concatenated cookie to URL as like

http://abc.com/xyz.do?;JSESSIONID=12345

but webbrowser not setting JSESSIONID as a cookie. i am getting session timeout.

I have to set cookie ( jsessionid) and url to webbrowser. and then display that webbrowser in JFrame.

can any one please suggestion me which webbrowser will does.

Thanks & Regards
Ramesh k
[ July 03, 2008: Message edited by: ramesh kancherla ]
ramesh kancherla
Ranch Hand

Joined: May 01, 2008
Posts: 124
can any one please give me advice how to solve my problem
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42047
    
  64
You already got the answer in this post elsewhere, didn't you?

Please note that we like for people to BeForthrightWhenCrossPostingToOtherSites.


Ping & DNS - my free Android networking tools app
ramesh kancherla
Ranch Hand

Joined: May 01, 2008
Posts: 124
i didnt get solve my problem.
can you please advice me

Thanks & Regards
Ramesh K
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42047
    
  64
The answer was that the problem can't be solved because JWebBrowser doesn't have access to the browser's cookies.

Maybe the answer is to use some other browser component that does support cookies; you could try Lobo (on SourceForge), or IceBrowser.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: set cookie to jwebbrowser