Advice needed; Minimalist Java Browser

G

Gilbert

Hi

I'm planning a java based read-only system that will be deployed on an embedded device running Linux as the OS. The device will be totally standalone with no access to the outside world. Once each device is built - that's it! The current plan is to present the data through a browser backed by a stripped down web server/servlet engine.

I'm looking for suggestions for a "stripped" browser or configuration tips on how I can configure an existing java (or other Linux/ non Java compatible) browser. Using Firefox as an example, there is too much functionality that will be unusable, I need to conserve screen real estate and keep the total size of the OS and application to a minimum. I have no need for things like the Google Search facility, directly entering a URL will make no sense either. On the "File" menu, things like "Open File", "Print" make no sense either etc etc. I need to be able to display text and images so minimalist options like Lynx are out. The ability to understand CSS would be a bonus but not essential.

I suspect that I'm probably going to have to write my "browser" interface but I thought I'd ask first.
 
M

Mark Space

Gilbert said:
Hi

I'm planning a java based read-only system that will be deployed on
an embedded device running Linux as the OS. The device will be
totally standalone with no access to the outside world. Once each
device is built - that's it! The current plan is to present the data
through a browser backed by a stripped down web server/servlet
engine.

If all you need is HTML, a basic JEditorPane will display that. I don't
recall if it handles CSS, it might.

Starting point:

<http://java.sun.com/docs/books/tutorial/uiswing/components/editorpane.html>

Otherwise, you might need a full engine like Gecko and embed it in your app.
 
A

Andrew Thompson

If all you need is HTML, a basic JEditorPane will display that. I don't
recall if it handles CSS, it might.

Simple CSS, yes. If you control the pages
displayed, it should not be too hard to
produce some workable HTML/CSS.
 
M

Mark Space

Andrew said:
Simple CSS, yes. If you control the pages
displayed, it should not be too hard to
produce some workable HTML/CSS.

Also, while we are talking about the "simple" support present, I
remember the last time I used JEditorPane with html, one tag would
completely fubar the JEditorPane. I think one of the meta tags in the
header, if it contained a charset definition, like <META
content-type="text/html; charset=ISO-8059-1"/>. No matter what was in
that charset, even if the default charset type, the JEditorPane simply
would not display it at all. If you manually removed the charset part,
and the semicolon, it worked fine.

The solution was to disable generation of a <head> section in the XSLT
transformer, so that the charset definition would never be present.
 
R

Roedy Green

I suspect that I'm probably going to have to write my "browser" interface but I thought I'd ask first.
If you build one from the Swing components, it will work IF you
control the HTML it has to render. It does not support that much of
CSS and it is not as robust as a real browser. you can't go out
browsing random pages on the web with it.


There is a mini version of Opera you might use as a base.
--
Roedy Green Canadian Mind Products
http://mindprod.com
PM Steven Harper is fixated on the costs of implementing Kyoto, estimated as high as 1% of GDP.
However, he refuses to consider the costs of not implementing Kyoto which the
famous economist Nicholas Stern estimated at 5 to 20% of GDP
 
G

Gilbert

Roedy said:
If you build one from the Swing components, it will work IF you
control the HTML it has to render. It does not support that much of
CSS and it is not as robust as a real browser. you can't go out
browsing random pages on the web with it.
Yes, I will have complete control over the HTML to be rendered.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top