RE: How to replace VirtualWebappLoader in Tomcat 8
I finally found some more explanation by myself by digging into Tomcat 8 source code. In the javadoc of the interface org.apache.catalina.WebResourceRoot everything is very clear (see below): Pre- and Post-Resources may define WEB-INF/lib and WEB-INF/classes in order to make additional libraries and/or classes available to the web application. This mechanism replaces and extends the following features that were present in earlier versions: * Aliases - Replaced by Post-Resources with the addition of support for single files as well as directories and JARs. * VirtualWebappLoader - Replaced by Pre- and Post-Resources mapped to WEB-INF/lib and WEB-INF/classes * VirtualDirContext - Replaced by Pre- and Post-Resources * External repositories - Replaced by Pre- and Post-Resources mapped to WEB-INF/lib and WEB-INF/classes * Resource JARs - Same feature but implemented using the same mechanism as all the other additional resources. That's exactly the question I was asking! It should definitely be added in the documentation chapter bout Resource. Regards, Renaud --- public interface WebResourceRoot extends Lifecycle Represents the complete set of resources for a web application. The resources for a web application comprise of multiple ResourceSets and when looking for a Resource, the ResourceSets are processed in the following order: 1. Pre - Resources defined by the PreResource element in the web applicationaposs context.xml. Resources will be searched in the order they were specified. 2. Main - The main resources for the web application - i.e. the WAR or the directory containing the expanded WAR 3. JARs - Resource JARs as defined by the Servlet specification. JARs will be searched in the order they were added to the ResourceRoot. 4. Post - Resources defined by the PostResource element in the web applicationaposs context.xml. Resources will be searched in the order they were specified. The following conventions should be noted: * Write operations (including delete) will only be applied to the main ResourceSet. The write operation will fail if the presence of a Resource in one of the other ResourceSets effectively makes the operation on the main ResourceSet a NO-OP. * A file in a ResourceSet will hide a directory of the same name (and all the contents of that directory) in a ResourceSet that is later in the search order. * Only the main ResourceSet may define a META-INF/context.xml since that file defines the Pre- and Post-Resources. * As per the Servlet specification, any META-INF or WEB-INF directories in a resource JAR will be ignored. * Pre- and Post-Resources may define WEB-INF/lib and WEB-INF/classes in order to make additional libraries and/or classes available to the web application. This mechanism replaces and extends the following features that were present in earlier versions: * Aliases - Replaced by Post-Resources with the addition of support for single files as well as directories and JARs. * VirtualWebappLoader - Replaced by Pre- and Post-Resources mapped to WEB-INF/lib and WEB-INF/classes * VirtualDirContext - Replaced by Pre- and Post-Resources * External repositories - Replaced by Pre- and Post-Resources mapped to WEB-INF/lib and WEB-INF/classes * Resource JARs - Same feature but implemented using the same mechanism as all the other additional resources. Renaud -Message d'origine- De : Mark Thomas [mailto:ma...@apache.org] Envoyé : mardi 11 février 2014 20:09 À : Tomcat Users List Objet : Re: How to replace VirtualWebappLoader in Tomcat 8 On 11/02/2014 17:31, Renaud Pelissier wrote: Okay, I had it working finally by setting webAppMount to /WEB-INF/classes for every classes directory. So I understand the /WEB-INF/classes mount point is hard coded into the default Loader? Is it different to use /WEB-INF/lib? /WEB-INF/classes is for classes /WEB-INF/lib is for JARs Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
HTTP Status 304 on GET
Hi, I've just upgraded my java from 1.5 to 1.7, tomcat from 5.5.29 to 7.0.50 on the test environment. I have removed all JCIFs authentication from my application and am authenticating users against LDAP through tomcat. I have managed to get my application to load and allow me access, but when I go to different pages I'm getting HTTP 304 in my localhost_access_log file. The log file contains: [12/Feb/2014:12:03:56 +] GET / HTTP/1.1 200 11444 [12/Feb/2014:12:04:23 +] GET /my_application/ HTTP/1.1 200 20972 [12/Feb/2014:12:04:23 +] GET /my_application/css/main.css HTTP/1.1 304 - [12/Feb/2014:12:04:24 +] GET /my_application/css/main.css HTTP/1.1 304 - [12/Feb/2014:12:04:24 +] GET /my_application/js/common.js HTTP/1.1 200 1296 [12/Feb/2014:12:04:24 +] GET /my_application/js/common.js HTTP/1.1 200 1296 [12/Feb/2014:12:04:24 +] GET /my_application/yui/yuiloader-dom-event/yuiloader-dom-event.js HTTP/1.1 304 - [12/Feb/2014:12:04:24 +] GET /my_application/yui/yuiloader/yuiloader-min.js HTTP/1.1 304 - [12/Feb/2014:12:04:24 +] GET /my_application/yui/yahoo/yahoo-min.js HTTP/1.1 304 - [12/Feb/2014:12:04:24 +] GET /my_application/yui/event/event-min.js HTTP/1.1 304 - [12/Feb/2014:12:04:24 +] GET /my_application/yui/dom/dom-min.js HTTP/1.1 304 - [12/Feb/2014:12:04:24 +] GET /my_application/yui/element/element-beta-min.js HTTP/1.1 304 - [12/Feb/2014:12:04:24 +] GET /my_application/yui/dragdrop/dragdrop-min.js HTTP/1.1 304 - [12/Feb/2014:12:04:24 +] GET /my_application/yui/resize/resize-min.js HTTP/1.1 304 - [12/Feb/2014:12:04:24 +] GET /my_application/yui/animation/animation-min.js HTTP/1.1 304 - [12/Feb/2014:12:04:24 +] GET /my_application/yui/layout/layout-min.js HTTP/1.1 304 - etc.. etc... When looking in webapps/my_application/.. at the paths shown above, they all exist. Why is it then showing a 304 error and not loading the pages properly? FYI...YUI version is 2.6.0 in case that makes any difference to this (though in the above error, even the css files are showing the 304 error) Thanks Seema
Re: HTTP Status 304 on GET
On 12/02/2014 12:31, Seema Patel wrote: When looking in webapps/my_application/.. at the paths shown above, they all exist. Why is it then showing a 304 error and not loading the pages properly? FYI...YUI version is 2.6.0 in case that makes any difference to this (though in the above error, even the css files are showing the 304 error) Did you bother to check what an HTTP 304 status code actually means before sending this e-mail? I'll give you a hint, it is NOT an error code. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: HTTP Status 304 on GET
Date: Wed, 12 Feb 2014 12:38:33 + From: ma...@apache.org To: users@tomcat.apache.org Subject: Re: HTTP Status 304 on GET On 12/02/2014 12:31, Seema Patel wrote: When looking in webapps/my_application/.. at the paths shown above, they all exist. Why is it then showing a 304 error and not loading the pages properly? FYI...YUI version is 2.6.0 in case that makes any difference to this (though in the above error, even the css files are showing the 304 error) Did you bother to check what an HTTP 304 status code actually means before sending this e-mail? I'll give you a hint, it is NOT an error code. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org I have checked, but when I say error, what I meant is that it's not loading the yui stuff in my application (hence to me an error). Sorry for the confusion, I'm quite new to yui, as it was developed by previous developers and now I've just upgraded the java and tomcat, but can't get the application to work properly Seema
Re: HTTP Status 304 on GET
On Feb 12, 2014, at 7:48 AM, Seema Patel seema...@hotmail.com wrote: Date: Wed, 12 Feb 2014 12:38:33 + From: ma...@apache.org To: users@tomcat.apache.org Subject: Re: HTTP Status 304 on GET On 12/02/2014 12:31, Seema Patel wrote: When looking in webapps/my_application/.. at the paths shown above, they all exist. Why is it then showing a 304 error and not loading the pages properly? FYI...YUI version is 2.6.0 in case that makes any difference to this (though in the above error, even the css files are showing the 304 error) Did you bother to check what an HTTP 304 status code actually means before sending this e-mail? I'll give you a hint, it is NOT an error code. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org I have checked, but when I say error, what I meant is that it's not loading the yui stuff in my application (hence to me an error). Sorry for the confusion, I'm quite new to yui, as it was developed by previous developers and now I've just upgraded the java and tomcat, but can't get the application to work properly It doesn’t seem like there’s a problem with your server. As Mark mentioned 304 is not an error code. You probably want to debug this through your browser. Try Chrome Dev Tools or Firebug, inspect the requests and see if there are any JS errors. Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: HTTP Status 304 on GET
Subject: Re: HTTP Status 304 on GET From: dmik...@gopivotal.com Date: Wed, 12 Feb 2014 08:02:01 -0500 To: users@tomcat.apache.org On Feb 12, 2014, at 7:48 AM, Seema Patel seema...@hotmail.com wrote: Date: Wed, 12 Feb 2014 12:38:33 + From: ma...@apache.org To: users@tomcat.apache.org Subject: Re: HTTP Status 304 on GET On 12/02/2014 12:31, Seema Patel wrote: When looking in webapps/my_application/.. at the paths shown above, they all exist. Why is it then showing a 304 error and not loading the pages properly? FYI...YUI version is 2.6.0 in case that makes any difference to this (though in the above error, even the css files are showing the 304 error) Did you bother to check what an HTTP 304 status code actually means before sending this e-mail? I'll give you a hint, it is NOT an error code. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org I have checked, but when I say error, what I meant is that it's not loading the yui stuff in my application (hence to me an error). Sorry for the confusion, I'm quite new to yui, as it was developed by previous developers and now I've just upgraded the java and tomcat, but can't get the application to work properly It doesn’t seem like there’s a problem with your server. As Mark mentioned 304 is not an error code. You probably want to debug this through your browser. Try Chrome Dev Tools or Firebug, inspect the requests and see if there are any JS errors. Dan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Ok thanks Dan. I'm using IE 9, as the application seems to work on that when live. Just not working after I updated the java and tomcat versions. Will look at the IE developer tools Seema
Tomcat 8 appears slow to process jsp pages
Hi, I'm testing within Eclipse Kepler on Win7/64. Using Tomcat 7 and lower, jsp pages appear in an instant. Testing Tomcat 8 I watch the console and see the Java and sql processing complete, then wait a full minute for the webpage to appear. With Tomcat 7 there is no wait. Just to verify, while composing this I opened a web page within the application and stared at a white screen for almost exactly sixty seconds. I have everything else configured exactly the same. The only difference I can see is the version of Tomcat. Has anyone else run into anything similar? Thanks, John
Re: Tomcat 8 appears slow to process jsp pages
On 12/02/2014 14:57, john.kief...@engilitycorp.com wrote: Hi, I'm testing within Eclipse Kepler on Win7/64. Using Tomcat 7 and lower, jsp pages appear in an instant. Testing Tomcat 8 I watch the console and see the Java and sql processing complete, then wait a full minute for the webpage to appear. With Tomcat 7 there is no wait. Just to verify, while composing this I opened a web page within the application and stared at a white screen for almost exactly sixty seconds. I have everything else configured exactly the same. The only difference I can see is the version of Tomcat. Has anyone else run into anything similar? Haven't seen it before. Sounds like some form of IO timeout. Can you reproduce it on a stand-alone Tomcat? Try taking 3 thread dumps ~10s apart during the 60s pause to see what is going on. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 8 appears slow to process jsp pages
On Wed, Feb 12, 2014 at 9:57 AM, john.kief...@engilitycorp.com wrote: Testing Tomcat 8 I watch the console and see the Java and sql processing complete, then wait a full minute for the webpage to appear. With Tomcat 7 there is no wait. Just to verify, while composing this I opened a web page within the application and stared at a white screen for almost exactly sixty seconds. I I have used Tomcat 7.0.32+ (7.0.32, 34, 35, 37, 39, 40, 42, 47, ...) since I use TomEE, and I experienced that some time in the past. When I experienced that, I closed the browser with anticipation to break/cancel the HTTP request, and reopened browser and webapp page. Eventually, as time went on, i did not experience that anymore, and I don't see that anymore. There was 'maybe' some app changes that I made (and/or some improvements between Tomcat and TomEE), but it may have been caused by database deadlock. I'm not sure. I haven't experienced that for some months now, maybe 6+ months. you may need to change your jdbc Resource/ settings. One of tomcat committers, Christopher Schultz wrote a good article about tomcat jdbc[1] and how to configure it to meet your needs. I think i read it a few times and changed my jdbc settings sometime ago, and I think that may have solved the tomcat-request-white-page-in-browser issue/behavior that I experienced in the past. [1] http://blog.christopherschultz.net/index.php/2009/03/16/properly-handling-pooled-jdbc-connections/
Test to display an empty form by servlet.
If there is a field called username, in a form with url registration , how can I display the form the first time in Tomcat 7? (When the field is empty)
Re: Test to display an empty form by servlet.
On Wed, Feb 12, 2014 at 1:10 PM, JB MORLA jbmo...@gmail.com wrote: If there is a field called username, in a form with url registration , how can I display the form the first time in Tomcat 7? (When the field is empty) initialize the username property? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Problem using maven-tomcat7-plugin with RESTEasy
Hello, I am wondering if someone form this mailing list will be able to take a look at a question that I posted on Stackoverflow regarding using maven-tomcat7-plugin with a RESTEasy Maven project: http://stackoverflow.com/questions/21734564/unable-to-startup-resteasy-maven-project-through-tomcat7-maven-plugin-execution. I am able to run my project locally using the Jetty Maven plugin, but not Tomcat. Thank you. Evan
Re: Test to display an empty form by servlet.
Here is the code I found in a manual written at the time of Tomcat 6: The code belongs to a servlet. There is no index.jsp file nor order.html file. String message; /* * Initializing the message to display : If one of the mandatory fields * is not filled, then we display an error message * else we display a success message */ if ( name.trim().isEmpty() || address.trim().isEmpty() || telephone.trim().isEmpty() || amount == -1 ) { message = Error - You did not fill all the mandatory fields. br a href=\createOrder.jsp\Click here/a to access the order form.; } else { message = Order successfuly created !; } So when I run the project with Tomcat 7 as target, the url : createOrder.jsp points to an empty form the first time. But Tomcat 7 returns an error stating that it can't find the jsp. If I comment out the if.. else test and add some pipes with afile.html and index.jsp, the application works. I don't know how to replace the test for Tomcat 7 I'll try to give name a value like Z and test it as you advise. On Wed, Feb 12, 2014 at 9:32 PM, Leo Donahue donahu...@gmail.com wrote: On Wed, Feb 12, 2014 at 1:10 PM, JB MORLA jbmo...@gmail.com wrote: If there is a field called username, in a form with url registration , how can I display the form the first time in Tomcat 7? (When the field is empty) initialize the username property? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Test to display an empty form by servlet.
The purpose of this manual is to demonstrate MVC. In that case, the first component that runs is the Controller, that is the servlet. If I display an html form that redirects to the jsp, it's the html form that has the control. On Wed, Feb 12, 2014 at 10:18 PM, JB MORLA jbmo...@gmail.com wrote: Here is the code I found in a manual written at the time of Tomcat 6: The code belongs to a servlet. There is no index.jsp file nor order.html file. String message; /* * Initializing the message to display : If one of the mandatory fields * is not filled, then we display an error message * else we display a success message */ if ( name.trim().isEmpty() || address.trim().isEmpty() || telephone.trim().isEmpty() || amount == -1 ) { message = Error - You did not fill all the mandatory fields. br a href=\createOrder.jsp\Click here/a to access the order form.; } else { message = Order successfuly created !; } So when I run the project with Tomcat 7 as target, the url : createOrder.jsp points to an empty form the first time. But Tomcat 7 returns an error stating that it can't find the jsp. If I comment out the if.. else test and add some pipes with afile.html and index.jsp, the application works. I don't know how to replace the test for Tomcat 7 I'll try to give name a value like Z and test it as you advise. On Wed, Feb 12, 2014 at 9:32 PM, Leo Donahue donahu...@gmail.com wrote: On Wed, Feb 12, 2014 at 1:10 PM, JB MORLA jbmo...@gmail.com wrote: If there is a field called username, in a form with url registration , how can I display the form the first time in Tomcat 7? (When the field is empty) initialize the username property? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Versioned WAR Application
Please let me know where they are available, I am essentially looking for an Application both EJB and Servlets based (EAR) package, which I can accordingly make it to configure JMS, JDBC, etc and deploy the application to showcase the middleware components in tomcat and jboss etc... Best Regards, Ganesh Hariharan It is not the strongest of the species that survives, nor the most intelligent that survives. It is the one that is the most adaptable to change. — Charles Darwin On Tuesday, February 4, 2014 10:10 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ganeshh, On 2/4/14, 7:08 AM, Ganeshh HariHaran wrote: I do not want to build one, I am looking which already available Best Regards, Ganesh Hariharan It is not the strongest of the species that survives, nor the most intelligent that survives. It is the one that is the most adaptable to change. — Charles Darwin On Friday, January 31, 2014 4:30 PM, André Warnier a...@ice-sa.com wrote: Ganeshh HariHaran wrote: Hi, Is there a place where we get a Java application real time with some dummy data, essentially that application should connect to various J2EE conponents like JDBC, JMS, SOAP etc I am not looking at the sample app comes with tomcat. You mean like this ? http://lmgtfy.com/?q=java+servlets+real+time+applications Do you have any other requirements? There are literally hundreds of freely-available Java-based applications available. You have not defined real time, dummy data, or connects to J2EE components. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJS8RGNAAoJEBzwKT+lPKRYCuYQALfLRv9SbYvNsIgn03w1hFsj 7sofjgB9+wGL+Kjh54CRSCV22oENK5xW3QDMZ8kHw0nBRflSPUTOFPdn8EA53d89 SNYFbOIm8kI7nRecES2QHtdEs0LXHHEKQ/77KsV5Fg44jA9chFEme8xsVpiVWfv7 hU9VA7JIs+tRyExKTduULaesWW+dGDtaGu1AM/k2qAHcHko3RBfNYDBRFWSaGnV6 5cBqBUYygeGxkcRzJ5VlaUAA7BYNXFDthDlGoDUXS4avQVqwkSJKXZmfocHbMQrF 790s+ph1eSzH/XNeqqYUmrN73TW6SGUYj8q8Vf5PzIfdjsg6JF80bb0OisAvX0Ac 0cIft2wten+cZAad/ZjMOErVE8t+jkqmmGQzqk/jRrjX/58eGG76NJLHeZ/I1L/p Ei//yCf15R4bBvtbhRfW6iTFPTvf/LZgU/vZ5PQbfRLBnG5kQMQWHn9RwLd6Vrkf 4PpDi22m33D6OZeOR7gcs+LcySatrDSyW0PNX3V0cxHI8ZYOS8ZsP/SwLj99LB9o CcbySqhTqB9Jbth7V8edkEeU6pVaTR4cLoSDWwBiPfJuGZdYZn6W4KylL2+K03uA 3PzpelW46bRp8MqLuQEgnmhtm1iAygG6jPoKR6aubWlSmivOHr6U0lDwdtXS6s94 TfzJTBcE1AFQvxgcfSHM =E1bl -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
mod-jk stopped working
Apache 2.2 and Tomcat 6 on Linux Ubuntu 10.10 My connector worked fine for several years and then suddenly stopped working! Now I get a requested URL was not found on this server error instead. I've tried several things to fix this but no joy. Here is the current content of my two files: == workers.properties file -- workers.tomcat_home=/usr/share/tomcat6 workers.java_home=/usr/lib/jvm/java-6-openjdk/jre ps=/ worker.list=ajp13_worker worker.ajp13_worker.port=8009 worker.ajp13_worker.host=localhost worker.ajp13_worker.type=ajp13 worker.ajp13_worker.lbfactor=1 worker.loadbalancer.type=lb worker.loadbalancer.balance_workers=ajp13_worker == httpd.conf file -- LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so JkWorkersFile /etc/libapache2-mod-jk/workers.properties JkShmFile /var/log/apache2/mod_jk.shM JkLogFile /var/log/apache2/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkMount /big41 ajp13_worker JkMount /big41/* ajp13_worker JkMount /big50 ajp13_worker JkMount /big50/* ajp13_worker JkMount /*.jsp ajp13_worker JkMount /*/servlet/ ajp13_worker == I changed the JkLogLevel to debug, restarted Apache, and read through the long log file. No errors and everything seems to have be setup correctly. However, there was one strange occurrance. It went through the entire setup process twice and gave me two of these log entries: [info] init_jk::mod_jk.c (2830): mod_jk/1.2.26 initialized [info] init_jk::mod_jk.c (2830): mod_jk/1.2.26 initialized Now the log file is giving me a bunch of [debug] entries saying things similar to: missing uri map for domU-12-31-39-04-58-57.compute-1.internal:/big41. Also, I have a bunch of missing uri map entries for things present on the server that were never JkMounted. Like I said, it used to work fine. Any help or suggestions would be greatly appreciated. Thank you! Jim Borland - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org