RE: Tomcat 4.0b7 and struts-example webapp
I remember Craig McClanahan addressing the issue of Struts and Tomcat 4.0. As some of you might not know he is a primary developer for both projects. Here is what he said: The only thing you need to do is make sure an XML parser is visible to your webapps -- either copy the JAXP jar files (or Xerces) into $CATALINA_HOME/lib, or into your web app's /WEB-INF/lib, and you're all set. My choice would be to put them in the $CATALINA_HOME/lib unless you have web apps that need to use different parsers. refer to: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg13921.html
RE: Tomcat 4.0b7 and struts-example webapp
I just installed Tomcat4.0-b7 and have the examples working. I tried running my webapp that ran fine under Tomcat3.2 and it gives me these errors when Tomcat starts: Starting service Tomcat-Standalone Apache Tomcat/4.0-b7 register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'jar:file:/c:/web/blitzDev/WEB-INF/lib/struts.jar!/org/apache/struts/resources/struts-config_1_0.dtd' register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'jar:file:/c:/web/blitzDev/WEB-INF/lib/struts.jar!/org/apache/struts/resources/web-app_2_2.dtd' register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 'jar:file:/c:/web/blitzDev/WEB-INF/lib/struts.jar!/org/apache/struts/resources/web-app_2_3.dtd' Starting service Tomcat-Apache Apache Tomcat/4.0-b7 When I try to hit the webapp root, I get the following: A Servlet Exception Has Occurred Exception Report: javax.servlet.ServletException: Cannot find global ActionForward for name homepage at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:452) at org.apache.jsp._0002findex_jsp._jspService(_0002findex_jsp.java:87) I tried adding the struts-examples by sticking the .WAR files in the webapps directory and it gave me the exact same 'register' messages when I restarted Tomcat. Is this another XML parsing issue? I have jaxp.jar and crimson.jar in CATALINA_HOME/server/lib, CATALINA_HOME/jasper, and JAVA_HOME/lib/jaxp-1.1. Getting rid of the files in one in JAVA_HOME didn't fix anything. Calvin --- Jonathan Rosenblitt [EMAIL PROTECTED] wrote: In the install instructions for JAXP 1.1 they recommend putting the jaxp.jar and crimson.jar files in $JAVA_HOME/jre/lib/ext if you are running Java 2. I did this and also got the sealing violation exception. When I replaced the files with the same name files, from the $CATALINA_HOME/jasper subdir the examples worked fine. After fiddling and moving files around for a long time it seemed to me that the jar files from $CATALINA work and the files from the JAXP 1.1 download, don't work correctly with Catalina b5 or b7. By the way, the files are slightly different sizes. When I tried to follow up on the Security Exception, it came up with something about different certificates being used to sign the classes. I don't know if this is relevant. Jonathan Rosenblitt -Original Message- From: Marcel Mare [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 02, 2001 12:24 AM To: [EMAIL PROTECTED] Subject: RE: Tomcat 4.0b7 and struts-example webapp I had this same problem when putting crimson.jar and jaxp.jar from my own JAXP 1.1 installation. I solved it by using the crimson.jar and jaxp.jar from the %CATALINA%/jasper subdir. Sure looks the same like WIndows DLL hell to me ;-) Marcel Mare -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Verzonden: vrijdag 31 augustus 2001 23:43 Aan: [EMAIL PROTECTED] Onderwerp: Re: Tomcat 4.0b7 and struts-example webapp So the problem was that the Struts example wouldn't load in Tomcat4.0 B7 because it didn't have a parser or the jaxp.jar. Someone suggested putting a parser and jaxp.jar in the CATALINA_HOME/lib directory. This worked for me. But a post from the tomcat list suggested putting them in the web-inf/lib directory. Indeed this latter method should work and seems a better solution to me: Craig McClanahan posts: the order in which Tomcat 4 looks for classes to load. - /WEB-INF/classes - /WEB-INF/lib (undefined order of JAR files) - $CATALINA_HOME/classes - $CATALINA_HOME/lib (undefined order of JAR files) - $CATALINA_HOME/common/classes - $CATALINA_HOME/common/lib (undefined order of JAR files) So I put crimson.jar JAXP in the WEB-INF/lib directory. It's not loading properly, it throws a sealing violation. The classloader isn't having it. Not sure why this is happening. Anyone? Craig R. Craig_Reichenbach @lotus.com To: [EMAIL PROTECTED] cc: (bcc: Craig Reichenbach/CAM/Lotus) 08/31/2001 03:05 Subject: Re: Tomcat 4.0b7 and struts-example webapp PM Please respond to struts-user This is more a question for the Tomcat list, but since it came up below, what is the best practice for including needed libraries and implementations (such as crimson.jar jaxp.jar) in Catalina? While Ian's suggestion below moves these from /jasper to /lib, I found the struts example also works in B7 by putting jaxp and crimson in /common/lib and leaving them in jasper. Can someone point me to where I can discern the differences between the different lib directories in Catalina? This has
RE: Tomcat 4.0b7 and struts-example webapp
I had this same problem when putting crimson.jar and jaxp.jar from my own JAXP 1.1 installation. I solved it by using the crimson.jar and jaxp.jar from the %CATALINA%/jasper subdir. Sure looks the same like WIndows DLL hell to me ;-) Marcel Mare -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Verzonden: vrijdag 31 augustus 2001 23:43 Aan: [EMAIL PROTECTED] Onderwerp: Re: Tomcat 4.0b7 and struts-example webapp So the problem was that the Struts example wouldn't load in Tomcat4.0 B7 because it didn't have a parser or the jaxp.jar. Someone suggested putting a parser and jaxp.jar in the CATALINA_HOME/lib directory. This worked for me. But a post from the tomcat list suggested putting them in the web-inf/lib directory. Indeed this latter method should work and seems a better solution to me: Craig McClanahan posts: the order in which Tomcat 4 looks for classes to load. - /WEB-INF/classes - /WEB-INF/lib (undefined order of JAR files) - $CATALINA_HOME/classes - $CATALINA_HOME/lib (undefined order of JAR files) - $CATALINA_HOME/common/classes - $CATALINA_HOME/common/lib (undefined order of JAR files) So I put crimson.jar JAXP in the WEB-INF/lib directory. It's not loading properly, it throws a sealing violation. The classloader isn't having it. Not sure why this is happening. Anyone? Craig R. Craig_Reichenbach @lotus.com To: [EMAIL PROTECTED] cc: (bcc: Craig Reichenbach/CAM/Lotus) 08/31/2001 03:05Subject: Re: Tomcat 4.0b7 and struts-example webapp PM Please respond to struts-user This is more a question for the Tomcat list, but since it came up below, what is the best practice for including needed libraries and implementations (such as crimson.jar jaxp.jar) in Catalina? While Ian's suggestion below moves these from /jasper to /lib, I found the struts example also works in B7 by putting jaxp and crimson in /common/lib and leaving them in jasper. Can someone point me to where I can discern the differences between the different lib directories in Catalina? This has no doubt come up before, sorry for repetition. -Craig
Re: Tomcat 4.0b7 and struts-example webapp
This is more a question for the Tomcat list, but since it came up below, what is the best practice for including needed libraries and implementations (such as crimson.jar jaxp.jar) in Catalina? While Ian's suggestion below moves these from /jasper to /lib, I found the struts example also works in B7 by putting jaxp and crimson in /common/lib and leaving them in jasper. Can someone point me to where I can discern the differences between the different lib directories in Catalina? This has no doubt come up before, sorry for repetition. -Craig Ian Kallen iank@covalent To: [EMAIL PROTECTED] .net iank cc: [EMAIL PROTECTED], (bcc: Craig Reichenbach/CAM/Lotus) 08/30/2001 Subject: Re: Tomcat 4.0b7 and struts-example webapp 03:00 PM Please respond to struts-user Thanks! For the record, mv $CATALINA_HOME/jasper/crimson.jar $CATALINA_HOME/lib/crimson.jar mv $CATALINA_HOME/jasper/jaxp.jar $CATALINA_HOME/lib/jaxp.jar seems to have fixed it! -Ian On Thu, 30 Aug 2001, Remy Maucherat wrote: Does this mean that TC 4.0b7's web.xml parsing is not backwards compatible to the older webapp format? This sounds like a bug, not a feature. I'm using a webapp that just runs dropped into a TC 3.2.x installation straight out of the struts distribution. I tried it, and the error is confusing. Actually, the problem is caused because there's no XML parser (which is only mentioned in the logs). After I add one, the app works fine, and the messages are displayed correctly (so the properties file gets correctly loaded). Remy cheers, -Ian -- Ian Kallen [EMAIL PROTECTED] | AIM: iankallen
Re: Tomcat 4.0b7 and struts-example webapp
This is more a question for the Tomcat list, but since it came up below, what is the best practice for including needed libraries and implementations (such as crimson.jar jaxp.jar) in Catalina? While Ian's suggestion below moves these from /jasper to /lib, I found the struts example also works in B7 by putting jaxp and crimson in /common/lib and leaving them in jasper. Can someone point me to where I can discern the differences between the different lib directories in Catalina? This has no doubt come up before, sorry for repetition. Also, one of the causes of these problems is that the error message printed out doesn't mention the XML parser at all (so people then think it's a Tomcat 4 problem). Wouldn't it be a good idea to fix that too ? Remy
Re: Tomcat 4.0b7 and struts-example webapp
So the problem was that the Struts example wouldn't load in Tomcat4.0 B7 because it didn't have a parser or the jaxp.jar. Someone suggested putting a parser and jaxp.jar in the CATALINA_HOME/lib directory. This worked for me. But a post from the tomcat list suggested putting them in the web-inf/lib directory. Indeed this latter method should work and seems a better solution to me: Craig McClanahan posts: the order in which Tomcat 4 looks for classes to load. - /WEB-INF/classes - /WEB-INF/lib (undefined order of JAR files) - $CATALINA_HOME/classes - $CATALINA_HOME/lib (undefined order of JAR files) - $CATALINA_HOME/common/classes - $CATALINA_HOME/common/lib (undefined order of JAR files) So I put crimson.jar JAXP in the WEB-INF/lib directory. It's not loading properly, it throws a sealing violation. The classloader isn't having it. Not sure why this is happening. Anyone? Craig R. Craig_Reichenbach @lotus.com To: [EMAIL PROTECTED] cc: (bcc: Craig Reichenbach/CAM/Lotus) 08/31/2001 03:05Subject: Re: Tomcat 4.0b7 and struts-example webapp PM Please respond to struts-user This is more a question for the Tomcat list, but since it came up below, what is the best practice for including needed libraries and implementations (such as crimson.jar jaxp.jar) in Catalina? While Ian's suggestion below moves these from /jasper to /lib, I found the struts example also works in B7 by putting jaxp and crimson in /common/lib and leaving them in jasper. Can someone point me to where I can discern the differences between the different lib directories in Catalina? This has no doubt come up before, sorry for repetition. -Craig
Re: Tomcat 4.0b7 and struts-example webapp
Informative error messages and docs generally hasten developer time investment (and hoperfully adoption) of a new technology. So I would say yes! :) On Fri, 31 Aug 2001, Remy Maucherat wrote: leaving them in jasper. Can someone point me to where I can discern the differences between the different lib directories in Catalina? Also, one of the causes of these problems is that the error message printed out doesn't mention the XML parser at all (so people then think it's a Tomcat 4 problem). Wouldn't it be a good idea to fix that too ? cheers, -Ian -- Ian Kallen [EMAIL PROTECTED] | AIM: iankallen
RE: Tomcat 4.0b7 and struts-example webapp
Does this mean that TC 4.0b7's web.xml parsing is not backwards compatible to the older webapp format? This sounds like a bug, not a feature. I'm using a webapp that just runs dropped into a TC 3.2.x installation straight out of the struts distribution. On Wed, 29 Aug 2001, Thinh Doan wrote: I got this same error running under Jrun. Look into web.xml and make sure struts stuff is there (tlds etc..) T. -Original Message- From: Ian Kallen [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 4:17 PM To: [EMAIL PROTECTED] Subject: Tomcat 4.0b7 and struts-example webapp IIRC, the struts-example from struts 1.0 was happy with most of the recent Tomcat 3.2.x releases but with 4.0b7, it's not picking up the ApplicationResources.properties file. yes, it's in /struts-example/WEB-INF/classes/org/apache/struts/webapp/example/Application Resources.properties and web.xml has: servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valueorg.apache.struts.webapp.example.ApplicationResources/param-va lue /init-param right out of the war file... This is the error: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE So what's up? Is there something extra to setup the classpaths inside webapps under Tomcat 4.0? cheers, -Ian -- Ian Kallen [EMAIL PROTECTED] | AIM: iankallen cheers, -Ian -- Ian Kallen [EMAIL PROTECTED] | AIM: iankallen
Re: Tomcat 4.0b7 and struts-example webapp
Does this mean that TC 4.0b7's web.xml parsing is not backwards compatible to the older webapp format? This sounds like a bug, not a feature. I'm using a webapp that just runs dropped into a TC 3.2.x installation straight out of the struts distribution. I tried it, and the error is confusing. Actually, the problem is caused because there's no XML parser (which is only mentioned in the logs). After I add one, the app works fine, and the messages are displayed correctly (so the properties file gets correctly loaded). Remy
Re: Tomcat 4.0b7 and struts-example webapp
Thanks! For the record, mv $CATALINA_HOME/jasper/crimson.jar $CATALINA_HOME/lib/crimson.jar mv $CATALINA_HOME/jasper/jaxp.jar $CATALINA_HOME/lib/jaxp.jar seems to have fixed it! -Ian On Thu, 30 Aug 2001, Remy Maucherat wrote: Does this mean that TC 4.0b7's web.xml parsing is not backwards compatible to the older webapp format? This sounds like a bug, not a feature. I'm using a webapp that just runs dropped into a TC 3.2.x installation straight out of the struts distribution. I tried it, and the error is confusing. Actually, the problem is caused because there's no XML parser (which is only mentioned in the logs). After I add one, the app works fine, and the messages are displayed correctly (so the properties file gets correctly loaded). Remy cheers, -Ian -- Ian Kallen [EMAIL PROTECTED] | AIM: iankallen
Tomcat 4.0b7 and struts-example webapp
IIRC, the struts-example from struts 1.0 was happy with most of the recent Tomcat 3.2.x releases but with 4.0b7, it's not picking up the ApplicationResources.properties file. yes, it's in /struts-example/WEB-INF/classes/org/apache/struts/webapp/example/ApplicationResources.properties and web.xml has: servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valueorg.apache.struts.webapp.example.ApplicationResources/param-value /init-param right out of the war file... This is the error: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE So what's up? Is there something extra to setup the classpaths inside webapps under Tomcat 4.0? cheers, -Ian -- Ian Kallen [EMAIL PROTECTED] | AIM: iankallen
RE: Tomcat 4.0b7 and struts-example webapp
I got this same error running under Jrun. Look into web.xml and make sure struts stuff is there (tlds etc..) T. -Original Message- From: Ian Kallen [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 4:17 PM To: [EMAIL PROTECTED] Subject: Tomcat 4.0b7 and struts-example webapp IIRC, the struts-example from struts 1.0 was happy with most of the recent Tomcat 3.2.x releases but with 4.0b7, it's not picking up the ApplicationResources.properties file. yes, it's in /struts-example/WEB-INF/classes/org/apache/struts/webapp/example/Application Resources.properties and web.xml has: servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valueorg.apache.struts.webapp.example.ApplicationResources/param-va lue /init-param right out of the war file... This is the error: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE So what's up? Is there something extra to setup the classpaths inside webapps under Tomcat 4.0? cheers, -Ian -- Ian Kallen [EMAIL PROTECTED] | AIM: iankallen