Wt examples 3.1.10
/build/buildd/witty-3.1.10/examples/wt-homepage/main.C
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2009 Emweb bvba, Kessel-Lo, Belgium.
00003  *
00004  * See the LICENSE file for terms of use.
00005  */
00006 
00007 #include <Wt/WServer>
00008 
00009 #include "BlogRSSFeed.h"
00010 #include "WtHome.h"
00011 #include "JWtHome.h"
00012 
00013 int main(int argc, char **argv)
00014 {
00015   try {
00016     WServer server(argv[0]);
00017 
00018     server.setServerConfiguration(argc, argv, WTHTTP_CONFIGURATION);
00019 
00020     BlogRSSFeed rssFeed(server.appRoot() + "blog.db", "Wt and JWt blog",
00021       "http://www.webtoolkit.eu/wt/blog",
00022       "We care about our webtoolkits.");
00023 
00024     server.addResource(&rssFeed, "/wt/blog/feed/");
00025 
00026     server.addEntryPoint(Application, createJWtHomeApplication,
00027       "/jwt", "/css/jwt/favicon.ico");
00028     server.addEntryPoint(Application, createWtHomeApplication,
00029       "", "/css/wt/favicon.ico");
00030 
00031     if (server.start()) {
00032       WServer::waitForShutdown();
00033       server.stop();
00034     }
00035   } catch (Wt::WServer::Exception& e) {
00036     std::cerr << e.what() << std::endl;
00037   } catch (std::exception &e) {
00038     std::cerr << "exception: " << e.what() << std::endl;
00039   }
00040 }

Generated on Mon Nov 14 2011 for the C++ Web Toolkit (Wt) by doxygen 1.7.4