It is possible to use the users database of Moodle to Authenticate users in other web-app made with Servlets and JSP. The only problem that I don't know how to solve it, is to interpret the password column in a way that Java can understand it.
That Java application will let student to compile and run, Java/C++ code using only a web-browser. I need a way in where I can organize the student source codes in the server.
Another way can be, passing the session variable of Moodle to the java app, for me that is the easiest way of merging this application into Moodle.
Maybe your are asking yourself why I did it with JAVA and no with php. And the reason is that our project manager want that his team learn how to use JAVA.