Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!diablo1.news.osn.de!news.osn.de!diablo2.news.osn.de!ecngs!feeder.ecngs.de!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 09 Jan 2013 03:13:00 -0600 Date: Wed, 09 Jan 2013 09:12:57 +0000 From: lipska the kat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120410 Thunderbird/11.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Web browser in java References: <79904e78-2885-4a7f-a3e2-f260ffb6063a@googlegroups.com> <50ecc3a6$0$293$14726298@news.sunsite.dk> In-Reply-To: <50ecc3a6$0$293$14726298@news.sunsite.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: Lines: 29 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-nqznP3RyyFvS71WosZuwhwTOlIwBUf3SLNMzF+IK0BJjs22v4gMFW2LGhABbxYir7GBOu7TH4X4zEaK!hSwjayuS4CtNdiEvZ/t662Luf1da7YPgUo1RtWv/KoYiDZCkKyNm1oDGyvuhkHSjfqhWT9vsNRE= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2276 Xref: csiph.com comp.lang.java.programmer:21244 On 09/01/13 01:10, Arne Vajhøj wrote: > On 1/8/2013 7:19 AM, Roma Asnani wrote: >> Want to create a web browser but unable to handle cookies can any one >> help? >> I get some source from this link >> http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-JEditorPane.html >> >> but it display a simple browser but has no cookies or session handling. > > I think the right way is to subclass JEditorPane and > override getStream(URL) with a method that uses > Apache HttpClient instead of HttpURLConnection. It depends. If the object of the exercise is to understand the mechanics of cookie handing then 'doing it yourself' is a great learning exercise. If however the object of the exercise is to demonstrate your ability to delegate responsibility then using HttpClient and a rendering engine and some other bits and pieces would probably earn you a good grade. Horses for courses I guess. lipska -- Lipska the Kat©: Troll hunter, sandbox destroyer and farscape dreamer of Aeryn Sun