Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-java
Navigation:
Lists: gentoo-java: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: Renat Lumpau <rl03@g.o>, gentoo-java@g.o
From: Jose Gonzalez Gomez <jgonzalez.openinput@...>
Subject: Re: webapp-config & Java
Date: Thu, 26 Jan 2006 10:30:14 +0100
Hi,<br><br><div><span class="gmail_quote">2006/1/25, Renat Lumpau &lt;<a href="mailto:rl03@g.o">rl03@g.o</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br><br>I am looking into making webapp-config Java-aware. While there are quite a few<br>things that would need to happen from both the w-c and Java ends, it definitely<br>seems plausible.<br><br>The first step is to develop a directory structure for Java webapps that
<br>supports virtual hosts and plays nice with GLEP 11. </blockquote><div><br>I'm not sure this is the right way to go... The standard way to deploy a J2EE application (wether web or more than web, this is containing EJBs and other stuff) is using an enterprise application archive. This is basically a jar file with .ear extension and with its content arranged in a specified way. In the case of pure web applications (only servlets/JSPs) you may use directly a web archive, this is a jar file with .war extension and again with its contents arranged in a specified way. Some containers provide support for deploying an exploded (unzipped, unjarred, whatever you call it) application, but I think this is not dictated by the standard, so you can't count on this. Once you deploy the application, it's up to the server to do whatever it wants to run the application: it could unzip (unjar) the application to a working directory, or maybe just work from the provided file, as long as it publishes the web application as the standard dictates.
<br><br>Moreover, I'm not sure you could create virtual hosting based only on J2EE servers, as I don't remember this to be included in the J2EE standard, and again you can't count on it. I think the best way to do this would be to provide virtual hosting using Apache and then use some connector to forward requests to the corresponding J2EE server. As far as I know this can be done with Tomcat, Jetty and JBoss fro your list.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">All four J2EE/servlet<br>engines currently in Portage (tomcat, jetty, resin, and jboss) implement this in
<br>their own way:<br><br>- tomcat stores webapps in /var/lib/tomcat-5/{vhost}/webapps. There is<br>&nbsp;&nbsp;one &quot;default&quot; vhost.<br>- jetty stores webapps in /opt/jetty/webapps. There is currently no<br>&nbsp;&nbsp;vhost hierarchy, although I believe it should be easy to create one under
<br>&nbsp;&nbsp;/opt/jetty/webapps/{vhost}<br>- resin stores webapps in /opt/resin/webapps. There is currently no<br>&nbsp;&nbsp;vhost hierarchy, although I believe it should be easy to create one under<br>&nbsp;&nbsp;/opt/resin/webapps/{vhost}<br>- jboss is less straightforward. It appears that webapps go into
<br>&nbsp;&nbsp;/var/lib/jboss/{all,default,minimal}, but I'm not sure what the difference<br>&nbsp;&nbsp;between those three directories is or how vhosts are handled.</blockquote><div><br>JBoss is thought as a microkernel to which you add containers and services as needed. In this case, each container (web, EJB) or service can be added or removed to create an instance of the server that suits your needs. JBoss comes with three configurations out of the box, one with all availables services activated, one as the default configuration used for most of the J2EE applications and one with a minimal set of services activated. Each of them has its own directory where all the necessary files for that configuration live.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I propose to add a Java-specific directory under /var/www/{vhost}, such as<br>
/var/www/localhost/java (perhaps there is a better name than java?). This<br>directory could be symlinked from the tomcat/jetty/resin/jboss locations, much<br>like what tomcat already does. This would have the benefit of keeping everything
<br>related to one vhost (statis HTML, servlets, CGI scripts, etc) in one location.<br><br>Comments and suggestions (esp. from Java folks) are welcome. I would<br>particularly like to figure out what to do with jboss.<br>
</blockquote></div><br>I think the best bet would be to explore the API for J2EE application deployment (JSR 88) (<a href="http://java.sun.com/j2ee/tools/deployment/">http://java.sun.com/j2ee/tools/deployment/</a>, <a href="http://www.jcp.org/en/jsr/detail?id=88&amp;showPrint">
http://www.jcp.org/en/jsr/detail?id=88&amp;showPrint</a>). This API intends to provide a common contract every J2EE application server should comply with, so you could create a generic deploy tool that would be independent from the server you would be deploying to.
<br><br>A quick googling of JSR 88 reports this link as something to take into account: <a href="http://cargo.codehaus.org/">http://cargo.codehaus.org/</a>. This tool is being actively developed by the Maven guys, and I'm pretty sure that could be used to deploy web and J2EE applications to any supported server.
<br><br>A final note: don't know if you know the difference between a java web application an a full blown J2EE application... reading your mail I get the feeling that you think that J2EE is similar in complexity to a PHP web application, and this isn't the case. Just in case, from the four servers you mention, three of them are just web containers, this is, they only support a small part of the full J2EE stack. Only JBoss is a full J2EE server. I think you should add to that list a few other servers that are full J2EE stacks, and quite popular, like Geronimo (from Apache, 
<a href="http://geronimo.apache.org/">http://geronimo.apache.org/</a>)<br><br>HTH, best regards<br>Jose<br><br>(Sorry to post only to the java list, but I'm not subscribed to web-user)<br>
Replies:
Re: webapp-config & Java
-- William L. Thomson Jr.
Re: webapp-config & Java
-- Renat Lumpau
References:
webapp-config & Java
-- Renat Lumpau
Navigation:
Lists: gentoo-java: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
webapp-config & Java
Next by thread:
Re: webapp-config & Java
Previous by date:
webapp-config & Java
Next by date:
Re: Startup advice


Updated Jun 17, 2009

Summary: Archive of the gentoo-java mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.