|
|
RSSApplet is a Java applet that displays news headlines stored in the Rich Site Summary (RSS) XML format.
RSSApplet is a simple way to display RSS news from your Web site. Just copy the sample HTML, replace the src parameter with your news feed, and you are ready to roll. For an even more convenient method to display WebReference news try the RSS Configurator.
RSSApplet reads RSS newsfeeds from a given URL and displays the resulting headlines. Style parameters let you choose colors and fonts to have the applet match your Web site's look and feel.
RSSApplet, as the name implies, is a Java applet. Therefore it has to
adhere to the Java security rules, most importantly it can only connect
back to the host it came from to fetch the RSS news feed file. This
means the src parameter needs to have the same host name as the
archive and codebase attributes. If you want to display RSS feeds
from a different site, get their webmaster to put the applet somewhere on their site,
too, and embed this remote applet into your HTML like so:
<APPLET code=com.exploringxml.rss.applet.RSSViewerApplet.class archive=http://www.webreference.com/xml/rssApplet.jar codebase=http://www.webreference.com/ width=300 height=300> <PARAM name=src value=http://www.webreference.com/xml/index.rss> </APPLET>
Incorporating RSSApplet into your own site is fairly simple:
<applet> tag
as shown above in the previous question,
replacing www.webreference.com with your host name,
/xml/ with your directory name, and index.rss with your RSS file.
RSSApplet displays the headlines parsed from the given RSS source URL and displays them according to the many style parameters that can be supplied:
| Parameter | Type | Description |
|---|---|---|
| src | String | URL of RSS file |
| box.foreground | int | box foreground color |
| box.background | int | box background color |
| box.border | int | box border width |
| title.foreground | int | title foreground color |
| title.background | int | title background color |
| title.foreground.mouseover | int | title foreground color on mouse-over |
| title.background.mouseover | int | title background color on mouse-over |
| title.font.family | String | title font family |
| title.font.size | int | title font size |
| title.font.style | String | title font style |
| item.foreground | int | item foreground color |
| item.background | int | item background color |
| item.foreground.mouseover | int | item foreground color on mouse-over |
| item.background.mouseover | int | item background color on mouse-over |
| item.font.family | String | item font family |
| item.font.size | int | item font size |
| item.font.style | String | item font style |
| item.margin | int | item margin |
Sure. The RSSApplet Configurator produces the necessary HTML snippet to copy and paste as well as a preview of the applet's configuration for one of the many WebReference newsfeeds. Give it a try!
Right here.
RSSApplet is published under the GNU Public License. Feel free to use it on your Web site.
When you are using RSSApplet, I'd like to hear from you. Just send me feedback.
Congratulations, you've come to the right place ;-)
Produced by Michael Claßen
All Rights Reserved. Legal Notices.
URL: http://www.webreference.com/xml/tools/rssapplet.html
Created: Mar. 19, 2001
Revised: Mar. 19, 2001