RE: Run a war file without unpacking?
Hi, >Umm, huh? So why does it always unpack it? For performance and hot-deploy support, as well as an easier implementation of some of the trickier Servlet/JSP spec features. >I am sorry if I sound like an ungrateful pig. Don't get me wrong, I love >tomcat, and it does 99% of what I want. > >I am just an ungrateful pig who wants 100%. ;-) That's OK, greedy is good. I'm the same way usually ;) But at some point, you gotta put your money where your mouth is instead of just having endless theoretical debates, and here's how. Customize a version of Tomcat to never unpack a WAR, build it, and post it for us and/or others to test that it still passes the Servlet/JSP TCKs completely. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Run a war file without unpacking?
>>> [EMAIL PROTECTED] 10/19/04 1:19 PM >>> >You can, and Tomcat does this, for the relevant >parts of the WAR. But a WAR can contain an >unlimited amount of resources, including for >example 2 GB of static .html files ;) Heheh, yeah, and i *could* write my entire web application using inner classes (and doing so would be tremendously retarded), but does that mean we should not allow any inner classes? Trying to run a 2GB war file w/o unpacking it would be equally retarded. :-) I admit, that is not the greatest analogy, but it makes the point. Common sense should dictate how you deploy your application, not worst case scenarios. Preventing people from doing bad things is a good thing as long as they can still do the good stuff. ;-) >The WAR file does not *have* to be unpacked. >In fact, the Servlet Spec requires its Containers >to support running a packed WAR, and not vice >versa. Whether to unpack a WAR partially, fully, >transparently, or optionally are all Servlet >Container implementation choices. Umm, huh? So why does it always unpack it? I am sorry if I sound like an ungrateful pig. Don't get me wrong, I love tomcat, and it does 99% of what I want. I am just an ungrateful pig who wants 100%. ;-) Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Run a war file without unpacking?
Hmm, doesn't it do that already? ...just in either the work directory, or the webapp directory instead of a zip file. In all cases, it looks like an InputStream is used. The JRE *does* support url based class loading...I wonder if you could use the jar:file! syntax to get an InputStream from the war and make it load jar files from it that way? Larry >>> [EMAIL PROTECTED] 10/19/04 1:25 PM >>> One item for emphasis: the JRE provides the feature of adding a JAR to the classpath. The JRE does not offer direct support for WAR semantics, such as JAR files in the WEB-INF/lib directory. Tomcat would have to, for example, have a classloader that searched the WAR file in the specified order. This would be a massive effort. That's the difference between 'stuff in a JAR' and 'stuff in a WAR'. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Run a war file without unpacking?
One item for emphasis: the JRE provides the feature of adding a JAR to the classpath. The JRE does not offer direct support for WAR semantics, such as JAR files in the WEB-INF/lib directory. Tomcat would have to, for example, have a classloader that searched the WAR file in the specified order. This would be a massive effort. That's the difference between 'stuff in a JAR' and 'stuff in a WAR'. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Run a war file without unpacking?
Hi, >Hmm, it seems that keeping it in memory would provide better performance >than writing it to disk...admittedly with a higher cost in terms of >overhead. You can, and Tomcat does this, for the relevant parts of the WAR. But a WAR can contain an unlimited amount of resources, including for example 2 GB of static .html files ;) Getting all that in memory would lead to a bad situation. Of course you could write something adaptive, "load up to X" into memory, but than it gets trickier and slower. >I guess I still do not see the difference between a war file and a jar >file other than the size - they are both zip files, they are both >intended to simplify deployment, etc. The differences are numerous. Pretty much the only similarities are the compressions format (Zip for both) and the ar part of the extension. Beyond that, JARs have various properties (sealed, class-path, indexing) that are specific to them and designed for use-cases like applets. WARs have various properties (such as content under WEB-INF/ is special and cannot be served by the container, classes before lib, etc.) that are specific to them and designed for Servlet Container use-cases only. >It is just that the war file has to be unpacked while the jar file does >not. That is what I do not understand...what makes it so much more >difficult with a war file than a jar file? The WAR file does not *have* to be unpacked. In fact, the Servlet Spec requires its Containers to support running a packed WAR, and not vice versa. Whether to unpack a WAR partially, fully, transparently, or optionally are all Servlet Container implementation choices. The ones made by Tomcat are not only well thought-out (and I can say that without arrogance because I wasn't involved in most of them, it's not credit to me ;)), but proven to work well in the real world. As other technologies emerge, these implementations choices are subject to change. For example, java.nio's direct-mapped memory buffers provide interesting possibilie for in-memory WAR manipulation. So we constantly evaluate these options, sometimes going so far as to benchmark and test them out. This is not a dead area of development, nor one that we see as unimportant. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Run a war file without unpacking?
Hmm, it seems that keeping it in memory would provide better performance than writing it to disk...admittedly with a higher cost in terms of overhead. I guess I still do not see the difference between a war file and a jar file other than the size - they are both zip files, they are both intended to simplify deployment, etc. It is just that the war file has to be unpacked while the jar file does not. That is what I do not understand...what makes it so much more difficult with a war file than a jar file? Larry >>> [EMAIL PROTECTED] 10/19/04 12:09 PM >>> FWIW, Tomcat 5.5 relies (or will rely) more and more on the work directory, as do other servers, for performance optimizations, hot deploy support, and other key features. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Run a war file without unpacking?
Maven has various bits and pieces for checking war files without deploying. I assume however that its unarchives the war (which is just a zip like jars) during the process. Mark On 19 Oct 2004, at 20:05, Larry Meadors wrote: The motivation: Overzealous SOX auditing. [EMAIL PROTECTED] 10/19/04 10:15 AM >>> Hi, No, there's no way. The unpackWARs directive applies the webapp directory, and more generally to the part of the server visible to the users. It does not apply to the work directory, whose contents and management are internal to Tomcat. Other Servlet Containers and J2EE servers employ a similar division. What's your motivation? Yoav Shapira http://www.yoavshapira.com -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 12:08 PM To: [EMAIL PROTECTED] Subject: Run a war file without unpacking? I asked this a while back, and really did not get any responses... Can you run a web app from a war file without having tomcat unpack it anywhere? I see that in TC4, you can tell it in the Host configuration not to unpack it, but it seems that what that *really* means is to unpack it into the work directory instead of the web app directory. I do not want that. What I am looking for is a way to run it without unpacking it *at all*, and running it totally from the war file. Is there any way to do that with TC4 or TC5? Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Run a war file without unpacking?
Hi, >The motivation: Overzealous SOX auditing. Hey, it's good business for the auditors ;) Being a SOX compliance auditor/provider nowadays is $. That's me wearing my old Deloitte and Touche hat ;) FWIW, Tomcat 5.5 relies (or will rely) more and more on the work directory, as do other servers, for performance optimizations, hot deploy support, and other key features. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Run a war file without unpacking?
The motivation: Overzealous SOX auditing. >>> [EMAIL PROTECTED] 10/19/04 10:15 AM >>> Hi, No, there's no way. The unpackWARs directive applies the webapp directory, and more generally to the part of the server visible to the users. It does not apply to the work directory, whose contents and management are internal to Tomcat. Other Servlet Containers and J2EE servers employ a similar division. What's your motivation? Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Larry Meadors [mailto:[EMAIL PROTECTED] >Sent: Tuesday, October 19, 2004 12:08 PM >To: [EMAIL PROTECTED] >Subject: Run a war file without unpacking? > >I asked this a while back, and really did not get any responses... > >Can you run a web app from a war file without having tomcat unpack it >anywhere? > >I see that in TC4, you can tell it in the Host configuration not to >unpack it, but it seems that what that *really* means is to unpack it >into the work directory instead of the web app directory. I do not want >that. > >What I am looking for is a way to run it without unpacking it *at all*, >and running it totally from the war file. > >Is there any way to do that with TC4 or TC5? > >Larry > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Run a war file without unpacking?
Hi, No, there's no way. The unpackWARs directive applies the webapp directory, and more generally to the part of the server visible to the users. It does not apply to the work directory, whose contents and management are internal to Tomcat. Other Servlet Containers and J2EE servers employ a similar division. What's your motivation? Yoav Shapira http://www.yoavshapira.com >-Original Message- >From: Larry Meadors [mailto:[EMAIL PROTECTED] >Sent: Tuesday, October 19, 2004 12:08 PM >To: [EMAIL PROTECTED] >Subject: Run a war file without unpacking? > >I asked this a while back, and really did not get any responses... > >Can you run a web app from a war file without having tomcat unpack it >anywhere? > >I see that in TC4, you can tell it in the Host configuration not to >unpack it, but it seems that what that *really* means is to unpack it >into the work directory instead of the web app directory. I do not want >that. > >What I am looking for is a way to run it without unpacking it *at all*, >and running it totally from the war file. > >Is there any way to do that with TC4 or TC5? > >Larry > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Run a war file without unpacking?
I asked this a while back, and really did not get any responses... Can you run a web app from a war file without having tomcat unpack it anywhere? I see that in TC4, you can tell it in the Host configuration not to unpack it, but it seems that what that *really* means is to unpack it into the work directory instead of the web app directory. I do not want that. What I am looking for is a way to run it without unpacking it *at all*, and running it totally from the war file. Is there any way to do that with TC4 or TC5? Larry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]