First a little information i suppose?
I'm a developer for a web-based browser game that uses a C++ server backend and we're looking to reproduce a 'prequel' in java. It works like this:
Apache with an apache module communicate between client and the game server. C++ game server feeds out pages (much like a giant CGIServer) and also keeps all the objects in memory, only reading disk on startup and writing to disk once a turn/when necessary.
so onto the problem. we're interested in using jsp for the pages instead of having yucky compiled page variables as we had in c++ and constant apache module communication. so we figured we use tomcat, perhaps the game server as a servlet, and then jsp pages. but how would the jsp pages access the java objects in the gameserver/servlet? or would you instead have some sort of global scope bean?
primary things we're aimed for:
- keeping objects in memory/avoiding reading from the DB all the time
- the nice seperation of code and html/page via jsp
- decent/good efficiency and resource utilization (java garbage collection, etc)
it's kind of late and hopefully i didn't leave anything out but any help or ideas whatsoever are appreciated
EDIT: upon further research, java bean with a scope of 'application' perhaps? and if so, could someone give me/point me to an example usage?
