This is my first stack overflow question, so if this is a bad form, please excuse me and correct me!
As you can see from the title, I am trying to implement a lightweight Java browser in the browser, but I ran into a problem, but before I tell you in detail, I will give a brief description of my implementation:
The program consists of the following classes:
GUI (Extends JFrame implements HyperlinkListener): graphical user interface
Engine: Does all real work BlackListPolicy (implements CookiePolicy)
I use JEditorPane with its content set to "text / html" to display web pages. Whenever the "GO" button or link is clicked, Engine gets a URL and then JEditorPane.setPage (URL)
So this leads me to the first part of my question:
The browser works, however, only simple html pages are displayed if I go to Google, for example, if I click on the link, it will work, it remembers my settings (Cookies) but if the Google Search button is pressed, for example, nothing happens, embedded objects (Flash, applets, etc.) are displayed, and other pages are incorrectly encoded.
My theory is that JEditorPane cannot display such objects and is not a good choice for a web browser or that I am setting the wrong content type for it.
Regarding the second part of my question:
As a cookieHandler, I do the following:
BlackListPolicy blackListPolicy = new BlackListPolicy (),
CookieManager cookieManager = new CookieManager (null, blackListPolicy);
That way, I use the default CookieStore, which in my limited understanding uses an internal implementation to store cookies (they are not persistent), which is what I want However, if someone goes by what I would call " extreme browsing session "to store an excessive number of cookies that could cause performance or memory problems, or does the CookieStore handle these cases by default?
Before asking, yes, I'm a student, but this is not homework or even something that is related to my current programs, this is what I want to implement, because I noticed that the best way to learn programming is to write programs
I only need abstract answers, possibly with a link that will send me in the right direction, if you want me to publish my code, I would gladly do it
~ Thanks