Is it possible to use JOGL with Java servlets?
What are you trying to do? You should be able to run JOGL on the server side in a headless fashion, but I don’t know the restrictions servlet engines have on loading native code into servlets. You will also run into trouble if you try to load the JOGL native libraries from two different class loaders.
I’m getting prepared for next years assignment which will require me to write a game in a Java servlet.
I want to use JOGL however I want to know whether JOGL could be used under such a situation.
Thanks.
Hi
You could write an appication that runs on the client machine, that communicates with the server via HTTP/servlets. That would cover the servlet requirement and allow you to use JOGL. However, I suspect they want you to learn about JSPs and rendering HTML, in which case, your unfortunatly not going to be able to use GL at all. If it’s just the servlet layer down, then you can do it.
HTH
Endolf
You guys probably remember that I was preparing a year ago for this assignment.
Guess what?
I’m there now.
We’ve covered JSP and Servlets, the teacher doesn’t care how it’s done but he wants a 3D multiplayer game.
As far as I understand, servlets are just a thing you run on a server and like you said, I connect to the server.
I was thinking of having JOGL uploaded to the client from the server side, however I have only 3 weeks to create my game and I don’t want to spend most of it on the server side.
I’ve tried to get more information on this topic but I keep falling short.
What I know is that the server side doesn’t load JOGL, I need to use the client’s class loader.
A better question would be, am I biting off more than I can chew? Should I just stick to the standard networking Java application?
My recommendation would be to stick with the standard programming assignment. While it’s definitely possible to use JOGL in a client/server scenario, there is not a good match with servlets in particular; in general for a networked game you would be better off writing custom networking code rather than trying to shoehorn things into the context of servlet-style communication.
I will do that. I don’t have much experience or knowledge on servlets, so I don’t want to dig myself into a hole.
Thanks.