Total Knowledge: CPPSERV: Documentation: Writing CSP (C++ Server Pages)

CPPSERV: Documentation: Writing CSP (C++ Server Pages)

Home Projects Jobs Clientele Publishing Contact

Writing (CSP) C++ Server Pages

CSP is a mixture of C++ code and mark-up language (i.e. HTML, XHTML, XML - whatever you like), that is translated into pure C++ code, and then compiled into CPPSERV servlet, just like any other.

Steps to get your CSP page going are simple:

  • Write your CSP page. Take a look at the simple example
  • Translate it into C++:
    cxxsp_compile Simple.csp Simple.cpp
  • Compile it into servlet:
    g++ -shared -lservlet -o Simple.cpp
  • Add your CSP to configuration file, using <csp> tag:
    <csp path="Simple.csp" name="Simple.csp" dso=""/>
CSP based store application from samples package contains a script and set of good Makefile rules to generate servlets and CPPSERV config file from CSP's. Logo

Authoright © Total Knowledge: 1999-2013