RE: Configuration for High TPS
Have you integrated Tomcat with another webserver for the static content, assuming you have some. That would more than likely improve performance. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 12:52 PM To: 'Tomcat Users List' Subject: RE: Configuration for High TPS http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html John Turner [EMAIL PROTECTED] -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 1:50 PM To: 'Tomcat Users List' Subject: RE: Configuration for High TPS Where can I find documentation on the Coyote connector (such as the exact class name)? What is really bothering me (currently), is once I start getting connection errors, my CPU usage (roughly) doubles, and I get connection errors much more easily (as if acceptCount was reduced somehow). Any ideas on the cause/solution for this? -Original Message- From: Sullivan, Mark E [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 10:31 AM To: 'Tomcat Users List' Subject: RE: Configuration for High TPS what version of tomcat are you running? In the 4+ versions the Coyote HTTP connector is supposed to perform better. -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 12:23 PM To: Tomcat Users List Subject: Configuration for High TPS I'm attempting to configure Tomcat for a test environment to handle a high number of transactions per second (TPS) and would like any advice others may like to contribute. The machine is a fairly powerful dual processor machine (1+ GHz) running WinNT. I'm using a tool to send requests, where I can specify the TPS and number of requests total to send. I'm running the following with ok results, but I'm interested in any suggestions or better explanations of some of the fields: Connector className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=200 maxProcessors=200 enableLookups=true redirectPort=8443 acceptCount=2000 debug=0 connectionTimeout=6/ Perhaps my biggest problem is the number of connections Tomcat accepts fills up rather quickly, some of the connections my tool generates are refused (presumably due to the acceptCount limit being reached, and I have increased it a couple times). Any advice would be appreciated! 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]
Connection/acceptCount Problem
I've mentioned this before in my Configuration e-mail, but it appears important enough for me to mention it again (as there hasn't been a response, and it is a pretty serious problem IMO). When I run tests at a high TPS, I might encounter a can't connect error (looks like I've reached the acceptCount limit). That's fine with me, so I stop the test and get ready to start another. When I start the next test (I usually wait a few seconds, let tomcat's CPU usage drop off), I immediately start getting can't connect errors, which should not be possible in the amount of time I'm getting them (TPS of 100, acceptCount 1000, that should be 10 seconds before I should get these errors, right?) My only fix for this problem is to shutdown and restart Tomcat, which is not really a solution. Is this a known problem or bug? Possible I misconfigured something? Jeff -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Configuration for High TPS
I plan to do pre-caching later. Currently my first test run is the unlucky user, which I'm calling a cold start and seeing how well it performs from a clear cache. No, I'm running TC stand-alone currently. Running it with Apache will improve performance? I'll look into it, but for now I'm running stand-alone. -Original Message- From: Durham David Cntr 805CSS/SCBE [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 11:32 AM To: Tomcat Users List Subject: RE: Configuration for High TPS Have you integrated Tomcat with another webserver for the static content, assuming you have some. That would more than likely improve performance. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 12:52 PM To: 'Tomcat Users List' Subject: RE: Configuration for High TPS http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html John Turner [EMAIL PROTECTED] -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 1:50 PM To: 'Tomcat Users List' Subject: RE: Configuration for High TPS Where can I find documentation on the Coyote connector (such as the exact class name)? What is really bothering me (currently), is once I start getting connection errors, my CPU usage (roughly) doubles, and I get connection errors much more easily (as if acceptCount was reduced somehow). Any ideas on the cause/solution for this? -Original Message- From: Sullivan, Mark E [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 10:31 AM To: 'Tomcat Users List' Subject: RE: Configuration for High TPS what version of tomcat are you running? In the 4+ versions the Coyote HTTP connector is supposed to perform better. -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 12:23 PM To: Tomcat Users List Subject: Configuration for High TPS I'm attempting to configure Tomcat for a test environment to handle a high number of transactions per second (TPS) and would like any advice others may like to contribute. The machine is a fairly powerful dual processor machine (1+ GHz) running WinNT. I'm using a tool to send requests, where I can specify the TPS and number of requests total to send. I'm running the following with ok results, but I'm interested in any suggestions or better explanations of some of the fields: Connector className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=200 maxProcessors=200 enableLookups=true redirectPort=8443 acceptCount=2000 debug=0 connectionTimeout=6/ Perhaps my biggest problem is the number of connections Tomcat accepts fills up rather quickly, some of the connections my tool generates are refused (presumably due to the acceptCount limit being reached, and I have increased it a couple times). Any advice would be appreciated! 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]
error building mod_jk
From: Aaron [EMAIL PROTECTED] Date: Fri Aug 9, 2002 1:12:36 PM US/Central To: [EMAIL PROTECTED] Subject: error compiling mod_jk Hi- I'm trying to build mod_jk on Mac OS X. The build fails with this at the end: [so] StdErr: [so] libtool: unrecognized option `-arch_only' [so] Try `libtool --help' for more information. BUILD FAILED file:/usr/local/jakarta-tomcat-connectors/jk/native/build.xml:134: Link failed mod_jk I am using libtool-1.4.2 and I see the -arch_only option in the documentation. Does anyone know how to fix this? Thanks, Aaron [mobile:local/jakarta-tomcat-connectors/jk] mobile# ant native Buildfile: build.xml jkant: [javac] Compiling 17 source files to /usr/local/jakarta-tomcat-connectors/jk/build/classes [copy] Copying 1 file to /usr/local/jakarta-tomcat-connectors/jk/build/classes/META-INF [jar] Building jar: /usr/local/jakarta-tomcat-connectors/jk/build/lib/jkant.jar detect: [echo] jakarta-tomcat-connectors report: [echo] Tomcat33: ${tomcat33.detect} [echo] Tomcat40: true ../../jakarta-tomcat-4.0.3 [echo] Tomcat41: true ../../jakarta-tomcat-4.1.8 [echo] Apache13: ${apache13.detect} ${apache13.home} [echo] Apache2: true /usr/local/apache2 [echo] iPlanet: ${iplanet.detect} ${iplanet.home} [echo] IIS: ${iis.detect} ${iis.home} [echo] Using catalina.home: ${catalina.home} native: init: [echo] /var/root [available] DEPRECATED - available used to override an existing property. [available] Build file should not reuse the same property name for different values. [mkdir] Created dir: /usr/local/jakarta-tomcat-connectors/jk/build/jk apache20: [mkdir] Created dir: /usr/local/jakarta-tomcat-connectors/jk/build/jk/apache2 [so] Compiling 19 out of 19 Compiling /usr/local/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c [so] Warnings: [so] /usr/local/jakarta-tomcat-connectors/jk/native/apache-2.0/ mod_jk.c:1162: warning: missing initializer [so] /usr/local/jakarta-tomcat-connectors/jk/native/apache-2.0/ mod_jk.c:1162: warning: (near initialization for `jk_cmds[16].func') Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_ajp12_worker.c Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_ajp13.c Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_ajp13_worker.c Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_ajp14.c Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_ajp14_worker.c Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c [so] Warnings: [so] /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_ajp_common.c: In function `ajp_process_callback': [so] /usr/local/jakarta-tomcat-connectors/jk/native/common/ jk_ajp_common.c:949: warning: comparison between signed and unsigned Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_connect.c Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_context.c Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_jni_worker.c Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_lb_worker.c Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_map.c Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_md5.c Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_msg_buff.c Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_pool.c Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_sockbuf.c Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/ jk_uri_worker_map.c [so] Warnings: [so] /usr/local/jakarta-tomcat-connectors/jk/native/common/ jk_uri_worker_map.c: In function `map_uri_to_worker': [so] /usr/local/jakarta-tomcat-connectors/jk/native/common/ jk_uri_worker_map.c:571: warning: comparison between signed and unsigned Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_util.c Compiling /usr/local/jakarta-tomcat-connectors/jk/native/common/jk_worker.c Linking /usr/local/jakarta-tomcat-connectors/jk/build/jk/apache2/mod_jk.so [so] Link failed 1 [so] Command:libtool --mode=link cc -module -avoid-version -rpath /usr/local/jakarta-tomcat-connectors/jk/build/jk/apache2 -o mod_jk.la /usr/local/jakarta-tomcat-connectors/jk/build/jk/apache2/apache-2.0/ mod_jk.lo /usr/local/jakarta-tomcat-connectors/jk/build/jk/apache2/common/ jk_ajp12_worker.lo /usr/local/jakarta-tomcat-connectors/jk/build/jk/apache2/common/ jk_ajp13.lo /usr/local/jakarta-tomcat-connectors/jk/build/jk/apache2/common/ jk_ajp13_worker.lo /usr/local/jakarta-tomcat-connectors/jk/build/jk/apache2/common/ jk_ajp14.lo /usr/local/jakarta-tomcat-connectors/jk/build/jk/apache2/common/
Tomcat 4.1.x JAASRealm Implementation
Hey All (Craig particularly)- Going through the code that exists in 4.1.8, I noticed that in the JAASRealm comments, Craig makes mention of using classes implementing the Principal interface to represent Users and Roles. This sounds like a good approach given the vagueness surrounding the JAAS implementation once you get into implementing it. In the JAASRealm class, there are setters for configuring the JAASRealm with the names of Principal classes that contain Users and Roles. After running a Find Usages with IDEA, I wasn't able to find any code which references these methods. So, how does the JAASRealm find out what classes contain users vs. roles? Is there some kind of magic going on with the realm config node in server.xml? I'd like to start using JAAS on Tomcat since we currently use JAAS for our JRun servers and converting the existing LoginModules won't be too much of a pain. jk -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Connection/acceptCount Problem
You really aren't giving enough detail in your messages. You are trying to treat a complex problem (hundreds of transactions per second) as a simple, something is wrong with one thing issue. Scaling performance to these levels is usually a combination of factors. There are rarely magic bullets when it comes to things like this. What JDK are you using? Have you tried using different JDKs? What operating system are you using? You said WinNT in your initial post. Is that WinNT 4? What service packs have been applied? You never posted a response as to whether setting enableLookups=false made any difference. What test tool are you using? Are you sure the issue is in Tomcat, and not in the test tool/station? I assume you have IIS installed. Have you tried using the same test tool to put 200 connections per second to IIS? Have you tried scaling your transactions per second upwards and observing the behavior at different loads? George Sexton MH Software, Inc. Voice: 303 438 9585 http://www.mhsoftware.com -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 09 August, 2002 12:32 PM To: [EMAIL PROTECTED] Subject: Connection/acceptCount Problem I've mentioned this before in my Configuration e-mail, but it appears important enough for me to mention it again (as there hasn't been a response, and it is a pretty serious problem IMO). When I run tests at a high TPS, I might encounter a can't connect error (looks like I've reached the acceptCount limit). That's fine with me, so I stop the test and get ready to start another. When I start the next test (I usually wait a few seconds, let tomcat's CPU usage drop off), I immediately start getting can't connect errors, which should not be possible in the amount of time I'm getting them (TPS of 100, acceptCount 1000, that should be 10 seconds before I should get these errors, right?) My only fix for this problem is to shutdown and restart Tomcat, which is not really a solution. Is this a known problem or bug? Possible I misconfigured something? 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]
Converting HOST to IP an IP to HOST
All right, but it does not solve my problem. I did a local web system that can be accessed both by IP or HOST. Depending on the way the user accessed( by HOST or IP ) the application I must display different contents. I could do this: if( request.getRequestURL().toString().equals(192.168.20.10) ) out.print(show IP content); else ou.print(show HOST content); But the web server has many network devices and the user can accesss the system from many other IP and HOSTs. The InetAddress.getByName() does not work with the machine network name only with inet hosts. Does anybody has any idea ??? Thanks in advice, Junior On Fri, 9 Aug 2002 13:50:59 -0400 Turner, John [EMAIL PROTECTED] wrote: Come on...RTFM: java.net.InetAddress.getByName(); Sheesh. John Turner [EMAIL PROTECTED] -Original Message- From: Jose Francisco Junior [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 1:44 PM To: Tomcat Users List Subject: Re: Configuration for High TPS Please, I know it is a bit off-topic but I am trying to get a IP address from an URL like this: new URL(http://java.sun.com;); //this is the URL How can I get the IP address from this URL? Any idea ?? Thanks in advance, Junior Don't E-Mail, ZipMail! http://www.zipmail.com/ -- 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] - Prefiro as lágrimas da derrota do que a vergonha de não ter lutado... Willan Brook - Don't E-Mail, ZipMail! http://www.zipmail.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: java.endorsed.dirs
Hello Neo, Well, you can upgrade to Tomcat-4.1.x where they now include a $CATALINA_HOME/common/endorsed directory. Or, you can use java's standard endorsed dir: $JAVA_HOME/jre/lib/endorsed Not sure how to add your own endorsed directories, though. Maybe Tomcat-4.1.x will understand the -Dendorsed.dirs flag since it now provides the common/endorsed directory where Tomcat-4.0.x didn't. Jake Friday, August 09, 2002, 1:07:23 PM, you wrote: N How can I configure my custom instance of the Tomcat service to append my N endorsed.dir? I tried adding the flag (-Djava.endorsed.dirs='') to my N tomcat service installation script but the value is ignored by tomcat once N it starts up. N I stumbled across a couple web pages that lead me to believe it is not N possible to accomplish this given the current Tomcat classloader N implementation. If that is indeed the case...has this issue been address N and what version of Tomcat can I find it in? N I'm using Tomcat 4.0.4 on Win32. N Thanks in advance, N Neo N -- N To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] N For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Best regards, Jacobmailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Configuration for High TPS
We ran some high TPS testing recently using a Sun 220R running Solaris 8. We were running an Apache/Tomcat combination using the mod_webapp connector. Just running a dumb simple servlet we were topping out at 165 tps and 80% CPU. We tried repeating the test using Tomcat standalone trying to figure out where the bottleneck was. We still topped out at 165 tps despite everything we tried to tweak. Our CPU was drastically reduced though to 40%. After running some e-mails through this list, the consensus was that we needed to tweak with our JVM as this was probably the cause of our ceiling. Not the web server configuration and not the horsepower on the machine. Actually, in standalone mode, we could not drive our CPU load beyond 40%. So far, we haven't had a chance to research this further and our production app is not pushing any limits just yet so its on the back burner. By the way, check how much stuff your Tomcat installation is logging. The default configuration is pretty verbose and this consumes large amounts of horsepower writing it all to disk. WinNT isn't overly good at walking and chewing gum and a lot of disk activity can drain resources pretty quickly. _ Mark Annal e-mail: [EMAIL PROTECTED] TARGUSinfo phone : (585) 598-7011 255 Woodcliff Drive fax : (585) 598-7001 Fairport, NY 14450 web : www.targusinfo.com _ -Original Message- From: Durham David Cntr 805CSS/SCBE [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 2:32 PM To: Tomcat Users List Subject: RE: Configuration for High TPS Have you integrated Tomcat with another webserver for the static content, assuming you have some. That would more than likely improve performance. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 12:52 PM To: 'Tomcat Users List' Subject: RE: Configuration for High TPS http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html John Turner [EMAIL PROTECTED] -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 1:50 PM To: 'Tomcat Users List' Subject: RE: Configuration for High TPS Where can I find documentation on the Coyote connector (such as the exact class name)? What is really bothering me (currently), is once I start getting connection errors, my CPU usage (roughly) doubles, and I get connection errors much more easily (as if acceptCount was reduced somehow). Any ideas on the cause/solution for this? -Original Message- From: Sullivan, Mark E [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 10:31 AM To: 'Tomcat Users List' Subject: RE: Configuration for High TPS what version of tomcat are you running? In the 4+ versions the Coyote HTTP connector is supposed to perform better. -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 12:23 PM To: Tomcat Users List Subject: Configuration for High TPS I'm attempting to configure Tomcat for a test environment to handle a high number of transactions per second (TPS) and would like any advice others may like to contribute. The machine is a fairly powerful dual processor machine (1+ GHz) running WinNT. I'm using a tool to send requests, where I can specify the TPS and number of requests total to send. I'm running the following with ok results, but I'm interested in any suggestions or better explanations of some of the fields: Connector className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=200 maxProcessors=200 enableLookups=true redirectPort=8443 acceptCount=2000 debug=0 connectionTimeout=6/ Perhaps my biggest problem is the number of connections Tomcat accepts fills up rather quickly, some of the connections my tool generates are refused (presumably due to the acceptCount limit being reached, and I have increased it a couple times). Any advice would be appreciated! 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:
Re: Tomcat 4.1.x JAASRealm Implementation
On Fri, 9 Aug 2002, James Krygowski wrote: Date: Fri, 9 Aug 2002 14:39:57 -0400 From: James Krygowski [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Tomcat 4.1.x JAASRealm Implementation Hey All (Craig particularly)- Going through the code that exists in 4.1.8, I noticed that in the JAASRealm comments, Craig makes mention of using classes implementing the Principal interface to represent Users and Roles. This sounds like a good approach given the vagueness surrounding the JAAS implementation once you get into implementing it. In the JAASRealm class, there are setters for configuring the JAASRealm with the names of Principal classes that contain Users and Roles. After running a Find Usages with IDEA, I wasn't able to find any code which references these methods. So, how does the JAASRealm find out what classes contain users vs. roles? Is there some kind of magic going on with the realm config node in server.xml? I'd like to start using JAAS on Tomcat since we currently use JAAS for our JRun servers and converting the existing LoginModules won't be too much of a pain. As you've undoubtedly discovered, the JAAS spec doesn't provide any guidance for figuring out which Principal is which in the Subject that gets returned. Looking inside some of the existing implementations (such as the one that can access an NT domain), this was being done by hard coded instanceof checks on particular Principal subclasses. So, to generalize this a little, JAASRealm lets you declare the fully qualified class names of classes that represent your roles (in the roleClasses property). You can see it used in the createPrincipal() method inside JAASRealm, where it is checking the classname of each returned Principal against the list of class names you provided. When it finds a match, it assumes that principal.getName() on that Principal will return the role name that has been authorized for this user. The userClasses property serves a similar purpose for saying which classes actually represent the user. NOTE: The implementation classes themselves need to be visible to Catalina's internal class loaders for all of this to work. The simplest thing to do is put them in a JAR file in $CATALINA_HOME/server/lib, or as unpacked classes under $CATALINA_HOME/server/classes. NOTE: You won't see any direct references to the setRoleClasses() or setUserClasses() methods. The code that parses server.xml (the Digester module) has magic code (well, it's actually separately available in commons-beanutils :-) in it that matches up attributes in the XML elements to the corresponding property setters in the class. So, you configure one of these beasts like this: Realm className=org.apache.catalina.realm.JAASRealm roleClasses=com.foo.MyFirstRole,com.bar.MySecondRole ... / and the setter gets called for you via Java's introspection and reflection capabilities. jk Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Connection/acceptCount Problem
JDK: 1.4 and 1.3.1 (currently 1.4) OS: WinNT 4, no service packs on test machine enableLookups: Maybe slight improvement. I already stated it could handle 150 TPS with it set to true. test tool: custom program. I did not write it, only using it. Not running IIS, but I'm pretty sure it is not the tool. Currently testing Tomcat versus some custom C++ code (using the same tool for both), and the connection problem does not happen with the C++ code. Like I said before, I'm pretty sure it's Tomcat. Once the problem starts happening, Tomcat's CPU usage nearly doubles when running relatively low TPS values (like 40). -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 11:50 AM To: Tomcat Users List Subject: RE: Connection/acceptCount Problem You really aren't giving enough detail in your messages. You are trying to treat a complex problem (hundreds of transactions per second) as a simple, something is wrong with one thing issue. Scaling performance to these levels is usually a combination of factors. There are rarely magic bullets when it comes to things like this. What JDK are you using? Have you tried using different JDKs? What operating system are you using? You said WinNT in your initial post. Is that WinNT 4? What service packs have been applied? You never posted a response as to whether setting enableLookups=false made any difference. What test tool are you using? Are you sure the issue is in Tomcat, and not in the test tool/station? I assume you have IIS installed. Have you tried using the same test tool to put 200 connections per second to IIS? Have you tried scaling your transactions per second upwards and observing the behavior at different loads? George Sexton MH Software, Inc. Voice: 303 438 9585 http://www.mhsoftware.com -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 09 August, 2002 12:32 PM To: [EMAIL PROTECTED] Subject: Connection/acceptCount Problem I've mentioned this before in my Configuration e-mail, but it appears important enough for me to mention it again (as there hasn't been a response, and it is a pretty serious problem IMO). When I run tests at a high TPS, I might encounter a can't connect error (looks like I've reached the acceptCount limit). That's fine with me, so I stop the test and get ready to start another. When I start the next test (I usually wait a few seconds, let tomcat's CPU usage drop off), I immediately start getting can't connect errors, which should not be possible in the amount of time I'm getting them (TPS of 100, acceptCount 1000, that should be 10 seconds before I should get these errors, right?) My only fix for this problem is to shutdown and restart Tomcat, which is not really a solution. Is this a known problem or bug? Possible I misconfigured something? 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]
RE: Configuration for High TPS
Thanks Mark! That's some good advice. I haven't moved on to tweaking the JVM yet, I know there are some options I can use to increase performance, but I'm not to that point yet. I'm sticking with the standalone for simplicity. I'll likely turn this over to someone else, and the fewer parts, the better. We examined using Apache and JServ, and a coworker informed me the installation wasn't that straightforward. The logging tip is a good one, thanks! -Original Message- From: Mark Annal [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 11:58 AM To: Tomcat Users List Subject: RE: Configuration for High TPS We ran some high TPS testing recently using a Sun 220R running Solaris 8. We were running an Apache/Tomcat combination using the mod_webapp connector. Just running a dumb simple servlet we were topping out at 165 tps and 80% CPU. We tried repeating the test using Tomcat standalone trying to figure out where the bottleneck was. We still topped out at 165 tps despite everything we tried to tweak. Our CPU was drastically reduced though to 40%. After running some e-mails through this list, the consensus was that we needed to tweak with our JVM as this was probably the cause of our ceiling. Not the web server configuration and not the horsepower on the machine. Actually, in standalone mode, we could not drive our CPU load beyond 40%. So far, we haven't had a chance to research this further and our production app is not pushing any limits just yet so its on the back burner. By the way, check how much stuff your Tomcat installation is logging. The default configuration is pretty verbose and this consumes large amounts of horsepower writing it all to disk. WinNT isn't overly good at walking and chewing gum and a lot of disk activity can drain resources pretty quickly. _ Mark Annal e-mail: [EMAIL PROTECTED] TARGUSinfo phone : (585) 598-7011 255 Woodcliff Drive fax : (585) 598-7001 Fairport, NY 14450 web : www.targusinfo.com _ -Original Message- From: Durham David Cntr 805CSS/SCBE [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 2:32 PM To: Tomcat Users List Subject: RE: Configuration for High TPS Have you integrated Tomcat with another webserver for the static content, assuming you have some. That would more than likely improve performance. -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 12:52 PM To: 'Tomcat Users List' Subject: RE: Configuration for High TPS http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html John Turner [EMAIL PROTECTED] -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 1:50 PM To: 'Tomcat Users List' Subject: RE: Configuration for High TPS Where can I find documentation on the Coyote connector (such as the exact class name)? What is really bothering me (currently), is once I start getting connection errors, my CPU usage (roughly) doubles, and I get connection errors much more easily (as if acceptCount was reduced somehow). Any ideas on the cause/solution for this? -Original Message- From: Sullivan, Mark E [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 10:31 AM To: 'Tomcat Users List' Subject: RE: Configuration for High TPS what version of tomcat are you running? In the 4+ versions the Coyote HTTP connector is supposed to perform better. -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 12:23 PM To: Tomcat Users List Subject: Configuration for High TPS I'm attempting to configure Tomcat for a test environment to handle a high number of transactions per second (TPS) and would like any advice others may like to contribute. The machine is a fairly powerful dual processor machine (1+ GHz) running WinNT. I'm using a tool to send requests, where I can specify the TPS and number of requests total to send. I'm running the following with ok results, but I'm interested in any suggestions or better explanations of some of the fields: Connector className=org.apache.catalina.connector.http.HttpConnector port=8080 minProcessors=200 maxProcessors=200 enableLookups=true redirectPort=8443 acceptCount=2000 debug=0 connectionTimeout=6/ Perhaps my biggest problem is the number of connections Tomcat accepts fills up rather quickly, some of the connections my tool generates are refused (presumably due to the acceptCount limit being reached, and I have increased it a couple times). Any advice would be appreciated! Jeff -- To unsubscribe, e-mail: mailto:[EMAIL
RE: Precompiling JSPs for Tomcat
Try something like: property name=build.compiler value=jikes/ path id=compile.classpath pathelement location=${java.home}/jre/lib/rt.jar/ pathelement location=${java.home}/lib/tools.jar/ pathelement location=${tomcat.lib}/jasper-compiler.jar/ pathelement location=${tomcat.lib}/jasper-runtime.jar/ pathelement location=${tomcat.common.lib}/xerces.jar/ pathelement location=${tomcat.common.lib}/servlet.jar/ ... /path !-- store the generated java classes here -- property name=generated.java.classes.dir value=/some/path / !-- generate java classes for you JSPs and mapping web.xml -- java classname=org.apache.jasper.JspC classpath=${compile.classpath} fork=true failonerror=true arg value=-d / arg value=${generated.java.classes.dir} / arg value=-webinc / arg value=/path/to/the/generated/web.xml / arg value=-webapp / arg value=/path/to/you/webapp/dir / jvmarg value=-Djava.endorsed.dirs=${tomcat.home}/bin:${tomcat.home}/common/endorse d / jvmarg value=-Djasper.home=${tomcat.home} / jvmarg value=-Xms194m / jvmarg value=-Xmx194m / /java !-- compile generated java classes and store them in their finall location -- javac srcdir=${generated.java.classes.dir} destdir=/path/to/you/webapp/dir/WEB-INF/classes optimize=off debug=on depend=on classpath=${compile.classpath} includeJavaRuntime=on/ Regards, Rossen -Original Message- From: Sean LeBlanc [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 2:18 PM To: [EMAIL PROTECTED] Subject: Precompiling JSPs for Tomcat Hi all, I'm having some issues with using Ant's jspc task (I have a thread going on the Ant mailing list), is there any way to manually call the compilation for Tomcat's build? Somehow, Tomcat must do it, so I figure there has to be a way to kluge something together that does the same thing? -- Sean LeBlanc - Nutros.com Random fortune/quote: The biggest difference between time and space is that you can't reuse time. -- Merrick Furst -- 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: Converting HOST to IP an IP to HOST
Well, so far you've asked two different questions, yet they are supposed to be the same. Your first post wanted an IP address from a name, getByName() will do that for you, assuming by name you mean fully-qualified internet domain name. Now you are saying that the IP address will actually be in the URL, in which case you don't need to look it up, so it's not clear what you are trying to do. If you need to differentiate content based on whether someone accesses a resource by IP address or name, and there are many possible IP addresses, then all you have to do is test if the value returned from getRequestURI() has an IP address in it. So rather than look for a specific IP address, all you have to do is look for ANY IP address. That will tell you if someone entered the machine name or not. If you need something to translate a Microsoft WINS name (server name) to an IP address, you'll need some sort of Java WINS library...check google...my guess is the SAMBA group has written one (http://www.samba.org) but it may not be generally available. John Turner [EMAIL PROTECTED] -Original Message- From: Jose Francisco Junior [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 2:55 PM To: Tomcat Users List Subject: Converting HOST to IP an IP to HOST All right, but it does not solve my problem. I did a local web system that can be accessed both by IP or HOST. Depending on the way the user accessed( by HOST or IP ) the application I must display different contents. I could do this: if( request.getRequestURL().toString().equals(192.168.20.10) ) out.print(show IP content); else ou.print(show HOST content); But the web server has many network devices and the user can accesss the system from many other IP and HOSTs. The InetAddress.getByName() does not work with the machine network name only with inet hosts. Does anybody has any idea ??? Thanks in advice, Junior On Fri, 9 Aug 2002 13:50:59 -0400 Turner, John [EMAIL PROTECTED] wrote: Come on...RTFM: java.net.InetAddress.getByName(); Sheesh. John Turner [EMAIL PROTECTED] -Original Message- From: Jose Francisco Junior [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 1:44 PM To: Tomcat Users List Subject: Re: Configuration for High TPS Please, I know it is a bit off-topic but I am trying to get a IP address from an URL like this: new URL(http://java.sun.com;); //this is the URL How can I get the IP address from this URL? Any idea ?? Thanks in advance, Junior Don't E-Mail, ZipMail! http://www.zipmail.com/ -- 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] - Prefiro as lágrimas da derrota do que a vergonha de não ter lutado... Willan Brook - Don't E-Mail, ZipMail! http://www.zipmail.com/ -- 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: Is it possible to include via a directive snippets into the server.xml file
actually, I don't believe that the name of the xml file has to be the context name, but don't quote me on that. The important information is the context information within the XML file. From my understanding, you just have to use Context / as your root element, and you can add any sub elements necessary. - Andrew -Original Message- From: Horn, Rob [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 10:12 AM To: 'Tomcat Users List' Subject: RE: Is it possible to include via a directive snippets into the server.xml file Thanks Andrew, is there a naming convention that must be followed or do you know where I can get further info on this. Cheers Rob -Original Message- From: Andrew [mailto:[EMAIL PROTECTED]] Sent: 09 August 2002 14:12 To: 'Tomcat Users List' Subject: RE: Is it possible to include via a directive snippets into the server.xml file in Tomcat 4.1.x you can put XML files containing context information into your webapps directory and TC adds them as contexts. this is how the admin and manager apps are added. - Andrew -Original Message- From: Horn, Rob [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 5:19 AM To: '[EMAIL PROTECTED]' Subject: Is it possible to include via a directive snippets into the server.xml file Within our project we have an overlap of responsibility between the infrastructure team who are responsible for building the application servers and the development team who are responsible for delivering an application ready for deployment. The overlap centres on server.xml The infrastructure guys need to put host specific information into server.xml The development guys are dependent on a context definition and resources defined within it. My question is therefore ... is it possible to include a snippet for the context that the development team can maintain into the infrastructure maintain server.xml file. Cheers Rob Horn -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: using INCLUDE with crossContext
The include directive is relative to the webapp. This is as specified in the JSP Spec. From my understanding, you can use the jsp:include / to retrieve files from other contexts. - Andrew -Original Message- From: Christian J. Dechery [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 9:23 AM To: [EMAIL PROTECTED] Subject: using INCLUDE with crossContext I'm trying to use the crossContext feature to include a file that is in a context (that I call /global/) in other contexts... /global is is configured in server.xml with crossContext=true, but when I do %@include file=/global/includes/file.jsp% it gives me an error message with file not found... what is wrong? .:| Christian J. Dechery .:| FINEP - Depto. de Sistemas .:| [EMAIL PROTECTED] .:| (21) 2555-0332 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Accessing Mapped Drives
XP Pro, but I can put 2000 server on it. | -Original Message- | From: David Kavanagh [mailto:[EMAIL PROTECTED]] | Sent: Friday, August 09, 2002 7:34 AM | To: Tomcat Users List | Subject: Re: Accessing Mapped Drives | | I saw this problem with a java2 applet running with the plugin The file | dialog could not see mapped drives. I only saw it on Win 98. Windows | 2000 worked fine. What OS are you running? | | David | | Jacob Hookom wrote: | | What permissions do I need to setup for Tomcat to be able to access | shared network drives on win2k? I'm able to access shares through an | IDE of course, but Tomcat returns null for all io calls to these mapped | drives. | | If anyone has accomplished this or can point me in the right direction, | I would be much obliged :-) | | Regards, | Jacob Hookom | Comprehensive Computer Science | University of Wisconsin, Eau Claire | | | | --- | Outgoing mail is certified Virus Free. | Checked by AVG anti-virus system (http://www.grisoft.com). | Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002 | | | | -- | To unsubscribe, e-mail: mailto:tomcat-user- | [EMAIL PROTECTED] | For additional commands, e-mail: mailto:tomcat-user- | [EMAIL PROTECTED] | | | | | -- | To unsubscribe, e-mail: mailto:tomcat-user- | [EMAIL PROTECTED] | For additional commands, e-mail: mailto:tomcat-user- | [EMAIL PROTECTED] | | --- | Incoming mail is certified Virus Free. | Checked by AVG anti-virus system (http://www.grisoft.com). | Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002 | --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
tomcat + apache
hola estoy intentando , en mi linux suse 8, hacer andar el tomcat con el apache, es decir que el puerto 80 tambien responda a las peticones jsp y no lo consigo. para ver las jsp tengo que poenr 8080. bien el el httpd.conf de apache tengo: LoadModule webapp_module /usr/lib/apache/mod_webapp.so WebAppConnection tomcat warp localhost:8008 WebAppDeploy examples tomcat /examples WebAppInfo /webapp-info # The following line prohibits users from directly accessing WEB-INF Location /examples/WEB-INF/ AllowOverride None deny from all /Location el documentoRoot de apache esta en /usr/local/httpd/htdocs. Como puedo hacer andar en el puerto 80 unas paginas jsp que estan el: /usr/local/httpd/htdocs/admin ? el documento root de tomcat esta en /opt/jakarta/webapps/ROOT Me podeis ayudar con esto? llevo dos semanas con ello y no consigo tirar adelante. Me imagino que hay que hacer varias cosas: 1.- editar el httpd.conf de apache y añadir un conector con un puerto 2.- editar el server.xml y añadir un contexcto pero por mas que hago pruebas no consigo ver el admin. Me podeis ayudar? muchas gracias -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Is it possible to include via a directive snippets into theserver.xml file
On Fri, 9 Aug 2002, Andrew wrote: Date: Fri, 9 Aug 2002 15:26:33 -0400 From: Andrew [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: Is it possible to include via a directive snippets into the server.xml file actually, I don't believe that the name of the xml file has to be the context name, but don't quote me on that. You're correct -- the actual context path name is set from the path attribute of the Context element. But following the convention certainly reduces the potential for confusion. The important information is the context information within the XML file. From my understanding, you just have to use Context / as your root element, and you can add any sub elements necessary. Yep. - Andrew Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Converting HOST to IP an IP to HOST
The case is that I whould not like to do somithing like this: if( http://machineName1:8080.equals( request.getRequestURL() )|| http://www.my_system_url:8080.equals( request.getRequestURL() ) || http://200.2001.148.10:8080.equals( request.getRequestURL() ) ) showContent1(); else if( http://machineName2:8080.equals( request.getRequestURL() )|| http://www.my_system_url_2:8080.equals( request.getRequestURL() ) || http://200.2001.148.11:8080.equals( request.getRequestURL() ) ) showContent2(); ...and so on... I whould like to do some like this: if( 200.2001.148.10.equals( request.getRequestURL().toIPAddress() ) showContent1(); else if( 200.2001.148.11.equals( request.getRequestURL()toIPAddress() ) showContent2(); ...and so on... PS:toIPAddress() is what I am looking for ! Note that in the first case the user can access the system in tree different forms. but forget about it, it is just a whim... best regards, Junior On Fri, 9 Aug 2002 15:21:52 -0400 Turner, John [EMAIL PROTECTED] wrote: Well, so far you've asked two different questions, yet they are supposed to be the same. Your first post wanted an IP address from a name, getByName() will do that for you, assuming by name you mean fully-qualified internet domain name. Now you are saying that the IP address will actually be in the URL, in which case you don't need to look it up, so it's not clear what you are trying to do. If you need to differentiate content based on whether someone accesses a resource by IP address or name, and there are many possible IP addresses, then all you have to do is test if the value returned from getRequestURI() has an IP address in it. So rather than look for a specific IP address, all you have to do is look for ANY IP address. That will tell you if someone entered the machine name or not. If you need something to translate a Microsoft WINS name (server name) to an IP address, you'll need some sort of Java WINS library...check google...my guess is the SAMBA group has written one (http://www.samba.org) but it may not be generally available. John Turner [EMAIL PROTECTED] -Original Message- From: Jose Francisco Junior [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 2:55 PM To: Tomcat Users List Subject: Converting HOST to IP an IP to HOST All right, but it does not solve my problem. I did a local web system that can be accessed both by IP or HOST. Depending on the way the user accessed( by HOST or IP ) the application I must display different contents. I could do this: if( request.getRequestURL().toString().equals(192.168.20.10) ) out.print(show IP content); else ou.print(show HOST content); But the web server has many network devices and the user can accesss the system from many other IP and HOSTs. The InetAddress.getByName() does not work with the machine network name only with inet hosts. Does anybody has any idea ??? Thanks in advice, Junior On Fri, 9 Aug 2002 13:50:59 -0400 Turner, John [EMAIL PROTECTED] wrote: Come on...RTFM: java.net.InetAddress.getByName(); Sheesh. John Turner [EMAIL PROTECTED] -Original Message- From: Jose Francisco Junior [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 1:44 PM To: Tomcat Users List Subject: Re: Configuration for High TPS Please, I know it is a bit off-topic but I am trying to get a IP address from an URL like this: new URL(http://java.sun.com;); //this is the URL How can I get the IP address from this URL? Any idea ?? Thanks in advance, Junior Don't E-Mail, ZipMail! http://www.zipmail.com/ -- 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] - Prefiro as lágrimas da derrota do que a vergonha de não ter lutado... Willan Brook - Don't E-Mail, ZipMail! http://www.zipmail.com/ -- 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] - Prefiro as lágrimas da derrota do que a vergonha de não ter lutado... Willan Brook - Don't E-Mail, ZipMail! http://www.zipmail.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat, JAXB and SecurityManager
We have had a problem with JAXB under Tomcat 4.0.3, as it couldn't find the jaxb-rt.jar in the WEB-INF/lib folder. We also put it in the %catalina_home%/common/lib, and it still couldn't find it. We then put the jar in the %java_home%/jre/lib/ext and then it worked. We then upgraded to Tomcat 4.0.4 and the problem went away. So if your getting a 'ClassNotFound' exception this may help. PaulE -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 7:09 AM To: Tomcat Users List Subject: RE: Tomcat, JAXB and SecurityManager Bonjour! ;) If i launch it from a servlet, i failed. Can you please provide more details? The stack trace would be helpful. Any suspicious or error messages in the tomcat logs? One more point, if the same code is run under Tomcat 4.0.1, it work !!! Then I would look at the release notes for 4.0.3 to see what changes were made to the security manager between 4.0.1 and 4.0.3 ;) Cédric (very despited for two days). What does very despited mean? Yoav Shapira Millennium ChemInformatics -- 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]
JDBC Realm - Can't start TC4.0.4 !!
I am trying to configure JDBCRealm. I can't understand the error, since the same username and password was successfully used to access the database using servlet-jdbc in my webapp, without configuring JDBCrealm. Can anyone please advise? Thanks, skhuzema I have edited server.xml realm as under: Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=org.gjt.mm.mysql.Driver connectionURL=jdbc:mysql://myql.wpi.edu/dbaseName?user=skhuzema;dbpasswd=dbpasswd userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name / -- Names of columns same as above in database (I have installed tomcat on mapped drive on windowsNT) Error Message on tomcat startup: Starting service Tomcat-Standalone Apache Tomcat/4.0.4 Catalina.start: LifecycleException: Exception opening database connection: java.sql.SQLException: Invalid authorization specification: Access denied for user: 'skhuzema;[EMAIL PROTECTED]' (Using password: NO) LifecycleException: Exception opening database connection: java.sql.SQLException: Invalid authorization specification: Access denied for user: 'skhuzema;[EMAIL PROTECTED]' (Using password: NO) at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:615) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343 ) at org.apache.catalina.core.StandardService.start(StandardService.java:3 88) at org.apache.catalina.core.StandardServer.start(StandardServer.java:506 ) at org.apache.catalina.startup.Catalina.start(Catalina.java:781) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) - Root Cause - java.sql.SQLException: Invalid authorization specification: Access denied for user: 'skhuzema;[EMAIL PROTECTED]' (Using password: NO) at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:278) at org.gjt.mm.mysql.Connection.init(Connection.java:230) at org.gjt.mm.mysql.Driver.connect(Driver.java:126) at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:548) at org.apache.catalina.realm.JDBCRealm.start(JDBCRealm.java:613) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1108) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343 ) at org.apache.catalina.core.StandardService.start(StandardService.java:3 88) at org.apache.catalina.core.StandardServer.start(StandardServer.java:506 ) at org.apache.catalina.startup.Catalina.start(Catalina.java:781) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat4 : specific settings for Context
Hello list, I would like to setup some specific settings per Tomcat Context. Debian flavour for Tomcat automatically detects all apps deployed in CATALINA_HOME/webapps and sets up all needed settings : there is no Context entry in server.xml for the different applications. Now I woul like to setup the reloadable attribute for a specific application in Tomcat : how should I do, since I can not find anything related to my application Context in Tomcat config files... I hope this was clear enough :-) Regards, -- Dominique Deleris http://potatoworld.tuxfamily.org -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
JSSE/mod_ssl or wrong mailing list
I posted this a couple of days ago and so far I have had no response so am I asking a wrong question in the wrong mailing list does anyone know of a better place where my tomcat ssl encryption questions can be asked? I had been following the recent disscusion of login + ssl which has been very useful info for me. Also does anyone know which is better to use the mod_ssl or JSSE ORIGINAL MESSAGE HI I have just followed the Tomcat SSL HOWTO and I am able to get my https://localhost:443/ page. I then right-click on my mouse to get up the page properties; Protocol:Hyper Text Transfer With Privacy Type: HTML Document Connection:Not Encrypted Address(URL):https://localhost:443/index.html Size: 2572 bytes but it says the page is not encrypted why does this happen? should it not state some sought of encryption like 128 bit? I also tried the Apache + mod_ssl HOWTO and I do get an encrypted connection which says the following; Connection:TLS 1.0, RC4 with 128 bit encryption (High); RSA with 1024 bit exchange I have apache 1.3.26 (Linux box) + mod_jk + Tomcat 4.04 (Windows box) The Tomcat server in my environment handles login forms processes them and then puts the user to their homepage. I wish to encrypt this login process. I don't think I need to use apache +mod_ssl to do any connection encryption because the login form is sent to the Tomcat server. I cannot figure out what I am missing? Can anyone help please? Thanxs in Advance -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
500 error on all JSP pages
Hello all. I'm new to the list. I'm getting a 500 error on any JSP I try to run. If I run the servlet examples though, they seem to work fine. I realize that this is like the most common error and I know it's just a config issue, but darn if I can find it. Any help would be very appreciated (bowing down in complete reverence is probable). FYI: This is a fresh install of Apache 1.3.26 and Tomcat 3.3.1 on Windows NT. Thanks, Kenny -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
FW: Re[2]: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue
Ignacio, I was able to create a reproducible test case for you. It turns out this seems to be an Apache 2.0.39 issue only... Anyway, attached are two HTML files (copies of the Jakarta developer's guide). The first copy (Apache2TestShort.htm) is roughly 7k in size and displays without a problem. The second copy (Apache2TestLong.htm) is roughly 24k in size and doesn't display correctly. It gets cut off at 8192 bytes. I can reproduce this on my laptop (W2K Pro, P3) in both IE 5.5 and Navigator 4.75. On my tower (W2K Server, P4), I can reproduce on Navigator 4.79 only and it works in IE 5.5. Dave -Original Message- From: Short, Dave Sent: July 24, 2002 3:28 PM To: 'Tomcat Users List' Subject: RE: Re[2]: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue Ignacio, I can't provide a test case because my servlet is calling a component from an application server. The HTML is actually built in the component, within the application server, and returned to the servlet, web server and ultimately to the browser. Basically, some of the HTML pages are around 30-50k in size. Dave -Original Message- From: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]] Sent: July 24, 2002 1:34 PM To: 'Tomcat Users List' Subject: RE: Re[2]: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue I'm little out if this thread, could anyone give detaails about the test case, maybe attaching it to an ad hoc bug in bugzilla, thanks I'll take a look on this, if i can reproduce it.. Saludos , Ignacio J. Ortega -Mensaje original- De: Short, Dave [mailto:[EMAIL PROTECTED]] Enviado el: 24 de julio de 2002 21:21 Para: 'Tomcat Users List' Asunto: RE: Re[2]: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue Perhaps one of the mod_jk2 developers could comment? -Original Message- From: Jacob Kjome [mailto:[EMAIL PROTECTED]] Sent: July 24, 2002 12:15 PM To: Tomcat Users List Subject: Re[2]: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue Hello Dave, Yeah, I've noticed the same thing with Mozilla (latest nightly build). It think mod_jk2 is doing something wrong with the http headers. IE tends to be really lax in enforcing various specs which is why you always hear complaints saying but it works in IE thinking it is Netscape's fault for not doing it right when, in fact, Netscape is doing things propery and IE is just ignoring bad syntax. Either way, something is not quite right with mod_jk2 and http1.1 Jake Wednesday, July 24, 2002, 12:11:59 PM, you wrote: SD I'm using mod_jk2... SD It seems to work somewhat consistently on IE 5.5 and VERY inconsistently on SD Netscape 4.7x on my W2K professional laptop. It works fine with IE 5.5 on SD my W2K server tower, but not with Navigator 4.7x. Strange. SD -Original Message- SD From: Chris McCabe [mailto:[EMAIL PROTECTED]] SD Sent: July 24, 2002 10:06 AM SD To: Tomcat Users List SD Subject: Re: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue SD I ran into the same problem, and it appears to be related to the SD mod_webapp module. I switched to using mod_jk and it now works. I SD could not find any clues to what was causing the problem (exceptions, SD etc.) and searching the web only turned up others having the same SD problem with no solution. SD Chris SD Short, Dave wrote: There is an issue with Apache 2.0.39 and Tomcat 4.1.8 (actually this issue first appeared with Apache 2.0.36 and Tomcat 4.0.x). It seems, if a SD servlet returns content (dynamically built HTML for instance) which exceeds 8192 in length, the content is truncated at 8192 and a blank page is rendered by Apache. Actually, Apache renders what was returned by Tomcat (8192 bytes SD of the dynamically generated HTML page). Basically, an incomplete HTML page - hence it is displayed as blank. -- To unsubscribe, e-mail: SD mailto:[EMAIL PROTECTED] For additional commands, e-mail: SD mailto:[EMAIL PROTECTED] -- Best regards, Jacobmailto:[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] Apache2Test.zip Description: Binary data -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
ant task to query if a particular app is running?
Hi, I'm wondering if it is possible to use one of the catalina ant manager tasks to query for the existence of a single running application. The closest thing to it that I can find is the List task. However, that just returns a string list of all running apps. What I would like to do is be able to make my install target check whether an app is already loaded. If so, instead of just saying already installed and ending the build, it would run the reload target. This would save timeor is it possible to catch some error condition from the install target and conditionally run the reload target if the install target returns that error condition? If so, how is that done? Note: I'm sending this mostly Ant question to the Tomcat-user list only because people like Craig know more about the manager app and the catalina tasks than the Ant people do. thanks, Jake -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: tomcat + apache
Buenos Tardes, Carlo, this is Estebban Burrus, and I was just wondering if u could possibly put your submission in English, as I would love to help you, but don't speak Spanish!! Gracias. * Carlos wrote: hola estoy intentando , en mi linux suse 8, hacer andar el tomcat con el apache, es decir que el puerto 80 tambien responda a las peticones jsp y no lo consigo. para ver las jsp tengo que poenr 8080. bien el el httpd.conf de apache tengo: LoadModule webapp_module /usr/lib/apache/mod_webapp.so WebAppConnection tomcat warp localhost:8008 WebAppDeploy examples tomcat /examples WebAppInfo /webapp-info # The following line prohibits users from directly accessing WEB-INF Location /examples/WEB-INF/ AllowOverride None deny from all /Location el documentoRoot de apache esta en /usr/local/httpd/htdocs. Como puedo hacer andar en el puerto 80 unas paginas jsp que estan el: /usr/local/httpd/htdocs/admin ? el documento root de tomcat esta en /opt/jakarta/webapps/ROOT Me podeis ayudar con esto? llevo dos semanas con ello y no consigo tirar adelante. Me imagino que hay que hacer varias cosas: 1.- editar el httpd.conf de apache y añadir un conector con un puerto 2.- editar el server.xml y añadir un contexcto pero por mas que hago pruebas no consigo ver el admin. Me podeis ayudar? muchas gracias -- 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: 500 error on all JSP pages
Hello all. I'm new to the list. I'm getting a 500 error on any JSP I try to run. If I run the servlet examples though, they seem to work fine. This is the same issue I have been working on all day. I finally got it to work about an hour ago. (FYI: I am running fresh install of Apache 1.3.22 and Tomcat 3.3.1 on Windows 2000 Pro. Apache is running as a service and using mod_jk to support Tomcat.) You are 80% home based on your description. Questions: - Does your jsp work if you throw it into the examples\jsp folder? If it runs in one folder but not another, make sure you have your directory layout formatted according this deployment guide: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/deployment.html. - What does the Apache error log say? - What is your Apache-Tomcat glue (mod_jk, etc)?
Problems with url-pattern*
Hi there! New to the list. And to java and tomcat, so please be nice. I have a problem with a servlet mapping. If i use a url-pattern like url-pattern/Hello/url-pattern on a servlet mapping pointing to a particular servlet, the servlet get's the request and i can use request.getServletPath() to get the URI. But if I use something like url-pattern/*/url-pattern or url-pattern*/url-pattern, and it seems that anyghing with an *, the servlet get's called, BUT request.getServletPath() is empty! What I want is to actually direct all requests to my webapp to a particular servlet to validate priviledges (is this the best way to ensure that noone without permission accesses any page?) Thanks in advance for the help! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problems with url-pattern*
define a servlet mapping of just /. this is the default servlet mapping. To get the servlet name use request.getPathInfo(). This will return the info after the slash. From: Alexander Wallace [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Problems with url-pattern* Date: 09 Aug 2002 16:46:07 +0100 Hi there! New to the list. And to java and tomcat, so please be nice. I have a problem with a servlet mapping. If i use a url-pattern like url-pattern/Hello/url-pattern on a servlet mapping pointing to a particular servlet, the servlet get's the request and i can use request.getServletPath() to get the URI. But if I use something like url-pattern/*/url-pattern or url-pattern*/url-pattern, and it seems that anyghing with an *, the servlet get's called, BUT request.getServletPath() is empty! What I want is to actually direct all requests to my webapp to a particular servlet to validate priviledges (is this the best way to ensure that noone without permission accesses any page?) Thanks in advance for the help! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --- Todd Kaplinger mailTo:[EMAIL PROTECTED] _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
NetBeans + Tomcat 4.0.4
Does anyone here use NetBeans with tomcat 404? I'm using it, and use a small class to start tomcat from netbeans (instead of using the internal one that's 3.2), it works great when I want to debug servlets. But no JSP works, they all give error 500, even the ones in /exaples. But if i start it manually (i can't debug then, or is there a way?) the jsps work fine. The root couse starts with: java.lang.NoSuchMethodError: javax.servlet.ServletResponse.resetBuffer() Any clues? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: NetBeans + Tomcat 4.0.4
Look here: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg30523.html Instructions on how to set up tomcat and netbeans with the JPDA debugger. Larry [EMAIL PROTECTED] 08/09/02 15:59 PM Does anyone here use NetBeans with tomcat 404? I'm using it, and use a small class to start tomcat from netbeans (instead of using the internal one that's 3.2), it works great when I want to debug servlets. But no JSP works, they all give error 500, even the ones in /exaples. But if i start it manually (i can't debug then, or is there a way?) the jsps work fine. The root couse starts with: java.lang.NoSuchMethodError: javax.servlet.ServletResponse.resetBuffer() Any clues? -- 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]
Servlet not working
I typed in my first example servlet today cannot seem to get it working. I made sure all the following were done: 1) Classpath is set CATALINA_HOME=$CATALINA_HOME:/usr/java/jakarta-tomcat-4.0.4 JAVA_HOME=/usr/java/j2sdk1.4.0 PATH=$PATH:$HOME/bin:/usr/java/j2sdk1.4.0/bin CLASSPATH=$CLASSPATH:/home/lfindle/java:/usr/java/jakarta-tomcat-4.0.4/commo n/lib/servlet.jar:. export CATALINA_HOME export JAVA_HOME export PATH export CLASSPATH 2) Put the servlet in /usr/java/usr/java/jakarta-tomcat-4.0.4/webapps/begjsp-ch01/WEB-INF/classes/ ExampleServlet.java Compiled it from there. Shutdown restarted Tomcat. I went to http://localhost:8080/begjsp-ch01/servlet/ExampleServlet get 404 Error message. Does anyone have any suggestions? Thanks. import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class ExampleServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out; String title = Servlet Example; response.setContentType(text/html); out = response.getWriter(); out.println(htmlheadtitle); out.println(title); out.println(/title/headbody); out.println(h1This is an example servlet./h1); out.println(/body/html); out.close(); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ doGet(request, response); } } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
jsp:forward
The saga continues. Downloaded Tomcat 4.0.4. Couldn't get it to work even with the examples. Desperate. Downloaded Tomcat 4.1.8. Worked with the forward (jsp/forward/forward.jsp)... a little hope. Moved my application over... after a little tinkering with the code, it worked. The interface with Forte is just a little funky as I can't compile directly from Forte. But I can run from Forte and the logs display properly, so it looks like I am finally able to proceed. Still the question remains: why wouldn't Tomcat 4.0.1 (the version in the Forte download work with the jsp:forward ... / tag construct. Thanks, Carl Kabbe -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Servlet not working
The code looks alright... Do the example servlets work? Try putting the .class file in with the examples and try using it that way. .class file: Tomcat/webapps/examples/WEB-INF/classes URL: http://localhost:8080/examples/servlet/ExampleServlet (or HelloWorld just to make sure it works). Hope that helps! Jeff -Original Message- From: Laura Findley [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 3:08 PM To: Tomcat Users List Subject: Servlet not working I typed in my first example servlet today cannot seem to get it working. I made sure all the following were done: 1) Classpath is set CATALINA_HOME=$CATALINA_HOME:/usr/java/jakarta-tomcat-4.0.4 JAVA_HOME=/usr/java/j2sdk1.4.0 PATH=$PATH:$HOME/bin:/usr/java/j2sdk1.4.0/bin CLASSPATH=$CLASSPATH:/home/lfindle/java:/usr/java/jakarta-tomcat-4.0.4/commo n/lib/servlet.jar:. export CATALINA_HOME export JAVA_HOME export PATH export CLASSPATH 2) Put the servlet in /usr/java/usr/java/jakarta-tomcat-4.0.4/webapps/begjsp-ch01/WEB-INF/classes/ ExampleServlet.java Compiled it from there. Shutdown restarted Tomcat. I went to http://localhost:8080/begjsp-ch01/servlet/ExampleServlet get 404 Error message. Does anyone have any suggestions? Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Servlet to JDBC connection
I don't know for sure, but in my experience the jdbc urls typically don't have the path on the disk referenced. Rather they usually have the database name listed, or no name (ie default database). So I'd check your docs for interbase and make sure that your url following the slash after the port is correct. Also, if your database is running on the same machine as the web server then consider using the loopback address instead of the the real ip address of the server. Sometimes that'll be more efficient. --mikej -=- mike jackson [EMAIL PROTECTED] -Original Message- From: Peter O [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 10:07 AM To: Tomcat Users List Subject: Servlet to JDBC connection What's wrong with this string? I can't get this string to connect to the database, I'm trying to connect on a RH 7.2 system. protected String dbURL = jdbc:interbase://66.18.29.95:8089/opt/jakarta-tomcat-4.0.4/webapp s/ROOT/database/MAIN.GDB; The servlet dir is working, there's no error message. -Paul -- 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: NetBeans + Tomcat 4.0.4
Thanks! I'll check it out. On Fri, 2002-08-09 at 23:01, Larry Meadors wrote: Look here: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg30523.html Instructions on how to set up tomcat and netbeans with the JPDA debugger. Larry [EMAIL PROTECTED] 08/09/02 15:59 PM Does anyone here use NetBeans with tomcat 404? I'm using it, and use a small class to start tomcat from netbeans (instead of using the internal one that's 3.2), it works great when I want to debug servlets. But no JSP works, they all give error 500, even the ones in /exaples. But if i start it manually (i can't debug then, or is there a way?) the jsps work fine. The root couse starts with: java.lang.NoSuchMethodError: javax.servlet.ServletResponse.resetBuffer() Any clues? -- 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]
upgrading from v.3.1.1 to v.3.3 ?
What's involved w/ an upgrade of Tomcat from 3.1.1 to 3.3? Is this a fairly straight forward task, or is it quite involved? We're experiencing some odd behaviour from 3.1.1, and can't help but wonder if it's got something to do w/ the old version. Unfortunately, we're in the middle of a crunch deadline, so if it's as simple as say, swapping out a jar file or something, that would be great. Thoughts, or can someone point me to a FAQ on upgrading like this? Thanks, Paul Tomsic __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Tomcat4 : specific settings for Context
On 9 Aug 2002, Dominique Deleris wrote: Date: 09 Aug 2002 23:00:58 +0200 From: Dominique Deleris [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: tomcat-user-list [EMAIL PROTECTED] Subject: Tomcat4 : specific settings for Context Hello list, I would like to setup some specific settings per Tomcat Context. Debian flavour for Tomcat automatically detects all apps deployed in CATALINA_HOME/webapps and sets up all needed settings : there is no Context entry in server.xml for the different applications. Now I woul like to setup the reloadable attribute for a specific application in Tomcat : how should I do, since I can not find anything related to my application Context in Tomcat config files... For any version of Tomcat, you can put your own Context entry into server.xml, even if the application is in webapps -- the standard Tomcat distribution does this for the /examples webapp. For Tomcat 4.1, you can also locate the Context element in a separate file, and customize it as needed. If you put this context configuration file, instead of the directory or WAR, into webapps it will still get auto-deployed. I hope this was clear enough :-) Regards, -- Dominique Deleris http://potatoworld.tuxfamily.org Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: ant task to query if a particular app is running?
On Fri, 9 Aug 2002, Jacob Kjome wrote: Date: Fri, 9 Aug 2002 16:21:18 -0500 From: Jacob Kjome [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED], Jacob Kjome [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: ant task to query if a particular app is running? Hi, I'm wondering if it is possible to use one of the catalina ant manager tasks to query for the existence of a single running application. The closest thing to it that I can find is the List task. However, that just returns a string list of all running apps. You could always parse the output of task, or use grep to look for the line with the right context path ... What I would like to do is be able to make my install target check whether an app is already loaded. If so, instead of just saying already installed and ending the build, it would run the reload target. This would save timeor is it possible to catch some error condition from the install target and conditionally run the reload target if the install target returns that error condition? If so, how is that done? Such a facility doesn't exist yet, but would make a nice enhancement. To make such a request, the bug tracking system is a good bet: http://nagoya.apache.org/bugzilla/ Note: I'm sending this mostly Ant question to the Tomcat-user list only because people like Craig know more about the manager app and the catalina tasks than the Ant people do. Although it's an Ant-sounding question, the Ant tasks we are talking about are actually part of Tomcat (nobody on ANT-USER would probably have any idea what you're talking about), so this is the right place. Ant lets you plug in your own custom tasks, and we took advantage of that capability here. thanks, Jake Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problems with url-pattern*
On 9 Aug 2002, Alexander Wallace wrote: Date: 09 Aug 2002 16:46:07 +0100 From: Alexander Wallace [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Problems with url-pattern* Hi there! New to the list. And to java and tomcat, so please be nice. I have a problem with a servlet mapping. If i use a url-pattern like url-pattern/Hello/url-pattern on a servlet mapping pointing to a particular servlet, the servlet get's the request and i can use request.getServletPath() to get the URI. But if I use something like url-pattern/*/url-pattern or url-pattern*/url-pattern, and it seems that anyghing with an *, the servlet get's called, BUT request.getServletPath() is empty! If you use a /* mapping, you won't see anything in getServletPath(), but check out getPathInfo() -- that's defined to give you everything in the request URI after the part that matched my servlet. Because the part that matched your servlet in this case is a zero-length string, you'll see all the stuff you want. What I want is to actually direct all requests to my webapp to a particular servlet to validate priviledges (is this the best way to ensure that noone without permission accesses any page?) You will soon find out that a servlet mapping is not what you want here. Consider the case of a JSP page. The *.jsp pattern is mapped to the JSP servlet, but a /* mapping intercepts those requests, and there's no way to get from here to there. Your answer would be to use a Filter instead of a Servlet (requires a servlet 2.3 container like Tomcat 4 or later). You can map a Filter to one or more URL patterns without interfering with which Servlet is ultimately responsible for processing the request. A Filter can do things like inspect the request (or the appropriate session) and do things like redirect if the user is not logged on (by doing a RequestDispatcher.forwrd()) or passing the request through in the normal case. Thanks in advance for the help! Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Problems with url-pattern*
On Fri, 9 Aug 2002, Todd Kaplinger wrote: Date: Fri, 09 Aug 2002 17:43:36 -0400 From: Todd Kaplinger [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED], [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Problems with url-pattern* define a servlet mapping of just /. this is the default servlet mapping. That's still not going to work for what the proposed use case was -- because you've just disabled the default file-serving servlet that serves static content. Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Changing Servlet directories
How can I change the default servlet directory? Thanks, Peter -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Servlet not working
On Friday 09 August 2002 06:08 pm, Laura Findley wrote: I typed in my first example servlet today cannot seem to get it working. I made sure all the following were done: 1) Classpath is set CATALINA_HOME=$CATALINA_HOME:/usr/java/jakarta-tomcat-4.0.4 JAVA_HOME=/usr/java/j2sdk1.4.0 PATH=$PATH:$HOME/bin:/usr/java/j2sdk1.4.0/bin CLASSPATH=$CLASSPATH:/home/lfindle/java:/usr/java/jakarta-tomcat-4.0.4/comm o n/lib/servlet.jar:. export CATALINA_HOME export JAVA_HOME export PATH export CLASSPATH 2) Put the servlet in /usr/java/usr/java/jakarta-tomcat-4.0.4/webapps/begjsp-ch01/WEB-INF/classes ^^^ is this a typo? also check catalina.out, the log for your host and the log for your context in $CATALINA_HOME/logs / ExampleServlet.java Compiled it from there. Shutdown restarted Tomcat. I went to http://localhost:8080/begjsp-ch01/servlet/ExampleServlet get 404 Error message. Does anyone have any suggestions? Thanks. Paul -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
help with data insertion on postgresql on tomcat4/apache2
Greetings, I am using tomcat4.04 on SuSE8/postgresql7.2.1 with source compiled jdbc driver. I am able to do SELECTS and other queries on database tables (with jsp and servlets) but unable to do data UPDATES and INSERTS.. . Help would be appreciated. regards sibu -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Command line jspc throws NPE for page using JSTL
(Alrighty, this is actually attempt number 3 to get this note posted. Gotta get more caffeine to the gerbils powering the email server...) When I try to use jspc from the command line to compile a JSP page that uses JSTL (1.0.1), I get a NullPointerException. Here's the setup (apologies if my email client hoses long lines): JAVA_HOME=C:\jdk1.3 CATALINA_HOME=D:\jakarta-tomcat-4.1.8 JASPER_HOME=D:\jakarta-tomcat-4.1.8 Here's how jspc gets invoked and the resulting error: D:\jakarta-tomcat-4.1.8\webapps\jspcTest%JASPER_HOME%\bin\jspc -v4 -d WEB-INF\src\jspc -webinc WEB-INF\jspc-web.xml -uriroot . -webapp . 2002-08-09 09:07:44 - ERROR-the file '\index.jsp' generated the following general exception: java.lang.NullPointerException error:null Here's index.jsp: %@ page language=java % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % html headtitleJSPC Test/title/head bodyh1Welcome to the JSPC test page/h1/body /html Here's 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/dtd/web-app_2_3.dtd; web-app welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list /web-app The only other components of the app are the JAR files for JSTL that are installed in WEB-INF\lib. Everything works fine running as an app under 4.1.8. Any ideas about what's going on? Also, does the v flag really do anything? I can't seem to get any verbose output no matter what it's set to. Thanks for any help. -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Error Using JSTL1.0.1
Hi, I'm using jdk1.3.1_04, tomcat 4.0.4 on Linux 7.3 and I have link up apache and tomcat using mod_jk2. After I upgrade jstl from 1.0 to 1.0.1, I sometimes (not every time, happen mainly after I update jsp files, clear cache and restart tomcat) get the below error while trying to browse a jsp page. I click on a link from a main page and the link is like this http://mydomain/application/ (by default it will search for index.jsp) and the browser address bar will return somthing like below http://mydomain/application;jsessionid=42735B0A5AABE2DC6DA7212272E3CC3E with a Page not found error. but things will back to normal after I restart tomcat and clear cache again. Sometimes, I can just go back to the main page, refresh my browser and things will back to normal too without restarting tomcat. I can't figure out what is the cause as it is not happenning all the time. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: help with data insertion on postgresql on tomcat4/apache2
On Friday 09 August 2002 10:59 pm, sibusiso xolo wrote: Greetings, I am using tomcat4.04 on SuSE8/postgresql7.2.1 with source compiled jdbc driver. I am able to do SELECTS and other queries on database tables (with jsp and servlets) but unable to do data UPDATES and INSERTS.. . Help would be appreciated. regards sibu Error messages, please. Paul -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Command line jspc throws NPE for page using JSTL
I mucked around with the Jasper source a bit to get some exception info dumped: java.net.MalformedURLException: Path 'WEB-INF/lib/standard.jar' does not start with '/' at org.apache.jasper.servlet.JspCServletContext.getResource(JspCServletContext.java:278) at org.apache.jasper.JspCompilationContext.getResource(JspCompilationContext.java:235) at org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:196) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354) at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:790) at org.apache.jasper.compiler.Parser.parse(Parser.java:122) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:229) at org.apache.jasper.JspC.processFile(JspC.java:553) at org.apache.jasper.JspC.execute(JspC.java:778) at RunJspC.main(RunJspC.java:9) java.lang.NullPointerException at org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:215) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354) at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:790) at org.apache.jasper.compiler.Parser.parse(Parser.java:122) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:229) at org.apache.jasper.JspC.processFile(JspC.java:553) at org.apache.jasper.JspC.execute(JspC.java:778) at RunJspC.main(RunJspC.java:9) org.apache.jasper.JasperException 2002-08-09 10:55:36 - ERROR-the file '\index.jsp' generated the following general exception: java.lang.NullPointerException at org.apache.jasper.JspC.processFile(JspC.java:574) at org.apache.jasper.JspC.execute(JspC.java:778) at RunJspC.main(RunJspC.java:9) My RunJspC class just does this: public static void main(String[] args) { try { JspC jspc = new JspC(); jspc.setArgs(args); jspc.execute(); } catch (JasperException exc) { exc.printStackTrace(); } } Kris Schneider wrote: (Alrighty, this is actually attempt number 3 to get this note posted. Gotta get more caffeine to the gerbils powering the email server...) When I try to use jspc from the command line to compile a JSP page that uses JSTL (1.0.1), I get a NullPointerException. Here's the setup (apologies if my email client hoses long lines): JAVA_HOME=C:\jdk1.3 CATALINA_HOME=D:\jakarta-tomcat-4.1.8 JASPER_HOME=D:\jakarta-tomcat-4.1.8 Here's how jspc gets invoked and the resulting error: D:\jakarta-tomcat-4.1.8\webapps\jspcTest%JASPER_HOME%\bin\jspc -v4 -d WEB-INF\src\jspc -webinc WEB-INF\jspc-web.xml -uriroot . -webapp . 2002-08-09 09:07:44 - ERROR-the file '\index.jsp' generated the following general exception: java.lang.NullPointerException error:null Here's index.jsp: %@ page language=java % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % html headtitleJSPC Test/title/head bodyh1Welcome to the JSPC test page/h1/body /html Here's 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/dtd/web-app_2_3.dtd; web-app welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list /web-app The only other components of the app are the JAR files for JSTL that are installed in WEB-INF\lib. Everything works fine running as an app under 4.1.8. Any ideas about what's going on? Also, does the v flag really do anything? I can't seem to get any verbose output no matter what it's set to. Thanks for any help. -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ smime.p7s Description: S/MIME Cryptographic Signature
Re: Command line jspc throws NPE for page using JSTL
Kris, Did you find the code that refers to that path? Is it assuming that is runs inside a webapp container? If so, sound like it might be a bug (unless it was never intended to run standalone). I'd bet you could make it work by messing with your classpath. David Kris Schneider wrote: I mucked around with the Jasper source a bit to get some exception info dumped: java.net.MalformedURLException: Path 'WEB-INF/lib/standard.jar' does not start with '/' at org.apache.jasper.servlet.JspCServletContext.getResource(JspCServletContext.java:278) at org.apache.jasper.JspCompilationContext.getResource(JspCompilationContext.java:235) at org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:196) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354) at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:790) at org.apache.jasper.compiler.Parser.parse(Parser.java:122) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:229) at org.apache.jasper.JspC.processFile(JspC.java:553) at org.apache.jasper.JspC.execute(JspC.java:778) at RunJspC.main(RunJspC.java:9) java.lang.NullPointerException at org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:215) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354) at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:790) at org.apache.jasper.compiler.Parser.parse(Parser.java:122) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:229) at org.apache.jasper.JspC.processFile(JspC.java:553) at org.apache.jasper.JspC.execute(JspC.java:778) at RunJspC.main(RunJspC.java:9) org.apache.jasper.JasperException 2002-08-09 10:55:36 - ERROR-the file '\index.jsp' generated the following general exception: java.lang.NullPointerException at org.apache.jasper.JspC.processFile(JspC.java:574) at org.apache.jasper.JspC.execute(JspC.java:778) at RunJspC.main(RunJspC.java:9) My RunJspC class just does this: public static void main(String[] args) { try { JspC jspc = new JspC(); jspc.setArgs(args); jspc.execute(); } catch (JasperException exc) { exc.printStackTrace(); } } Kris Schneider wrote: (Alrighty, this is actually attempt number 3 to get this note posted. Gotta get more caffeine to the gerbils powering the email server...) When I try to use jspc from the command line to compile a JSP page that uses JSTL (1.0.1), I get a NullPointerException. Here's the setup (apologies if my email client hoses long lines): JAVA_HOME=C:\jdk1.3 CATALINA_HOME=D:\jakarta-tomcat-4.1.8 JASPER_HOME=D:\jakarta-tomcat-4.1.8 Here's how jspc gets invoked and the resulting error: D:\jakarta-tomcat-4.1.8\webapps\jspcTest%JASPER_HOME%\bin\jspc -v4 -d WEB-INF\src\jspc -webinc WEB-INF\jspc-web.xml -uriroot . -webapp . 2002-08-09 09:07:44 - ERROR-the file '\index.jsp' generated the following general exception: java.lang.NullPointerException error:null Here's index.jsp: %@ page language=java % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % html headtitleJSPC Test/title/head bodyh1Welcome to the JSPC test page/h1/body /html Here's 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/dtd/web-app_2_3.dtd; web-app welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list /web-app The only other components of the app are the JAR files for JSTL that are installed in WEB-INF\lib. Everything works fine running as an app under 4.1.8. Any ideas about what's going on? Also, does the v flag really do anything? I can't seem to get any verbose output no matter what it's set to. Thanks for any help. -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
context problem with webapp connector
Tomcat 4.0.4 + Apache 1.3... I have setup the mod_webapp connector and it sort of works... However, I have a context in my tomcat server.xml file that looks like this: Context path=/tester docBase=tester debug=0 reloadable=false Parameter name=userdatadirectory value=/pathToData override=false / /Context Now, when I access my servlet directly into Tomcat standalone like this: http://URL:8080/tester/etc -- the parameter is passed to my application just fine. However, when I access my servlet through warp like this: http://URL/tester/etc -- the parameter doesn't get passed. I don't know why.. This is a stock Tomcat and Apache setup - the only thing I did was add mod_webapp and modify the apache configs according to the documentation. Other than the parameter passing not working, the webapp connector seems to work. -- that is: http://URL/examples/etc work fine. In a blind attempt to make it work, I added a hostcontext (same as above) /context/host to the warp connector section near the bottom of the Tomcat server.xml. That didn't seem to help any. Any ideas? Thanks Paul Phillips -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
unpacking of WAR
I worked on deploying my first webapp to another server today. I packaged it up as a war, transferred it to the other tomcat server, added the one line context element in the server.xml, and restarted. Nothing - the logs said that the webapp that was referenced by the context statement was not available or in a readable format. In fact, the war did not expand into the file system. So, I removed the context element, and restarted. With the context gone, the WAR expanded properly. Then I added the context back in, and it worked fine. Is this normal? Thanks Paul Phillips PS - the context element in the server.xml is just there to pass in a parameter containing the location of a data directory. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Command line jspc throws NPE for page using JSTL
Hi Dave ;-), I'm pretty sure it's meant to run standalone. The two normal ways I know of are through the optional jspc Ant task or by running %CATALINA_HOME%\bin\jspc.bat directly. Neither of those worked for me so I went digging for some more detail about the failure. There's code in the constructor of TagLibraryInfoImpl that strips a leading / off the path before handing it off to JspCompilationContext.getResource which, in turn, hands it off to JspCServletContext.getResource which explicitly checks to see if the path starts with a /. David Kavanagh wrote: Kris, Did you find the code that refers to that path? Is it assuming that is runs inside a webapp container? If so, sound like it might be a bug (unless it was never intended to run standalone). I'd bet you could make it work by messing with your classpath. David Kris Schneider wrote: I mucked around with the Jasper source a bit to get some exception info dumped: java.net.MalformedURLException: Path 'WEB-INF/lib/standard.jar' does not start with '/' at org.apache.jasper.servlet.JspCServletContext.getResource(JspCServletContext.java:278) at org.apache.jasper.JspCompilationContext.getResource(JspCompilationContext.java:235) at org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:196) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354) at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:790) at org.apache.jasper.compiler.Parser.parse(Parser.java:122) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:229) at org.apache.jasper.JspC.processFile(JspC.java:553) at org.apache.jasper.JspC.execute(JspC.java:778) at RunJspC.main(RunJspC.java:9) java.lang.NullPointerException at org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:215) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354) at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:790) at org.apache.jasper.compiler.Parser.parse(Parser.java:122) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:229) at org.apache.jasper.JspC.processFile(JspC.java:553) at org.apache.jasper.JspC.execute(JspC.java:778) at RunJspC.main(RunJspC.java:9) org.apache.jasper.JasperException 2002-08-09 10:55:36 - ERROR-the file '\index.jsp' generated the following general exception: java.lang.NullPointerException at org.apache.jasper.JspC.processFile(JspC.java:574) at org.apache.jasper.JspC.execute(JspC.java:778) at RunJspC.main(RunJspC.java:9) My RunJspC class just does this: public static void main(String[] args) { try { JspC jspc = new JspC(); jspc.setArgs(args); jspc.execute(); } catch (JasperException exc) { exc.printStackTrace(); } } Kris Schneider wrote: (Alrighty, this is actually attempt number 3 to get this note posted. Gotta get more caffeine to the gerbils powering the email server...) When I try to use jspc from the command line to compile a JSP page that uses JSTL (1.0.1), I get a NullPointerException. Here's the setup (apologies if my email client hoses long lines): JAVA_HOME=C:\jdk1.3 CATALINA_HOME=D:\jakarta-tomcat-4.1.8 JASPER_HOME=D:\jakarta-tomcat-4.1.8 Here's how jspc gets invoked and the resulting error: D:\jakarta-tomcat-4.1.8\webapps\jspcTest%JASPER_HOME%\bin\jspc -v4 -d WEB-INF\src\jspc -webinc WEB-INF\jspc-web.xml -uriroot . -webapp . 2002-08-09 09:07:44 - ERROR-the file '\index.jsp' generated the following general exception: java.lang.NullPointerException error:null Here's index.jsp: %@ page language=java % %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % html headtitleJSPC Test/title/head bodyh1Welcome to the JSPC test page/h1/body /html Here's 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/dtd/web-app_2_3.dtd; web-app welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list /web-app The only other components of the app are the JAR files for JSTL that are installed in WEB-INF\lib. Everything works fine running as an app under 4.1.8. Any ideas about what's going on?
RE: RMI and TC4.x (Really classloader stuff)
Hi David: I'm in the same boat trying to use RMI and/or Jini from Tomcat. This isn't a complete answer to your question, as I'm still investigating the issue, but I'm posting what I know so far in the hope that it might help in your own solution, and also generate discussion that will guide my exploration. When all is said and done, if there's interest, I can post a Catalina-RMI HOWTO sort of document. Although I didn't try to run the test case that you attached to your bug report, I did take a look at it, and I think I know what's going on. Here's what I know so far (most of which you probably know already, but I'm summarizing for other folks on the list): When you pass an instance of some Serializable class as an argument to an RMI call (e.g. passing a command object, as in your test case), the RMI subsystem will serialize the object with an additional annotation indicating the locations from which the class's bytecode can be downloaded. When you pass an exported object (e.g. a server object or an object that will receive callbacks from remote objects), the RMI subsystem creates and serializes a proxy object (otherwise known as the RMI stub object) in place of the actual object. In either case, the remote RMI subsystem has to load the class that is called out in the serialized instance. It does this by calling the RMIClassLoader. The RMIClassLoader object first tries to find the class locally (i.e. in the default classloader). If it can't find it locally, it searches in the list of locations contained in the annotation mentioned above. If the required class is available locally, no further headaches are caused, which may be why some people have had no problems using RMI under Tomcat - they probably had the serialized classes and/or proxy classes in the standard classpath/classloader setup. And there we find our problem. (At this point you might want to have a look at the JSP snippet below) The annotation is determined by RMIClassLoader. According to the RMI and Object Serialization FAQ in the JDK1.31 API docs, If the _Stub class was loaded by an RMIClassLoader, then RMI already knows which codebase to use for its annotation. If the _Stub class was loaded from the CLASSPATH, then there is no obvious codebase, and RMI consults the java.rmi.server.codebase system property to find the codebase. If the system property is not set, then the stub is marshalled with a null codebase, which means that it cannot be used unless the client has a matching copy of the _Stub classfile in the client's CLASSPATH. If we're running a standalone application (and I believe also in Tomcat 3.x), we're using the system class loader, which has no obvious codebase, so the java.rmi.server.codebase property gets used. But what's the class loader used in Tomcat 4.x? I looked at the source code for Tomcat 4.0.1 (happens to be what I have on hand), and o.a.c.loader.WebAppClassLoader extends from o.a.c.loader.StandardClassLoader, which extends from java.net.URLClassLoader, which has a method called getURLs(). The WebAppClassLoader.getURLs() method returns a list of all the repositories it will search when trying to load a class on behalf of the web app. This list calls out all the jar's in WEB-INF/lib, common/lib, etc. Having not seen the source for RMIClassLoader, I suspect that the getClassAnnotation(..) method checks to see if the classloader for the supplied class is a URLClassLoader, and if so, uses the results of the getURLs() method call as an obvious codebase. This suspicion is supported by the last part of the JSP, where I create a classloader that extends from URLClassLoader but overrides getURLs() to return a phony url. The phony url shows up as the class's annotation. So the exact error you quoted in the bug report shows something about a protocol missing MalformedURL exception, which is caused by the fact that the urls to the repositories contain spaces, since the RMI annotation is supposed to be a space-separated list of URL's. Thus the annotation doesn't get parsed properly. This may be a bug in Catalina's class loader (i.e. should the returned urls have the spaces encoded to '%20'?) or possibly in the way RMIClassLoader uses the results of getURLs(). But it's not the problem. The problem is how to get our codebase into the annotation. Clearly the java.rmi.server.codebase property is not used, since the class loader has a codebase. But setting a system property doesn't feel right to me anyway, since in a webapp scenario, we're in a shared JVM, and we shouldn't be allowed to set system properties that will affect other webapps. (Aside- we similarly can't follow the normal practise of setting our own RMISecurityManager, again since it doesn't play nice with the other webapps. When I tried it, it seemed to screw-up Tomcat's internals, as well. We need to run Tomcat with security enabled, and set the appropriate
Re: Command line jspc throws NPE for page using JSTL
On Fri, 9 Aug 2002, Kris Schneider wrote: Date: Fri, 09 Aug 2002 23:11:48 -0400 From: Kris Schneider [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: Re: Command line jspc throws NPE for page using JSTL I mucked around with the Jasper source a bit to get some exception info dumped: java.net.MalformedURLException: Path 'WEB-INF/lib/standard.jar' does not start with '/' Have you verified that your application's use of the path to the taglib URL, in web.xml or in a %@ taglib % directive of a JSP page, do not use this kind of invalid reference? Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: unpacking of WAR
On Fri, 9 Aug 2002, Paul Phillips wrote: Date: Fri, 09 Aug 2002 22:49:00 -0500 From: Paul Phillips [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Subject: unpacking of WAR I worked on deploying my first webapp to another server today. I packaged it up as a war, transferred it to the other tomcat server, added the one line context element in the server.xml, and restarted. Nothing - the logs said that the webapp that was referenced by the context statement was not available or in a readable format. In fact, the war did not expand into the file system. So, I removed the context element, and restarted. With the context gone, the WAR expanded properly. Then I added the context back in, and it worked fine. Is this normal? Depends on what you specified for the docBase parameter in the Context element. This needs to be the absolute or relative (to $CATALINA_HOME/webapps) name of the WAR file. Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: apache tomcat and ssl
Did you define jk directives in the SSL virtual host section of your apache config file? If you want https to behave exactly like http, but just secure, copy your virtual jk directives over to the ssl portion. Also, make sure when you start apache, it doesn't complain about mod_jk without EAPI support, you will need that with SSL. -Original Message- From: Vincent Kerr [mailto:[EMAIL PROTECTED]] Sent: Friday, August 09, 2002 10:40 AM To: [EMAIL PROTECTED] Subject: apache tomcat and ssl I have apache and tomcat working with mod_jk on Windows NT and can access my tomcat apps through apache. I have installed ssl support and can access apache's htdocs over https. However I cannot access my Tomcat webapps over https. Could someone tell me how to configure apache so that tomcat apps can be accessed over https. -- 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]