That;s a very broad question that would require a full article to answer but that's very internal so that wouldn't benefit many.
If you are looking for Websphere support you should copy what's done for Tomcat for instance. The first goal would be to be able to run the full testsuite on Websphere instead of Tomcat or JBoss AS. Note that the testsuite is using Cargo, I don't know how Cargo supports Websphere if it does.
If you have specific question, do not hesitate to ask.