Embedding Processing code with Processing JS
Download the source code materials for this tutorial here.
In order to post code to the web, you will need two libraries: ProcessingJS and jQuery. Jquery is used simply to know when the page is loaded.
The tutorial video goes over the process of integrating processing code for use in ProcessingJS. But once you download the tutorial files, basically all that's left to do is replace the mySketch.pde.js with your Processing code, and you're good to go.
Note:
Keep in mind your sketch will not work if you any external libraries, including sound, video, midi, or 3D. At this point, ProcessingJS only supports visual code. If you paste in processing code that uses external libraries, it probably won't work. If that's the case, you probably will have to embed your processing sketch by going to File>Export in the Processing menu, and then uploading that whole folder to your website. This will rely on the java plugin.