Forum OpenACS Development: What Aolserver Tie-in can be used for servlets?
However I believe that ACS runs its Java stuff inside Oracle. If OpenACS want to move to servlets, what can they use?
More over, what can I use now to run servlets?
(The nstomcat module supports .jps OK but I can't figure out how to run straight servlets..) Thanks -T
ACS 5, at least, won't be running inside Oracle. I don't think the
Java version of ACS 4 does, either. The java snippets inside the Tcl
version of ACS 4 do, though, and we'll be dealing with that in OpenACS
by rewriting them to use Dan Wickstrom's java module for AOLserver.
Wow, we just had an earthquake as I sat here typing this...aD giving
up Tcl and moving to Java really is earthshaking news, I guess!
AFAIK, ACS Java does not require AOLserver, or even Apache. Supposedly it's J2EE (insert your favorite buzzword here) compliant.
java (which i'm working with right now) will deploy in any servlet
2.1 container with jsp1.1 support. it should work out of the box
with tomcat and probably resin, other containers might require a
little installation tweaking. the data model appears to be identical
to the tcl version. the acs4 java is pretty interesting because
righting a package or page in it is remarkably similiar to writing
an acs4 tcl page, thanks to a precompiler. it should be relatively
easily to make an openacs java version once the data model is ported.
there is some minor use of j2ee ( so far i see it for JavaMail,
Servlet, and JDBC APIs), but no ejbs. i'm speculating now, but i
believe more oo and javaisms will make their way into the system
I'm a programmer on the ACS-Java project, I'll try to answer as best I can. First off, JSPs *are* servlets. JSP is a scripting language that the servlet engine compiles down to a Java servlet on the fly. So, if you have something that can handle JSPs, odds are quite good that it can handle servlets. The only additional issue with servlets over JSPs is generally a configuration issue; servlets that aren't JSPs usually need to be registered (in an XML init file) for the servlet engine to locate them. I suspect this is the step you've been missing with your nstomcat experimentation; you want to edit Tomcat's server.xml file to map a context path to a docbase, and then edit that docbase's WEB-INF/web.xml file to register servlets. Unfortunately I haven't played with nstomcat any; in the interest of just working on the ACS as much as possible, I went with the quick "run Tomcat stand-alone" approach rather than trying to configure a webserver to talk to Tomcat.
The ACS has used Java in Oracle for some features before, even back with the TCL version. That's the "java in Oracle" you've seen. For ACS Java, though, the code written is outside of Oracle; it runs in the servlet engine's JVM.
ACS Java does not require AOLServer or Apache. It requires a servlet engine; various servlet engines can be made to work with various web servers, or can be run stand-alone. We've run under Tomcat, Resin, and WebLogic servlet engines. Adding a webserver is essentially using the webserver as a proxy engine, where it takes web requests and hands the requests for servlets (or JSPs) off to the servlet engine. Again, I haven't found a need to personally experiment with this sort of thing yet, so I don't know much about it.
In response to Kapil's observations, yes, ACS4 Java is quite similar to ACS4 TCL because it was a port, not a redesign. ACS5 will be a redesign, and thus will end up being different, much like how ACS4 was a redesign and thus was very different from ACS3.
I'm not sure what openacs will choose to do with regard to ACS/Java or acs5; I suspect it's quite quite early to speculate on such things, and that decisions will be based on technical merits, business needs, and who has free time. I'm not involved with openACS, but I like the project, read the bboards, and will be using the code for a personal site as soon as I find free time.
Hope that clears things up a bit.