Hi,
As a summary of the previous posts, I will like to contribute with the following ideas:
As DexOS points out, it is not difficult to integrate a simple web server into your application. Check for example the following tutorial that implements a simple form to switch on/off a led connected with GPIO:
http://docs.biicode.com/en/latest/hardw ... erver.html
This example uses biicode (cross building from a linux box), to easily configure and build from sources the required libraries (ptypes and gpio). Embedding the web server into your application is ok for simple web applications, and only if there are no security concerns, as such servers are limited in functionality. The good part is that you don't have to install or configure a web server, so this approach might be ok if you just need to display some info in web or handle a few simple forms, over a local network.
If you need something open to the world, or more web functionality (uploading files multi-part, accessing both static and dynamic contents...) then, the way to go is certainly a full server as Apache or Nginx, plus developing your cgi code with
http://sourceforge.net/projects/cppweb/.
Note that CGI apps are called at each HTTP request, and finished when the HTTP request is completed. If you want to maintain the application running, you have to use FastCGI. You have CWServer for sessionful calls in cppweb.
As for real control applications, lets say a heater, that continously checks temperature and acts accordingly, those application have obviously to continuosly run indepently of the web access. For such tasks I would build a two layer system: In the backend I would have my application (a standard binary) running, that could be accessed by some simple way, which could be the embedded http server above or even simpler, secured by firewall, only accessible within the raspberry. Then, for the web front end, an Nginx is used (configured properly) for full functionality and security, and for those requests that goes to the control app, the minimum http client code is executed to connect to the control application.
This might sound complex, but is is the only way to clearly address both problems: having a secure and robust web access, and being able to indendently build and manage a control application.
Good luck!