Deprecated: Assigning the return value of new by reference is deprecated in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-settings.php on line 520 Deprecated: Assigning the return value of new by reference is deprecated in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-settings.php on line 535 Deprecated: Assigning the return value of new by reference is deprecated in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-settings.php on line 542 Deprecated: Assigning the return value of new by reference is deprecated in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-settings.php on line 578 Deprecated: Function set_magic_quotes_runtime() is deprecated in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-settings.php on line 18 Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl(&$output) in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/classes.php on line 1199 Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl(&$output) in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/classes.php on line 1199 Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output) in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/classes.php on line 1199 Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el(&$output) in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/classes.php on line 1199 Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output) in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/classes.php on line 1244 Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl(&$output) in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/classes.php on line 1391 Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl(&$output) in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/classes.php on line 1391 Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el(&$output) in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/classes.php on line 1391 Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el(&$output) in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/classes.php on line 1391 Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output) in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/classes.php on line 1442 Strict Standards: Redefining already defined constructor for class wpdb in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/wp-db.php on line 306 Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/cache.php on line 431 Strict Standards: Declaration of Walker_Comment::start_lvl() should be compatible with Walker::start_lvl(&$output) in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/comment-template.php on line 1266 Strict Standards: Declaration of Walker_Comment::end_lvl() should be compatible with Walker::end_lvl(&$output) in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/comment-template.php on line 1266 Strict Standards: Declaration of Walker_Comment::start_el() should be compatible with Walker::start_el(&$output) in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/comment-template.php on line 1266 Strict Standards: Declaration of Walker_Comment::end_el() should be compatible with Walker::end_el(&$output) in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/comment-template.php on line 1266 Strict Standards: Redefining already defined constructor for class WP_Dependencies in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/class.wp-dependencies.php on line 31 Strict Standards: Redefining already defined constructor for class WP_Http in /var/www/clients/client231/web1294/web/multikoop.de/wordpress/wp-includes/http.php on line 61 multiKOOP.de » Blog Archive » NewsfeedCreator released

NewsfeedCreator released

August 10, 2005 – 12:00 am

In the last few years RSS-Newsfeeds became more popular. Nearly every well-known website (Heise.de, Spiegel.de, BBC.com, CNN.com) provides its news in an XML based format for syndication.

NewsfeedCreator is a small framework for providing news from within a JAVA based Web Application. As a developer you have just to subclass de.koop.util.newsfeed.AbstractNewsfeedServlet and implement the createNewsfeed(...) method, e.g:


import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import de.koop.util.newsfeed.AbstractNewsfeedServlet;

public class MyFeedServlet extends AbstractNewsfeedServlet {

/* (non-Javadoc)
* @see de.koop.util.rss.AbstractNewsfeedServlet#
* createNewsfeed(javax.servlet.http.HttpServletRequest)
*/
public Newsfeed createNewsfeed(HttpServletRequest request) {

Newsfeed news = new Newsfeed();

news.setTitle( "Koop News" );
news.setDescription( "News by Andreas Koop" );
news.setLink( "http://www.multikoop.de/" );

// Optional
FeedImage image = new FeedImage();
image.setTitle( "Koop Logo" );
image.setUrl( "http://www.multikoop.de/gfx/logo.gif" );
image.setLink( "http://www.multikoop.de/" );
image.setDescription( "Feed provided by multikoop.de. Click to visit.");

news.setImage( image );

// get your news items from somewhere, e.g. your database
// and put them as follows to the newsfeed
FeedItem item = new FeedItem();
item.setTitle( "Koops NewsfeedCreator 1.0a released" );
item.setLink( "http://www.multikoop.de/news.do?id=1234" );
item.setDescription( "Koops NewsfeedCreator 1.0a has been released.\n" +
"Generate easily RSS0.91, RSS2.0 Newsfeeds." +
" Further formats still awaiting to be implemented." );
item.setDate( new Date() );
item.setAuthor( "Andreas Koop" );

news.addItem( item );

return news;
}

}

And the corresponding configuration in your Application Descriptor, e.g web.xml:


<servlet>
<servlet-name>newsfeed</servlet-name>
<servlet-class>MyFeedServlet</font></servlet-class>
<init-param>
<param-name>format</param-name>
<param-value>RSS2.0</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>newsfeed</servlet-name>
<url-pattern>*.rss</url-pattern>
</servlet-mapping>

After restarting your application server just provide a link to http://host/context/somename.rss within your website.

Version 1.0a:05-22-2004: Generation of RSS0.91 and RSS2.0.

Download [Binaries], [Sources].

  1. 3 Responses to “NewsfeedCreator released”

  2. kostenfrei habt ihr empfangen, kostenfrei gebt - math.10:8

    deshalb vielen dank fuer deine grosse muehe und vorallem fuer diese nette ueberraschung die bibel fuers handy kostenfrei im netz zu finden - doll :-)

    es waere schoen wenn es auch andere bibeluebersetzungen gaebe wie z.b. die gute nachricht oder die neuewelt uebersetzung. zeige doch anderen wie es geht eine mobilbibel zu machen. kein buch ist wichtiger als gottes wort.

    vielen dank

    jens

    By Jens on Dec 20, 2005

  3. Danke für deine Mühen. War schon lange auf der Suche noch einer Handy Bibel! Benutze ein SE K500i und es funktionniert einwandfrei.

    Viele Grüße

    Elmar

    By Elmar on Nov 21, 2006

  4. Ich finds supertoll was du gemacht hast :-)

    Endlich immer meine BIbel dabei

    Super klasse

    ChriX

    By Christoph on Dec 17, 2006

Post a Comment