* Robin H. Johnson <[EMAIL PROTECTED]> [2004-01-08 02:48:43 -0800]:
> I'm working on implementing GLEP11 (just started a week ago since my
> school semester was over and I had some vacation time). I've got
> absolutely no experience or knowledge of servlets, so if you can explain
> how to incorporate them and how they fit together with everything, I'd
> be glad to see if they fit in with vhost-config and webapp-config, or
> java-config.
I'll try to explain.
Servlets
--------
Servlets, or rather, web applications, usually come in the form of a WAR-file
(Web Archive). Everything needed to run the web application is contained in
this file (apart from the servlet engine itself), and installation of the
web application is a matter of deploying it into a servlet engine.
As you can see, this is much like installing a "normal" web application
into apache, but in many ways much simpler.
Servlet engines
---------------
Just as with web servers, there are several available servlet engines. But
unlike web servers, in theory, all web applications can be run by all
servlet engines. The process of deploying an application may be different
though, but many servlet engines lets you deploy a web application simply
by dropping the war file into a certain directory.
The current problem
-------------------
The problem is that there is no standard way to install a web application
on a gentoo system, and there is no way to choose which servlet engine
one wants to use.
Application Installation
- - - - - - - - - - - -
For example, the before mentioned cocoon application requires tomcat.
Personally, I don't use tomcat, I rather use JBoss/Jetty for my
web applications. However, since I have installed cocoon, I automatically
got tomcat dragged in. And emerging cocoon gives me
/opt/jakarta/tomcat/webapps/cocoon.war
and documentation in
/usr/share/doc/cocoon-2.0.2
So installing cocoon for me is:
emerge cocoon
cp /opt/jakarta/tomcat/webapps/cocoon.war
/opt/jboss-3.2.1/server/default/deploy/
Which isn't very elegant.
This is very much like the problem with apache applications, and you could
probably use the same system. Cocoon could be installed into
/usr/share/webapps/, just like the apache applications, e.g. like
/usr/share/webapps/${P}/war/cocoon.war.
WAR files usually have the configuration files included into the WAR file
(not very practical IMO), so there is no need for a configuration directory.
Virtual Host Support
- - - - - - - - - -
As for the vhost-setup, I'm afraid I don't have enough experience with
vhosting servlet engines to talk about it.
The GLEP currently only have to deal with apache vs. apache2. I think
this escalates a bit when it comes to web applications, there are many
more servlet engines to consider. I don't see why the installation
tool couldn't handle these as well though. The user could control which
servlet engine to use using USE flags, or perhaps even better(?) using the
same mechanism as is used to choose the prefered Java VM today (using
java-config). The installation tool could then pass off deploying the
web application to the chosen servlet engine's own installation script
for performing the actual deployment.
I hope this makes sense, I really don't have the time to further explain/
formalize this as this moment.
Eivind
--
[EMAIL PROTECTED] mailing list