RE: War files don't work
Tang, Thanks for the reply. Unfortunantly, that isn't the behavior I am seeing, and I think the other poster had the same issue. If I don't have a context for my war file in the server.xml, then it unpacks fine. But, if I do have a context, then it won't unpack, and I have to do it manually. This is the server conf that I am trying to use that doesn't work: Context className=org.apache.catalina.core.StandardContext cachingAllowed=true charsetMapperClass=org.apache.catalina.util.CharsetMapper cookies=true crossContext=false debug=0 docBase=fortius.war mapperClass=org.apache.catalina.core.StandardContextMapper path=/fortius privileged=false reloadable=true swallowOutput=false useNaming=true wrapperClass=org.apache.catalina.core.StandardWrapper Environment description= name=local_dir override=true type=java.lang.String value=d:/java/tomcat/webapps/fortius/data/scintfiles/ /Context I do have the docBase pointing to my war file. Eric Pugh -Original Message- From: Tang To: Tomcat Users List; [EMAIL PROTECTED] Sent: 7/24/03 9:31 PM Subject: Re: War files don't work Hi, all you need to do is place WAR file into webapps directory, Tomcat will unpack for you. If you don't pack web application into WAR file. You should copy web application directory into webapps directory and config context parameter. You can check tomcat-docs for more configuration details. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, July 24, 2003 6:18 PM Subject: RE: War files don't work I'm joining this thread late, but I posted a couple weeks ago the same problem.. I am running JDK1.4.2 and Tomcat 4.1.24. If I have a context specified in server.xml, then the war file DOESN'T unpack. If I don't have a context specified, then it DOES unpack. Setting the docBase to fortius.war versus fortius doesn't seem to matter at all. I am building my war file using Maven.. could that be the problem? Eric Pugh -Original Message- From: Rick Roberts To: Tomcat Users List Sent: 7/23/03 3:26 PM Subject: Re: War files don't work Making docBase = nsfs.war vice nsfs works!! :) However; the war file is not being unpacked. It seems that unpackWARs=true works the same as unpackWARs=false Thanks, Rick John Turner wrote: From the docs for Context: The Document Base (also known as the Context Root) directory for this web application, or the pathname to the web application archive file (if this web application is being executed directly from the WAR file). You may specify an absolute pathname for this directory or WAR file, or a pathname that is relative to the appBase directory of the owning Host. Thus, if you're going to put a Context entry in server.xml for nsfs, make the docBase nsfs.war, not nsfs. Further: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Automat ic%20Application%20Deployment John Rick Roberts wrote: Does the nsfs.war file go into webapps directory or into webapps/nsfs directory? Currently, the webapps/nsfs dir does not exist. There is only the nsfs.war file setting in the webapps directory. I am assuming that Tomcat will create the webapps/nsfs directory for me when it expands the war file. I have temporarily set permissions to 777 on the webapps directory and it still does not expand, nor try to use, the war file. Rick John Turner wrote: You've told Tomcat the docBase is nsfs. Tomcat thusly looks for a directory called nsfs in the Host's appBase. If it finds it, and unpackWars is true, it will unpack your WAR file into that directory (webapps/nsfs, NOT webapps). Thus, Tomcat needs r+w on webapps/nsfs. Does Tomcat have r+w on webapps/nsfs? Alternatively, make unpackWars false. John Rick Roberts wrote: My directory permissions are as follows: drwxrwx---7 root tomcat4 4096 Jul 23 12:17 webapps ps -ef shows me this, which is think is Tomcat, which is run by user tomcat4: tomcat4 6199 1 0 12:17 pts/200:00:36 /usr/java/jdk1.4/bin/java -Djava.endorsed.dirs= -classpath /usr/java/jdk1.4/lib/tools.jar:/var Thanks, Rick Shapira, Yoav wrote: Howdy, 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed: java.lang.IllegalArgumentException: Document base /var/tomcat4/webapps/nsfs does not exist or is not a readable directory Well explain it to me! :) There is a /var/tomcat4/webapps/nsfs.war file. There should not be a /var/tomcat4/webapps/nsfs directory. If you have unpackWARS=true tomcat will try to explode your war into the directory specified as the docBase, which is nsfs under webapps. If it can't create this directory or read/write into it, you get the above error. Check file permissions on webapps. Yoav Shapira
RE: War files don't work
What the Automatic Applcation Deployment doc says is that if you have a WAR file, it won't be expanded if you have a context element in the server.xml document. It will only be run from that war file in an unexpanded format. correct? Eric -Original Message- From: John Turner To: Tomcat Users List Sent: 7/23/03 3:18 PM Subject: Re: War files don't work Check out the rules for Auto deployment: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Automat ic%20Application%20Deployment John Rick Roberts wrote: This sounds reasonable to me. But, if I don't have a Context/ element in server.xml then how do I provide Context/ type information to Tomcat? !-- NSFS Context -- Context path=/nsfs docBase=nsfs debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=nsfs_log. suffix=.txt timestamp=true/ /Context BTW, manually creating the nsfs/ directory did not help. however; if i manually create the nsfs/ dir and manually unpack the .war file everything works fine. another question: did I correctly create the nsfs.war file and test it by doing the following?: 1. cd to the webapps/nsfs/ directory 2. jar -cvf nsfs.war * 3. cp nsfs.war ../. (the webapps dir) 4. rm -rf nsfs/ 5. restart tomcat 6. use browser and navigate to http://localhost/nsfs Thanks, Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: War files don't work
That's how I read it. Basically, a Context in server.xml trumps automatic deployment. As I understand it, you have to pick one or the other, not both. If you must put a Context in server.xml for your web application, and you want to use a WAR file, then make the docBase of the Context the WAR file, not a directory, like this: docBase=myApp.war John [EMAIL PROTECTED] wrote: What the Automatic Applcation Deployment doc says is that if you have a WAR file, it won't be expanded if you have a context element in the server.xml document. It will only be run from that war file in an unexpanded format. correct? Eric -Original Message- From: John Turner To: Tomcat Users List Sent: 7/23/03 3:18 PM Subject: Re: War files don't work Check out the rules for Auto deployment: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Automat ic%20Application%20Deployment John Rick Roberts wrote: This sounds reasonable to me. But, if I don't have a Context/ element in server.xml then how do I provide Context/ type information to Tomcat? !-- NSFS Context -- Context path=/nsfs docBase=nsfs debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=nsfs_log. suffix=.txt timestamp=true/ /Context BTW, manually creating the nsfs/ directory did not help. however; if i manually create the nsfs/ dir and manually unpack the .war file everything works fine. another question: did I correctly create the nsfs.war file and test it by doing the following?: 1. cd to the webapps/nsfs/ directory 2. jar -cvf nsfs.war * 3. cp nsfs.war ../. (the webapps dir) 4. rm -rf nsfs/ 5. restart tomcat 6. use browser and navigate to http://localhost/nsfs Thanks, Rick - 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: War files don't work
I'm joining this thread late, but I posted a couple weeks ago the same problem.. I am running JDK1.4.2 and Tomcat 4.1.24. If I have a context specified in server.xml, then the war file DOESN'T unpack. If I don't have a context specified, then it DOES unpack. Setting the docBase to fortius.war versus fortius doesn't seem to matter at all. I am building my war file using Maven.. could that be the problem? Eric Pugh -Original Message- From: Rick Roberts To: Tomcat Users List Sent: 7/23/03 3:26 PM Subject: Re: War files don't work Making docBase = nsfs.war vice nsfs works!! :) However; the war file is not being unpacked. It seems that unpackWARs=true works the same as unpackWARs=false Thanks, Rick John Turner wrote: From the docs for Context: The Document Base (also known as the Context Root) directory for this web application, or the pathname to the web application archive file (if this web application is being executed directly from the WAR file). You may specify an absolute pathname for this directory or WAR file, or a pathname that is relative to the appBase directory of the owning Host. Thus, if you're going to put a Context entry in server.xml for nsfs, make the docBase nsfs.war, not nsfs. Further: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Automat ic%20Application%20Deployment John Rick Roberts wrote: Does the nsfs.war file go into webapps directory or into webapps/nsfs directory? Currently, the webapps/nsfs dir does not exist. There is only the nsfs.war file setting in the webapps directory. I am assuming that Tomcat will create the webapps/nsfs directory for me when it expands the war file. I have temporarily set permissions to 777 on the webapps directory and it still does not expand, nor try to use, the war file. Rick John Turner wrote: You've told Tomcat the docBase is nsfs. Tomcat thusly looks for a directory called nsfs in the Host's appBase. If it finds it, and unpackWars is true, it will unpack your WAR file into that directory (webapps/nsfs, NOT webapps). Thus, Tomcat needs r+w on webapps/nsfs. Does Tomcat have r+w on webapps/nsfs? Alternatively, make unpackWars false. John Rick Roberts wrote: My directory permissions are as follows: drwxrwx---7 root tomcat4 4096 Jul 23 12:17 webapps ps -ef shows me this, which is think is Tomcat, which is run by user tomcat4: tomcat4 6199 1 0 12:17 pts/200:00:36 /usr/java/jdk1.4/bin/java -Djava.endorsed.dirs= -classpath /usr/java/jdk1.4/lib/tools.jar:/var Thanks, Rick Shapira, Yoav wrote: Howdy, 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed: java.lang.IllegalArgumentException: Document base /var/tomcat4/webapps/nsfs does not exist or is not a readable directory Well explain it to me! :) There is a /var/tomcat4/webapps/nsfs.war file. There should not be a /var/tomcat4/webapps/nsfs directory. If you have unpackWARS=true tomcat will try to explode your war into the directory specified as the docBase, which is nsfs under webapps. If it can't create this directory or read/write into it, you get the above error. Check file permissions on webapps. Yoav Shapira -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: War files don't work
You need to make sure that you delete the webapps/nsfs directory before starting tomcat, or tomcat won't unpack the .war file. Place the .war file directly in the webapps directory. From: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/deployment.html Copy the web application archive file into directory $CATALINA_HOME/webapps/. When Tomcat is started, it will automatically expand the web application archive file into its unpacked form, and execute the application that way. This approach would typically be used to install an additional application, provided by a third party vendor or by your internal development staff, into an existing Tomcat installation. NOTE - If you use this approach, and wish to update your application later, you must both replace the web application archive file AND delete the expanded directory that Tomcat created, and then restart Tomcat, in order to reflect your changes. -Original Message- From: Rick Roberts [mailto:[EMAIL PROTECTED] Sent: 23 July 2003 20:27 To: Tomcat Users List Subject: Re: War files don't work Making docBase = nsfs.war vice nsfs works!! :) However; the war file is not being unpacked. It seems that unpackWARs=true works the same as unpackWARs=false Thanks, Rick John Turner wrote: From the docs for Context: The Document Base (also known as the Context Root) directory for this web application, or the pathname to the web application archive file (if this web application is being executed directly from the WAR file). You may specify an absolute pathname for this directory or WAR file, or a pathname that is relative to the appBase directory of the owning Host. Thus, if you're going to put a Context entry in server.xml for nsfs, make the docBase nsfs.war, not nsfs. Further: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Automatic%2 0Application%20Deployment John Rick Roberts wrote: Does the nsfs.war file go into webapps directory or into webapps/nsfs directory? Currently, the webapps/nsfs dir does not exist. There is only the nsfs.war file setting in the webapps directory. I am assuming that Tomcat will create the webapps/nsfs directory for me when it expands the war file. I have temporarily set permissions to 777 on the webapps directory and it still does not expand, nor try to use, the war file. Rick John Turner wrote: You've told Tomcat the docBase is nsfs. Tomcat thusly looks for a directory called nsfs in the Host's appBase. If it finds it, and unpackWars is true, it will unpack your WAR file into that directory (webapps/nsfs, NOT webapps). Thus, Tomcat needs r+w on webapps/nsfs. Does Tomcat have r+w on webapps/nsfs? Alternatively, make unpackWars false. John Rick Roberts wrote: My directory permissions are as follows: drwxrwx---7 root tomcat4 4096 Jul 23 12:17 webapps ps -ef shows me this, which is think is Tomcat, which is run by user tomcat4: tomcat4 6199 1 0 12:17 pts/200:00:36 /usr/java/jdk1.4/bin/java -Djava.endorsed.dirs= -classpath /usr/java/jdk1.4/lib/tools.jar:/var Thanks, Rick Shapira, Yoav wrote: Howdy, 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed: java.lang.IllegalArgumentException: Document base /var/tomcat4/webapps/nsfs does not exist or is not a readable directory Well explain it to me! :) There is a /var/tomcat4/webapps/nsfs.war file. There should not be a /var/tomcat4/webapps/nsfs directory. If you have unpackWARS=true tomcat will try to explode your war into the directory specified as the docBase, which is nsfs under webapps. If it can't create this directory or read/write into it, you get the above error. Check file permissions on webapps. Yoav Shapira -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * *** - 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: War files don't work
Hi, all you need to do is place WAR file into webapps directory, Tomcat will unpack for you. If you don't pack web application into WAR file. You should copy web application directory into webapps directory and config context parameter. You can check tomcat-docs for more configuration details. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, July 24, 2003 6:18 PM Subject: RE: War files don't work I'm joining this thread late, but I posted a couple weeks ago the same problem.. I am running JDK1.4.2 and Tomcat 4.1.24. If I have a context specified in server.xml, then the war file DOESN'T unpack. If I don't have a context specified, then it DOES unpack. Setting the docBase to fortius.war versus fortius doesn't seem to matter at all. I am building my war file using Maven.. could that be the problem? Eric Pugh -Original Message- From: Rick Roberts To: Tomcat Users List Sent: 7/23/03 3:26 PM Subject: Re: War files don't work Making docBase = nsfs.war vice nsfs works!! :) However; the war file is not being unpacked. It seems that unpackWARs=true works the same as unpackWARs=false Thanks, Rick John Turner wrote: From the docs for Context: The Document Base (also known as the Context Root) directory for this web application, or the pathname to the web application archive file (if this web application is being executed directly from the WAR file). You may specify an absolute pathname for this directory or WAR file, or a pathname that is relative to the appBase directory of the owning Host. Thus, if you're going to put a Context entry in server.xml for nsfs, make the docBase nsfs.war, not nsfs. Further: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Automat ic%20Application%20Deployment John Rick Roberts wrote: Does the nsfs.war file go into webapps directory or into webapps/nsfs directory? Currently, the webapps/nsfs dir does not exist. There is only the nsfs.war file setting in the webapps directory. I am assuming that Tomcat will create the webapps/nsfs directory for me when it expands the war file. I have temporarily set permissions to 777 on the webapps directory and it still does not expand, nor try to use, the war file. Rick John Turner wrote: You've told Tomcat the docBase is nsfs. Tomcat thusly looks for a directory called nsfs in the Host's appBase. If it finds it, and unpackWars is true, it will unpack your WAR file into that directory (webapps/nsfs, NOT webapps). Thus, Tomcat needs r+w on webapps/nsfs. Does Tomcat have r+w on webapps/nsfs? Alternatively, make unpackWars false. John Rick Roberts wrote: My directory permissions are as follows: drwxrwx---7 root tomcat4 4096 Jul 23 12:17 webapps ps -ef shows me this, which is think is Tomcat, which is run by user tomcat4: tomcat4 6199 1 0 12:17 pts/200:00:36 /usr/java/jdk1.4/bin/java -Djava.endorsed.dirs= -classpath /usr/java/jdk1.4/lib/tools.jar:/var Thanks, Rick Shapira, Yoav wrote: Howdy, 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed: java.lang.IllegalArgumentException: Document base /var/tomcat4/webapps/nsfs does not exist or is not a readable directory Well explain it to me! :) There is a /var/tomcat4/webapps/nsfs.war file. There should not be a /var/tomcat4/webapps/nsfs directory. If you have unpackWARS=true tomcat will try to explode your war into the directory specified as the docBase, which is nsfs under webapps. If it can't create this directory or read/write into it, you get the above error. Check file permissions on webapps. Yoav Shapira -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * *** - 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: War files don't work
Howdy, The error I get looks like this: HTTP Status 404 - /nsfs type Status report message /nsfs description The requested resource (/nsfs) is not available. Apache Tomcat/4.1 What the root cause and full stack trace? Yoav Shapira 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: War files don't work
2003-07-23 10:04:43 WebappLoader[/nsfs]: Deploying class repositories to work directory /var/tomcat4/work/Standalone/localhost/nsfs 2003-07-23 10:04:43 WebappLoader[/nsfs]: Reloading checks are enabled for this Context 2003-07-23 10:04:43 ContextConfig[/nsfs]: Missing application web.xml, using defaults only 2003-07-23 10:04:43 StandardManager[/nsfs]: Seeding random number generator class java.security.SecureRandom 2003-07-23 10:04:43 StandardManager[/nsfs]: Seeding of random number generator has been completed 2003-07-23 10:04:43 StandardWrapper[/nsfs:default]: Loading container servlet default 2003-07-23 10:04:43 default: init 2003-07-23 10:04:43 StandardWrapper[/nsfs:invoker]: Loading container servlet invoker 2003-07-23 10:04:43 invoker: init 2003-07-23 10:04:43 jsp: init 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed: java.lang.IllegalArgumentException: Document base /var/tomcat4/webapps/nsfs does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(Unknown Source) at org.apache.catalina.core.StandardContext.resourcesStart(Unknown Source) at org.apache.catalina.core.StandardContext.start(Unknown Source) at org.apache.catalina.core.ContainerBase.start(Unknown Source) at org.apache.catalina.core.StandardHost.start(Unknown Source) at org.apache.catalina.core.ContainerBase.start(Unknown Source) at org.apache.catalina.core.StandardEngine.start(Unknown Source) at org.apache.catalina.core.StandardService.start(Unknown Source) at org.apache.catalina.core.StandardServer.start(Unknown Source) at org.apache.catalina.startup.Catalina.start(Unknown Source) at org.apache.catalina.startup.Catalina.execute(Unknown Source) at org.apache.catalina.startup.Catalina.process(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Unknown Source) Shapira, Yoav wrote: Howdy, The error I get looks like this: HTTP Status 404 - /nsfs type Status report message /nsfs description The requested resource (/nsfs) is not available. Apache Tomcat/4.1 What the root cause and full stack trace? Yoav Shapira 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] -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: War files don't work
2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed: java.lang.IllegalArgumentException: Document base /var/tomcat4/webapps/nsfs does not exist or is not a readable directory Seems self-explanatory to me. John Rick Roberts wrote: 2003-07-23 10:04:43 WebappLoader[/nsfs]: Deploying class repositories to work directory /var/tomcat4/work/Standalone/localhost/nsfs 2003-07-23 10:04:43 WebappLoader[/nsfs]: Reloading checks are enabled for this Context 2003-07-23 10:04:43 ContextConfig[/nsfs]: Missing application web.xml, using defaults only 2003-07-23 10:04:43 StandardManager[/nsfs]: Seeding random number generator class java.security.SecureRandom 2003-07-23 10:04:43 StandardManager[/nsfs]: Seeding of random number generator has been completed 2003-07-23 10:04:43 StandardWrapper[/nsfs:default]: Loading container servlet default 2003-07-23 10:04:43 default: init 2003-07-23 10:04:43 StandardWrapper[/nsfs:invoker]: Loading container servlet invoker 2003-07-23 10:04:43 invoker: init 2003-07-23 10:04:43 jsp: init 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed: java.lang.IllegalArgumentException: Document base /var/tomcat4/webapps/nsfs does not exist or is not a readable directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: War files don't work
Does the war file contain a web.xml file that contains entries for the /nsfs servlet? If not, that's likely your problem. Rhino - Original Message - From: Rick Roberts [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 12:11 PM Subject: War files don't work My server.xml contains this: Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- NSFS Context -- Context path=/nsfs docBase=nsfs debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=nsfs_log. suffix=.txt timestamp=true/ /Context My webapps dir contains my war file (nsfs.war). The error I get looks like this: HTTP Status 404 - /nsfs type Status report message /nsfs description The requested resource (/nsfs) is not available. Apache Tomcat/4.1 If I manually expand the nsfs.war file into a webapps/nsfs/ directory then all works fine. How do I get Tomcat to use the war file? -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * *** - 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: War files don't work
John Turner wrote: 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed: java.lang.IllegalArgumentException: Document base /var/tomcat4/webapps/nsfs does not exist or is not a readable directory Seems self-explanatory to me. John Well explain it to me! :) There is a /var/tomcat4/webapps/nsfs.war file. There should not be a /var/tomcat4/webapps/nsfs directory. Do I need to make changes to my workers2.properties file to accomodate the .war file instead of and expanded webapps/nsfs directory? # # /nsfs # [uri:/nsfs] info=NSFS WBS Web Application context=/nsfs debug=0 [uri:/nsfs/servlet/*] info=Prefix mapping [uri:/nsfs/*.jsp] info=Extension mapping [uri:/nsfs/*] info=Map the whole webapp -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: War files don't work
Howdy, 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed: java.lang.IllegalArgumentException: Document base /var/tomcat4/webapps/nsfs does not exist or is not a readable directory Well explain it to me! :) There is a /var/tomcat4/webapps/nsfs.war file. There should not be a /var/tomcat4/webapps/nsfs directory. If you have unpackWARS=true tomcat will try to explode your war into the directory specified as the docBase, which is nsfs under webapps. If it can't create this directory or read/write into it, you get the above error. Check file permissions on webapps. Yoav Shapira 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: War files don't work
Yes. My war file has a web.xml file within the WEB-INF/ directory structure of the war file. Rhino wrote: Does the war file contain a web.xml file that contains entries for the /nsfs servlet? If not, that's likely your problem. Rhino - Original Message - From: Rick Roberts [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 12:11 PM Subject: War files don't work My server.xml contains this: Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true !-- NSFS Context -- Context path=/nsfs docBase=nsfs debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=nsfs_log. suffix=.txt timestamp=true/ /Context My webapps dir contains my war file (nsfs.war). The error I get looks like this: HTTP Status 404 - /nsfs type Status report message /nsfs description The requested resource (/nsfs) is not available. Apache Tomcat/4.1 If I manually expand the nsfs.war file into a webapps/nsfs/ directory then all works fine. How do I get Tomcat to use the war file? -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * *** - 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] -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: War files don't work
My directory permissions are as follows: drwxrwx---7 root tomcat4 4096 Jul 23 12:17 webapps ps -ef shows me this, which is think is Tomcat, which is run by user tomcat4: tomcat4 6199 1 0 12:17 pts/200:00:36 /usr/java/jdk1.4/bin/java -Djava.endorsed.dirs= -classpath /usr/java/jdk1.4/lib/tools.jar:/var Thanks, Rick Shapira, Yoav wrote: Howdy, 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed: java.lang.IllegalArgumentException: Document base /var/tomcat4/webapps/nsfs does not exist or is not a readable directory Well explain it to me! :) There is a /var/tomcat4/webapps/nsfs.war file. There should not be a /var/tomcat4/webapps/nsfs directory. If you have unpackWARS=true tomcat will try to explode your war into the directory specified as the docBase, which is nsfs under webapps. If it can't create this directory or read/write into it, you get the above error. Check file permissions on webapps. Yoav Shapira 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. -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: War files don't work
You've told Tomcat the docBase is nsfs. Tomcat thusly looks for a directory called nsfs in the Host's appBase. If it finds it, and unpackWars is true, it will unpack your WAR file into that directory (webapps/nsfs, NOT webapps). Thus, Tomcat needs r+w on webapps/nsfs. Does Tomcat have r+w on webapps/nsfs? Alternatively, make unpackWars false. John Rick Roberts wrote: My directory permissions are as follows: drwxrwx---7 root tomcat4 4096 Jul 23 12:17 webapps ps -ef shows me this, which is think is Tomcat, which is run by user tomcat4: tomcat4 6199 1 0 12:17 pts/200:00:36 /usr/java/jdk1.4/bin/java -Djava.endorsed.dirs= -classpath /usr/java/jdk1.4/lib/tools.jar:/var Thanks, Rick Shapira, Yoav wrote: Howdy, 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed: java.lang.IllegalArgumentException: Document base /var/tomcat4/webapps/nsfs does not exist or is not a readable directory Well explain it to me! :) There is a /var/tomcat4/webapps/nsfs.war file. There should not be a /var/tomcat4/webapps/nsfs directory. If you have unpackWARS=true tomcat will try to explode your war into the directory specified as the docBase, which is nsfs under webapps. If it can't create this directory or read/write into it, you get the above error. Check file permissions on webapps. Yoav Shapira 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: War files don't work
Does the nsfs.war file go into webapps directory or into webapps/nsfs directory? Currently, the webapps/nsfs dir does not exist. There is only the nsfs.war file setting in the webapps directory. I am assuming that Tomcat will create the webapps/nsfs directory for me when it expands the war file. I have temporarily set permissions to 777 on the webapps directory and it still does not expand, nor try to use, the war file. Rick John Turner wrote: You've told Tomcat the docBase is nsfs. Tomcat thusly looks for a directory called nsfs in the Host's appBase. If it finds it, and unpackWars is true, it will unpack your WAR file into that directory (webapps/nsfs, NOT webapps). Thus, Tomcat needs r+w on webapps/nsfs. Does Tomcat have r+w on webapps/nsfs? Alternatively, make unpackWars false. John Rick Roberts wrote: My directory permissions are as follows: drwxrwx---7 root tomcat4 4096 Jul 23 12:17 webapps ps -ef shows me this, which is think is Tomcat, which is run by user tomcat4: tomcat4 6199 1 0 12:17 pts/200:00:36 /usr/java/jdk1.4/bin/java -Djava.endorsed.dirs= -classpath /usr/java/jdk1.4/lib/tools.jar:/var Thanks, Rick Shapira, Yoav wrote: Howdy, 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed: java.lang.IllegalArgumentException: Document base /var/tomcat4/webapps/nsfs does not exist or is not a readable directory Well explain it to me! :) There is a /var/tomcat4/webapps/nsfs.war file. There should not be a /var/tomcat4/webapps/nsfs directory. If you have unpackWARS=true tomcat will try to explode your war into the directory specified as the docBase, which is nsfs under webapps. If it can't create this directory or read/write into it, you get the above error. Check file permissions on webapps. Yoav Shapira -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: War files don't work
nsfs.war goes in webapps. How about just creating the directory and seeing what happens? In any case, if you're using WAR files, there's no reason to have a Context defined in server.xml, that's probably what is confusing Tomcat. Tomcat is reading server.xml, which tells it to start a Context called nsfs with a docBase of nsfs but no such docBase exists. John Rick Roberts wrote: Does the nsfs.war file go into webapps directory or into webapps/nsfs directory? Currently, the webapps/nsfs dir does not exist. There is only the nsfs.war file setting in the webapps directory. I am assuming that Tomcat will create the webapps/nsfs directory for me when it expands the war file. I have temporarily set permissions to 777 on the webapps directory and it still does not expand, nor try to use, the war file. Rick John Turner wrote: You've told Tomcat the docBase is nsfs. Tomcat thusly looks for a directory called nsfs in the Host's appBase. If it finds it, and unpackWars is true, it will unpack your WAR file into that directory (webapps/nsfs, NOT webapps). Thus, Tomcat needs r+w on webapps/nsfs. Does Tomcat have r+w on webapps/nsfs? Alternatively, make unpackWars false. John Rick Roberts wrote: My directory permissions are as follows: drwxrwx---7 root tomcat4 4096 Jul 23 12:17 webapps ps -ef shows me this, which is think is Tomcat, which is run by user tomcat4: tomcat4 6199 1 0 12:17 pts/200:00:36 /usr/java/jdk1.4/bin/java -Djava.endorsed.dirs= -classpath /usr/java/jdk1.4/lib/tools.jar:/var Thanks, Rick Shapira, Yoav wrote: Howdy, 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed: java.lang.IllegalArgumentException: Document base /var/tomcat4/webapps/nsfs does not exist or is not a readable directory Well explain it to me! :) There is a /var/tomcat4/webapps/nsfs.war file. There should not be a /var/tomcat4/webapps/nsfs directory. If you have unpackWARS=true tomcat will try to explode your war into the directory specified as the docBase, which is nsfs under webapps. If it can't create this directory or read/write into it, you get the above error. Check file permissions on webapps. Yoav Shapira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: War files don't work
From the docs for Context: The Document Base (also known as the Context Root) directory for this web application, or the pathname to the web application archive file (if this web application is being executed directly from the WAR file). You may specify an absolute pathname for this directory or WAR file, or a pathname that is relative to the appBase directory of the owning Host. Thus, if you're going to put a Context entry in server.xml for nsfs, make the docBase nsfs.war, not nsfs. Further: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Automatic%20Application%20Deployment John Rick Roberts wrote: Does the nsfs.war file go into webapps directory or into webapps/nsfs directory? Currently, the webapps/nsfs dir does not exist. There is only the nsfs.war file setting in the webapps directory. I am assuming that Tomcat will create the webapps/nsfs directory for me when it expands the war file. I have temporarily set permissions to 777 on the webapps directory and it still does not expand, nor try to use, the war file. Rick John Turner wrote: You've told Tomcat the docBase is nsfs. Tomcat thusly looks for a directory called nsfs in the Host's appBase. If it finds it, and unpackWars is true, it will unpack your WAR file into that directory (webapps/nsfs, NOT webapps). Thus, Tomcat needs r+w on webapps/nsfs. Does Tomcat have r+w on webapps/nsfs? Alternatively, make unpackWars false. John Rick Roberts wrote: My directory permissions are as follows: drwxrwx---7 root tomcat4 4096 Jul 23 12:17 webapps ps -ef shows me this, which is think is Tomcat, which is run by user tomcat4: tomcat4 6199 1 0 12:17 pts/200:00:36 /usr/java/jdk1.4/bin/java -Djava.endorsed.dirs= -classpath /usr/java/jdk1.4/lib/tools.jar:/var Thanks, Rick Shapira, Yoav wrote: Howdy, 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed: java.lang.IllegalArgumentException: Document base /var/tomcat4/webapps/nsfs does not exist or is not a readable directory Well explain it to me! :) There is a /var/tomcat4/webapps/nsfs.war file. There should not be a /var/tomcat4/webapps/nsfs directory. If you have unpackWARS=true tomcat will try to explode your war into the directory specified as the docBase, which is nsfs under webapps. If it can't create this directory or read/write into it, you get the above error. Check file permissions on webapps. Yoav Shapira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: War files don't work
This sounds reasonable to me. But, if I don't have a Context/ element in server.xml then how do I provide Context/ type information to Tomcat? !-- NSFS Context -- Context path=/nsfs docBase=nsfs debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=nsfs_log. suffix=.txt timestamp=true/ /Context BTW, manually creating the nsfs/ directory did not help. however; if i manually create the nsfs/ dir and manually unpack the .war file everything works fine. another question: did I correctly create the nsfs.war file and test it by doing the following?: 1. cd to the webapps/nsfs/ directory 2. jar -cvf nsfs.war * 3. cp nsfs.war ../. (the webapps dir) 4. rm -rf nsfs/ 5. restart tomcat 6. use browser and navigate to http://localhost/nsfs Thanks, Rick John Turner wrote: nsfs.war goes in webapps. How about just creating the directory and seeing what happens? In any case, if you're using WAR files, there's no reason to have a Context defined in server.xml, that's probably what is confusing Tomcat. Tomcat is reading server.xml, which tells it to start a Context called nsfs with a docBase of nsfs but no such docBase exists. John Rick Roberts wrote: Does the nsfs.war file go into webapps directory or into webapps/nsfs directory? Currently, the webapps/nsfs dir does not exist. There is only the nsfs.war file setting in the webapps directory. I am assuming that Tomcat will create the webapps/nsfs directory for me when it expands the war file. I have temporarily set permissions to 777 on the webapps directory and it still does not expand, nor try to use, the war file. Rick John Turner wrote: You've told Tomcat the docBase is nsfs. Tomcat thusly looks for a directory called nsfs in the Host's appBase. If it finds it, and unpackWars is true, it will unpack your WAR file into that directory (webapps/nsfs, NOT webapps). Thus, Tomcat needs r+w on webapps/nsfs. Does Tomcat have r+w on webapps/nsfs? Alternatively, make unpackWars false. John Rick Roberts wrote: My directory permissions are as follows: drwxrwx---7 root tomcat4 4096 Jul 23 12:17 webapps ps -ef shows me this, which is think is Tomcat, which is run by user tomcat4: tomcat4 6199 1 0 12:17 pts/200:00:36 /usr/java/jdk1.4/bin/java -Djava.endorsed.dirs= -classpath /usr/java/jdk1.4/lib/tools.jar:/var Thanks, Rick Shapira, Yoav wrote: Howdy, 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed: java.lang.IllegalArgumentException: Document base /var/tomcat4/webapps/nsfs does not exist or is not a readable directory Well explain it to me! :) There is a /var/tomcat4/webapps/nsfs.war file. There should not be a /var/tomcat4/webapps/nsfs directory. If you have unpackWARS=true tomcat will try to explode your war into the directory specified as the docBase, which is nsfs under webapps. If it can't create this directory or read/write into it, you get the above error. Check file permissions on webapps. Yoav Shapira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: War files don't work
Check out the rules for Auto deployment: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Automatic%20Application%20Deployment John Rick Roberts wrote: This sounds reasonable to me. But, if I don't have a Context/ element in server.xml then how do I provide Context/ type information to Tomcat? !-- NSFS Context -- Context path=/nsfs docBase=nsfs debug=0 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=nsfs_log. suffix=.txt timestamp=true/ /Context BTW, manually creating the nsfs/ directory did not help. however; if i manually create the nsfs/ dir and manually unpack the .war file everything works fine. another question: did I correctly create the nsfs.war file and test it by doing the following?: 1. cd to the webapps/nsfs/ directory 2. jar -cvf nsfs.war * 3. cp nsfs.war ../. (the webapps dir) 4. rm -rf nsfs/ 5. restart tomcat 6. use browser and navigate to http://localhost/nsfs Thanks, Rick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: War files don't work
Making docBase = nsfs.war vice nsfs works!! :) However; the war file is not being unpacked. It seems that unpackWARs=true works the same as unpackWARs=false Thanks, Rick John Turner wrote: From the docs for Context: The Document Base (also known as the Context Root) directory for this web application, or the pathname to the web application archive file (if this web application is being executed directly from the WAR file). You may specify an absolute pathname for this directory or WAR file, or a pathname that is relative to the appBase directory of the owning Host. Thus, if you're going to put a Context entry in server.xml for nsfs, make the docBase nsfs.war, not nsfs. Further: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html#Automatic%20Application%20Deployment John Rick Roberts wrote: Does the nsfs.war file go into webapps directory or into webapps/nsfs directory? Currently, the webapps/nsfs dir does not exist. There is only the nsfs.war file setting in the webapps directory. I am assuming that Tomcat will create the webapps/nsfs directory for me when it expands the war file. I have temporarily set permissions to 777 on the webapps directory and it still does not expand, nor try to use, the war file. Rick John Turner wrote: You've told Tomcat the docBase is nsfs. Tomcat thusly looks for a directory called nsfs in the Host's appBase. If it finds it, and unpackWars is true, it will unpack your WAR file into that directory (webapps/nsfs, NOT webapps). Thus, Tomcat needs r+w on webapps/nsfs. Does Tomcat have r+w on webapps/nsfs? Alternatively, make unpackWars false. John Rick Roberts wrote: My directory permissions are as follows: drwxrwx---7 root tomcat4 4096 Jul 23 12:17 webapps ps -ef shows me this, which is think is Tomcat, which is run by user tomcat4: tomcat4 6199 1 0 12:17 pts/200:00:36 /usr/java/jdk1.4/bin/java -Djava.endorsed.dirs= -classpath /usr/java/jdk1.4/lib/tools.jar:/var Thanks, Rick Shapira, Yoav wrote: Howdy, 2003-07-23 11:09:30 StandardContext[/nsfs]: Resources start failed: java.lang.IllegalArgumentException: Document base /var/tomcat4/webapps/nsfs does not exist or is not a readable directory Well explain it to me! :) There is a /var/tomcat4/webapps/nsfs.war file. There should not be a /var/tomcat4/webapps/nsfs directory. If you have unpackWARS=true tomcat will try to explode your war into the directory specified as the docBase, which is nsfs under webapps. If it can't create this directory or read/write into it, you get the above error. Check file permissions on webapps. Yoav Shapira -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]