Re: Regression? Tomcat 4.1.27 spiraling out of control!
I don't know how to creat a test case for this. Everything ran fine on my test box. It only gets out of control under load. I don't have any tools for load testing. I was hoping that the clues about the fix between 4.0.3 and 4.0.4 would help because the symptoms are identical. I also didn't expect that I would be the first one to notice this... -- Jeff jlar310 at yahoo - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, September 29, 2003 8:08 AM Subject: RE: Regression? Tomcat 4.1.27 spiraling out of control! Howdy, Google hasn't been very helpful on this one. Should I just revert to 4.0.4 and wait for a fix? Instead of idly waiting for a fix, I encourage you to contribute a test war and steps to reproduce your problem. If we don't see it, chances are it won't get fixed... 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat with JBoss/Tomcat
I don't see why they wouldn't play nice. I use them both, but on separate boxes. The can be memory pigs however. Each uses around 128Mb on Solaris 7. I haven't done it myself, but JBoss can be configured to run Tomcat within it's JVM. This might save some overhead. Neither one is a processor hog with my applications. If you run them in separate JVM's, watch out for the plethora of default services that JBoss launches. You will likely get some contention for some 80xx port numbers. -- Jeff jlar310 at yahoo - Original Message - From: Geralyn M Hollerman [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, September 29, 2003 12:13 PM Subject: Tomcat with JBoss/Tomcat I have an application running quite happily under Tomcat 4.1.24. I have been informed that it is desired to run an instance of JBoss with Tomcat (3.2.1) on the same machine for some other development. Has anyone had any experience doing this kind of thing - in other words, do Tomcat and JBoss/Tomcat, as 2 different processes, play nice, or does one of the two processes have a problem (as in, is one a resource hog) when the other is used? Are there some system conflicts that need to be resolved first? Thanks! -- Lynn Hollerman. - 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]
Regression? Tomcat 4.1.27 spiraling out of control!
I just upgraded my production server to tomcat 4.1.27 running on Solaris 7 with java 1.4.2_01. I am using Ajp13 connections to Apache 1.3.23 with mod_jk 1.2.0. I was running 4.0.4 on java 1.3.0 without incident. It ran fine for a day and a half, but then over a period of about 10 minutes I got a flood of log messages for Broken pipe, Starting background thread and finally when it exceeded my configured Ajp13Processor limit, No processor available, rejecting this connection. Also, tomcat pegged my CPU usage during this period. I bounced tomcat and now all is well with less than 10% cpu for tomcat. The httpd logs show no evidence of a DOS attack. Besides, the tomcat application requires form based login. My 4.0.4 setup never used more than 55 AJP processors. It was (as is 4.1.27) configured for a max of 75 which it never reached. I had the very same problem when I first deployed 4.0.3, but it got fixed in 4.0.4. Can anybody confirm this regression? Google hasn't been very helpful on this one. Should I just revert to 4.0.4 and wait for a fix? -- Jeff jlar310 at yahoo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache + Tomcat sometimes pegs CPU
I'm running Apache 1.3.23/Tomcat 4.0.3 (jdk1.3.1) on Solaris 7 connected with mod_jk. Sometimes I I find that the CPU on the web server box is pegged at 100%. It's a dedicated server and I am bouncing Apache and Tomcat once a week to help alleviate the problem. If I didn't restart every week, it would just be a matter of time before things spiraled out of control again. The processes that are responsible are java (Tomcat) and libhttpd.ep (Apache, with --enable-rule=SHARED_CORE) each with about 50% of the CPU. If I bounce Tomcat, no change. If I bounce Apache, it returns to normal (low) CPU usage. I have Apache running on other machines without Tomcat and this does not happen. So it's got to be a mod_jk thing. There are no log messages of any significance. Any ideas on how to fix it? Thanks, Jeff -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache + Tomcat sometimes pegs CPU
I forgot to mention... Even when the CPU is pegged, the site functions normally. Jeff - Original Message - From: Jeff Larsen [EMAIL PROTECTED] To: tomcat-user [EMAIL PROTECTED] Sent: Friday, August 02, 2002 12:02 PM Subject: Apache + Tomcat sometimes pegs CPU I'm running Apache 1.3.23/Tomcat 4.0.3 (jdk1.3.1) on Solaris 7 connected with mod_jk. Sometimes I I find that the CPU on the web server box is pegged at 100%. It's a dedicated server and I am bouncing Apache and Tomcat once a week to help alleviate the problem. If I didn't restart every week, it would just be a matter of time before things spiraled out of control again. The processes that are responsible are java (Tomcat) and libhttpd.ep (Apache, with --enable-rule=SHARED_CORE) each with about 50% of the CPU. If I bounce Tomcat, no change. If I bounce Apache, it returns to normal (low) CPU usage. I have Apache running on other machines without Tomcat and this does not happen. So it's got to be a mod_jk thing. There are no log messages of any significance. Any ideas on how to fix it? Thanks, Jeff -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache + Tomcat sometimes pegs CPU
Thanks, I figured that I wasn't the first one to see this. Is my current mod_jk going to need upgrading also? Jeff - Original Message - From: Tim Funk [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, August 02, 2002 12:28 PM Subject: Re: Apache + Tomcat sometimes pegs CPU Upgrade to 4.0.4. Earlier (4.0.X) versions have a problems with POST requests when the browser terminates before sending enough data. This caused an infinite loop between apache and tomcat. Here is the simple way to reproduce, (and watch your cpu go way up): % telnet webserver 80 POST /somepage.jsp HTTP/1.1 Host: webserver:80 Connection: Close Content-Type: application/x-www-form-urlencoded Content-Length: 200 PutStuff here and kill telnet session before 200 chars -Tim Jeff Larsen wrote: I forgot to mention... Even when the CPU is pegged, the site functions normally. Jeff - Original Message - From: Jeff Larsen [EMAIL PROTECTED] To: tomcat-user [EMAIL PROTECTED] Sent: Friday, August 02, 2002 12:02 PM Subject: Apache + Tomcat sometimes pegs CPU I'm running Apache 1.3.23/Tomcat 4.0.3 (jdk1.3.1) on Solaris 7 connected with mod_jk. Sometimes I I find that the CPU on the web server box is pegged at 100%. It's a dedicated server and I am bouncing Apache and Tomcat once a week to help alleviate the problem. If I didn't restart every week, it would just be a matter of time before things spiraled out of control again. The processes that are responsible are java (Tomcat) and libhttpd.ep (Apache, with --enable-rule=SHARED_CORE) each with about 50% of the CPU. If I bounce Tomcat, no change. If I bounce Apache, it returns to normal (low) CPU usage. I have Apache running on other machines without Tomcat and this does not happen. So it's got to be a mod_jk thing. There are no log messages of any significance. Any ideas on how to fix it? Thanks, Jeff -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Apache + Tomcat sometimes pegs CPU
If you read the fine print below, you'll see that I am running my server on using UNIX. Most webmasters use some form of Unix/Linux. Please don't be angry with us. We have our own troubles with trying to build mod_jk on our various platforms, so we can sympathize. However, I did find the following page which discusses installation of mod_jk.dll on Windows. It includes a link (which works) to a downloadable version of mod_jk.dll at the jakarta web site. http://www.tek-tips.com/gfaqs.cfm/lev2/3/lev3/22/spid/65/sfid/1814 HTH, Jeff - Original Message - From: steve Burrus [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, August 02, 2002 1:44 PM Subject: Re: Apache + Tomcat sometimes pegs CPU Hello there, I need the file--mod_jk.dll--to be able to smoothly connect the Tomcat 4.0.* Server with the Apache HTTP Server!!! Does anyone out there have the download link to access and then install this file WHICH I STILL DON'T HAVE! I am getting sick and tired of seeing other members of the tomcat users newsgroup referring to this file, but I still do not have access to it!!! ** *** Jeff Larsen wrote: Thanks, I figured that I wasn't the first one to see this. Is my current mod_jk going to need upgrading also? Jeff - Original Message - From: Tim Funk [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, August 02, 2002 12:28 PM Subject: Re: Apache + Tomcat sometimes pegs CPU Upgrade to 4.0.4. Earlier (4.0.X) versions have a problems with POST requests when the browser terminates before sending enough data. This caused an infinite loop between apache and tomcat. Here is the simple way to reproduce, (and watch your cpu go way up): % telnet webserver 80 POST /somepage.jsp HTTP/1.1 Host: webserver:80 Connection: Close Content-Type: application/x-www-form-urlencoded Content-Length: 200 PutStuff here and kill telnet session before 200 chars -Tim Jeff Larsen wrote: I forgot to mention... Even when the CPU is pegged, the site functions normally. Jeff - Original Message - From: Jeff Larsen [EMAIL PROTECTED] To: tomcat-user [EMAIL PROTECTED] Sent: Friday, August 02, 2002 12:02 PM Subject: Apache + Tomcat sometimes pegs CPU I'm running Apache 1.3.23/Tomcat 4.0.3 (jdk1.3.1) on Solaris 7 connected with mod_jk. Sometimes I I find that the CPU on the web server box is pegged at 100%. It's a dedicated server and I am bouncing Apache and Tomcat once a week to help alleviate the problem. If I didn't restart every week, it would just be a matter of time before things spiraled out of control again. The processes that are responsible are java (Tomcat) and libhttpd.ep (Apache, with --enable-rule=SHARED_CORE) each with about 50% of the CPU. If I bounce Tomcat, no change. If I bounce Apache, it returns to normal (low) CPU usage. I have Apache running on other machines without Tomcat and this does not happen. So it's got to be a mod_jk thing. There are no log messages of any significance. Any ideas on how to fix it? Thanks, Jeff -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Client session problems when MSIE is run within Outlook
I don't have MS Outlook myself, so I can't do any testing on this. But I have a customer who has been running a browser session from within Outlook. Some of my pages have javascript links that open a new browser window to view a page. When she accesses one of these popups from within Outlook, the newly popped-up window fails to supply the correct session cookie and a new session is created for that window. Needless to say, this really screws up the application. Is it possible to *force* the encoding of the session ID in the page which contains the link that generates the popup even if cookies are used for the session ID? Right now, I'm using response.encodeURL(), but that does nothing when cookies are used. I would rather not use an encoded session ID for all links, just ones that open new windows. Jeff -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Debugging
I develop with JBuilder 4 Pro which has support for Tomcat 3, but not Tomcat 4. So I did a little digging and discovered the class org.apache.catalina.startup.Embedded. Download the source and look at the main() method in this class. It will show you how to use the Embedded class to run Tomcat from within another class. I wrote my own TomcatRunner class which employs the Embedded class to run Tomcat 4.0.3 much in the same way as Embedded.main() except customized for my application. All you need to do is put TOMCAT_HOME/bin/bootstrap.jar and TOMCAT_HOME/server/lib/catalina.jar in your classpath. Then just run your enclosing class in your debugger. It beats the heck out of trying to customize my IDE to use TC4. Jeff - Original Message - From: Trenton D. Adams [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Wednesday, June 12, 2002 12:12 PM Subject: Debugging Where could I get information on debugging a web application under tomcat? Is there a way of doing it or do you have to just do a whole bunch of printing to the tomcat screen or web page? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Running a webapp and accessing from www.mysite.com
Look at the configuration fo the ROOT context that is included in the default installation of tomcat. - Original Message - From: Donie Kelly [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Wednesday, May 15, 2002 9:26 AM Subject: Running a webapp and accessing from www.mysite.com Hi all I want to deploy a webapp but don't want to have the context name in the URL like www.mysite.com/myapp/ but instead want to use the URL to the primary servlet accessed by www.mysite.com How can I do this? Thanks in advance Donie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: catalina.LoggerBase class should have public access
I was whining about this too about a month ago, but I failed to spark a discussion on this list. So I went to Bugzilla and entered it as a feature request. Apparently, somebody agreed with me. If you look at the nightly build source code, you will see that LoggerBase is now public and FileLogger is no longer final. You can now easily subclass FileLogger and need only override a small number of methods to achieve the desired results. Now it's just a matter of waiting for the next production quality release (unless you like living on the edge!). Jeff - Original Message - From: Animesh Chaturvedi - US [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, May 13, 2002 6:03 PM Subject: catalina.LoggerBase class should have public access Hi I have a requirement of a single log file instead of having the default log files created on a daily basis. Since I could not configure Tomcat for this, I started writing my own MyFileLogger class. I am extending org.apache.catalina.logger.LoggerBase and my class is in my own package. But since the LoggerBase class does not have public access, it is not accessible to other packages. I cannot extend org.apache.catalina.logger.FileLogger class as its a final class and I do not wish to change Tomcat code. Should not this class have public access ? just like org.apache.catalina.valves.RequestFilterValve class has public access, and I was able to write my own Valve for AccessControlList. thanks Animesh -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
REPOST: Problems serving PDF to Netscape browsers
I've made no progress on this, so let's try again. My dynamic PDF is working perfectly with MSIE 4, 5, and 6, but I'm still having problems with Netscape (ver 4 and 6) and the Acrobat (ver 4 and 5) plugin. I've tried this on various client machines. With both NS4 and NS6, I just get a blank screen when I request my dynamic PDF. They don't even show the Acrobat toolbar. The similarities end there. In NS4, the first request does not launch the AcroRd32.exe process. In fact, it fails to read the entire output of the servlet and Tomcat (4.0.3) spits out a Broken Pipe exception to the logs. If I hit Reload, however, I get my PDF and the plugin works. According to the Apache logs, the first unsucessful request returns 6144 of 21212 bytes before the broken pipe. On the Reload, the Apache log shows TWO requests returning the full 21212 bytes and Netscape displays it in the plugin. In NS6, the first request DOES launch the plugin executable, but that's as far as it gets. Reload doesn't help. My Apache server reports the correct number of bytes for the full PDF request, so the data seems to be getting to the browser. No exceptions are thrown by Tomcat. In both NS4 and NS6, it works if I configure Acrobat to be launched as an external application instead of a plugin. But it is not a viable option to impose that configuration on our customers. I use a servlet mapping that sends requests for xxx.pdf to my servlet, thus the browser sees a .pdf filename. I also use setContentType(application/pdf). There are known problems with MSIE and unknown ContentLength with PDF so I create the PDF in a ByteArrayOutputStream so I can know and set the ContentLength before writing to response.getOutputStream(). To take the dynamic nature of the PDF out of the equation, I was able to reproduce these problems --sometimes-- when serving static PDF files via Tomcat. - Original Message - From: Jeff Larsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 09, 2002 1:44 PM Subject: Problems serving PDF to Netscape browsers I'm running out of hair to pull out here... My ultimate goal is to serve dynamically generated PDF documents generated with iText. I've got it working just fine with MSIE. However, I was just getting blank pages with Netscape (and it wasn't even showing the toolbar for Acrobat). With NS6 I could at least see that it started an AcroRd32.exe process, but NS4 didn't even get that far. So, I did some tests to rule out some variables. I grabbed a handful of pre-generated PDF files and stuck them on my Apache 1.3.23 server. All browsers could display the PDFs just fine. Then I set up Tomcat 4.0.3 to server the same files directly without going through Apache. MSIE worked, but both NS browsers gave a blank page with no Acrobat plugin toolbar. Again NS6 managed to start an Acrobat process, NS4 didn't. My production environment is Apache 1.3.23 and Tomcat 4.0.3 connected with mod_jk. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: REPOST: Problems serving PDF to Netscape browsers
Direct connection to Tomcat does not help... And I've tried reconfiguring the headers too. I even mimicked the exact headers that Apache sends when it serves a static PDF file. No luck... I wish I could run Netscape and Adobe in a debugger! - Original Message - From: Sexton, George [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, May 14, 2002 3:40 PM Subject: RE: REPOST: Problems serving PDF to Netscape browsers I thought of one other question. What happens if you connect to the http 1.1 connector directly and don't go through mod_jk? -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: 14 May, 2002 2:36 PM To: Tomcat Users List Subject: RE: REPOST: Problems serving PDF to Netscape browsers The only tip I can provide is that you need to do the absolute minimum in your page. IOW, don't set extraneous headers to disable caching, etc. Really, just set the content type and shove out the byte stream. You might also check that you are using a straight output stream, and not a compressed one. -Original Message- From: Mihai Gheorghiu [mailto:[EMAIL PROTECTED]] Sent: 14 May, 2002 12:29 PM To: [EMAIL PROTECTED] Subject: Re: REPOST: Problems serving PDF to Netscape browsers I do the following (call it whatever you want :-|, the reasons are beyond technical): I have an applet that calls the servlet that generates the pdf stream. The applet then saves the stream as a file on the local HDD and opens the file with Acrobat Reader. Of course you need to check whether the file is already there, open etc. HTH -Original Message- From: Jeff Larsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Tuesday, May 14, 2002 12:01 PM Subject: REPOST: Problems serving PDF to Netscape browsers I've made no progress on this, so let's try again. My dynamic PDF is working perfectly with MSIE 4, 5, and 6, but I'm still having problems with Netscape (ver 4 and 6) and the Acrobat (ver 4 and 5) plugin. I've tried this on various client machines. With both NS4 and NS6, I just get a blank screen when I request my dynamic PDF. They don't even show the Acrobat toolbar. The similarities end there. In NS4, the first request does not launch the AcroRd32.exe process. In fact, it fails to read the entire output of the servlet and Tomcat (4.0.3) spits out a Broken Pipe exception to the logs. If I hit Reload, however, I get my PDF and the plugin works. According to the Apache logs, the first unsucessful request returns 6144 of 21212 bytes before the broken pipe. On the Reload, the Apache log shows TWO requests returning the full 21212 bytes and Netscape displays it in the plugin. In NS6, the first request DOES launch the plugin executable, but that's as far as it gets. Reload doesn't help. My Apache server reports the correct number of bytes for the full PDF request, so the data seems to be getting to the browser. No exceptions are thrown by Tomcat. In both NS4 and NS6, it works if I configure Acrobat to be launched as an external application instead of a plugin. But it is not a viable option to impose that configuration on our customers. I use a servlet mapping that sends requests for xxx.pdf to my servlet, thus the browser sees a .pdf filename. I also use setContentType(application/pdf). There are known problems with MSIE and unknown ContentLength with PDF so I create the PDF in a ByteArrayOutputStream so I can know and set the ContentLength before writing to response.getOutputStream(). To take the dynamic nature of the PDF out of the equation, I was able to reproduce these problems --sometimes-- when serving static PDF files via Tomcat. - Original Message - From: Jeff Larsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 09, 2002 1:44 PM Subject: Problems serving PDF to Netscape browsers I'm running out of hair to pull out here... My ultimate goal is to serve dynamically generated PDF documents generated with iText. I've got it working just fine with MSIE. However, I was just getting blank pages with Netscape (and it wasn't even showing the toolbar for Acrobat). With NS6 I could at least see that it started an AcroRd32.exe process, but NS4 didn't even get that far. So, I did some tests to rule out some variables. I grabbed a handful of pre-generated PDF files and stuck them on my Apache 1.3.23 server. All browsers could display the PDFs just fine. Then I set up Tomcat 4.0.3 to server the same files directly without going through Apache. MSIE worked, but both NS browsers gave a blank page with no Acrobat plugin toolbar. Again NS6 managed to start an Acrobat process, NS4 didn't. My production environment is Apache 1.3.23 and Tomcat 4.0.3 connected with mod_jk. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED
Re: REPOST: Problems serving PDF to Netscape browsers
As much as it pained me to do so, I tried generating static files and redirecting, but it still behaved the same way!!! It's got to be something about iText that the Netscape/Acrobat combination doesn't like. Too bad there aren't any (free) packages better than iText! Has anybody worked with Big Faceless? Jeff - Original Message - From: Andy Eastham [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, May 14, 2002 3:54 PM Subject: RE: REPOST: Problems serving PDF to Netscape browsers Jeff, As a last resort, you could write the pdf to a temporary directory accessible via apache, then send the browser a redirect to that file. That way, the actual PDF will be served by apache, not Tomcat. You'll obviously have to tidy up the generated PDFs periodically, although the temp file methods in java.io.File should help. Also, java.util.Timer is useful for writing jobs which do clean up tasks. This is of course undesirable, but sometimes you just have to do what it takes to make something work... :-( Good luck, Andy -Original Message- From: Jeff Larsen [mailto:[EMAIL PROTECTED]] Sent: 14 May 2002 17:01 To: [EMAIL PROTECTED] Subject: REPOST: Problems serving PDF to Netscape browsers I've made no progress on this, so let's try again. My dynamic PDF is working perfectly with MSIE 4, 5, and 6, but I'm still having problems with Netscape (ver 4 and 6) and the Acrobat (ver 4 and 5) plugin. I've tried this on various client machines. With both NS4 and NS6, I just get a blank screen when I request my dynamic PDF. They don't even show the Acrobat toolbar. The similarities end there. In NS4, the first request does not launch the AcroRd32.exe process. In fact, it fails to read the entire output of the servlet and Tomcat (4.0.3) spits out a Broken Pipe exception to the logs. If I hit Reload, however, I get my PDF and the plugin works. According to the Apache logs, the first unsucessful request returns 6144 of 21212 bytes before the broken pipe. On the Reload, the Apache log shows TWO requests returning the full 21212 bytes and Netscape displays it in the plugin. In NS6, the first request DOES launch the plugin executable, but that's as far as it gets. Reload doesn't help. My Apache server reports the correct number of bytes for the full PDF request, so the data seems to be getting to the browser. No exceptions are thrown by Tomcat. In both NS4 and NS6, it works if I configure Acrobat to be launched as an external application instead of a plugin. But it is not a viable option to impose that configuration on our customers. I use a servlet mapping that sends requests for xxx.pdf to my servlet, thus the browser sees a .pdf filename. I also use setContentType(application/pdf). There are known problems with MSIE and unknown ContentLength with PDF so I create the PDF in a ByteArrayOutputStream so I can know and set the ContentLength before writing to response.getOutputStream(). To take the dynamic nature of the PDF out of the equation, I was able to reproduce these problems --sometimes-- when serving static PDF files via Tomcat. - Original Message - From: Jeff Larsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 09, 2002 1:44 PM Subject: Problems serving PDF to Netscape browsers I'm running out of hair to pull out here... My ultimate goal is to serve dynamically generated PDF documents generated with iText. I've got it working just fine with MSIE. However, I was just getting blank pages with Netscape (and it wasn't even showing the toolbar for Acrobat). With NS6 I could at least see that it started an AcroRd32.exe process, but NS4 didn't even get that far. So, I did some tests to rule out some variables. I grabbed a handful of pre-generated PDF files and stuck them on my Apache 1.3.23 server. All browsers could display the PDFs just fine. Then I set up Tomcat 4.0.3 to server the same files directly without going through Apache. MSIE worked, but both NS browsers gave a blank page with no Acrobat plugin toolbar. Again NS6 managed to start an Acrobat process, NS4 didn't. My production environment is Apache 1.3.23 and Tomcat 4.0.3 connected with mod_jk. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
App Reload problems: java.lang.NoClassDefFoundError
Tomcat 4.0.3 on Sun Solaris 7. Most of the time, the manager app successfully reloads my application. But sometimes when I make changes to a class that is packaged in a jar file in WEB-INF/lib, the reload fails with a java.lang.NoClassDefFoundError for some of the classes in that WEB-INF/lib jar file. I know that the classes are present and functional, because if I bounce tomcat everything loads just fine. What's the spec on reloading of classes in WEB-INF/lib? For the record, the class that is changed, is NOT one that may be stored as a user session attribute. Even so, what will Tomcat do if it is asked to reload a changed class when existing instances of that class exist as session attributes? Jeff -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problems serving PDF to Netscape browsers
Is your tomcat set up with a direct http connector? What happens if you bypass apache? When I serve static PDF files with apache, Netscape is OK, when I serve them directly from tomcat, no go. Jeff - Original Message - From: Andy Eastham [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, May 10, 2002 5:44 AM Subject: RE: Problems serving PDF to Netscape browsers Jeff, I just tried this through my apache(1.3.20)-tomcat(4.0.4b1) connection using warp, serving the document from a webapp directory, through apache. Ironically, the pdf worked correctly in ns 4.72 and 6.2, but displayed as binary in the browser in ie 6 (even though right clicking and viewing properties said it was an adobe acrobat document. When I put the same file in the apache root, it displayed correctly in all browsers. There's obviously something screwy going on, because I've checked the mime type is correctly configured in both. For reference, these are the headers that came back using a telnet connection on port 80: GET /control/test.pdf HTTP 1.1 HTTP/1.1 200 OK Date: Fri, 10 May 2002 10:17:10 GMT Server: Apache/1.3.20 (Win32) Content-Type: application/pdf Content-Length: 33747 ETag: 33747-1019121624574 Last-Modified: Thu, 18 Apr 2002 09:20:24 GMT Connection: close %PDF-1.2 %âãÏÓ GET /test.pdf HTTP 1.1 HTTP/1.1 200 OK Date: Fri, 10 May 2002 10:17:55 GMT Server: Apache/1.3.20 (Win32) Last-Modified: Thu, 18 Apr 2002 09:20:24 GMT ETag: 0-83d3-3cbe8fd8 Accept-Ranges: bytes Content-Length: 33747 Connection: close Content-Type: application/pdf %PDF-1.2 %âãÏÓ Andy -Original Message- From: Jeff Larsen [mailto:[EMAIL PROTECTED]] Sent: 09 May 2002 22:33 To: Tomcat Users List Subject: Re: Problems serving PDF to Netscape browsers The content type header is correctly set to application/pdf. I even tested with a UNIX command line utility called webgrab which dumps the entire server response (including headers) to stdout. I can't find anything wrong with the server output. And yes, I tried it on another box to make sure it wasn't my system's fault. It's got to be something that the Netscape plugin doesn't like. I just uninstalled Acrobat and did my dynamic PDF page with all three browsers. Without Acrobat, they all just prompted me to save it as a file. All three files that I generated with each browser are identical!!! And once Acrobat was re-installed, they all opened just fine in the stand-alone Acrobat. Jeff - Original Message - From: Andy Eastham [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, May 09, 2002 4:20 PM Subject: RE: Problems serving PDF to Netscape browsers Jeff, Do you know that the correct mime type is being sent back to the browser? If there is no known mime type, I believe that IE makes guesses about what program to launch a file with based on its extension, but NS 4 doesn't seem to do this. If you haven't solved it yet, check the mime type being served, and check the associated programs for this mime type in Netscape. Otherwise, check the log file to see if the requests from IE and NS are different. Is one http 1.0 and http 1.1? Sorry if I'm not offering any solutions, but hopefully these are some additional routes for investigation. Andy -Original Message- From: Jeff Larsen [mailto:[EMAIL PROTECTED]] Sent: 09 May 2002 19:45 To: [EMAIL PROTECTED] Subject: Problems serving PDF to Netscape browsers I'm running out of hair to pull out here... My ultimate goal is to server dynamically generated PDF documents generated with iText. I've got it working just fine with MSIE. However, I was just getting blank pages with Netscape (and it wasn't even showing the toolbar for Acrobat). With NS6 I could at least see that it started an AcroRd32.exe process, but NS4 didn't even get that far. So, I did some tests to rule out some variables. I grabbed a handful of pre-generated PDF files and stuck them on my Apache 1.3.23 server. All browsers could display the PDFs just fine. Then I set up Tomcat 4.0.3 to server the same files directly without going through Apache. MSIE worked, but both NS browsers gave a blank page with no Acrobat plugin toolbar. Again NS6 managed to start an Acrobat process, NS4 didn't. My production environment is Apache 1.3.23 and Tomcat 4.0.3 connected with mod_jk. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED
Re: building mod_jk on solaris
apxs requires perl. You must have perl installed prior to installation of apache httpd in order for the apache install to correctly configure apxs. Otherwise, I believe you are on the right track. Jeff - Original Message - From: Peter Choe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 10, 2002 7:52 AM Subject: building mod_jk on solaris i am trying to build mod_jk for tomcat4.0. the only mod_jk i found is actually in tomcat3.3 though. so, i tried to compile it using the build-solaris.sh script and i get the following error: bash-2.03# ./build-solaris.sh Building mod_jk cc -DEAPI -DMOD_PERL -DUSE_EXPAT -O -G -Kpic -I/usr/apache/include -I../common -I/usr/java/include -I/usr/java/include/solaris -DSOLARIS -c ../common/jk_ajp12_worker.c apxs:Break: Command failed with rc=16711680 Error with apxs does anyone know how i can fix this? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Multiple webapps, multiple classpaths
Put the dependent external jar files in /application1/WEB-INF/lib and /application2/WEB-INF/lib. Jeff - Original Message - From: Ryan P. Davidsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 10, 2002 4:14 PM Subject: Multiple webapps, multiple classpaths I am currently deploying multiple tomcats for multiple applications (1:1) such as: application1--tomcat1 application2--tomcat2 I would like to share a single instance of tomcat but have multiple contexts registered (/application1 and /application2) The problem is that application1 and application2 need to have seperate classpaths (due to conflicting codebases). Is there any way to deploy multiple contexts to compile from different classpaths? Right now my classpaths are being set in the tomcat startup script - I would like to have something like: Context path=/Application1 docBase=D:\application1\root debug=0 reloadable=false classpath=D:\application1\codebase,D:\etc /Context Is there a way of accomplishing this some other way? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problems serving PDF to Netscape browsers
I'm running out of hair to pull out here... My ultimate goal is to server dynamically generated PDF documents generated with iText. I've got it working just fine with MSIE. However, I was just getting blank pages with Netscape (and it wasn't even showing the toolbar for Acrobat). With NS6 I could at least see that it started an AcroRd32.exe process, but NS4 didn't even get that far. So, I did some tests to rule out some variables. I grabbed a handful of pre-generated PDF files and stuck them on my Apache 1.3.23 server. All browsers could display the PDFs just fine. Then I set up Tomcat 4.0.3 to server the same files directly without going through Apache. MSIE worked, but both NS browsers gave a blank page with no Acrobat plugin toolbar. Again NS6 managed to start an Acrobat process, NS4 didn't. My production environment is Apache 1.3.23 and Tomcat 4.0.3 connected with mod_jk. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: WAR files don't unpack if the webapp is already there
It's a feature. Sucks, huh? - Original Message - From: James Turner [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 09, 2002 2:23 PM Subject: WAR files don't unpack if the webapp is already there I'm going through the standard compile-edit-test look on some applications using JBuilder and Tomcat right now. I've got JBuilder creating a new WAR file in TOMCAT_HOME/webapps on rebuild, but I need to delete the old webapp directory before Tomcat will notice the new one and unpack it. Is this a feature of Tomcat? Shouldn't it notice if the webapp directory is out of date in comparison to the WAR file? James -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problems serving PDF to Netscape browsers
The iText documentation supplies a workaround for some MSIE problems and I haven't had any trouble with it so far. The fact that Netscape isn't reading STATIC PDF files served by Tomcat makes me think there's something hinky in Tomcat. I'll be certain to post my findings, if there are any! Jeff - Original Message - From: Abhi [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, May 09, 2002 2:07 PM Subject: Re: Problems serving PDF to Netscape browsers Coincidentally ... http://www.lib.washington.edu/help/knownIssues/#ie So better do a check again for IE as well. Don't be too sure that it will work with *all* versions of IE on all flavours of windows. On some, I couldn't see it at all, till we applied the latest critical patch for the concerned windows... IE 6 did not give any problems... but it was a different story for IE 5.5 and downwards... Perhaps try fiddling with check browser settings option in Acrobat reader ? Hope this was useful. :) Btw, I would be very interested in your findings and results on this problem... Is it possible for you to share the info ? Regards, Abhi - Original Message - From: Jeff Larsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 10, 2002 3:44 AM Subject: Problems serving PDF to Netscape browsers I'm running out of hair to pull out here... My ultimate goal is to server dynamically generated PDF documents generated with iText. I've got it working just fine with MSIE. However, I was just getting blank pages with Netscape (and it wasn't even showing the toolbar for Acrobat). With NS6 I could at least see that it started an AcroRd32.exe process, but NS4 didn't even get that far. So, I did some tests to rule out some variables. I grabbed a handful of pre-generated PDF files and stuck them on my Apache 1.3.23 server. All browsers could display the PDFs just fine. Then I set up Tomcat 4.0.3 to server the same files directly without going through Apache. MSIE worked, but both NS browsers gave a blank page with no Acrobat plugin toolbar. Again NS6 managed to start an Acrobat process, NS4 didn't. My production environment is Apache 1.3.23 and Tomcat 4.0.3 connected with mod_jk. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: WAR files don't unpack if the webapp is already there
Not sure what you mean by new ones, but TC 4.0.3 does NOT unpack wars if the directory already exists regardless of the reloadable flag. Jeff - Original Message - From: Rick Fincher [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, May 09, 2002 2:57 PM Subject: Re: WAR files don't unpack if the webapp is already there Older versions of Tomcat don't, new ones will if you set reloadable to true in the context. It will monitor WEB-ING/lib and WEB-INF/classes for changes and reload if it detects any. This canj cause a performance degradation on your server so you may only want to do this for development. Rick - Original Message - From: James Turner [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 09, 2002 3:23 PM Subject: WAR files don't unpack if the webapp is already there I'm going through the standard compile-edit-test look on some applications using JBuilder and Tomcat right now. I've got JBuilder creating a new WAR file in TOMCAT_HOME/webapps on rebuild, but I need to delete the old webapp directory before Tomcat will notice the new one and unpack it. Is this a feature of Tomcat? Shouldn't it notice if the webapp directory is out of date in comparison to the WAR file? James -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: serving CSV file
What's your request URL? I do it by using a servlet mapping that ends in .csv to fool the browser into thinking it's actually downloading a file. I set the content-type header to application/csv which isn't really a universal standard, but if I remember right, the mime mapping you listed will make Excel think it's opening a real .xls spreadsheet and not a text file and it screws things up. Jeff - Original Message - From: Liu, Xiaoyan [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Thursday, May 09, 2002 3:51 PM Subject: serving CSV file Hi, all, I can seem to make tomcat 4.0.2 serving csv (comma-seperated file) file. The files are open plain text in IE. I added the following mime-mapping to web.xml: extensioncsv/extension mime-typeapplication/vnd.ms-excel/mime-type is there anything else needs to change? thank you. Liu -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problems serving PDF to Netscape browsers
The content type header is correctly set to application/pdf. I even tested with a UNIX command line utility called webgrab which dumps the entire server response (including headers) to stdout. I can't find anything wrong with the server output. And yes, I tried it on another box to make sure it wasn't my system's fault. It's got to be something that the Netscape plugin doesn't like. I just uninstalled Acrobat and did my dynamic PDF page with all three browsers. Without Acrobat, they all just prompted me to save it as a file. All three files that I generated with each browser are identical!!! And once Acrobat was re-installed, they all opened just fine in the stand-alone Acrobat. Jeff - Original Message - From: Andy Eastham [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, May 09, 2002 4:20 PM Subject: RE: Problems serving PDF to Netscape browsers Jeff, Do you know that the correct mime type is being sent back to the browser? If there is no known mime type, I believe that IE makes guesses about what program to launch a file with based on its extension, but NS 4 doesn't seem to do this. If you haven't solved it yet, check the mime type being served, and check the associated programs for this mime type in Netscape. Otherwise, check the log file to see if the requests from IE and NS are different. Is one http 1.0 and http 1.1? Sorry if I'm not offering any solutions, but hopefully these are some additional routes for investigation. Andy -Original Message- From: Jeff Larsen [mailto:[EMAIL PROTECTED]] Sent: 09 May 2002 19:45 To: [EMAIL PROTECTED] Subject: Problems serving PDF to Netscape browsers I'm running out of hair to pull out here... My ultimate goal is to server dynamically generated PDF documents generated with iText. I've got it working just fine with MSIE. However, I was just getting blank pages with Netscape (and it wasn't even showing the toolbar for Acrobat). With NS6 I could at least see that it started an AcroRd32.exe process, but NS4 didn't even get that far. So, I did some tests to rule out some variables. I grabbed a handful of pre-generated PDF files and stuck them on my Apache 1.3.23 server. All browsers could display the PDFs just fine. Then I set up Tomcat 4.0.3 to server the same files directly without going through Apache. MSIE worked, but both NS browsers gave a blank page with no Acrobat plugin toolbar. Again NS6 managed to start an Acrobat process, NS4 didn't. My production environment is Apache 1.3.23 and Tomcat 4.0.3 connected with mod_jk. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Best practices for deployment?
I pack it up in a war file, ftp it to the server (UNIX), create an at job for late at night which runs a script that stops tomcat, unpacks the war file and restarts tomcat. I've had spotty results with reloading a newly unpacked app while tomcat is still running. Jeff - Original Message - From: Sean LeBlanc [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, May 09, 2002 4:22 PM Subject: Best practices for deployment? I'm trying to figure out the best way to deploy an application...I see the manager application has a way to deploy the application, but the war file or tree has to be on the server deployed to, correct? What do you guys do in testing and/or production environments? Make a tarball and scp or ftp it over, and then untar there? It'd be *really* cool to get Ant to automate a deploy to Tomcat if possible. Thanks, Sean -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Rantings about FileLogger (TC 4.0.3)
I was just perusing the source code for org.apache.catalina.logger.FileLogger because, like many of you, I don't like the clutter of daily log file rotation. I noticed that even if timestamps are turned off, the FileLogger class still calls System.currentTimeMillis() on every log call!! It does this to check the date to see if the file needs to be switched. Not only that, but it creates two new String objects for the timestamp even if you aren't logging it. The only performance gain is the skipped call to write the timestamp to the file. So if you think you're saving resources by turning off timestamps, think again... I also noticed that FileLogger is declared final. WHY!?!?!?!?!? It would be so easy to extend FileLogger to create my own rotation scheme. And while I'm at it, why is LoggerBase NOT public!?!?!?!? So now if I want to create my own logger, I have to implement the Logger interface from scratch. Tomcat developers, what's the deal? My $0.02, Jeff -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Getting a servlet running under Tomcat-Apache 4.0.3
Under what context path is your servlet deployed? The context path is typically the name of the directory under $TOMCAT_HOME/webapps in which your app resides. Unless your app is deployed in the ROOT context, your URL should be http://localhost:8080/context/seating. Jeff - Original Message - From: Brook Monroe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 10:13 AM Subject: Getting a servlet running under Tomcat-Apache 4.0.3 Greetings, y'all. * I've read all the documentation I can find. * I've emulated all the examples. * I've asked people I know who have set up servlets before. I still can't get access to the servlet I just wrote and installed. No matter how I've set up servlet-mappings, or url-patterns, or otherwise, I get 404'd on any attempt to test the servlet. The class files are where they're supposed to be, and the manager HTML applet says that the servlet is loaded and running. Supposedly (based on reading docs and looking at examples) servlet servlet-nameMySeatingServlet/servlet-name servlet-classSeating/servlet-class /servlet servlet-mapping servlet-nameMySeatingServlet/servlet-name url-pattern/seating/url-pattern /servlet-mapping in my web.xml file should be sufficient to get the servlet mapped to a url, but http://localhost:8080/seating produces nothing but a 404, specifically type Status report message /seating description The requested resource (/seating) is not available. Obviously I'm either misinterpreting the documentation, missed something somewhere, or making a bad assumption. I'd appreciate any input I could get on this, because the servlet customer is breathing down my neck for the prototype, which I would like to test before delivering it jbm! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Persistent Context names with auto-deploy
Since you are using the manager app to deploy your war files, there is no need to keep the war files in the webapps directory. Make a separate directory outside of /www/webapps, perhaps /www/war. Then Tomcat won't find them when it starts up. Jeff - Original Message - From: bryan collins [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 12:15 AM Subject: Persistent Context names with auto-deploy Hi, I have an environment that serves requests via apache, on Solaris. I have configured Tomcat 4.0.3 with mod_jk, most things appear to be working just fine. Apache is configured to pass /apps/* to tomcat via ajp13 protocol. Tomcat is configured with an appbase of /www/webapps I automatically deploy my .war files on paths of /apps/servletname so I can have completely independant contexts for each servlet. This works, and I can access the app via apache. However, when tomcat restarts, it finds the servlet in the appbase, since unpackWARS=true, and automatically deploys it under / My question is, How can I force persistance of Context paths across a Tomcat restart, when using automatic deploy (via the manager app) i.e auto-deploy foo.war on /apps/foo (via manager) TC extracts the war to /www/webapps/foo, everything works perfectly. After TC restart, TC deploys the servlet as /foo, not /apps/foo. Any ideas? Many Thanks Bry -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Getting a servlet running under Tomcat-Apache 4.0.3
What path does the Manager display for your app? If tomcat is auto-deploying your app, then it should be /MySeatMap since that is the subdir of webapps in which your WEB-INF/web.xml resides. Then you should be accessing http://localhost:8080/MySeatMap/seating If you are using a Context path=/mypath docBase=MySeatMap / element in server.xml, then your URL should be http://localhost:8080/mypath/seating Remember, the servlet-mapping elements only tell the container which servlet classes to invoke WITHIN that servlet's context path. Nothing in web.xml defines the context path itself. Try the above URL's and let us know if it works. Jeff - Original Message - From: Brook Monroe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 10:55 AM Subject: RE: Getting a servlet running under Tomcat-Apache 4.0.3 Fabian: something not directly mentioned in the howtos for deploying a servlet: you have to update the TOMCAT_HOME/conf/server.xml file for installing your application in the web-app-directory. You have to add an entry like Context path=/seating docBase=seating debug=0 reloadable=true/ in server.xml if you have your servlet in a folder named TOMCAT_HOME/web-app/seating/WEB-INF/classes That was the first thing I did, actually. No variations on that theme seem to be making any difference, and it doesn't matter whether it's under the Tomcat-Standalone or Tomcat-Apache section Jeff: Under what context path is your servlet deployed? The context path is typically the name of the directory under $TOMCAT_HOME/webapps in which your app resides. It's deployed where the examples are, and where the manager is. The specific path is drive:\Tomcat\webapps\MySeatMap\ with the class files in drive:\Tomcat\webapps\MySeatMap\WEB-INF\classes I've tried permuting this almost to exhaustion. I've been reading the example setups, and I can't even figure out how the HelloWorldExample class gets called. Something to do with filter tags, but I can't make out what's happening. And to repeat: I know the servlet is running, because the manager and the logs confirm it. For grins and giggles, here's the web.xml file. ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-name MySeatMap /servlet-name servlet-class /MySeatMap /servlet-class /servlet servlet-mapping servlet-name MySeatMap /servlet-name url-pattern /seating /url-pattern /servlet-mapping servlet-mapping servlet-name MySeatMap /servlet-name url-pattern /seating/ /url-pattern /servlet-mapping servlet-mapping servlet-name MySeatMap /servlet-name url-pattern*.map/url-pattern /servlet-mapping /web-app And the context entry: Context path=/MySeatMap docBase=MySeatMap isReloadable=true debug=2 crossContent=true/ Anyone see anything (in)obviously wrong? jbm! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: How can I automatically start a servlet in a specific time?
How about using some kind of command line driven web URL grabber (e.g. webgrab for UNIX, or write your own java version) launched at the appropriate time (via cron or Task Scheduler) which asks for a URL which will cause the servlet to load and do it's thing. Of course, you need to be reasonably sure that someone won't unexpectedly request that URL at some other time. Jeff - Original Message - From: Kelly Prudente Pereira [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Wednesday, April 10, 2002 5:20 PM Subject: RES: How can I automatically start a servlet in a specific time? Yes Ken, I mean I don't want to load it until a specific time. I need to load it to do a specific job at a certain time. Do you know how can I do this? -Mensagem original- De: Ken Anderson [mailto:[EMAIL PROTECTED]] Enviada em: quarta-feira, 10 de abril de 2002 19:19 Para: Tomcat Users List Assunto: Re: How can I automatically start a servlet in a specific time? You mean you don't want to load it until a specific time, or you don't want it to respond to requests until a certain time? Ken Carlos Martins wrote: Kelly, Boa pergunta... não sei nenhuma maneira directa, mas podes sempre criar um servlet tipo scheduler que arranca automáticamente com o tomcat e que a determinadas horas arranca outros servlets. Carlos -Original Message- From: Kelly Prudente Pereira [mailto:[EMAIL PROTECTED]] Sent: quarta-feira, 10 de Abril de 2002 23:04 To: '[EMAIL PROTECTED]' Subject: How can I automatically start a servlet in a specific time? Can anyone answer my question? How can I automatically start a servlet in a specific time? For example: at midnight. I don't want to start it when I start my webserver. Thanks in advanced, Kelly Prudente Pereira Analista de Sistemas - NDS [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Fóton® Informática e Serviços Fone: (61) 328 5060 R.: 221 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: download link for mod_jk
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.3/src/ Choose the jakarta-tomcat-connectors zip or tar.gz file as needed. Note that mod_jk is just one part of this collection. Jeff - Original Message - From: Duane Gran [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: SpinWeb Admin [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 7:44 AM Subject: download link for mod_jk I've looked around but I can't find where to download mod_jk sources. Could someone please give me a pointer? Thanks. Duane -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Handle exceptions correctly
The error message looks more like your page just has some mismatched brackets and not a problem with exceptions. If you have a hard time finding it in your source jsp. Look at $TOMCAT_HOME/work/host/context/yourfile$jsp.java. This is the compilable java source for your jsp. Jeff - Original Message - From: Raphael Di Cicco [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 10:10 AM Subject: Handle exceptions correctly Hi, I used to handle exceptions quite weel within my JSP pages. This is what I chose to do : - always throw Exceptions inside my Java methods and don't catch them inside. - don't do a try{} catch{} statement within my JSP pages. - but include an error page so that errors get redirected there. It used to work quite well but now whenever I get a small exception somewhere in the code all I have is a message saying : org.apache.jasper.JasperException: Unable to compile class for JSP} catch (Throwable t) { ^ } ^ } ^ 3 errors at The problem is that I don't know what I have changed in my code, not much. Do you know what type of problems that can occur with this ? Thanks for your help -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Session already invalidated
Part of the problem may be that you're grabbing a session object that you have stored in your own data structure. Tomcat doesn't know anything about your monitor HashMap and is not going to update it when it invalidates a timed-out session. Why don't you do this: try { oldSession.invalidate(); } catch (IllegalStateException ise) { // do nothing, if it's already invalidated, we're happy } Jeff - Original Message - From: Rick Roberts [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 10:13 AM Subject: Session already invalidated I have the book Professional JSP (1st Edition). Chapter 5 has some session management code that does not work. I have searched the different newsgroups and tomcat archives, and have found where others have asked this question but I can't find where anyone has answered it. The problem is that whenever oldSession.invalidate() is called; I get the following error message: java.lang.IllegalStateException: getAttributeNames: Session already invalidated I am using Tomcat 3.3, JDK 1.3.1_01 and Apache on RedHat Linux 7.2. Here is the problem code: --- %@ page language=java import=java.util.* errorPage=error1.jsp% jsp:useBean id=loginBean scope=page class=Login jsp:setProperty name=loginBean property=*/ /jsp:useBean jsp:useBean id=monitor scope=application class=java.util.HashMap/ % String username = request.getParameter( username ); String password = request.getParameter( password ); loginBean.setUserName( username ); loginBean.setPassword( password ); String display = index.html; User user = loginBean.authenticate(); if( user != null ){ user.setIPAddr(request.getRemoteHost()); // Got user. Do they already have a session? if( monitor.containsKey(user)){ // There's an old session for this user - invalidate it HttpSession oldSession = (HttpSession)monitor.get(user); String sID1 = oldSession.getId(); System.out.println(Existing Session detected: + sID1); oldSession.invalidate(); } session.setAttribute(user, user); monitor.put(user, session); String sID = session.getId(); System.out.println(Session Created: + sID); session.setMaxInactiveInterval(300); display=browse.jsp; } % jsp:forward page=%= display %/ Any help greatly appreciated. Thanks, Rick Roberts -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Passing objects to taglib file
Just do it! mytaglib:mytag data=%= someVectorObject % You need to support the object type in your getter and setter methods for the tag attribute... public Class MyTag extends TagSupport { private Vector data; public void setData(Vector newData) { data = newData; } public Vector getData() { return data; } ... } You also need to use rtexprvaluetrue/rtexprvalue in your tld. Jeff - Original Message - From: Zsolt Koppany [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 8:26 AM Subject: Passing objects to taglib file Hi, I understand that I can pass Strings and numbers to taglib files, but how can I pass other objects (for example a Vector)? -- Zsolt -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Session already invalidated
Hmmm... The IllegalStateException must be getting caught within the session.invalidate() code and then throwing another exception which generates the error page. For debugging, catch (Exception e) and then System.out.println(e.getClass()). You then know what exception to catch, but it might not be a good idea to have too broad a catch. My question (and one that you may need to be asking yourself) is: Why do you need to store the HttpSession objects and why is it so important that you invalidate them before replacing them in your HashMap? Couldn't you just overwrite them in your HashMap and forget about them? Jeff - Original Message - From: Rick Roberts [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, April 09, 2002 11:44 AM Subject: Re: Session already invalidated This seems reasonable to me. In fact someone had suggested this in the archives some months ago to someone elses query about this same issue. But when I do this. The exception is still passed to my error page. Do you know of anyway to prevent that? Thanks for the help. Rick Jeff Larsen wrote: Part of the problem may be that you're grabbing a session object that you have stored in your own data structure. Tomcat doesn't know anything about your monitor HashMap and is not going to update it when it invalidates a timed-out session. Why don't you do this: try { oldSession.invalidate(); } catch (IllegalStateException ise) { // do nothing, if it's already invalidated, we're happy } Jeff -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: optimizing tomcat for use with apache only
Depending on server load, you may want to increase minProcessors, so the server doesn't have to create new threads on the fly. Jeff - Original Message - From: Ken Anderson [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, April 27, 2002 12:55 PM Subject: optimizing tomcat for use with apache only This is a barebones server.xml for using mod_webapp with apache only (no standalone tomcat service) I'm using tomcat 4.04b2, a fresh mod_webapp.so, apache 1.3.22, on redhat 7.2. Everything works nicely, and it's fast, but I'd like to squeeze as much performance as possible out of the configuration as possible. Any ideas for optimization? --- Server port=8005 shutdown=SHUTDOWN debug=0 Service name=Tomcat-Apache Connector className=org.apache.catalina.connector.warp.WarpConnector port=8008 minProcessors=5 maxProcessors=75 enableLookups=true appBase=webapps acceptCount=10 debug=0/ Engine className=org.apache.catalina.connector.warp.WarpEngine name=Apache debug=0 Logger className=org.apache.catalina.logger.FileLogger prefix=apache_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.MemoryRealm / /Engine /Service /Server --- Thanks, Ken -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Some body Help
There is NO way to know when a client kills their browser. HTTP is a stateless protocol. The only time we know that the browser is alive is during a request. After that, we don't know if the browser gets closed or if the user just navigates elsewhere. If you need to close down resources, just set your session timeout appropriately and use the javax.servlet.http.HttpSessionBindingListener interface to know when the session gets killed either by an explicit user logout or a session timeout. In any case, I would not recommend holding database connections open for each session. Use a connection pool... Jeff - Original Message - From: Uma Munugala [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, April 06, 2002 2:44 PM Subject: Some body Help Hi All Iam using Tomcat 4.0 on NT. When a client kills a browser, I dont have any idea whether the client is alive or not from a servlet. when client is not alive I want release database connections and objects instances. how do I know which user is alive or which session is alive. Is there any software available. Please help Thanks Uma -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: JSP compilation exceptions thrown for Tomcat4 and JDK1.4
Make sure your CLASSPATH under which Tomcat runs is not still referencing any jars (most likeley tools.jar) from the JDK1.3 installation. - Original Message - From: Bedia, Bharat [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 05, 2002 2:42 AM Subject: JSP compilation exceptions thrown for Tomcat4 and JDK1.4 Hi All, I'm using Tomcat4. I previously used JDK1.3 with great success. I've recently upgraded to JDK1.4 and am experiencing problems in that an: - Unable to compile class for JSP: org.apache.jasper.JasperException is being thrown with a root cause of: - Invalid class file format in c: java.lang.NumberFormatException I use my own tags libraries and other software which I recompiled under JDK1.4 beforehand. If I switch back to JDK1.3 then everything works! Can anyone help? Thanks in advance, Bharat Here's the complete stack trace:- A Servlet Exception Has Occurred Exception Report: org.apache.jasper.JasperException: Unable to compile class for JSP at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:558) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:215) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :163) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 1005) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1098 ) at java.lang.Thread.run(Thread.java:536) Root Cause: java.lang.NumberFormatException: Invalid class file format in c at java.lang.Integer.parseInt(Integer.java:426) at java.lang.Integer.parseInt(Integer.java:476) at org.apache.jasper.compiler.Compiler.getJspLineErrors(Compiler.java:321) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:280) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:543) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at
Re: JSP compilation exceptions thrown for Tomcat4 and JDK1.4
- Original Message - From: Bedia, Bharat [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, April 05, 2002 9:50 AM Subject: RE: JSP compilation exceptions thrown for Tomcat4 and JDK1.4 --snip-- Can the opposite be true? Is there an issue with JDK1.4 being unable to run class files which have been built using an older java compiler? I blooming well hope not !! If that were the case, it would be a bug. The Java runtime is backward compatible with classes compiled under older JVM's -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Simple Question (I hope...)
Could be several things. Since some details about your setup are, missing, please don't take offense if I state the obvious. Are you using Tomcat standalone or with Apache? Have you successfully gotten the Tomcat examples to work? If your homepage.class has a 'package' directive in the source, then you need to reference the fully qualified class name in your web.xml and your class file needs to be in the proper package subdirectories under WEB-INF/classes. Check the Tomcat logs. You should see some messages that reference your [/test] context if Tomcat is successfully deploying the context. Add load-on-startup1/load-on-startup to your web.xml. Restart Tomcat and if you class is being successfully loaded you should see greetings: init in the log. If your servlet is successfully loaded, then it's a URL problem. What URL are you using to test the servlet? According to your setup it should be http://hostname:{port}/test/please assuming you are using Tomcat as your webserver, otherwise the URL mapping is dependent upon your Apache config. I hope these ideas help... Post more details if not. Jeff - Original Message - From: Sefton, Adam [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Friday, April 05, 2002 10:29 AM Subject: Simple Question (I hope...) Hi there, I'm new to Tomcat and to this list, so apologies if this question has already been asked (I've checked the archives and can't find an answer). I'm trying to create a new context in server.xml. My current code is: Context path=/test docBase=test debug=0 reloadable=true / I've also created a directory within webapps called test, with sub directory WEB-INF and classes. And within the classes folder is my test class file (homepage.class). I've also created a web.xml file and placed it in the WEB-INF directory defining the servlet mappings for the new servlet (called homepage): web-app servlet servlet-namegreetings/servlet-name servlet-classhomepage/servlet-class /servlet servlet-mapping servlet-namegreetings/servlet-name url-pattern/test/please/url-pattern /servlet-mapping /web-app Using the manager app I've successfully added a new application (called test) but when I try to view the servlet, I get a 404 error ... any idea what I'm doing wrong? Thanks Adam Sefton Applications Developer ** This message may contain information which is confidential or privileged. If you are not the intended recipient, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. ** -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat won't find my web.xml files.
Since your running on Windows, make absolutely sure your WEB-INF directory for your app is in all-caps. Use a DOS window to verify this. Windows Explorer will always convert things to title case, so you can't tell from there. Jeff - Original Message - From: Jason Johnston [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 03, 2002 3:42 PM Subject: Tomcat won't find my web.xml files. I've been working with Tomcat 4.0.1 and I'm running into a major stumbling block. I can run servlets and jsp's letting tomcat default to the default web.xml but I can't make my own. I have the following web.xml: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc. //DTD Web Application 2.3//EN' 'http://java.sun.com/j2ee/dtds/web-app_2_3.dtd' web-app servlet servlet-namelogin/servlet-name servlet-classcom.onjava.login/servlet-class /servlet taglib taglib-uri/onjava/taglib-uri taglib-location/WEB-INF/lib/taglib.tld/taglib-location /taglib /web-app Located at TOMCAT_HOME/webapps/onjava/WEB-INF/web.xml The custom tags fail and I see this in the logs: 2002-04-03 13:10:37 ContextConfig[/onjava]: Missing application web.xml, using defaults only Am I missing something? I'm running on NT4.0 Server Sp6a. I've seen other people mention this problem but I haven't found any solutions. PLEASE. IF ANYONE KNOWS ANYTHING THAT COULD HELP, LET ME KNOW This is a major stumbling block. I basically can't build webapps if I can't get it to recognize me web.xml files. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: How to manage log files?
I share your frustrations, but at this time I believe that our only recourse is to write our own subclass of org.apache.catalin.logger.FileLogger. At this point, I've got bigger fish to fry, so I haven't even looked at this yet. If you come up with something, post it! Jeff - Original Message - From: Mike Millson [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, April 03, 2002 7:25 AM Subject: How to manage log files? What is the philosophy behind managing Tomcat log files? Why is it that log files can only be created with the date attached? This makes it impossible to manage the files using logrotate like you can w/ Apache. Instead of a single log file name that you can rotate, you get a file for every day of the year. Is it set up this way because the logging is only for development purposes? Is it expected that tomcat logging will be turned off and Apache logging used instead? What is the reason for having the log files have the date attached so they cannot be logrotated? Or, if the log files are meant for production use, how are people managing these files? Surely the way isn't to have hundreds of log files. Is there some tool that aggregates them so they can be logrotated? Thank you, Mike Millson Web Systems Engineer Sun Certified Programmer for Java2 Platform AableTech Solutions, Inc. 770.414.8834 404.219.3177 cell 770.414.8206 fax http://www.atsga.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: losing session info with netscape 4.x
To encode a URL with the session id, you call HttpServletResponse.encodeURL() or HttpServletResponse.encodeRedirectURL(). If the session id is being stored as a cookie, these methods will leave the URL unchanged. If cookies are disabled, then these methods will embed the session id within the URL. So if you have a jsp with javascript that opens a popup, your javascript would be something like this: popup = window.open(%= response.encodeURL(popup.jsp) %); In your case, with cookies enabled, it doesn't seem likely that this is your problem. But it's a necessary practice if you want to allow users that don't accept cookies to access your site. Jeff - Original Message - From: Huy K Dung [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, April 01, 2002 5:53 PM Subject: RE: losing session info with netscape 4.x netscape 4.79 in particular. Accept all cookies option is selected. I will try your suggestion and see what it will do. Thanks. PS. how do you correctly encode URL? -Original Message- From: Jeff Larsen [mailto:[EMAIL PROTECTED]] Sent: Monday, April 01, 2002 06:29 PM To: Tomcat Users List; Huy K. Dung Subject: Re: losing session info with netscape 4.x Netscape 4.x has been working for me in this type of situation, but the value of .x might make a difference. Do you have cookies enabled? If not, does your javascript for opening the popup window use a correctly encoded URL so the popup window's request has the session id built in? For debugging, configure your popup window with an address bar so you can see the sessionid in the URL. Jeff - Original Message - From: Huy K Dung [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, April 01, 2002 4:59 PM Subject: losing session info with netscape 4.x Hi, I am using tomcat 3.3.1, apache 1.3.24, turbine 2.1 to develop my web app. Everything seems to work fine with IE 5.5 and netscape 6.x and even netscape 4.x. What I've noticed is that when I use popup windows, netscape 4.x doesn't seem to have the right info from session. From main netscape window I click to open a 1st popup window, and from the 1st popup window I click to open a 2nd popup windows. When I perform an action from the 2nd popup window, it closes it self and refresh the 1st popup. The 1st popup doesn't seem to have the right session info. And the same thing happens to the main window when I perform an action on the 1st popup. None of this happens to IE 5.5 or netscape 6.x. Does anyone come across this problem before? Work around? Please HELP!!! Thanks in advance!!! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Reloading Web Applications without manager and without reloadable=true
Not true. I've tested with a role-name other than manager. It is configurable in the web.xml for the manager app. See excerpt below. (TC 4.0.3) security-constraint web-resource-collection web-resource-nameEntire Application/web-resource-name url-pattern/*/url-patter /web-resource-collection auth-constraint role-namemyappmanager/role-name /auth-constraint /security-constraint - Original Message - From: Cox, Charlie [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, April 01, 2002 6:02 AM Subject: RE: Reloading Web Applications without manager and without reloadable=true The role must be 'manager'. The manager app currently does not let you specify the role to use. Charlie -Original Message- From: Jeff Larsen [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 2:14 PM To: Tomcat Users List Subject: Re: Reloading Web Applications without manager and without reloadable=true I'm not 100% sure about this, but I'm sure someone will correct me if I'm wrong Isn't the manager app limited to apps within the same virtual host? So have your sysadmin create a tomcat virtual host just for your web app. Install the manager app in your virtual host under a unique context name so as not to conflict with the manager app for other virtual hosts. Then configure the role in the web.xml for YOUR manager app to a custom role and create a unique username and password for that role in tomcat-users.xml. Now you have access to a manager app just for your webapp. And your sysadmin rests easy knowing that you can't mess with anyone elses webapps. Jeff - Original Message - From: Tarun Ramakrishna Elankath [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 27, 2002 10:28 AM Subject: Reloading Web Applications without manager and without reloadable=true Hello all, I had asked this question previously without anybody understanding. I need to be able to reload my web-application *without* setting the reloadable=true parameter in the context tag, when I *dont* have access to the manager web-application. Why? This is because my web-application will be on a *production* server where reloadable *should* be set equal to false (as the documentation recommends). And I will not be given access to the manager application because my web-application resides with web-apps of other independent developers. I do not want to bother my system administrator for every modification that I commit to the site. (Even production environments suffer from modification) Is there another way of forcing Tomcat to reload classes of *only* my web application? If no such program exists then I would be grateful if someone could point me towards how to write one. Any help appreciated, Tarun -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: taglib and contextPath
HttpServletRequest request = (HttpServletRequest)pageContext.getRequest(); This request object can then be used just like in a servlet. Jeff - Original Message - From: Zsolt Koppany [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, March 31, 2002 3:21 AM Subject: taglib and contextPath Hi, from a taglib class I have to write links (A HREF=.../A) with context dependent paths. From a servlet I use request.getContextPath()... How can I do the same from a taglib class? -- Zsolt Koppany -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: appBase and virtual hosts
You need separate webapp directories for each virtual host. Otherwise Tomcat will autodeploy everything it finds in your webapp directory, even if the app is supposed to belong to another virtual host. Jeff - Original Message - From: Micael Padraig Og mac Grene [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, March 31, 2002 3:15 AM Subject: appBase and virtual hosts If you have a virtual host that you want to run the application my_app at CATALINA_HOME/webapps/my_app, what is the value you use for appBase? How do you refer to only my_app and not to all applications in the webapps file holding other applications for other virtual hosts? Thanks for assistance. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Reloading Web Applications without manager and without reloadable=true
As long as the role-name in the manager app web.xml matches the role assigned to a user in tomcat-users.xml, it works. - Original Message - From: Cox, Charlie [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, April 01, 2002 10:15 AM Subject: RE: Reloading Web Applications without manager and without reloadable=true I stand corrected. I didn't think you could override the default manager role since it is not defined in the web.xml. So you have manager working with a user without the 'manager' role? Or are you adding another role requirement to to the manager path? This is what it appears that you are doing in the example as opposed to replacing 'manager' with 'myappmanager'. Certainly you could add another role requirement on top of manager - you would just have to make sure that each webapp's manager does the same if you want users to only have access to their own app. Charlie -Original Message- From: Jeff Larsen [mailto:[EMAIL PROTECTED]] Sent: Monday, April 01, 2002 10:34 AM To: Tomcat Users List Subject: Re: Reloading Web Applications without manager and without reloadable=true Not true. I've tested with a role-name other than manager. It is configurable in the web.xml for the manager app. See excerpt below. (TC 4.0.3) security-constraint web-resource-collection web-resource-nameEntire Application/web-resource-name url-pattern/*/url-patter /web-resource-collection auth-constraint role-namemyappmanager/role-name /auth-constraint /security-constraint - Original Message - From: Cox, Charlie [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, April 01, 2002 6:02 AM Subject: RE: Reloading Web Applications without manager and without reloadable=true The role must be 'manager'. The manager app currently does not let you specify the role to use. Charlie -Original Message- From: Jeff Larsen [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 2:14 PM To: Tomcat Users List Subject: Re: Reloading Web Applications without manager and without reloadable=true I'm not 100% sure about this, but I'm sure someone will correct me if I'm wrong Isn't the manager app limited to apps within the same virtual host? So have your sysadmin create a tomcat virtual host just for your web app. Install the manager app in your virtual host under a unique context name so as not to conflict with the manager app for other virtual hosts. Then configure the role in the web.xml for YOUR manager app to a custom role and create a unique username and password for that role in tomcat-users.xml. Now you have access to a manager app just for your webapp. And your sysadmin rests easy knowing that you can't mess with anyone elses webapps. Jeff - Original Message - From: Tarun Ramakrishna Elankath [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 27, 2002 10:28 AM Subject: Reloading Web Applications without manager and without reloadable=true Hello all, I had asked this question previously without anybody understanding. I need to be able to reload my web-application *without* setting the reloadable=true parameter in the context tag, when I *dont* have access to the manager web-application. Why? This is because my web-application will be on a *production* server where reloadable *should* be set equal to false (as the documentation recommends). And I will not be given access to the manager application because my web-application resides with web-apps of other independent developers. I do not want to bother my system administrator for every modification that I commit to the site. (Even production environments suffer from modification) Is there another way of forcing Tomcat to reload classes of *only* my web application? If no such program exists then I would be grateful if someone could point me towards how to write one. Any help appreciated, Tarun -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto
Re: Process for using Manager reload of war file?
Here's the deal with unpacking of war files: It only happens when Tomcat starts and autodeploys apps that do not otherwise have a Context element in server.xml. If you manually define the context, it won't unpack the war file! If you update the war file and reload, it won't re-unpack the war file! Absolutly NOTHING will get tomcat to re-unpack a war file except stopping tomcat, manually deleting the unpacked directory, and restarting tomcat. And again, it ONLY unpacks auto-deployed apps. I've given up on war files, because I need my app unpacked so Apache can serve the static content. Luckily, I have an ftp client (CuteFTP) than can upload an entire directory structure with one command. Then, with the files already unpacked (I have reloadable=false in my Context), I use the manager app to reload my application. Personally, I fail to see the purpose of auto-unpacking of war files if the only way to reload is to manually delete the unpacked directory (Tomcat developers: are you listening?!?!?). It has caused myself and many other contributors to this list more headaches than it is worth. My $0.02, Jeff - Original Message - From: David M. Karr [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 01, 2002 4:39 PM Subject: Process for using Manager reload of war file? I'm trying to understand the complete process of getting the Manager application to completely reload a rebuilt application. I'm on Win2k, with TC 4.0.4b2, and JDK 1.4.0. With Tomcat down, I make sure I have a valid WAR file copied into webapps, and the unpacked directory is gone. I then start Tomcat and test the app. Now, I make a minor change to one JSP file and rebuild the WAR file. At this point, I've tried various things, starting with copying the new WAR file into webapps. I've tried the reload op. I've tried using stop, and then start. I've tried deleting the unpacked directory, but while Tomcat is running, this never completes (Tomcat probably has something open). None of these things seem to result in Tomcat reloading the app. When I retest the app, it doesn't show the minor change I made to the JSP. I've verified that the Manager app basically works, as I can execute the list operation, and I can use stop and start on an app to see its different output in the list output. I'm just using wget to interface to the Manager app, writing results to standard output. I wondered whether the unpackWARs attribute in my Context element in server.xml would make it NOT unpack the WAR into the directory, but this seemed to have no effect. I set this to false, made sure the unpacked directory was gone, restarted Tomcat, and it unpacked the WAR again. -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Process for using Manager reload of war file?
I forgot to mention: If you can live without unpacked war files, set unpackWARs=false in your Host and/or define your Context with docBase=myapp.war and reloadable=false. Then the manager app will successfully reload (but not unpack) your war file. Jeff - Original Message - From: Jeff Larsen [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, April 01, 2002 5:19 PM Subject: Re: Process for using Manager reload of war file? Here's the deal with unpacking of war files: It only happens when Tomcat starts and autodeploys apps that do not otherwise have a Context element in server.xml. If you manually define the context, it won't unpack the war file! If you update the war file and reload, it won't re-unpack the war file! Absolutly NOTHING will get tomcat to re-unpack a war file except stopping tomcat, manually deleting the unpacked directory, and restarting tomcat. And again, it ONLY unpacks auto-deployed apps. I've given up on war files, because I need my app unpacked so Apache can serve the static content. Luckily, I have an ftp client (CuteFTP) than can upload an entire directory structure with one command. Then, with the files already unpacked (I have reloadable=false in my Context), I use the manager app to reload my application. Personally, I fail to see the purpose of auto-unpacking of war files if the only way to reload is to manually delete the unpacked directory (Tomcat developers: are you listening?!?!?). It has caused myself and many other contributors to this list more headaches than it is worth. My $0.02, Jeff - Original Message - From: David M. Karr [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 01, 2002 4:39 PM Subject: Process for using Manager reload of war file? I'm trying to understand the complete process of getting the Manager application to completely reload a rebuilt application. I'm on Win2k, with TC 4.0.4b2, and JDK 1.4.0. With Tomcat down, I make sure I have a valid WAR file copied into webapps, and the unpacked directory is gone. I then start Tomcat and test the app. Now, I make a minor change to one JSP file and rebuild the WAR file. At this point, I've tried various things, starting with copying the new WAR file into webapps. I've tried the reload op. I've tried using stop, and then start. I've tried deleting the unpacked directory, but while Tomcat is running, this never completes (Tomcat probably has something open). None of these things seem to result in Tomcat reloading the app. When I retest the app, it doesn't show the minor change I made to the JSP. I've verified that the Manager app basically works, as I can execute the list operation, and I can use stop and start on an app to see its different output in the list output. I'm just using wget to interface to the Manager app, writing results to standard output. I wondered whether the unpackWARs attribute in my Context element in server.xml would make it NOT unpack the WAR into the directory, but this seemed to have no effect. I set this to false, made sure the unpacked directory was gone, restarted Tomcat, and it unpacked the WAR again. -- === David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: losing session info with netscape 4.x
Netscape 4.x has been working for me in this type of situation, but the value of .x might make a difference. Do you have cookies enabled? If not, does your javascript for opening the popup window use a correctly encoded URL so the popup window's request has the session id built in? For debugging, configure your popup window with an address bar so you can see the sessionid in the URL. Jeff - Original Message - From: Huy K Dung [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, April 01, 2002 4:59 PM Subject: losing session info with netscape 4.x Hi, I am using tomcat 3.3.1, apache 1.3.24, turbine 2.1 to develop my web app. Everything seems to work fine with IE 5.5 and netscape 6.x and even netscape 4.x. What I've noticed is that when I use popup windows, netscape 4.x doesn't seem to have the right info from session. From main netscape window I click to open a 1st popup window, and from the 1st popup window I click to open a 2nd popup windows. When I perform an action from the 2nd popup window, it closes it self and refresh the 1st popup. The 1st popup doesn't seem to have the right session info. And the same thing happens to the main window when I perform an action on the 1st popup. None of this happens to IE 5.5 or netscape 6.x. Does anyone come across this problem before? Work around? Please HELP!!! Thanks in advance!!! -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: multiple users using tomcat
What is the nature of the instruction? Are you teaching the students how to install and configure tomcat or are they just going to be creating webapps for tomcat? If they are going to be configuring tomcat, then each student should have his own tomcat installation directory, and (assuming they are all on the same server) each tomcat instance will need it's own port. However, you'll need a beefy server to handle 75 instances of tomcat. If they are just creating webapps. Then you don't really need separate instances of tomcat on separate ports. Just assign each student his/her own webapp context into which their programs will be installed. The same server could serve them all. However each context path will need to be individually specified in server.xml and have the reloadable flag set to true. You may also want to specify a custom logger for each context so the students may easily track server error messages related to their apps. I hope I'm somewhat on the right track for you. Good Luck, Jeff - Original Message - From: j h [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 28, 2002 12:16 AM Subject: multiple users using tomcat Hi there... I have a server that I need to have 20-75 separate student users accessing tomcat. Do I set it up so each user has a separate directory that they can write to, under the directory that tomcat uses? Or possibly run tomcat on a separate port for each user? Sorry to say, the instructor wanted each student to run tomcat on a win 95/98/nt machine, and he has no idea how to set this up, so it's on me. I have perused many hundreds of messages on this newsgroup with nothing to steer me. I've also looked at the documentation and scoured the jakarta homepage for help. I'm sure it's in the server.xml file, but I'm stumped. Please send crumbs...no problems here following the trail...thank you in advance.. Joe __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: SAXParseException on catalina.sh run
The XML parser in Tomcat 4.0.3 requires STRICT adherence to XML standards. I struggled for a while myself before I discovered that XML sub-elements must appear in the SAME ORDER as they are listed in the DTD. That was news to me, because I had never seen a parser that required it. So... make sure your XML is absolutely correct. Your parse error is coming at line 1 column 1 so make sure your web.xml starts with ?xml version=1.0 encoding=ISO-8859-1? and then make sure your !DOCTYPE tag is is exactly right. One wrong letter will screw it up. Note that server.xml does not need the opening ?xml or !DOCTYPE tags, but web.xml does. - Original Message - From: Daryn Nakhuda [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 28, 2002 4:07 AM Subject: SAXParseException on catalina.sh run I'm getting the following error when I run 'catalina.sh run'. It'll happen whether I say /path/to/catalina.sh or ./ or just catalina.sh. another user with nearly identical server.xml and web.xml doesn't get the error (the only differences between our files are port numbers and user names) Any ideas? I'm pretty sure the errors are referring to web.xml, and I can make it have other errors, but can't get rid of this one, even though someone else w/ the same file won't have a problem.. something in my env??! --error-- Starting service Tomcat-Standalone Apache Tomcat/4.0.3 PARSE error at line 1 column 1 org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed. PARSE error at line 1 column 1 org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed. PARSE error at line 1 column 1 org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed. Server.xml (first few lines) !-- Example Server Configuration File -- !-- Note that component elements are nested corresponding to their parent-child relationships with each other -- web.xml (first few lines) !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2.2.dtd; web-app servlet -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: session from URL/Cookie
I'm not entirely sure I understand your problem, but I'll take a stab at it anyway Typically, you don't need to worry about where the sessionid comes from. Anywhere you send a redirect or put a link in a JSP or servlet generated html, you should ALWAYS use HttpServletResponse.encodeURL() or HttpServletResponse.encodeRedirectURL(). Once tomcat knows whether or not the browser is using cookies, it will encode the URL as needed. If cookies are enabled, the URL will be unchanged. If no cookies, the session ID will be inserted. Tomcat does this for you. You don't need to worry about it, just encode ALL URLs. Jeff - Original Message - From: Michael [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 28, 2002 4:16 AM Subject: session from URL/Cookie Hi! (tomcat 3.3.1) *** please help! *** my question (short version;-): client supports cookies and makes a request with session-encoded URL: request: http://myserver/testservlet;jsessionid=12121212 isRequestedSessionIdFromURL() is false isRequestedSessionIdFromCookie() is true and getRequestURI() won't show the encoded sessionid!!! so how to find out, that the URL is encoded??? question (long version): If a client request comes with no session (or an invalid session) I do: session = request.getSession(true); //create session result.sendRedirect(result.encodeRedirectURL(request.getRequestURI())); //redirect to the same page, so the next request comes with valid session - tomcat can't know, whether my browser supports cookies the time it creates the session or not - so it encodes the sessionid into the URL - after the redirect, I can check, if the client's browser supports cookies (isRequestedSessionIdFromURL() /Cookie()) - this works in any case, because the URL is encoded!!! my problem: - now I would like to make another redirect, if the browser supports cookies (so the sessionid won't be visible in the URL again) or leave the session id in the encoded URL (if it doesn't support cookies) BUT how to check, if the sessionid is encoded into the URL, when the browser supports cookies??? isRequestedSessionIdFromURL() is false isRequestedSessionIdFromCookie() is true and getRequestURI() won't show the encoded sessionid!!! an example: client request: http://myserver/testservlet (no session) - create new session - redirect to same page client request: http://myserver/testservlet;jsessionid=12121212 - now tomcat sees if the browser supports cookies or not - but how do I recognize, that the URL is encoded? another redirect to the same page would do request: http://myserver/testservlet;jsessionid=12121212 request: http://myserver/testservlet thanks michi -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: JSP question
Assuming you have a controller servlet that could load the hint text from the database, why not have a static hashtable in your servlet code that is initialized with the values from the database in the init() method. Then as each session is initialized, you could put a reference to the hashtable in each session with session.setAttribute(hints, hintTable); Then you have access to the hints wherever you need them. jsp:useBean name=hints class=java.util.Hashtable scope=session ... input type=text name=myField onMouseOver=self.status='%= (String)hints.get(myField) %' Or better yet you could write a custom taglib... mytags:textWithHint name=myField and then do the hint lookup in the custom tag code. You could even have your hashtable stored and initialized in the taglib code. Then your pages would never need to know about it. I hope these ideas help... Jeff - Original Message - From: Michael Molloy [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, March 28, 2002 9:11 AM Subject: JSP question I'm working on a web application that will be used by about 150 people concurrently. One of the requirements is to show text field hints in the status bar whenever the mouse passes over a text field. All of the hints are stored in the database. I need to write a class that will be available at the application level that returns some javascript along with the correct hint for whatever field the mouse is currently over. Since there are over 1000 fields in this web application, I'm looking for alternatives to writing a class with a get method for each field. What would work very well is if I could pass an argument in a getProperty call. For example, jsp:getProperty name=testBean property=hintText value=firstName / That way, I could store the values in a hashtable and just get whatever one was requested. Of course, I can't do that. I also can't set a property then immediately call get property to get the one I just requested in the set since the class is going to be shared by all users. Can anyone suggest a way to do this? I feel sure there must be a way, but I can't think of it. Thanks --Michael -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Reloading Web Applications without manager and without reloadable=true
I'm not 100% sure about this, but I'm sure someone will correct me if I'm wrong Isn't the manager app limited to apps within the same virtual host? So have your sysadmin create a tomcat virtual host just for your web app. Install the manager app in your virtual host under a unique context name so as not to conflict with the manager app for other virtual hosts. Then configure the role in the web.xml for YOUR manager app to a custom role and create a unique username and password for that role in tomcat-users.xml. Now you have access to a manager app just for your webapp. And your sysadmin rests easy knowing that you can't mess with anyone elses webapps. Jeff - Original Message - From: Tarun Ramakrishna Elankath [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 27, 2002 10:28 AM Subject: Reloading Web Applications without manager and without reloadable=true Hello all, I had asked this question previously without anybody understanding. I need to be able to reload my web-application *without* setting the reloadable=true parameter in the context tag, when I *dont* have access to the manager web-application. Why? This is because my web-application will be on a *production* server where reloadable *should* be set equal to false (as the documentation recommends). And I will not be given access to the manager application because my web-application resides with web-apps of other independent developers. I do not want to bother my system administrator for every modification that I commit to the site. (Even production environments suffer from modification) Is there another way of forcing Tomcat to reload classes of *only* my web application? If no such program exists then I would be grateful if someone could point me towards how to write one. Any help appreciated, Tarun -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: manager/remove functionality
I'm having the same problem with unpacking updated war files when the directory already exists. Anyone out there know what's up? Jeff - Original Message - From: Michael Teter [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 28, 2002 11:03 AM Subject: manager/remove functionality Hello. I'm just beginning to use the manager app to deploy my app instead of dropping a myapp.war file into the webapps dir, deleting the webapps/myapp directory and myapp.war file, stopping Tomcat, and retarting Tomcat. The stopping and restarting of Tomcat was a real drag. So now I do manager/install ... my war file from my dist directory, and that makes my app available. I like it so far. But then I modify my app, build (with ant), manager/remove, and manager/install. That doesn't work unless I manually (or as part of my ant dist activity) delete webapps/myapp directory. Now to my point. I would expect manager/remove to completely remove the app (including the webapps/myapp directory.) It doesn't remove the directory, so subsequent manager/install attempts do nothing. At least, I can't see my changes unless I: ant dist (including rm $TOMCAT_HOME/webapps/myapp), manager/remove, and then manager/install. Am I misusing this or misunderstanding it? Shouldn't manager/remove actually remove the webapps/myapp dir? Or shouldn't manager/install remove or overwrite the webapps/myapp directory or its contents? Thanks for any pointers. (I've read what documentation I can find on Manager app, but it's fairly sparse.) I suppose I could change manager's behavior by modifying its source, but I'll reserve that for last. Michael PS: anyone know how to get XEmacs to highlight Java/JSP code? any pointers there would be welcome... not much useful answers to this question from what I can find on the net. __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: manager/remove functionality
I've just looked at the source code and indeed, it just quits if the directory already exists. If I can come up with a modification that works, I'll post the code. Has anyone asked the tomcat-developer list why it behaves like this? What good is automatic unpacking of wars if it won't re-unpack an updated war file? Leaving it packed isn't an option for those of us that use Apache to serve the static content. Jeff - Original Message - From: todd tredeau [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, March 28, 2002 3:58 PM Subject: Re: manager/remove functionality This has NEVER worked for me, I don't think it will if the directory exists... todd http://www.wiserlabz.com collaborative effort to promote Novell and Open Source solutions Jeff Larsen wrote: I'm having the same problem with unpacking updated war files when the directory already exists. Anyone out there know what's up? Jeff - Original Message - From: Michael Teter [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 28, 2002 11:03 AM Subject: manager/remove functionality Hello. I'm just beginning to use the manager app to deploy my app instead of dropping a myapp.war file into the webapps dir, deleting the webapps/myapp directory and myapp.war file, stopping Tomcat, and retarting Tomcat. The stopping and restarting of Tomcat was a real drag. So now I do manager/install ... my war file from my dist directory, and that makes my app available. I like it so far. But then I modify my app, build (with ant), manager/remove, and manager/install. That doesn't work unless I manually (or as part of my ant dist activity) delete webapps/myapp directory. Now to my point. I would expect manager/remove to completely remove the app (including the webapps/myapp directory.) It doesn't remove the directory, so subsequent manager/install attempts do nothing. At least, I can't see my changes unless I: ant dist (including rm $TOMCAT_HOME/webapps/myapp), manager/remove, and then manager/install. Am I misusing this or misunderstanding it? Shouldn't manager/remove actually remove the webapps/myapp dir? Or shouldn't manager/install remove or overwrite the webapps/myapp directory or its contents? Thanks for any pointers. (I've read what documentation I can find on Manager app, but it's fairly sparse.) I suppose I could change manager's behavior by modifying its source, but I'll reserve that for last. Michael PS: anyone know how to get XEmacs to highlight Java/JSP code? any pointers there would be welcome... not much useful answers to this question from what I can find on the net. __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Basic authentication and Tomcat servlets
If 'b' is not protected, then Apache will neither ask for authorization nor include authorization info in the request headers when a document in 'b' is requested. One thing you could try is to use a symbolic link to 'b' from 'a' so that /htdocs/a/b points to /htdocs/b. Then a request for /htdocs/a/b will require authorization, but /htdocs/b will not. Of course it all depends on how your documents link to 'b' and if you don't mind maintaining 2 routes to 'b' in your links. Jeff - Original Message - From: Barris, Wes (LI, Uni of Queensland) [EMAIL PROTECTED] To: Tomcat User (E-mail) [EMAIL PROTECTED] Sent: Tuesday, March 26, 2002 10:37 PM Subject: Basic authentication and Tomcat servlets I am running Tomcat 4.0.1 connected to Apache 1.3.23 via mod_webapp 1.0 on a Redhat 7.2 system. Directory 'a' is protected using Basic Apache authentication: /htdocs/a Directory 'b' is where my servlets are deployed via webapp: /htdocs/b I want to allow anyone access to 'b', but inside a servlet in 'b' I want to test to see if they authenticated themselves in 'a'. Is there a way to do this? So far, I have only been able to do this using: String auth = request.getHeader(Authorization); IFF 'b' is under 'a' like this: /htdocs/a/b -- Wes Barris E-Mail: [EMAIL PROTECTED] Phone: 07-3346-2504 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: session management
Look at javax.servlet.http.HttpSessionBindingListener. Say you have a class MyClass that implements HttpSessionBindingListener. When you call HttpSession.setAttribute(name, myClass), the valueBound() method of MyClass gets called. Likewise when the session expires or the object is explicitly removed from the session, the valueUnbound() method is called. So if you put a listener in the session attributes, you will know when the session dies. Jeff - Original Message - From: Michael [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 27, 2002 11:32 AM Subject: session management Hi! I want to create a directory in my file-system for every new session - that's easy! (there I want to store large files belonging to that session!) Now I would like to get rid of the directories of older timed-out sessions!!! . It would be enough, if every time, when I have to create a new session and a new directory, all session-directories are checked for their valid sessions - and if a directory exists though the session has already timed-out, it will be deleted! is this possible? thanks michi -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: JNDI/EJB: looking for some references
Hi! Thanks for the suggestions. I'm actually able to invoke the remote EJB setting either the properties you mentioned in the call of the codenew InitialContext/code or setting them in the codeSystem/code properties and then calling codenew InitialContext/code without parameters ; anyway, I wish I could do that without specifing the provider url in the code (as J2EE.5.1 suggests). I use a context-param in my web.xml to specify the provider URL, which is then read by my servlets in the init() method using... getServletContext().getInitParameter(provider.url); Then you are free to change without recompilation. Jeff -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Problem with cache clearing in Tomcat
You may also want to try META http-equiv=Expires content=0 However, I don't really trust META tags. Browser implementations of META tags are not always reliable. Write to the response headers directly. I embed the following at the top of every jsp page. % response.setHeader(Cache-Control, no-cache); response.setHeader(Pragma, no-cache); response.setDateHeader(Expires, 0); % If you're not using jsp, you could also put this in your servlet code. However, during the development of my latest web app, I had similar cache problems while running under Tomcat 3.2.3 standalone. In my production environment however, I run Apache 1.3.23 with mod_jk to connect to Tomcat 4.0.3 and my cache problems went away. I'm not sure if it's a Tomcat version issue or if Tomcat's standalone HTTP connector just doesn't handle the headers correctly. Good luck, Jeff - Original Message - From: somya_iyer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 26, 2002 3:58 AM Subject: Problem with cache clearing in Tomcat Hi, I'm using apache tomcat 4.0 and my application has been developed using only servlets and an oracle database. After a user logs out, when the next one logs in, the application continues with the old pages belonging to the previous user. The old session has been invalidated and the new session values are being correctly taken by the system. On refreshing the screen, the correct pages come up. I have tried setting the header information as follows: meta http-equiv=pragma content=no-cache meta http-equiv=cache-control content=no-store but this doesn't help either. Can anyone help out? Thanks, Somya -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Integrating Tomcat 3.3 in Jbuilder 6
If you haven't done so already, try posting this question to the appropriate newsgroups at http://www.borland.com/newsgroups. I've found them to be very helpful on issues like this. Jeff - Original Message - From: Laurent Michenaud [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 26, 2002 11:42 AM Subject: RE: Integrating Tomcat 3.3 in Jbuilder 6 Yes, i want to integrate the version 3.3. I don't want to use the 3.2.3 and 4.0.1 versions installed by jbuilder. -Message d'origine- De : Serhiy Brytskyy [mailto:[EMAIL PROTECTED]] Envoyé : mardi 26 mars 2002 18:37 À : Tomcat Users List Objet : Re: Integrating Tomcat 3.3 in Jbuilder 6 Laurent Michenaud wrote: Hi, Does anyone know how to integrate Tomcat 3.3 with JBuilder 6 ? Bye Michenaud Laurent - Adeuza - [ Développeur Web - Administrateur Réseau ] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] It is integrated into JBuilder 6. Just run as a web-app. Or would like integrate exactly 3.3 version? -- Best regards, Serhiy Brytskyy mailto:[EMAIL PROTECTED] ICQ: 78708314 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: JNDI/EJB: looking for some references
I'm using servlets on Tomcat that must access one of four remote JBoss servers depending on the web user login. Basically, you have to tell the client where the JBoss server is running. Here's the java code from the servlet side... Properties props = new Properties(); props.put(java.naming.factory.initial, org.jnp.intervaces.NaingContextFactory); props.put(java.naming.facotyr.url.pkgs, org.jboss.naming:org.jnp.interfaces); props.put(java.naming.provider.url, myjbosshost.mydomain.com); InitialContext ic = new InitialContext(props); ... then proceed as normal Note that you will need some jars (jboss-client.jar, jboss-j2ee.jar, jnp-client.jar, jbosssx-client.jar) from the JBoss 'client' subdir available to your tomcat installation. I put them in $TOMCAT_HOME/lib. Your required jars may vary depending on what functions of JBoss you are using. If you are using a port other than 1099 for JBoss, you will need to use myjbosshost.mydomain.com:myport instead. Jeff - Original Message - From: Daniel Hinojosa [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, March 25, 2002 10:37 AM Subject: Re: JNDI/EJB: looking for some references I use Jboss all the time but I use it within the same server, so I never come across that. I highly recommend the JBoss forum at http://main.jboss.org Alberto Bolchini wrote: Hi all. I'm trying to find some references on using an EJB from a remote J2EE Container (JBoss). I'v deployed the .war in my Tomcat 4.0.2 including JBoss's client jars in WEB-INF/lib and have in my web.xml mentioned the ejb-ref as follows ejb-ref descriptionNation/description ejb-ref-nameejb/Nation/ejb-ref-name ejb-ref-typeSession/ejb-ref-type homeNationHome/home remoteNation/remote ejb-linkjnp:remoteIP/Nation/ejb-link /ejb-ref All I get is a Error initializing context: javax.naming.NameNotFoundException: Name jnp:remoteIP is not bound in this Context Can anyone point me a source of infos on this (or show me where the error is?) -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Daniel Hinojosa Java XML: Consultant | Developer | Instructor P.O. Box 4675 Albuquerque, NM 87196-4675 (505) 363-5832 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: JNDI/EJB: looking for some references
Oops, I mistyped factory in one of the lines of sample code. - Original Message - From: Jeff Larsen [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, March 25, 2002 11:26 AM Subject: Re: JNDI/EJB: looking for some references I'm using servlets on Tomcat that must access one of four remote JBoss servers depending on the web user login. Basically, you have to tell the client where the JBoss server is running. Here's the java code from the servlet side... Properties props = new Properties(); props.put(java.naming.factory.initial, org.jnp.intervaces.NaingContextFactory); props.put(java.naming.facotyr.url.pkgs, org.jboss.naming:org.jnp.interfaces); props.put(java.naming.provider.url, myjbosshost.mydomain.com); InitialContext ic = new InitialContext(props); ... then proceed as normal Note that you will need some jars (jboss-client.jar, jboss-j2ee.jar, jnp-client.jar, jbosssx-client.jar) from the JBoss 'client' subdir available to your tomcat installation. I put them in $TOMCAT_HOME/lib. Your required jars may vary depending on what functions of JBoss you are using. If you are using a port other than 1099 for JBoss, you will need to use myjbosshost.mydomain.com:myport instead. Jeff - Original Message - From: Daniel Hinojosa [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, March 25, 2002 10:37 AM Subject: Re: JNDI/EJB: looking for some references I use Jboss all the time but I use it within the same server, so I never come across that. I highly recommend the JBoss forum at http://main.jboss.org Alberto Bolchini wrote: Hi all. I'm trying to find some references on using an EJB from a remote J2EE Container (JBoss). I'v deployed the .war in my Tomcat 4.0.2 including JBoss's client jars in WEB-INF/lib and have in my web.xml mentioned the ejb-ref as follows ejb-ref descriptionNation/description ejb-ref-nameejb/Nation/ejb-ref-name ejb-ref-typeSession/ejb-ref-type homeNationHome/home remoteNation/remote ejb-linkjnp:remoteIP/Nation/ejb-link /ejb-ref All I get is a Error initializing context: javax.naming.NameNotFoundException: Name jnp:remoteIP is not bound in this Context Can anyone point me a source of infos on this (or show me where the error is?) -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- Daniel Hinojosa Java XML: Consultant | Developer | Instructor P.O. Box 4675 Albuquerque, NM 87196-4675 (505) 363-5832 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: re-deploying a web app
I've experimented with several versions (3.2, 3.3, 4.0) of Tomcat and none of them have handled updating of application files with any grace. The documentation on this is pretty sparse so I've never been sure whether it's a bug or the intended behavior. The only way to make sure things get re-deployed properly is to unpack the war file yourself and restart Tomcat. However, I think if you upload a new war file and delete the old unpacked directory, Tomcat will unpack the new war file on a restart. Jeff - Original Message - From: Satish Jeejula [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 21, 2002 3:17 PM Subject: re-deploying a web app Hi All, I have tomcat 3.3a running and am using that to deploy my web applications. The procedure I am following to deploy a webapp is by placing filename.war file in the webapps directory under tomcat_home. When I start the tomcat, the war file is getting expanded into web-app directory structure. Now when I make changes to my application, I recreate the war file and place it in webapps directory. Now if I restart tomcat, ideally, it should expand this war file .. right? But it is not happening. I have to delete the existing web-app directory structure so that when tomcat is re-started it expands the new war file. Is there any property in the tomcat config files that I need to set, to make tomcat expand the war file whenever it finds new one in the webapps directory? Any help is appreciated. Thanks, Satish -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: REPOST: mod_jk.log question
It all depends on the relevant Alias and JkMount directives in your Apache configuration. You'll need to post them in order for us to make any useful analysis. Here's an example of my config where Apache serves the static content. The servlet context is /online. # tell Apache where my app files are Alias /online /www/tomcat/webapps/online JkMount /online/*.jsp ajp13 # Tomcat handles all JSP's # mount only URL's SPECIFICALLY mapped to servlet, all # others (like /online/images) are handled by Apache directly JkMount /online/login ajp13 JkMount /online/order ajp13 Also, look at the Tomcat access log (if you have one configured). Compare it to the access log for Apache. If you have things set up right, you will see the static content requests in the Apache log, but not the Tomcat access log. Jeff - Original Message - From: Cindy Ballreich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 22, 2002 11:04 AM Subject: REPOST: mod_jk.log question I'm using mod_jk with Tomcat 4.0.1 and Apache 1.3.19 on a Redhat 7.0 system. Looking at my mod_jk.log file, it appears that mod_jk is trying to map every request that comes to my server, regardless of whether it should be handled by Tomcat or Apache. This seems very inefficient to me and I'm wondering if I have a configuration problem somewhere. Otherwise everything seems to be working correctly and all pages (jsp and otherwise) are being served correctly. Perhaps this is normal and I just need to change my log level and ignore it. (log level is currently warn.) I'd appreciate some input. mod_jk.log entry of a request that should be (and is) handled by Apache... [Wed Mar 20 10:07:35 2002] [jk_uri_worker_map.c (351)]: Into jk_uri_worker_map_t::map_uri_to_worker [Wed Mar 20 10:07:35 2002] [jk_uri_worker_map.c (368)]: Attempting to map URI '/images/logo_level2.gif' [Wed Mar 20 10:07:35 2002] [jk_uri_worker_map.c (456)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match Thanks! Cindy -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: RE : java.lan.OutOfMemoryError
Actually, changing java versions is easier than changing Tomcat versions. I've made it my policy to NEVER use a Java 1.x.0 version. It never pays to be on the bleeding edge. If you've ever spent any time hanging out in the Java Developer's Connection 'Bug Parade', you'll know that they rarely get anything right the first time. My advice is to go back to JDK 1.3.1. There's nothing about Tomcat that requires 1.4. Jeff - Original Message - From: Robert Douglass [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, March 22, 2002 12:16 PM Subject: RE: RE : java.lan.OutOfMemoryError Darn, I had my hopes up for an easy solution! -Original Message- From: Vincent Lambert [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 7:10 PM To: 'Tomcat Users List' Subject: RE : java.lan.OutOfMemoryError I encounter similar problem and i am running TC4.0.3 with JDK 1.4. -Message d'origine- De : David Hamilton [mailto:[EMAIL PROTECTED]] Envoyé : vendredi 22 mars 2002 18:59 À : Tomcat Users List; [EMAIL PROTECTED] Objet : Re: java.lan.OutOfMemoryError 'java.lan.OutOfMemoryError' Coo - is your whole LAN out of memory? Wow! (Sorry couldn't resist.) Seriously: You using JDK 1.4? We found that TC 3.2.3 with JDK 1.4 was giving us a recursive IllegalStateException which locked up the server and eventually fell over. Reason: Any cancelled or closed HTTP request would apparently cause this problem. Seems that this causes the output stream to be closed and under JDK 1.4 any attempt to write to it causes an IllegalStateException. Closer investigation showed that the error handling in 3.2.3 was fairly junky, (lots of empty exception handlers, hopefully addressed in 3.3/4.0 series) and it tries to handle by passing it to the error servlet, which tries to write out the error, which gives an IllegalStateException, which redirects to the error servlet, etc. Solution: TC 4.01 does not exhibit this behaviour, so we upgraded. Hope that helps david - Original Message - From: Robert Douglass [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, March 22, 2002 12:06 PM Subject: RE: java.lan.OutOfMemoryError I'm using Tomcat 3.2.3, by the way. -Original Message- From: Robert Douglass [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 1:01 PM To: Tomcat Users List Subject: RE: java.lan.OutOfMemoryError I also get this error: 2002-03-22 12:59:29 - Ctx( /RobertDouglass ): IllegalStateException in: R( /Robe rtDouglass + /img/Beetle5.jpg + null) Current state = FLUSHED, new state = CODIN G but once again, only when I try to access it from the link on my webpage, not when I run localhost:8080 -Original Message- From: Robert Douglass [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 12:53 PM To: Tomcat Group Subject: java.lan.OutOfMemoryError Hi all, When I run my webapp from localhost, everything seems to be fine. When I put a link to in on my website and try running accessing it from there, I get: 2002-03-22 12:47:12 - Ctx( /RobertDouglass ): Exception in: R( /RobertDouglass + /img/Beetle8.jpg + null) - java.lang.OutOfMemoryError and Tomcat eventually crashes, but not before my data is corrupted. I also get the following error: 2002-03-20 22:27:01 - Ctx( /RobertDouglass ): IOException in: R( /RobertDouglass + /img/Beetle6.jpg + null) Software caused connection abort: socket + write error where do I start looking to fix this? Thanks, Robert Douglass -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Servlet mapping question
You haven't said anything about your Tomcat configuration. What version? Are you running it standalone or through Apache? Basically, it sounds like you need to create a Context in your server.xml which maps the root (/) to your servlet. In the default Tomcat config, look at how they map the context ROOT. Jeff - Original Message - From: Sean LeBlanc [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, March 22, 2002 12:31 PM Subject: RE: Servlet mapping question -Original Message- From: Sean LeBlanc [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 11:25 AM To: [EMAIL PROTECTED] Subject: Servlet mapping question I want to have a servlet listen at the top level of my app for urls of this type: http://www.myserver.com/foo http://www.myserver.com/bar etc. Basically, anything NOT in a subdir, or ending in .jsp or .html. I want the foo and bar to be data driven, not something I have to put into the web.xml file and restart. So, if a user puts in a bar2, and it's NOT found in the database as being valid, I will then have servlet redirect to the default home page. If it is valid, then I will execute some code, and then redirect to a page specified in database (by matching the url given). Does anyone know how I could do this? What I have tried so far is putting an url pattern like this in the web.xml: servlet-mapping servlet-nameListen/servlet-name url-pattern/*/url-pattern /servlet-mapping and then have the servlet do a response.sendredirect() to the .jsp if it was not an URL of the type I describe above...this only creates an endless loop, though, because the servlet sees the redirect, too. I have tried something like url-pattern/*/$/url-pattern, but that seemed to match nothing at all for me. To add even more to this - I can't even get the pattern like this to work: url-pattern/c*/url-pattern anything typed doesn't seem to get recognized and used by the servlet. Any ideas would be welcome. -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: RE : java.lan.OutOfMemoryError
OK, so I missed the part where they found that it was a Tomcat problem. But I stand by my point on avoiding first edition JDK releases. And I'm not necessarily flaming Sun here. If I didn't think Java was a godsend, I wouldn't be reading this list. It's just the reality of software that new major releases have greater potential for bugs. That's why they have maintenance releases. In general, I avoid ALL vendor's x.0 releases unless they have features I absolutely need. As far as I'm concerned, JDK 1.4.0 is not a must have. My $0.02 - Original Message - From: Andy Eastham [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, March 22, 2002 12:46 PM Subject: RE: RE : java.lan.OutOfMemoryError Jeff, That's pretty harsh on Sun. How many major software vendors do you know that get it completely right first time? At least Sun have the decency to inform it's customers (many of whom use their products for free) of what the current bugs are. And they also ask which are causing the most grief. I'm using java 1.4.0 very happily with Tomcat 4. As was pointed out below, this was actually a problem with Tomcat anyway. Andy -Original Message- From: Jeff Larsen [mailto:[EMAIL PROTECTED]] Sent: 22 March 2002 18:34 To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: RE : java.lan.OutOfMemoryError Actually, changing java versions is easier than changing Tomcat versions. I've made it my policy to NEVER use a Java 1.x.0 version. It never pays to be on the bleeding edge. If you've ever spent any time hanging out in the Java Developer's Connection 'Bug Parade', you'll know that they rarely get anything right the first time. My advice is to go back to JDK 1.3.1. There's nothing about Tomcat that requires 1.4. Jeff - Original Message - From: Robert Douglass [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, March 22, 2002 12:16 PM Subject: RE: RE : java.lan.OutOfMemoryError Darn, I had my hopes up for an easy solution! -Original Message- From: Vincent Lambert [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 7:10 PM To: 'Tomcat Users List' Subject: RE : java.lan.OutOfMemoryError I encounter similar problem and i am running TC4.0.3 with JDK 1.4. -Message d'origine- De : David Hamilton [mailto:[EMAIL PROTECTED]] Envoyé : vendredi 22 mars 2002 18:59 À : Tomcat Users List; [EMAIL PROTECTED] Objet : Re: java.lan.OutOfMemoryError 'java.lan.OutOfMemoryError' Coo - is your whole LAN out of memory? Wow! (Sorry couldn't resist.) Seriously: You using JDK 1.4? We found that TC 3.2.3 with JDK 1.4 was giving us a recursive IllegalStateException which locked up the server and eventually fell over. Reason: Any cancelled or closed HTTP request would apparently cause this problem. Seems that this causes the output stream to be closed and under JDK 1.4 any attempt to write to it causes an IllegalStateException. Closer investigation showed that the error handling in 3.2.3 was fairly junky, (lots of empty exception handlers, hopefully addressed in 3.3/4.0 series) and it tries to handle by passing it to the error servlet, which tries to write out the error, which gives an IllegalStateException, which redirects to the error servlet, etc. Solution: TC 4.01 does not exhibit this behaviour, so we upgraded. Hope that helps david - Original Message - From: Robert Douglass [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, March 22, 2002 12:06 PM Subject: RE: java.lan.OutOfMemoryError I'm using Tomcat 3.2.3, by the way. -Original Message- From: Robert Douglass [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 1:01 PM To: Tomcat Users List Subject: RE: java.lan.OutOfMemoryError I also get this error: 2002-03-22 12:59:29 - Ctx( /RobertDouglass ): IllegalStateException in: R( /Robe rtDouglass + /img/Beetle5.jpg + null) Current state = FLUSHED, new state = CODIN G but once again, only when I try to access it from the link on my webpage, not when I run localhost:8080 -Original Message- From: Robert Douglass [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 12:53 PM To: Tomcat Group Subject: java.lan.OutOfMemoryError Hi all, When I run my webapp from localhost, everything seems to be fine. When I put a link to in on my website and try running accessing it from there, I get: 2002-03-22 12:47:12 - Ctx( /RobertDouglass ): Exception in: R( /RobertDouglass + /img/Beetle8.jpg + null) - java.lang.OutOfMemoryError and Tomcat eventually crashes, but not before my data is corrupted. I also get the following error: 2002-03-20 22:27:01 - Ctx( /RobertDouglass
Re: REPOST: mod_jk.log question
I don't see anything in your setup that looks wrong. Just for kicks, I set my test server's log level for mod_jk to warn and I didn't see any messages relating to non-servlet document requests. Something is fishy on your system. Are non-servlet requests being properly returned to the browser? Your mod_jk log certainly makes it seem like '/images/logo_level2.gif' is being mapped into the servlet name space. - Original Message - From: Cindy Ballreich [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, March 22, 2002 1:46 PM Subject: Re: REPOST: mod_jk.log question Thanks for your reply! Here is my mod_jk.conf which is referenced from httpd.conf... IfModule !mod_jk.c LoadModule jk_module libexec/mod_jk.so /IfModule JkWorkersFile /usr/local/java/catalina/conf/jk/workers.properties JkLogFile /usr/local/java/catalina/logs/mod_jk.log JkLogLevel warn Alias /applications/ /usr/local/java/catalina/webapps/applications JkMount /applications/* ajp13 JkMount /applications/*.jsp ajp13 I do have an access log set up for Tomcat and it only shows requests for stuff inside the applications directory. It's ignoring anything requested from anywhere else. Likewise, Apache's access_log shows the request for the jsp page (which makes sense since it was called on port 80), but nothing else. All this is as I would expect. However, mod_jk.log is showing an entry for every single request that comes to the server, including Nimda probes!! I'm willing to ignore it if everything else is ok, but I'm concerned that I've got some sort of configuration error somewhere that's going to bite me later on. Thanks again! Cindy At 12:25 PM 3/22/02 -0600, Jeff Larsen wrote: It all depends on the relevant Alias and JkMount directives in your Apache configuration. You'll need to post them in order for us to make any useful analysis. Here's an example of my config where Apache serves the static content. The servlet context is /online. # tell Apache where my app files are Alias /online /www/tomcat/webapps/online JkMount /online/*.jsp ajp13 # Tomcat handles all JSP's # mount only URL's SPECIFICALLY mapped to servlet, all # others (like /online/images) are handled by Apache directly JkMount /online/login ajp13 JkMount /online/order ajp13 Also, look at the Tomcat access log (if you have one configured). Compare it to the access log for Apache. If you have things set up right, you will see the static content requests in the Apache log, but not the Tomcat access log. Jeff - Original Message - From: Cindy Ballreich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, March 22, 2002 11:04 AM Subject: REPOST: mod_jk.log question I'm using mod_jk with Tomcat 4.0.1 and Apache 1.3.19 on a Redhat 7.0 system. Looking at my mod_jk.log file, it appears that mod_jk is trying to map every request that comes to my server, regardless of whether it should be handled by Tomcat or Apache. This seems very inefficient to me and I'm wondering if I have a configuration problem somewhere. Otherwise everything seems to be working correctly and all pages (jsp and otherwise) are being served correctly. Perhaps this is normal and I just need to change my log level and ignore it. (log level is currently warn.) I'd appreciate some input. mod_jk.log entry of a request that should be (and is) handled by Apache... [Wed Mar 20 10:07:35 2002] [jk_uri_worker_map.c (351)]: Into jk_uri_worker_map_t::map_uri_to_worker [Wed Mar 20 10:07:35 2002] [jk_uri_worker_map.c (368)]: Attempting to map URI '/images/logo_level2.gif' [Wed Mar 20 10:07:35 2002] [jk_uri_worker_map.c (456)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match Thanks! Cindy -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Tomcat 4.0.3. is not unpacking my WAR file
Tomcat 4.0.3 is NOT unpacking my WAR file and my application is not getting loaded. Is this a bug or is there a configuration issue that I am missing. If I run without unpacking the war (i.e., docBase=online.war), the application runs just fine, but then I can't have Apache httpd serve my static html and images. Here's the Host section of my server.xml Host name=localhost debug=0 appBase=webapps unpackWARs=true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=access. suffix=.log pattern=common timestamp=true/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost. suffix=.log timestamp=false/ Context path=/online docBase=online debug=0 reloadable=false crossContext=false useNaming=false Logger className=org.apache.catalina.logger.FileLogger prefix=online. suffix=.log timestamp=true/ /Context /Host -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Tomcat 4.0.3. is not unpacking my WAR file
Let me clarify: Tomcat NEVER unpacks the war, not when it's restarted, and even if the directory is not there. On restart, Tomcat complains that it can't start the application, because the directory does not exists. - Original Message - From: Daniel Bruce Lynes [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, March 21, 2002 10:09 AM Subject: Re: Tomcat 4.0.3. is not unpacking my WAR file On March 21, 2002 08:02 am, you wrote: Tomcat 4.0.3 is NOT unpacking my WAR file and my application is not getting loaded. Is this a bug or is there a configuration issue that I am missing. It'll only do this if the server is restarted. Tomcat doesn't support on-the-fly deploy yet. I've also noticed that if the directory already exists for the web application in question, that it never extracts the war file. This seems to be the behaviour on all of the Tomcat versions I've tried recently (3.2.1,3.2.3,3.3rc1,4.0.1). -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Solaris Install Question
Solaris will not allow an unprivileged user (i.e., not the root user) to open a server on a port number below 1024. You must run as root or use a higher port number. Jeff - Original Message - From: Scott Purcell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 21, 2002 10:44 AM Subject: Solaris Install Question I am trying to install Tomcat 4.0.3 on Solaris and I am having some issues getting the product to start. I downloaded the jakarta-tomcat.4.0.3.tar.gz from the site and extracted the files. I am a new employee here and I am installing it as myself in my own home-directory. I edited the /config/server.xml file and changed the 8080 to 63 (per our administrator here, as other sites run on 8080 and 80). I went into the /bin directory and tried to run: 'catalina.sh run' and it starts, but bombs with the following error: $ catalina.sh run Using CATALINA_BASE: /export/home/spurcell/jakarta-tomcat-4.0.3 Using CATALINA_HOME: /export/home/spurcell/jakarta-tomcat-4.0.3 Using CATALINA_TMPDIR: /export/home/spurcell/jakarta-tomcat-4.0.3/temp Using JAVA_HOME: /usr/java Catalina.start: LifecycleException: null.open: java.net.BindException: Permission denied:36 LifecycleException: null.open: java.net.BindException: Permission denied:36 at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConnector.java:1130) at org.apache.catalina.core.StandardService.initialize(StandardService.java:454) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:553) at org.apache.catalina.startup.Catalina.start(Catalina.java:780) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) 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(Bootstrap.java:243) - Root Cause - java.net.BindException: Permission denied:36 at org.apache.catalina.connector.http.HttpConnector.open(HttpConnector.java:950) at org.apache.catalina.connector.http.HttpConnector.initialize(HttpConnector.java:1128) at org.apache.catalina.core.StandardService.initialize(StandardService.java:454) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:553) at org.apache.catalina.startup.Catalina.start(Catalina.java:780) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) 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(Bootstrap.java:243) StandardServer.await: create[8005]: java.net.BindException: Address already in use java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:321) at java.net.ServerSocket.bind(ServerSocket.java:308) at java.net.ServerSocket.bind(ServerSocket.java:266) at java.net.ServerSocket.init(ServerSocket.java:182) at org.apache.catalina.core.StandardServer.await(StandardServer.java:277) at org.apache.catalina.startup.Catalina.start(Catalina.java:794) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) 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(Bootstrap.java:243) spurcell@devweb2:~/jakarta-tomcat-4.0.3/bin/. $ Does anyone know what I could try to do to get this running? Thanks, Scott -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Tab Characters in web.xml (Tomcat 4.0.3)
I've been developing a web application in JBuilder using Tomcat 3.2 with great success. Now it's time for the real world. I'm deploying my app on Tomcat 4.0.3 on Solaris and I'm having problems with my web.xml. When Tomcat starts, it gives me the following error: 2002-03-20 10:47:48 ContextConfig[/online] Parse error in application web.xml org.xml.sax.SAXParseException: The content of element type web-app must match (icon?,display-name?,description?,distributable?,context-param*,servlet*,servlet-mapping* ,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,securi ty-constraint*,login-config?,security-role*,env-entry*,ejb-ref*). OK, so it's just validating my web.xml against the DTD. BUT... my web.xml is correct. If I remove the leading tab characters from the lines of web.xml and replace them with plain spaces, it parses just fine. What gives?!?!? Since when are tabs not legal whitespace?!?!?! Jeff -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]