Re: Recommendation: where to place app config file without overwriting during deploy. JNDI configuration also??
Hi Johathan. We use a different approach. Everything that is packed in a war is "immutable" i.e. it is not customer dependent. Then: * We store logs outside the war (in /var/log/tomcat/MyWebApp) * We define connection pools in the context xml file (MyWebApp.xml, the one in the conf directory). So we have two version of this file, one to be used in devel and an other to be used in production * We define any other customer-dependent variable in the file described above. So, with this approach, the only think you need to to when updating the war is replacing it! Apropos log4j.properties, you can define a new value of the system properties log4j.configuration (? please check the correct name), which will force log4j to read the log file from an other location. The problem is that if you define this property, you will have defined it for the whole container. I hope I gave a start to your application packaging re-thought. On Tue, 08 Feb 2005 18:28:56 -0600, Jonathan Wilson <[EMAIL PROTECTED]> wrote: > Okay, lets try this variant of my original post.. > > I've started using JNDI under 5.0.19 and when I deploy to my remote > server(using /Manager) I need to change the data sources url connect > string(f/test DB to prod DB). Does everyone use Ant while building the > WAR to filter/whatever this url? How do you make changes to the context.xml? > > Thanks in advance, > JW > > Jonathan Wilson wrote: > > > My current upgrade procedures are to shutdown tomcat 3.x, move the > > current version of my webapp directory somewhere else, recreate the > > /webapp directory, then un-jar the war file created by NetBeans. After > > doing this I then have to modify the WEB-INF/app.config file with > > customer-specific information. The code is identical, just > > configuration items change. If the customer has changed their > > app.config then I have to roll those changes into the new app.config > > file. Also, I have to copy the log files out of the old version into > > the new versions' /logs directory and modify the stock > > log4j.properties to point to their desired directory. Also, I can't > > always have access to the server to do this so I've written a > > procedure to explain this to another. > > > > Is there a way to store customer configuration info(app.config, > > log4j.properties) outside of the app and have the app still know how > > to find it? > > > > There must be a better way - nothing in the Tomcat Application > > Developers Guide that covers this. > > > > Thanks in advance, > > > > JW > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Roberto Cosenza http://robcos.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Attn developers of Tomcat and JK
If you want to integrate Tomcat and IIS with enough technical support, then go to a commercial site like http://jspisapi.neurospeech.com/. There you can find jspisapi redirector worth $50 I think... Aris -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 09, 2005 7:37 AM To: Tomcat Users List Subject: Re: Attn developers of Tomcat and JK If you want immediately support Covalent offers it. I don't work for covalent, but they are reliable. the tone of your post is very rude and frankly completely inappropriate. I've come across bugs in every webserver I've used. Here is a short list, IIS, weblogic, websphere, resin, netscape and tomcat. of all the servers I've used over the last 6 years, tomcat is the most responsive in terms of fixing bugs and useful responses. Now that doesn't mean it's perfect or any where near perfect. Obviously you're using IIS, so why not just use .NET, C# and ADO. if you haven't got the experience or skill to use tomcat, than you're wasting everyone's time. Including your own valuable time. Quite honestly, for commercial products, you're looking at 8-12 months turn around time for a patch. Even then, it probably won't fix the problem. There are plenty of qualified and experienced developers who know tomcat insdie and out. I would advise hiring some one because it's near impossible to diagnose your problem without being at the system. peter lin On Tue, 08 Feb 2005 10:11:03 -0600, Eric Sandusky <[EMAIL PROTECTED]> wrote: > To the developers of Tomcat and JK: > > If Tomcat + JK cannot process every request/response on a Windows > > server > that is dual-xeon 3.0 Ghz processors with 4 GB of memory, then what > machine would? > > And doesn't it seem strange how the JK2 project has been mysteriously > abandoned? Thanks for going off in a seemingly better direction only > to jump ship and leave everyone SOL. It makes me think that this > whole Tomcat development effort is more of just a hobby and not > something to be taken seriously. > > If anyone is willing to contact me on this issue, I would be more than > happy to talk one-on-one. If you want to tell me that this is not the > forum for ranting about Tomcat or JK, it should be. If you want to > blackball me from this community, go ahead, I'm not getting any help > from it as it is. I can only hope that this message reaches the > people who supposedly support this software and lights a fire > underneath them to improve it or tell us that it just doesn't work. > > Eric > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.6 / Eclipse / no startup.bat
Geoff Wiggs wrote: Trying to integrate Tomcat 5.6 and Eclipse. Without the startup.bat and [...] Anyone have any ideas? Have you tried Sysdeo Tomcat Plugin for Eclipse? Vamsee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTPconnector problem
> From: reynir [mailto:[EMAIL PROTECTED] > Subject: Re: HTTPconnector problem > > What is the secure="true" then for ? My guess is that it's intended more for the proprietary connectors like AJP13, but since I have zero experience with those, it's only speculation. > should it not be enough to set scheme ="https" ? Yes, I would think it should, but being able to test a boolean is much faster than doing a string comparison. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: Compression in the server.xml
Tim Funk wrote: Compression is useless if you use apache in front of tomcat. Do you think that there will be a merging of Tomcat and Apache in the future? Random speculation appreciated. G. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.0.28/IIS 5.0/jk2
Hi, I have configured IIS 5.0 with jk2 (isapi_redirector2.dll) + Tomcat 5.0.28. My main problem is that the log entry being written to IIS just logs GET /jakarta/isapi_redirector2.dll 200 ... for all URLs being redirected. All requests not redirected log as expected. Is there a way to log the actual request in the IIS logs and not /jakarta/isapi_redirector2.dll? (We are using Cocoon under Tomcat to process everything redirected) Thanks very much for any help. Clare. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTPconnector problem
thanx Mark, It's version 4.1.24 (if I rember it correctly I will check again to morrow and send you an update), but I will upgrade the tomcat service. That hopefully will fix this matter. I was hoping this was some configuration error on my behalf, but I must upgrade. .. thanx again, -reynir Mark Thomas wrote: I have just tested this on the latest TC4.1.x from CVS this works as stated in the docs. The output I see is: is secure : true port : 8080 It is possible that this is a bug that has been fixed but I don't see any changes in the archives that look relevant (I checked back to the end of 2003). What version are you using? Can you try 4.1.31? Mark reynir wrote: Hi, As I understand the documentation (and my past experience shows) you are not correct. :) the documentation : http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html states : |secure| Set this attribute to |true| if you wish to have calls to |request.isSecure()| to return |true| for requests received by this Connector (you would want this on an SSL Connector). The default value is |false|. in short terms, this is not happening. It's not requrired to have a https schema on this connector. thanx, -reynir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Compression in the server.xml
Compression is useless if you use apache in front of tomcat. Look into mod_gzip and make sure the option for zipping chunked data in mod_gzip is turned on. -Tim Randy Paries wrote: Could some one explain the downsides of setting compression="on" in the server.xml I have a web app that averages 2 million hits aday. The static and images are handled using apache. I am trying to understand what the compression setting is used for in the server.xml and what are the ramifications. I found out about the setting reading " http://brandlay.com/wojtek/publ/tomcat.jsp " that was on the list earlier today. any bandwidth I can save would be great - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTPconnector problem
Thanx Charles, I knew it did not work in tc 5. I did not check out the code. This obviously is not working according to the documentation. What is the secure="true" then for ? should it not be enough to set scheme ="https" ? Then again in my experience this works with tomcat 4.1.31 with out problems (except it's tc 4.1.31) and I really thought it was a bug in tc 5.x But the situation that I am in right now is a production server, that I rather work as little on as I can, and only want to update it if I must. there for I was looking for configuration errors, or someone stating that this was a bug in some version fixed in some other version. I could not see any mentions of this in the change-logs for tomcat, and there for I posted this question. I guess my only solution right now is upgrading it to 4.1.31 and hoping that will "fix" the problem. I also hope that the secure="true" will return the behavior described in the documentation. the usecase has to do with reverse proxying through apache. apache holds the key for the SSL, and then forwards the requests I need into tomcat, where I execute serveral operations based on if request.isSecure() is true or false. In my case it's very difficoult to have the SSL key on the tomcat for several reasons, there for I must have the port doing http (not https) but still returning true for req.isSecure()... Well this probably means some hacking, or an upgrade... thanx again, -reynir Caldarale, Charles R wrote: From: reynir [mailto:[EMAIL PROTECTED] Subject: Re: HTTPconnector problem As I understand the documentation (and my past experience shows) you are not correct. :) But we don't actually run the documentation. Here's the code of interest (from 5.0.25, the last one I downloaded the source for): if (! req.scheme().isNull()) { // use processor specified scheme to determine secure state request.setSecure(req.scheme().equals("https")); } else { // use connector scheme and secure configuration, (defaults to // "http" and false respectively) req.scheme().setString(connector.getScheme()); request.setSecure(connector.getSecure()); } If I'm reading this correctly, the connector's secure attribute will only be used if the scheme for the request has not been set. I suspect that, in your case, the scheme is "http", forcing the secure attribute for the request to false. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Compression in the server.xml
Could some one explain the downsides of setting compression="on" in the server.xml I have a web app that averages 2 million hits aday. The static and images are handled using apache. I am trying to understand what the compression setting is used for in the server.xml and what are the ramifications. I found out about the setting reading " http://brandlay.com/wojtek/publ/tomcat.jsp " that was on the list earlier today. any bandwidth I can save would be great Thanks for the patience Randy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Recommendation: where to place app config file without overwriting during deploy. JNDI configuration also??
Okay, lets try this variant of my original post.. I've started using JNDI under 5.0.19 and when I deploy to my remote server(using /Manager) I need to change the data sources url connect string(f/test DB to prod DB). Does everyone use Ant while building the WAR to filter/whatever this url? How do you make changes to the context.xml? Thanks in advance, JW Jonathan Wilson wrote: My current upgrade procedures are to shutdown tomcat 3.x, move the current version of my webapp directory somewhere else, recreate the /webapp directory, then un-jar the war file created by NetBeans. After doing this I then have to modify the WEB-INF/app.config file with customer-specific information. The code is identical, just configuration items change. If the customer has changed their app.config then I have to roll those changes into the new app.config file. Also, I have to copy the log files out of the old version into the new versions' /logs directory and modify the stock log4j.properties to point to their desired directory. Also, I can't always have access to the server to do this so I've written a procedure to explain this to another. Is there a way to store customer configuration info(app.config, log4j.properties) outside of the app and have the app still know how to find it? There must be a better way - nothing in the Tomcat Application Developers Guide that covers this. Thanks in advance, JW - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trouble getting CGI script to execute
Brelsfoard, Alex wrote: OK. I should have spotted this from your last post. Your context path should be path="/myapp" NOT path="myapp" Yeah, you're right. Oops. Thanks. 1 problem down. n to go... Script should be: /station/endeca/4.5.4/i86pc-linux/webapps/myapp/WEB-INF/cgi/script.cgi Good, this is where I put it originally. OK tried it Still asking me if I want to download the script Poop. This really bothers me. Since the cgi script is in the WEB-INF directory you should not be able to access it. I hope this is a config error but if I were you I would have some security concerns right now. Can you post the cgi parts of your web.xml as well please. I assume that has been modified too. Can you also check that ${CATALINA_HOME}/webapps/ROOT does not contain a directory called myapp. If it does - delete it. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Attn developers of Tomcat and JK
If you want immediately support Covalent offers it. I don't work for covalent, but they are reliable. the tone of your post is very rude and frankly completely inappropriate. I've come across bugs in every webserver I've used. Here is a short list, IIS, weblogic, websphere, resin, netscape and tomcat. of all the servers I've used over the last 6 years, tomcat is the most responsive in terms of fixing bugs and useful responses. Now that doesn't mean it's perfect or any where near perfect. Obviously you're using IIS, so why not just use .NET, C# and ADO. if you haven't got the experience or skill to use tomcat, than you're wasting everyone's time. Including your own valuable time. Quite honestly, for commercial products, you're looking at 8-12 months turn around time for a patch. Even then, it probably won't fix the problem. There are plenty of qualified and experienced developers who know tomcat insdie and out. I would advise hiring some one because it's near impossible to diagnose your problem without being at the system. peter lin On Tue, 08 Feb 2005 10:11:03 -0600, Eric Sandusky <[EMAIL PROTECTED]> wrote: > To the developers of Tomcat and JK: > > If Tomcat + JK cannot process every request/response on a Windows server > that is dual-xeon 3.0 Ghz processors with 4 GB of memory, then what machine > would? > > And doesn't it seem strange how the JK2 project has been mysteriously > abandoned? Thanks for going off in a seemingly better direction only to > jump ship and leave everyone SOL. It makes me think that this whole Tomcat > development effort is more of just a hobby and not something to be taken > seriously. > > If anyone is willing to contact me on this issue, I would be more than happy > to talk one-on-one. If you want to tell me that this is not the forum for > ranting about Tomcat or JK, it should be. If you want to blackball me from > this community, go ahead, I'm not getting any help from it as it is. I can > only hope that this message reaches the people who supposedly support this > software and lights a fire underneath them to improve it or tell us that it > just doesn't work. > > Eric > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trouble getting CGI script to execute
> From: Brelsfoard, Alex [mailto:[EMAIL PROTECTED] > Subject: RE: Trouble getting CGI script to execute > > OK tried it Still asking me if I want to download the > script Poop. Would it be possible to try this with a clean install of a known Tomcat download? This would determine if the second-hand version you're trying to use might be missing some pieces. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trouble getting CGI script to execute
>OK. I should have spotted this from your last post. Your context path should be path="/myapp" NOT path="myapp" Yeah, you're right. Oops. Thanks. >Script should be: > /station/endeca/4.5.4/i86pc-linux/webapps/myapp/WEB-INF/cgi/script.cgi Good, this is where I put it originally. OK tried it Still asking me if I want to download the script Poop. Thanks --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 5:51 PM To: Tomcat Users List Subject: Re: Trouble getting CGI script to execute Brelsfoard, Alex wrote: > Yes, well this is where things get a little messy. I am using a > version of Tomcat installed by a search engine software package called > Endeca. They HAVE made some default settings of their own in server.xml. Ah. That explains a few things. > I have not been > using ${CATALINA_HOME} in the server.xml config file; I have been > manually entering the directory. OK. Good. > I will paste in my server.xml here: OK. I should have spotted this from your last post. Your context path should be path="/myapp" NOT path="myapp" Script should be: /station/endeca/4.5.4/i86pc-linux/webapps/myapp/WEB-INF/cgi/script.cgi url to script should then be: http://host:/myapp/cgi-bin/script.cgi Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Running heavily loaded tomcat sites.
Hello, I have collected my experiences with running a heavily loaded (and soon to be high availability) tomcat setup in a paper available here: http://brandlay.com/wojtek/publ/tomcat.jsp Have a look if you're interested and please email any comments directly to my email. Thanks! -- Wojciech Sobczuk [EMAIL PROTECTED] +48 605 607 170 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JTDS help
> From: Charles P. Killmer [mailto:[EMAIL PROTECTED] > Subject: RE: JTDS help > > Well there aren't any file access errors but it looks like for every > request it is racing through all of the directories and compiling > whatever it finds. Is there a setting that tells tomcat to > recompile on every request? Recompilation is usually triggered by the timestamp on the jsp file being newer than the timestamp of the generated servlet. Is it possible that the clock on your system is set wrong? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: using shared objects from tomcat
On Tue, Feb 08, 2005 at 10:53:37PM +0100, Andreas Andersson wrote: > This is a debian suggesting strace to be the one for me. Can I attach > strace to my .so-file or do I have to start tomcat via strace? I'm not certain about debian, but under NetBSD you can turn on tracing for an already running process. (ktrace -p ) I'd imagine there'd be something similar under linux. Check the strace man page. Keep in mind that this can create a _lot_ of output. > >2) Generally, you can get some clues on UnsatisfiedLinkError, in a > >pinch, by using LD_DEBUG or strace (or truss or whatever). > > If I'm not misstaken tomcat ignores environment variables so how can I > set LD_DEBUG? The LD_DEBUG env variable would actually be interpreted by the dynamic linker code, so it's irrelevant whether tomcat ignores it or not. Tomcat will rely on the JVM's library loading functions, which in turn should use dlopen() and related functions. > >5) Consider using an RPC protocol to talk to a server written in C/C++ > >instead of using JNI in the first place. If the performance is > >acceptable, your life could be a lot simpler. > > Unfortunatly the codes in the .so-files isn't mine. It's a third party > product that we can't alter or even have altered for us. That really depends on how much the library depends on java. If it's a C/C++ library that had a thin JNI layer added on afterwards you can probably write a C/C++ program to use it fairly easily. A good indicator of this is if the .so comes with C/C++ header files, and if the java interface is light on it's use of objects. (e.g. all function arguments and return values are primitives, or data-only objects) Of course, if the library wasn't written that way you might not have an easy to use C function to call. eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Web App to Cell Phone
This may be off topic but I'm looking for a java solution to deliver MMS or WAP push "ringtones" to cell phones via my tomcat shopping cart. Does anyone know of some good solutions for this ? Thanks in advance -Wiley - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: using shared objects from tomcat
This is a debian suggesting strace to be the one for me. Can I attach strace to my .so-file or do I have to start tomcat via strace? -- .so.s don't have independent existence. You run strace on a process. I recommend using the -p option to attach it to the JVM after the JVM is up but before you try to touch your code. > 2) Generally, you can get some clues on UnsatisfiedLinkError, in a > pinch, by using LD_DEBUG or strace (or truss or whatever). If I'm not misstaken tomcat ignores environment variables so how can I set LD_DEBUG? -- Tomcat can't 'ignore' LD_ environment variables. They control how ld.so loads the JVM into the process address space and links it. You put env settings in bin/setenv.sh. You will need such a setting for LD_LIBRARY_PATH, at least. > A) Any .so has to be in java.library.path and in LD_LIBRARY_PATH. Any > dependencies of the .so (visible with 'ldd', likewise). java.library.path _AND_ LD_LIBRARY_PATH? Thats intersting and might very well be the solution to my problem. As I just wrote I think tomcat ignores these evironment variabels. I was under the impression that LD_LIBRARY_PATH was the same as java.library.path, if that is not the case then how do I set LD_LIBRARY_PATH? -- you set the environment variable in bin/setenv.sh or the equivalent. You also set java.library.path there, generally. > Thus, I always put native classes in the 'common' classloader by > adding the jars to common.loader in catalina.properties. Is it also OK to add .so-files? I have grant codeBase "file:${catalina.home}/common/-" { permission java.security.AllPermission; }; in my catalina.properties. Would that suggest that if I only placed all .so-files under /common they would be loaded or at least accessable? -- you can never 'add a .so' to a classpath. You add the Java class with the 'native' methods, and when it calls System.loadLibrary, the fun begins. The jar containing the native-method classes is the important one. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trouble getting CGI script to execute
Brelsfoard, Alex wrote: Yes, well this is where things get a little messy. I am using a version of Tomcat installed by a search engine software package called Endeca. They HAVE made some default settings of their own in server.xml. Ah. That explains a few things. I have not been using ${CATALINA_HOME} in the server.xml config file; I have been manually entering the directory. OK. Good. I will paste in my server.xml here: OK. I should have spotted this from your last post. Your context path should be path="/myapp" NOT path="myapp" Script should be: /station/endeca/4.5.4/i86pc-linux/webapps/myapp/WEB-INF/cgi/script.cgi url to script should then be: http://host:/myapp/cgi-bin/script.cgi Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trouble getting CGI script to execute
Yes, well this is where things get a little messy. I am using a version of Tomcat installed by a search engine software package called Endeca. They HAVE made some default settings of their own in server.xml. I have not been using ${CATALINA_HOME} in the server.xml config file; I have been manually entering the directory. I will paste in my server.xml here: --- --- Thanks a lot. --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 5:19 PM To: Tomcat Users List Subject: Re: Trouble getting CGI script to execute Before I forget, what version of Tomcat? I don't think you can use ${CATALINA_HOME} directly in server.xml (I might be wrong). Can you post your server.xml? It looks like you have made some changes that might be complicating matters. *If* you host still has auto deploy configured (it is unless you explicitly set it to false) and an appbase of "webapps", remove the element for myapp completely. Auto deploy will sort it out. Mark Brelsfoard, Alex wrote: > OK I changed it so that the path is "myapp" and the docBase is > "${CATALINA_HOME}/webapps/myapp". > Restarted Tomcat > Still nothing. > --Alex > > > Alex Brelsfoard > Web Applications Developer > Web Development Office > Worcester Polytechnic Institute > 508-831-6147 > [EMAIL PROTECTED] > > -Original Message- > From: Mark Thomas [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 08, 2005 4:48 PM > To: Tomcat Users List > Subject: Re: Trouble getting CGI script to execute > > Brelsfoard, Alex wrote: > >>Ok. So I did everything you said. Still not working. >>I get a 404 error. >>So I took it step by step to see if I made typos or something. If I >>go to http://host:port I see the directory listing including "myapp" > > > This shouldn't happen. This means that myapp is a directory in the > root context rather than a separate context. > > Have you edited server.xml at all? It looks like you have a context > element along the lines of debug="0"/> in your server.xml. This is bad. The default install uses > although it is commented > out because tomcat does this automatically by default anyway. > > Mark > > >>I click on >>myapp. There is nothing in the directory listing. I then add >>"/cgi-bin/script.cgi" to the end, to make >>http://host:port/myapp/cgi-bin/script.cgi. Same result: 404. >>I then tried http://host:port/myapp/script.cgi. Same result. >>I then tried http://host:port/myapp/WEB-INF/cgi/script.cgi. This time >>it asked me if I want to open or download this file. >> >>Any ideas? >>Thanks. >>--Alex > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.6 / Eclipse / no startup.bat
Trying to integrate Tomcat 5.6 and Eclipse. Without the startup.bat and shutdown.bat files I'm having trouble defining the external tools. I have tried to use the command string in the windows service properties, but the service does not start. Anyone have any ideas? Geoff [EMAIL PROTECTED]
Re: Trouble getting CGI script to execute
Before I forget, what version of Tomcat? I don't think you can use ${CATALINA_HOME} directly in server.xml (I might be wrong). Can you post your server.xml? It looks like you have made some changes that might be complicating matters. *If* you host still has auto deploy configured (it is unless you explicitly set it to false) and an appbase of "webapps", remove the element for myapp completely. Auto deploy will sort it out. Mark Brelsfoard, Alex wrote: OK I changed it so that the path is "myapp" and the docBase is "${CATALINA_HOME}/webapps/myapp". Restarted Tomcat Still nothing. --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 4:48 PM To: Tomcat Users List Subject: Re: Trouble getting CGI script to execute Brelsfoard, Alex wrote: Ok. So I did everything you said. Still not working. I get a 404 error. So I took it step by step to see if I made typos or something. If I go to http://host:port I see the directory listing including "myapp" This shouldn't happen. This means that myapp is a directory in the root context rather than a separate context. Have you edited server.xml at all? It looks like you have a context element along the lines of in your server.xml. This is bad. The default install uses although it is commented out because tomcat does this automatically by default anyway. Mark I click on myapp. There is nothing in the directory listing. I then add "/cgi-bin/script.cgi" to the end, to make http://host:port/myapp/cgi-bin/script.cgi. Same result: 404. I then tried http://host:port/myapp/script.cgi. Same result. I then tried http://host:port/myapp/WEB-INF/cgi/script.cgi. This time it asked me if I want to open or download this file. Any ideas? Thanks. --Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.7/DataSourceRealm/Manager app
I didn't test 5.5.4 but I will grab patch you mentioned and test it in 5.5.7. -Original Message- From: Remy Maucherat [mailto:[EMAIL PROTECTED] Sent: February 8, 2005 5:10 PM To: Tomcat Users List Subject: Re: Tomcat 5.5.7/DataSourceRealm/Manager app On Tue, 08 Feb 2005 21:49:16 +, Mark Thomas <[EMAIL PROTECTED]> wrote: > It is a known bug that has been fixed and will be included in 5.5.8. > Sorry. Did it exist in 5.5.4, or is it a regression ? -- x Rémy Maucherat Developer & Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:420938ce145968343549367!
Re: Tomcat 5.5.7/DataSourceRealm/Manager app
On Tue, 08 Feb 2005 21:49:16 +, Mark Thomas <[EMAIL PROTECTED]> wrote: > It is a known bug that has been fixed and will be included in 5.5.8. Sorry. Did it exist in 5.5.4, or is it a regression ? -- x Rémy Maucherat Developer & Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.7/DataSourceRealm/Manager app
On Tue, 8 Feb 2005 16:39:40 -0500, Phillip Qin <[EMAIL PROTECTED]> wrote: > I am having serious issue with Tomcat Manager app using DataSourceRealm > during upgrading from Tomcat 5.0.28 to 5.5.7. The issue is, after I accessed > Tomcat Manager app couple of times, I got this exception It could be this issue: http://issues.apache.org/bugzilla/show_bug.cgi?id=33357 The patch needs some testing, but you can grab the replacement class from a nightly build, or build it from CVS. -- x Rémy Maucherat Developer & Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
case sensitivity with JDBCRealm
Here's our server.xml's Realm element: Basically out of the textbook...but the problem is, we're moving from MySQL to Oracle, and the MySQL database wasn't case sensitive when checking the username. Is there any way to turn off case sensitivity on the JDBCRealm side of things when checking the username in the Oracle database? Thanks... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trouble getting CGI script to execute
OK I changed it so that the path is "myapp" and the docBase is "${CATALINA_HOME}/webapps/myapp". Restarted Tomcat Still nothing. --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 4:48 PM To: Tomcat Users List Subject: Re: Trouble getting CGI script to execute Brelsfoard, Alex wrote: > Ok. So I did everything you said. Still not working. > I get a 404 error. > So I took it step by step to see if I made typos or something. If I > go to http://host:port I see the directory listing including "myapp" This shouldn't happen. This means that myapp is a directory in the root context rather than a separate context. Have you edited server.xml at all? It looks like you have a context element along the lines of in your server.xml. This is bad. The default install uses although it is commented out because tomcat does this automatically by default anyway. Mark > I click on > myapp. There is nothing in the directory listing. I then add > "/cgi-bin/script.cgi" to the end, to make > http://host:port/myapp/cgi-bin/script.cgi. Same result: 404. > I then tried http://host:port/myapp/script.cgi. Same result. > I then tried http://host:port/myapp/WEB-INF/cgi/script.cgi. This time > it asked me if I want to open or download this file. > > Any ideas? > Thanks. > --Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT]Attn developers of Tomcat and JK
Really this is way out of line. As everyone has said this is a free product with no formalized support structure, and no claims of any support. This list is here as a resource to those brave souls who are adventerous enough to work with the software. I might be overstating things here but there should be no one here that is surprised that there is no corporate help desk here. When I started out the only thing I had going for me was I was inquisitive and had access to log files, this list and google, thats all I needed. Three things you can do that will answer your questiion. Ask in a clear consise manner (I have had a problem with that on occasion), check and double check your settings (many times I have been the culprut in my own problem) and google the error. :) From: Eric Sandusky <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" To: 'Tomcat Users List' Subject: Attn developers of Tomcat and JK Date: Tue, 08 Feb 2005 10:11:03 -0600 To the developers of Tomcat and JK: As I can sense that not one single person is willing to respond to this issue, I can only assume that this tomcat-user community is worthless. Not only have I submitted this issue back 6 months ago, but a similar post was made by the user "A jie" twice within the last week. If you are too ashamed that your software is not reliable enough to be installed in a production environment, at least have the decency of telling us that. When I have to deal with user session data being sent back to the wrong client, sessions getting lost, and numerous log errors stating that the request/response cannot be fulfilled, I can only come to one conclusion.. Tomcat and the JK/JK2 connector are not reliable. See below and tell me that those messages would not cause problems for the client. [Mon Feb 07 13:30:20 2005] [info] jk_open_socket::jk_connect.c (183): connect() failed errno = 61 [Mon Feb 07 13:30:20 2005] [info] ajp_connect_to_endpoint::jk_ajp_common.c (862): Failed connecting to tomcat. Tomcat is probably not started or is listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61 [Mon Feb 07 13:30:20 2005] [info] ajp_send_request::jk_ajp_common.c (1186): Error connecting to the Tomcat process. [Mon Feb 07 13:30:20 2005] [info] ajp_service::jk_ajp_common.c (1665): Sending request to tomcat failed, recoverable operation attempt=2 [Mon Feb 07 13:30:20 2005] [error] ajp_service::jk_ajp_common.c (1673): Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. worker=ajp13w failed errno = 61 [Mon Feb 07 13:30:20 2005] [error] HttpExtensionProc::jk_isapi_plugin.c (937): service() failed If Tomcat + JK cannot process every request/response on a Windows server that is dual-xeon 3.0 Ghz processors with 4 GB of memory, then what machine would? And doesn't it seem strange how the JK2 project has been mysteriously abandoned? Thanks for going off in a seemingly better direction only to jump ship and leave everyone SOL. It makes me think that this whole Tomcat development effort is more of just a hobby and not something to be taken seriously. If anyone is willing to contact me on this issue, I would be more than happy to talk one-on-one. If you want to tell me that this is not the forum for ranting about Tomcat or JK, it should be. If you want to blackball me from this community, go ahead, I'm not getting any help from it as it is. I can only hope that this message reaches the people who supposedly support this software and lights a fire underneath them to improve it or tell us that it just doesn't work. Eric -Original Message- From: Eric Sandusky [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 02, 2005 11:40 AM To: Tomcat Users List Subject: ISAPI redirector warnings While running Tomcat 5 with IIS and JK2.. The Windows Application Logs often log several Warnings at the same point in time, see below for example. The problem is, these Warnings pile up in the Windows Event logs and force the Administrator to manually clear out the logs daily or weekly. I am not looking to simply suppress these messages, but find a solution to the actual problem. This issue seems to occur at random and things such as session confusion (user A sees user B's data) and other noticeable issues happen at or around the same time as these warnings. What is the reason for these log entries? How can I eliminate these log entries? Error: [jk_worker_ajp13.c (648)]: ajp13.service() Error forwarding ajp13:localhost:8009 1 0 Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply recoverable error 3 Error: [jk_handler_response.c (140)]: handler.response() Error sending response Error: [jk_service_iis.c (126)]: jk_ws_service_t::head, ServerSupportFunction failed Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply recoverable error 3 Error: [jk_handler_response.c (140)]: handler.response() Error sending response Error: [jk_service_iis.c (126)]: jk_ws_service_t::head, ServerSuppor
RE: Tomcat 5.5.7/DataSourceRealm/Manager app
Thx, I am relieved. Off to Cuba. -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: February 8, 2005 4:49 PM To: Tomcat Users List Subject: Re: Tomcat 5.5.7/DataSourceRealm/Manager app It is a known bug that has been fixed and will be included in 5.5.8. Sorry. Mark Phillip Qin wrote: > I am having serious issue with Tomcat Manager app using > DataSourceRealm during upgrading from Tomcat 5.0.28 to 5.5.7. The > issue is, after I accessed Tomcat Manager app couple of times, I got > this exception > > 8-Feb-2005 2:19:24 PM org.apache.catalina.realm.DataSourceRealm open > SEVERE: Exception performing authentication > org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, > pool exhausted > at > org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSou > rce.ja > va:103) > at > org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5 > 40) > at > org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:407) > at > org.apache.catalina.realm.DataSourceRealm.getPassword(DataSourceRealm.java:4 > 59) > at > org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java: > 339) > at > org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java: > 284) > at > org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthe > nticator.java:181) > at > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase > .java:446) > at > org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.jav > a:275) > at > org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:80) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126 > ) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105 > ) > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java > :107) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) > at > org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:306) > at > org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385) > at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:745) > at > org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) > at > org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:868) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav > a:684) > at java.lang.Thread.run(Unknown Source) > Caused by: java.util.NoSuchElementException: Timeout waiting for idle object > at > org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo > l.java:756) > at > org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja > va:95) > ... 21 more > > I took a look at the connections. They had never been evicted nor > removed. This problem only happened on Tomcat 5.5. 4.x/5.0 were fine. > > > My configuration is jdk 1.5.0, tomcat 5.5.7, commons-dbcp-1.2.1, > commons-pool-1.2, mysql-connector-java-3.1.6-bin, MySQL 4.1.5 > > ${catalina.home}/conf/Server.xml > > > >className="org.apache.catalina.mbeans.ServerLifecycleListener" > /> >className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> >className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/> > > > > type="javax.sql.DataSource" > driverClassName="com.mysql.jdbc.Driver" > url="jdbc:mysql://1.2.3.4:3306/webapps" > username="username" > password="password" > factory="org.apache.commons.dbcp.BasicDataSourceFactory" > maxActive="4" > maxIdle="1" > minIdle="1" > maxWait="15000" > removeAbandoned="true" > validationQuery="SELECT 1" > testOnBorrow="true" > testOnReturn="true" > minEvictableIdleTimeMillis="-1" > timeBetweenEvictionRunsMillis="3" > numTestsPerEvictionRun="1" > testWhileIdle="true" > /> > > > > > > maxSpareThreads="75" >enableLookups="false" redirectPort="8443" acceptCount="100" >connectionTimeout="2" disableUploadTimeout="true" > /> > > enableLookups="false" redirectPort="8443" > protocol="AJP/1.3" /> > > > jvmRoute="jvm1"> > > > > dataSourceName="jdbc/manager" > digest="MD5" > roleNameCol="role_name" > userCredCol="user_pass" > userNameCol="user_name" > userRoleTable="user_roles" > userTable="users"
Re: using shared objects from tomcat
Benson Margulies wrote: First of all, thanks for the answer, I've been fighting this one for quite som time now. 1) Your monitoring options depend on what unix(-like) system you are running on. On Linux, there's strace. On Solaris, truss. On HPUX and AIX? I forget. To do this PROGRAMMATICALLY to create a sandbox? Forget it. The Unix Approach is this: This is a debian suggesting strace to be the one for me. Can I attach strace to my .so-file or do I have to start tomcat via strace? 2) Generally, you can get some clues on UnsatisfiedLinkError, in a pinch, by using LD_DEBUG or strace (or truss or whatever). If I'm not misstaken tomcat ignores environment variables so how can I set LD_DEBUG? A) Any .so has to be in java.library.path and in LD_LIBRARY_PATH. Any dependencies of the .so (visible with 'ldd', likewise). java.library.path _AND_ LD_LIBRARY_PATH? Thats intersting and might very well be the solution to my problem. As I just wrote I think tomcat ignores these evironment variabels. I was under the impression that LD_LIBRARY_PATH was the same as java.library.path, if that is not the case then how do I set LD_LIBRARY_PATH? Thus, I always put native classes in the 'common' classloader by adding the jars to common.loader in catalina.properties. Is it also OK to add .so-files? I have grant codeBase "file:${catalina.home}/common/-" { permission java.security.AllPermission; }; in my catalina.properties. Would that suggest that if I only placed all .so-files under /common they would be loaded or at least accessable? 4) I have come to believe that the shared objects that you use for JNI should be thin wrappers that make their own calls to dlopen/dlsym to find the guts of your code. This insulates you from the various stupid things that the JVM makers do from time to time in picking the wrong arguments to dlopen. > 5) Consider using an RPC protocol to talk to a server written in C/C++ instead of using JNI in the first place. If the performance is acceptable, your life could be a lot simpler. Unfortunatly the codes in the .so-files isn't mine. It's a third party product that we can't alter or even have altered for us. -- Andreas Andersson IT Dept. Travelstart Nordic [EMAIL PROTECTED] http://www.travelstart.se - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.5.7/DataSourceRealm/Manager app
It is a known bug that has been fixed and will be included in 5.5.8. Sorry. Mark Phillip Qin wrote: I am having serious issue with Tomcat Manager app using DataSourceRealm during upgrading from Tomcat 5.0.28 to 5.5.7. The issue is, after I accessed Tomcat Manager app couple of times, I got this exception 8-Feb-2005 2:19:24 PM org.apache.catalina.realm.DataSourceRealm open SEVERE: Exception performing authentication org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja va:103) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5 40) at org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:407) at org.apache.catalina.realm.DataSourceRealm.getPassword(DataSourceRealm.java:4 59) at org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java: 339) at org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java: 284) at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthe nticator.java:181) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:446) at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.jav a:275) at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:80) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126 ) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105 ) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:306) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:745) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:868) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:684) at java.lang.Thread.run(Unknown Source) Caused by: java.util.NoSuchElementException: Timeout waiting for idle object at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo l.java:756) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja va:95) ... 21 more I took a look at the connections. They had never been evicted nor removed. This problem only happened on Tomcat 5.5. 4.x/5.0 were fine. My configuration is jdk 1.5.0, tomcat 5.5.7, commons-dbcp-1.2.1, commons-pool-1.2, mysql-connector-java-3.1.6-bin, MySQL 4.1.5 ${catalina.home}/conf/Server.xml /> dataSourceName="jdbc/manager" digest="MD5" roleNameCol="role_name" userCredCol="user_pass" userNameCol="user_name" userRoleTable="user_roles" userTable="users" /> ${catalina.home}/conf/Catalina/my.localhost/manager.xml Regards, PQ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trouble getting CGI script to execute
Brelsfoard, Alex wrote: Ok. So I did everything you said. Still not working. I get a 404 error. So I took it step by step to see if I made typos or something. If I go to http://host:port I see the directory listing including "myapp" This shouldn't happen. This means that myapp is a directory in the root context rather than a separate context. Have you edited server.xml at all? It looks like you have a context element along the lines of in your server.xml. This is bad. The default install uses although it is commented out because tomcat does this automatically by default anyway. Mark I click on myapp. There is nothing in the directory listing. I then add "/cgi-bin/script.cgi" to the end, to make http://host:port/myapp/cgi-bin/script.cgi. Same result: 404. I then tried http://host:port/myapp/script.cgi. Same result. I then tried http://host:port/myapp/WEB-INF/cgi/script.cgi. This time it asked me if I want to open or download this file. Any ideas? Thanks. --Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IllegalStateException: getOutputStream() has already been called for this response
Your approach is bad but don't worry. If you have time, read something about MVC. You will need it eventually. To make your servlet work, try something like: public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { StringBuffer myOutput = new StringBuffer(); try { myOutput.append("Here I'm not doing anything illegal"); if(true) throw new BookNotFoundException("Book doesn't exist"); } catch (Exception e) { System.out.println("Caught exception: " + e.getMessage()); throw new ServletException("Dummy Exception", e); } // you reach this only if no errors have been caught so no error page to display OutputStream out = res.getOutputStream(); res.setContentType("text/plain"); out.println(myOutput.toString()); } /roberto - Original Message - From: DAVID TURNER To: tomcat-user@jakarta.apache.org Sent: Tuesday, February 08, 2005 9:56 PM Subject: IllegalStateException: getOutputStream() has already been called for this response I'm trying to write a servlet that handles business logic exceptions by specifying in the web.xml the jsp error page that I want to use for a specific Exception (see web.xml snippet below). I have this working when I use response.getWriter() in the servlet instead of response.getOutputStream() -- see sample servlet code below. But, when I try to use the response.getOutputStream() approach the jsp error page doesn't work and an "IllegalStateException: getOutputStream() has already been called for this response " gets thrown because the jsp is probably trying to get the OutputStream also. Why does the response.getWriter() method work even after headers/data have been written to the writer? Is there any way to get the jsp error page to work with the getOutputStream()? I would like to eventually compress the response stream, but from all the examples I've come across on compression they all use getOutputStream. web.xml contents: BookNotFoundException /jsp/ErrorPage.jsp servlet contents: public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { PrintWriter out = res.getWriter(); //OutputStream out = res.getOutputStream(); res.setContentType("text/plain"); try { out.println("Line 1 of servlet"); //out.write("Line 1 of servlet".getBytes()); throw new BookNotFoundException("Book doesn't exist"); } catch (Exception e) { res.reset(); System.out.println("Caught exception: " + e.getMessage()); throw new ServletException("Dummy Exception", e); } } -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.7/DataSourceRealm/Manager app
I am having serious issue with Tomcat Manager app using DataSourceRealm during upgrading from Tomcat 5.0.28 to 5.5.7. The issue is, after I accessed Tomcat Manager app couple of times, I got this exception 8-Feb-2005 2:19:24 PM org.apache.catalina.realm.DataSourceRealm open SEVERE: Exception performing authentication org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja va:103) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5 40) at org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:407) at org.apache.catalina.realm.DataSourceRealm.getPassword(DataSourceRealm.java:4 59) at org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java: 339) at org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java: 284) at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthe nticator.java:181) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:446) at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.jav a:275) at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:80) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126 ) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105 ) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:306) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:745) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:868) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:684) at java.lang.Thread.run(Unknown Source) Caused by: java.util.NoSuchElementException: Timeout waiting for idle object at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo l.java:756) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja va:95) ... 21 more I took a look at the connections. They had never been evicted nor removed. This problem only happened on Tomcat 5.5. 4.x/5.0 were fine. My configuration is jdk 1.5.0, tomcat 5.5.7, commons-dbcp-1.2.1, commons-pool-1.2, mysql-connector-java-3.1.6-bin, MySQL 4.1.5 ${catalina.home}/conf/Server.xml ${catalina.home}/conf/Catalina/my.localhost/manager.xml Regards, PQ
RE: Trouble getting CGI script to execute
Ok. So I did everything you said. Still not working. I get a 404 error. So I took it step by step to see if I made typos or something. If I go to http://host:port I see the directory listing including "myapp" I click on myapp. There is nothing in the directory listing. I then add "/cgi-bin/script.cgi" to the end, to make http://host:port/myapp/cgi-bin/script.cgi. Same result: 404. I then tried http://host:port/myapp/script.cgi. Same result. I then tried http://host:port/myapp/WEB-INF/cgi/script.cgi. This time it asked me if I want to open or download this file. Any ideas? Thanks. --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 4:15 PM To: Tomcat Users List Subject: Re: Trouble getting CGI script to execute OK. Making progress. Can you try the following? (all steps included - even the ones you have already done) Once it works we can tweak it to give the configuration you want. These steps assume a default install. Create a directory $CATALINA_HOME/webapps/myapp/ Create a directory $CATALINA_HOME/webapps/myapp/WEB-INF Create a directory $CATALINA_HOME/webapps/myapp/WEB-INF/cgi Place your script called (script.cgi) in: $CATALINA_HOME/webapps/myapp/WEB-INF/cgi Uncomment the cgi stuff in $CATALINA_HOME/conf/web.xml Rename $CATALINA_HOME/server/servlets-cgi.renametojar to $CATALINA_HOME/server/servlets-cgi.jar Restart tomcat. Browse to http://host:port/myapp/cgi-bin/script.cgi Let me know what happens. Mark Brelsfoard, Alex wrote: > This is one area I was not entirely sure about. I did uncomment > everything and did NOT change anything. > I do not really have a ROOT url. I setup a "/cgi-bin" directory in > server.xml. I then created a WEB-INF and cgi folders and placed my > script in there. > So the path to the file is /path/cgi-bin/WEB-INF/cgi/script.cgi > And the URL: domain.com/cgi-bin/script.cgi Did I miss something here? > Thanks. > --Alex > > > Alex Brelsfoard > Web Applications Developer > Web Development Office > Worcester Polytechnic Institute > 508-831-6147 > [EMAIL PROTECTED] > > -Original Message- > From: Mark Thomas [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 08, 2005 3:55 PM > To: Tomcat Users List > Subject: Re: Trouble getting CGI script to execute > > Exactly where did you put your script? If you follow > http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cgi-howto.html and use > the defaults it is impossible to see the text of your script. > > Assuming you only uncommented the global web.xml and did not edit any > of the settings, your script should be in: > /WEB-INF/cgi/ > > and it is accessed through > /yourcontext/cgi-bin/yourscript.cgi > > Mark > > > Brelsfoard, Alex wrote: > >>I have been reading all the online documentation I can dig up and >>cannot find the solution to my problem. >>Quite simply, all I want to do is be able to run perl cgi script >>through my Tomcat server. I uncommented everything having to do with >>CGI in the Tomcat web.xml conf file, restarted the server and placed >>my scriptmin the right place. All that happens now is the script is >>printed up to the screenjust like a txt file. It is executable. I >>checked the logs and the log says that a 304 code is sent to the browser. >>ANY help would be much appreciated. >>Thanks very much. >>--Alex >> >> >>Alex Brelsfoard >>Web Applications Developer >>Web Development Office >>Worcester Polytechnic Institute >>508-831-6147 >>[EMAIL PROTECTED] >> >> >> > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: using shared objects from tomcat
1) Your monitoring options depend on what unix(-like) system you are running on. On Linux, there's strace. On Solaris, truss. On HPUX and AIX? I forget. To do this PROGRAMMATICALLY to create a sandbox? Forget it. The Unix Approach is this: A) create a uid/gid with only the access that you want your code to have. B) Run tomcat under that UID/GID. If you want the shared lib code to have less access than Java code, you need to introduce a process boundary instead of using JNI. 2) Generally, you can get some clues on UnsatisfiedLinkError, in a pinch, by using LD_DEBUG or strace (or truss or whatever). 3) Read the JNDI-howto. I happen to have left behind some useful clues in there. However, the following might also be useful. A) Any .so has to be in java.library.path and in LD_LIBRARY_PATH. Any dependencies of the .so (visible with 'ldd', likewise). B) A native class can only be loaded in One Classloader. Tomcat has a bunch of classloaders. If you run without a security manager, you \can/ load a native class in a webapp class loader, but it will often cause you pain and suffering. If you undeploy and redeploy the webapp, chances are that the old classloader will still be around with the native class in it, unless you were amazingly careful with reference management. Thus, I always put native classes in the 'common' classloader by adding the jars to common.loader in catalina.properties. 4) I have come to believe that the shared objects that you use for JNI should be thin wrappers that make their own calls to dlopen/dlsym to find the guts of your code. This insulates you from the various stupid things that the JVM makers do from time to time in picking the wrong arguments to dlopen. 5) Consider using an RPC protocol to talk to a server written in C/C++ instead of using JNI in the first place. If the performance is acceptable, your life could be a lot simpler. -Original Message- From: Andreas Andersson [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 3:32 PM To: Tomcat Users List Subject: using shared objects from tomcat Hi (again)! I still have problems useing a shared library from within a tomcat webapp. The same code works from a standalone appication but not from tomcat. If anyone can answer one or more of the following questions I would be happy. 1) Is there any way to log what a .so-file attempts to do without altering the source? This so that I can see if the .so tries anything funny thats not allowed from within tomcat. 2) Is there any way to get more information from an UnsatisfiedLinkError. Now that error is all I get, no reason or root cause at all. 3) What differs in how tomcat and a standalone java application loads libraries? And what is the restrictions on loading subsekvent libraris (ie the first one loads the ones it depends on). If I could assigne Duke Dollars, Expert Exchange Dollars or some kind of Tomcat Dollars I would. -- Andreas Andersson IT Dept. Travelstart Nordic [EMAIL PROTECTED] http://www.travelstart.se - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JTDS help
Well there aren't any file access errors but it looks like for every request it is racing through all of the directories and compiling whatever it finds. Is there a setting that tells tomcat to recompile on every request? Charles -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 9:36 AM To: Tomcat Users List Subject: RE: JTDS help Hey Charles, I'm sure it's quite frustrating, but I've already shown that your precise code runs way faster than your original statistics, and that was only on a modest box. It serves no purpose therefore to believe it could be the language of choice, because I cannot replicate your speed issue. See what your monitoring brings back. What kind of setup are you running? Allistair. > -Original Message- > From: Charles P. Killmer [mailto:[EMAIL PROTECTED] > Sent: 08 February 2005 15:33 > To: Tomcat Users List > Subject: RE: JTDS help > > > I don't mean to be contrary, I am just trying to pin this down. The > database and tomcat server are only separated by a 10/100 switch. I > am going to run filemon and watch for access denied messages, then > regmon and watch for similar things. The network is very fast, the db > server is not being used by anyone else. It seems to me that if it > were environmental, it would affect these other programming languages > the same. I checked and the jtds.jar file is in tomcat\common\lib. > > Any other thoughts while you wait for the results from filemon and > regmon? > > Thank you > Charles > > -Original Message- > From: Allistair Crossley [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 08, 2005 8:44 AM > To: Tomcat Users List > Subject: RE: JTDS help > > Hi, > > No it was a totally raw test of your code which by virtue of using > DriverManager does not use connection pooling even if I do have it > enabled in my web app. > > jTDS installation is simply adding the JAR to tomcat/common/lib > > Are you running Tomcat on the same server as the database? > > Config file won't have anything to do with this. I am certain it is > environmental. > > Ali. > > > -Original Message- > > From: Charles P. Killmer [mailto:[EMAIL PROTECTED] > > Sent: 08 February 2005 14:41 > > To: Tomcat Users List > > Subject: RE: JTDS help > > > > > > Well I must have missed something because it isn't working > correctly. > > ;) Were you using connection pooling in your test? Perhaps I have > > something messed up in a config file? Or installed jTDS > incorrectly? > > > > Thanks for all your help. > > Charles > > > > -Original Message- > > From: Allistair Crossley [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, February 08, 2005 3:17 AM > > To: Tomcat Users List > > Subject: RE: JTDS help > > > > Hi Charles, > > > > I've just taken your code and run it through our Tomcat > 5.5, jTDS, SQL > > > Server 2000 web application and it took approx. 0.5s to compile and > > subsequent requests were instantaneous < 0.5s. > > > > I would look again at the issues I first noted, perhaps there is > > something you have missed. > > > > Cheers, Allistair. > > > > > -Original Message- > > > From: Charles P. Killmer [mailto:[EMAIL PROTECTED] > > > Sent: 07 February 2005 22:42 > > > To: Tomcat Users List > > > Subject: RE: JTDS help > > > > > > > > > When I strip the code to simply this, > > > > > > <%@ page language="java" import="java.sql.*"%> <% > Connection conn = > > > DriverManager.getConnection("jdbc:jtds:sqlserver://*.*.*.*:143 > > > 3/dbname;u > > > ser=*;password=**"); > > > conn.close(); > > > %> > > > > > > It still runs slowly. And yes it is multiple refreshes. > > > > > > I have tried to use connection pooling but have not been > > able to get > > > it working yet. Also the thing that I run into with connection > > > pooling the inability to use the SQL Statement of "select > > @@IDENTITY > > > from table". > > > With connection pooling, you run the risk of getting the ID for a > > > record that someone else inserted with the same connection. > > > > > > If connection pooling is the only option, I can work around that > > > issue. > > > But it seems that if PHP, ASP, ASP.NET... Can access the > > database just > > > > > fine without connection pooling, JSP should be able to as well. > > > > > > Any thoughts? > > > Thanks for all your input. > > > Charles > > > > > > -Original Message- > > > From: Mario Winterer [mailto:[EMAIL PROTECTED] > > > Sent: Monday, February 07, 2005 2:43 PM > > > To: Tomcat Users List > > > Subject: Re: JTDS help > > > > > > I do not think, jsp compilation is the problem - well, the first > > > request will last long, but after the jsp is compiled, subsequent > > > calls will not be remarkable slower than executing pure compiled > > > servlet code. > > > (Charles, I hope you did not measure the time for the > first request > > > only > > > - which indeed includes compilation tim
Re: OT: Version control tool
John Najarian <[EMAIL PROTECTED]> writes: > Also, a bug tracking application would be nice also. > These need to be run on Windows. I've used RT (Request Tracker) for feature/issue/bug tracking. It works well and is quite powerful. Clients access it through a web interface, or email requests into it. It's actively developed. http://bestpractical.com/rt/ It's in Perl and uses a backend SQL DB; I'm using MySQL. I front it with Apache. I'm running it on FreeBSD but since Perl, Apache, and MySQL now run on Windows you should be able to serve it from there. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trouble getting CGI script to execute
Sorry my server was a bit slow and I didn't get this message until after I had sent my last. Apologies. Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 4:15 PM To: Tomcat Users List Subject: Re: Trouble getting CGI script to execute OK. Making progress. Can you try the following? (all steps included - even the ones you have already done) Once it works we can tweak it to give the configuration you want. These steps assume a default install. Create a directory $CATALINA_HOME/webapps/myapp/ Create a directory $CATALINA_HOME/webapps/myapp/WEB-INF Create a directory $CATALINA_HOME/webapps/myapp/WEB-INF/cgi Place your script called (script.cgi) in: $CATALINA_HOME/webapps/myapp/WEB-INF/cgi Uncomment the cgi stuff in $CATALINA_HOME/conf/web.xml Rename $CATALINA_HOME/server/servlets-cgi.renametojar to $CATALINA_HOME/server/servlets-cgi.jar Restart tomcat. Browse to http://host:port/myapp/cgi-bin/script.cgi Let me know what happens. Mark Brelsfoard, Alex wrote: > This is one area I was not entirely sure about. I did uncomment > everything and did NOT change anything. > I do not really have a ROOT url. I setup a "/cgi-bin" directory in > server.xml. I then created a WEB-INF and cgi folders and placed my > script in there. > So the path to the file is /path/cgi-bin/WEB-INF/cgi/script.cgi > And the URL: domain.com/cgi-bin/script.cgi Did I miss something here? > Thanks. > --Alex > > > Alex Brelsfoard > Web Applications Developer > Web Development Office > Worcester Polytechnic Institute > 508-831-6147 > [EMAIL PROTECTED] > > -Original Message- > From: Mark Thomas [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 08, 2005 3:55 PM > To: Tomcat Users List > Subject: Re: Trouble getting CGI script to execute > > Exactly where did you put your script? If you follow > http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cgi-howto.html and use > the defaults it is impossible to see the text of your script. > > Assuming you only uncommented the global web.xml and did not edit any > of the settings, your script should be in: > /WEB-INF/cgi/ > > and it is accessed through > /yourcontext/cgi-bin/yourscript.cgi > > Mark > > > Brelsfoard, Alex wrote: > >>I have been reading all the online documentation I can dig up and >>cannot find the solution to my problem. >>Quite simply, all I want to do is be able to run perl cgi script >>through my Tomcat server. I uncommented everything having to do with >>CGI in the Tomcat web.xml conf file, restarted the server and placed >>my scriptmin the right place. All that happens now is the script is >>printed up to the screenjust like a txt file. It is executable. I >>checked the logs and the log says that a 304 code is sent to the browser. >>ANY help would be much appreciated. >>Thanks very much. >>--Alex >> >> >>Alex Brelsfoard >>Web Applications Developer >>Web Development Office >>Worcester Polytechnic Institute >>508-831-6147 >>[EMAIL PROTECTED] >> >> >> > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trouble getting CGI script to execute
I'm sorry. I really don't mean to waste your time. I'm just a bit confused here. You agreed that I do not need to use apache, but your advice was explained to me using apache configuration file format. I just figured that you were giving me examples/ideas. Tomcat does not have an httpd.conf file, it has server.xml and web.xml and the format of these files are completely different from apache. Hence my confusion. The idea made since since there were no instructions for Tomcat to know how to handle .cgi files. Again, I apologize if I'm missing something blatantly obvious, but I've been working on this for several days now and not getting anywhere. Thanks. --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 4:03 PM To: Tomcat Users List Subject: Re: Trouble getting CGI script to execute You are heading in the wrong direction. You don't need to specify a mime-type. (Neither do you need Apache.) You have a simple configuration error. See my previous post. Mark Brelsfoard, Alex wrote: > OK, now we're getting somewhere. There was no entry for mime-type for > file extension cgi. I added: > > cgi > application/x-httpd-cgi > > Which was not there before. Do I have the correct "mime-type" info there? > When I go to my script (via the web) now it asks me to download the file. > This mean something to someone? > Thanks. > --Alex > > > Alex Brelsfoard > Web Applications Developer > Web Development Office > Worcester Polytechnic Institute > 508-831-6147 > [EMAIL PROTECTED] > > -Original Message- > From: Warron French [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 08, 2005 3:42 PM > To: Tomcat Users List > Subject: RE: Trouble getting CGI script to execute > > I use apache to enable cgi scripts, and I had the same problem as you. > > So, since I don't know Tomcat so well, I can offer you this. > > Check in your config file to make sure that you have the line(s): > > AddType application/x-httpd-cgi .cgi .sh .pl > AddHandler cgi-script .cgi .sh .pl (I am not actually using this line but > maybe you need to) > > Also, in my httpd.conf file I am using some directives and options such as: > > > Options +Includes +ExecCGI > XbitHack On > > > I am sure you know how the Directory directive works, but make sure > that you do have the Options +ExecCGI, and XbitHack On lines also. > > Good luck, > Warron French > Sr. Network Engineer > Xtria, LLC > > -Original Message- > From: Brelsfoard, Alex [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 08, 2005 3:28 PM > To: tomcat-user@jakarta.apache.org > Subject: Trouble getting CGI script to execute > > > I have been reading all the online documentation I can dig up and > cannot find the solution to my problem. > Quite simply, all I want to do is be able to run perl cgi script > through my Tomcat server. I uncommented everything having to do with > CGI in the Tomcat web.xml conf file, restarted the server and placed > my scriptmin the right place. All that happens now is the script is > printed up to the screenjust like a txt file. It is executable. I > checked the logs and the log says that a 304 code is sent to the browser. > ANY help would be much appreciated. > Thanks very much. > --Alex > > > Alex Brelsfoard > Web Applications Developer > Web Development Office > Worcester Polytechnic Institute > 508-831-6147 > [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat CPU utilization pegged...total CPU only 50%
> -Original Message- > From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] > Sent: Monday, February 07, 2005 10:04 PM > To: Tomcat Users List > Subject: RE: tomcat CPU utilization pegged...total CPU only 50% > [bcc][faked-from][bayes] > Importance: Low > > > From: Kevin Williams [mailto:[EMAIL PROTECTED] > > Subject: RE: tomcat CPU utilization pegged...total CPU only 50% > > > > The two Xeon CPU's are hyperthreaded to represent 4 CPU's > > on the machine. I'm not sure exactly how tomcat/java > > interact with this, but it was not favorable. > > Other than for determining the number of threads to use for parallel GC, > the JVM does not care how many CPUs there are. I don't know what Windows > returns for the number of CPUs installed when hyperthreading is enabled, > but you can determine that with the Runtime.availableProcessors() method. > > You really should be measuring performance by some measurement of actual > workload completed, not CPU utilization. Turning off hyperthreading may > actually reduce your overall throughput. (Then again, it might make it > better - very application dependent.) > > You're right. I was measuring average response time. The CPU was just the bottleneck. My average response time under a specified user load actually decreased with hyperthreading off. My next step is to start analyzing the code:) Thanks for the pointer! Kevin Williams - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trouble getting CGI script to execute
OK. Making progress. Can you try the following? (all steps included - even the ones you have already done) Once it works we can tweak it to give the configuration you want. These steps assume a default install. Create a directory $CATALINA_HOME/webapps/myapp/ Create a directory $CATALINA_HOME/webapps/myapp/WEB-INF Create a directory $CATALINA_HOME/webapps/myapp/WEB-INF/cgi Place your script called (script.cgi) in: $CATALINA_HOME/webapps/myapp/WEB-INF/cgi Uncomment the cgi stuff in $CATALINA_HOME/conf/web.xml Rename $CATALINA_HOME/server/servlets-cgi.renametojar to $CATALINA_HOME/server/servlets-cgi.jar Restart tomcat. Browse to http://host:port/myapp/cgi-bin/script.cgi Let me know what happens. Mark Brelsfoard, Alex wrote: This is one area I was not entirely sure about. I did uncomment everything and did NOT change anything. I do not really have a ROOT url. I setup a "/cgi-bin" directory in server.xml. I then created a WEB-INF and cgi folders and placed my script in there. So the path to the file is /path/cgi-bin/WEB-INF/cgi/script.cgi And the URL: domain.com/cgi-bin/script.cgi Did I miss something here? Thanks. --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 3:55 PM To: Tomcat Users List Subject: Re: Trouble getting CGI script to execute Exactly where did you put your script? If you follow http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cgi-howto.html and use the defaults it is impossible to see the text of your script. Assuming you only uncommented the global web.xml and did not edit any of the settings, your script should be in: /WEB-INF/cgi/ and it is accessed through /yourcontext/cgi-bin/yourscript.cgi Mark Brelsfoard, Alex wrote: I have been reading all the online documentation I can dig up and cannot find the solution to my problem. Quite simply, all I want to do is be able to run perl cgi script through my Tomcat server. I uncommented everything having to do with CGI in the Tomcat web.xml conf file, restarted the server and placed my scriptmin the right place. All that happens now is the script is printed up to the screenjust like a txt file. It is executable. I checked the logs and the log says that a 304 code is sent to the browser. ANY help would be much appreciated. Thanks very much. --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: No jsp compiles
Follow Up: in case anyone had the same issue. It was my installation of tomcat. I blew away old instance, downloaded binaries again and this time JSP's compiled fine. My guess is that the original tar ball was either a result of an incomplete download or was just simply the wrong one. Who knows. -Original Message- From: Brian McGovern [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 12:53 PM To: Tomcat Users List Subject: No jsp compiles I just installed tomcat 5.0.28 and java 1.4.2_06 on redhat and no JSP compiles, with the following error: Even jsp with one line in them Any ideas? org.apache.jasper.JasperException: Unable to compile class for JSP org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:520) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause java.lang.NullPointerException org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.doesModernCompilerExist(CompilerAdapterFactory.java:143) org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:97) org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:929) org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758) org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382) org.apache.jasper.compiler.Compiler.compile(Compiler.java:472) org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Context element precedence
In the TC 5.5 doc under "Server Configuration Reference" it says: In addition to nesting Context elements inside a Host element, you can also store them: in the individual $CATALINA_HOME/conf/context.xml file: ... in the individual $CATALINA_HOME/conf/[enginename]/[hostname]/context.xml.default file: ... in individual files (with a ".xml" extension) in the $CATALINA_HOME/conf/[enginename]/[hostname]/ directory if the previous file was not found for this application, in individual file at /META-INF/context.xml inside the application files Is it the override attribute then who decides if it is the "next" context element who has precedence or not if there happens to be duplicate definitions of parameters or attributes? Thanks Bengt Lord - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trouble getting CGI script to execute
This is one area I was not entirely sure about. I did uncomment everything and did NOT change anything. I do not really have a ROOT url. I setup a "/cgi-bin" directory in server.xml. I then created a WEB-INF and cgi folders and placed my script in there. So the path to the file is /path/cgi-bin/WEB-INF/cgi/script.cgi And the URL: domain.com/cgi-bin/script.cgi Did I miss something here? Thanks. --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 3:55 PM To: Tomcat Users List Subject: Re: Trouble getting CGI script to execute Exactly where did you put your script? If you follow http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cgi-howto.html and use the defaults it is impossible to see the text of your script. Assuming you only uncommented the global web.xml and did not edit any of the settings, your script should be in: /WEB-INF/cgi/ and it is accessed through /yourcontext/cgi-bin/yourscript.cgi Mark Brelsfoard, Alex wrote: > I have been reading all the online documentation I can dig up and > cannot find the solution to my problem. > Quite simply, all I want to do is be able to run perl cgi script > through my Tomcat server. I uncommented everything having to do with > CGI in the Tomcat web.xml conf file, restarted the server and placed > my scriptmin the right place. All that happens now is the script is > printed up to the screenjust like a txt file. It is executable. I > checked the logs and the log says that a 304 code is sent to the browser. > ANY help would be much appreciated. > Thanks very much. > --Alex > > > Alex Brelsfoard > Web Applications Developer > Web Development Office > Worcester Polytechnic Institute > 508-831-6147 > [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trouble getting CGI script to execute
You are heading in the wrong direction. You don't need to specify a mime-type. (Neither do you need Apache.) You have a simple configuration error. See my previous post. Mark Brelsfoard, Alex wrote: OK, now we're getting somewhere. There was no entry for mime-type for file extension cgi. I added: cgi application/x-httpd-cgi Which was not there before. Do I have the correct "mime-type" info there? When I go to my script (via the web) now it asks me to download the file. This mean something to someone? Thanks. --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] -Original Message- From: Warron French [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 3:42 PM To: Tomcat Users List Subject: RE: Trouble getting CGI script to execute I use apache to enable cgi scripts, and I had the same problem as you. So, since I don't know Tomcat so well, I can offer you this. Check in your config file to make sure that you have the line(s): AddType application/x-httpd-cgi .cgi .sh .pl AddHandler cgi-script .cgi .sh .pl (I am not actually using this line but maybe you need to) Also, in my httpd.conf file I am using some directives and options such as: Options +Includes +ExecCGI XbitHack On I am sure you know how the Directory directive works, but make sure that you do have the Options +ExecCGI, and XbitHack On lines also. Good luck, Warron French Sr. Network Engineer Xtria, LLC -Original Message- From: Brelsfoard, Alex [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 3:28 PM To: tomcat-user@jakarta.apache.org Subject: Trouble getting CGI script to execute I have been reading all the online documentation I can dig up and cannot find the solution to my problem. Quite simply, all I want to do is be able to run perl cgi script through my Tomcat server. I uncommented everything having to do with CGI in the Tomcat web.xml conf file, restarted the server and placed my scriptmin the right place. All that happens now is the script is printed up to the screenjust like a txt file. It is executable. I checked the logs and the log says that a 304 code is sent to the browser. ANY help would be much appreciated. Thanks very much. --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trouble getting CGI script to execute
OK, now we're getting somewhere. There was no entry for mime-type for file extension cgi. I added: cgi application/x-httpd-cgi Which was not there before. Do I have the correct "mime-type" info there? When I go to my script (via the web) now it asks me to download the file. This mean something to someone? Thanks. --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] -Original Message- From: Warron French [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 3:42 PM To: Tomcat Users List Subject: RE: Trouble getting CGI script to execute I use apache to enable cgi scripts, and I had the same problem as you. So, since I don't know Tomcat so well, I can offer you this. Check in your config file to make sure that you have the line(s): AddType application/x-httpd-cgi .cgi .sh .pl AddHandler cgi-script .cgi .sh .pl (I am not actually using this line but maybe you need to) Also, in my httpd.conf file I am using some directives and options such as: Options +Includes +ExecCGI XbitHack On I am sure you know how the Directory directive works, but make sure that you do have the Options +ExecCGI, and XbitHack On lines also. Good luck, Warron French Sr. Network Engineer Xtria, LLC -Original Message- From: Brelsfoard, Alex [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 3:28 PM To: tomcat-user@jakarta.apache.org Subject: Trouble getting CGI script to execute I have been reading all the online documentation I can dig up and cannot find the solution to my problem. Quite simply, all I want to do is be able to run perl cgi script through my Tomcat server. I uncommented everything having to do with CGI in the Tomcat web.xml conf file, restarted the server and placed my scriptmin the right place. All that happens now is the script is printed up to the screenjust like a txt file. It is executable. I checked the logs and the log says that a 304 code is sent to the browser. ANY help would be much appreciated. Thanks very much. --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trouble getting CGI script to execute
I do not have apache installed on this server. I was hoping to be able to do everything I want with just one server. I understand that if I cannot get this to work with Tomcat, then I will have to install apache as well. But I have to try. --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 3:52 PM To: Brelsfoard, Alex Subject: Re: Trouble getting CGI script to execute In a message dated 2/8/2005 3:45:01 PM Eastern Standard Time, [EMAIL PROTECTED] writes: I have edited the part in the web.xml conf file referencing the cgi servlet to verify that the cgi-bin folder containing my script is being affected, and it is. cgi has nothing to do with tomcat or web.xml. You should be able to run cgi program from Apache without integrating Tomcat which is J2EE Servlet container. go to apache default port http://localhost:80/cgi-bin/
IllegalStateException: getOutputStream() has already been called for this response
I'm trying to write a servlet that handles business logic exceptions by specifying in the web.xml the jsp error page that I want to use for a specific Exception (see web.xml snippet below). I have this working when I use response.getWriter() in the servlet instead of response.getOutputStream() -- see sample servlet code below. But, when I try to use the response.getOutputStream() approach the jsp error page doesn't work and an "IllegalStateException: getOutputStream() has already been called for this response " gets thrown because the jsp is probably trying to get the OutputStream also. Why does the response.getWriter() method work even after headers/data have been written to the writer? Is there any way to get the jsp error page to work with the getOutputStream()? I would like to eventually compress the response stream, but from all the examples I've come across on compression they all use getOutputStream. web.xml contents: BookNotFoundException /jsp/ErrorPage.jsp servlet contents: public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { PrintWriter out = res.getWriter(); //OutputStream out = res.getOutputStream(); res.setContentType("text/plain"); try { out.println("Line 1 of servlet"); //out.write("Line 1 of servlet".getBytes()); throw new BookNotFoundException("Book doesn't exist"); } catch (Exception e) { res.reset(); System.out.println("Caught exception: " + e.getMessage()); throw new ServletException("Dummy Exception", e); } }- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trouble getting CGI script to execute
Exactly where did you put your script? If you follow http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cgi-howto.html and use the defaults it is impossible to see the text of your script. Assuming you only uncommented the global web.xml and did not edit any of the settings, your script should be in: /WEB-INF/cgi/ and it is accessed through /yourcontext/cgi-bin/yourscript.cgi Mark Brelsfoard, Alex wrote: I have been reading all the online documentation I can dig up and cannot find the solution to my problem. Quite simply, all I want to do is be able to run perl cgi script through my Tomcat server. I uncommented everything having to do with CGI in the Tomcat web.xml conf file, restarted the server and placed my scriptmin the right place. All that happens now is the script is printed up to the screenjust like a txt file. It is executable. I checked the logs and the log says that a 304 code is sent to the browser. ANY help would be much appreciated. Thanks very much. --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tools for Memory leaks
Hi, I'm looking for a free tool to monitor my application on Tomcat 5.0.28? I don't see any changes in memory use on RH9 - but the load is too low. What I'd like to test: - high load - potential memory leaks - etc. I'd rather to have a tool which have a minimum impact on performance, but any tool will be fine for now. Thank, Mark. __ Do you Yahoo!? All your favorites on one personal page Try My Yahoo! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session Objects
It's not impossible to make this work over a cluster but not with the included clustering classes in tomcat. You would have to write your own clustering classes. The reason why it won't work is that each singleton will be individual to a classloader and each tomcat accross the cluster will obviously have its own classloaders. The standard clustering only shares the sessions that are stored within the standard session manager in tomcat. -Original Message- From: Shey Rab Pawo [mailto:[EMAIL PROTECTED] Sent: 08 February 2005 17:44 To: Tomcat Users List Subject: Re: Session Objects Could you explain why this won't work across a cluster? Thanks. On Tue, 8 Feb 2005 17:28:59 -, Dale, Matt <[EMAIL PROTECTED]> wrote: > > Yes it will, this won't work accross a cluster. > Hi all, > I' am storing session objects in a SINGLEON class object to keep all > active sessions. Does it give any problems in clustered enviornment since > singleton is a static referrence. > > Regards, > Jagga > -- The radiance of all the stars does not equal a sixteenth part of the moon's radiance, likewise, good deeds giving us merit, all these do not equal a sixteenth part of the merit of loving-kindness.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any opinions expressed in this E-mail may be those of the individual and not necessarily the company. This E-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this E-mail in error and that any use or copying is strictly prohibited. If you have received this E-mail in error please notify the beCogent postmaster at [EMAIL PROTECTED] Unless expressly stated, opinions in this email are those of the individual sender and not beCogent Ltd. You must take full responsibility for virus checking this email and any attachments. Please note that the content of this email or any of its attachments may contain data that falls within the scope of the Data Protection Acts and that you must ensure that any handling or processing of such data by you is fully compliant with the terms and provisions of the Data Protection Act 1984 and 1998. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Trouble getting CGI script to execute
Virendra Agarwal wrote: > I think you can run cgi script under Apache only when installed under cgi-bin subdir. Right, sorry, forgot to include that. I have placed the script in a cgi-bin folder. When I go to the folder that script is listed there in the directory listing. When I click on the file, that's when I get the contents of the script displayed on the screen like a txt file. Same thing happens if you type in the appropriate address fully. I have edited the part in the web.xml conf file referencing the cgi servlet to verify that the cgi-bin folder containing my script is being affected, and it is. Thanks. --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 3:37 PM To: Brelsfoard, Alex Subject: Re: Trouble getting CGI script to execute In a message dated 2/8/2005 3:28:41 PM Eastern Standard Time, [EMAIL PROTECTED] writes: I have been reading all the online documentation I can dig up and cannot find the solution to my problem. Quite simply, all I want to do is be able to run perl cgi script through my Tomcat server. I uncommented everything having to do with CGI in the Tomcat web.xml conf file, restarted the server and placed my scriptmin the right place. All that happens now is the script is printed up to the screenjust like a txt file. It is executable. I checked the logs and the log says that a 304 code is sent to the browser. ANY help would be much appreciated. Thanks very much. I think you can run cgi script under Apache only when installed under cgi-bin subdir. Virendra Agarwal
RE: Trouble getting CGI script to execute
I use apache to enable cgi scripts, and I had the same problem as you. So, since I don't know Tomcat so well, I can offer you this. Check in your config file to make sure that you have the line(s): AddType application/x-httpd-cgi .cgi .sh .pl AddHandler cgi-script .cgi .sh .pl (I am not actually using this line but maybe you need to) Also, in my httpd.conf file I am using some directives and options such as: Options +Includes +ExecCGI XbitHack On I am sure you know how the Directory directive works, but make sure that you do have the Options +ExecCGI, and XbitHack On lines also. Good luck, Warron French Sr. Network Engineer Xtria, LLC -Original Message- From: Brelsfoard, Alex [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 3:28 PM To: tomcat-user@jakarta.apache.org Subject: Trouble getting CGI script to execute I have been reading all the online documentation I can dig up and cannot find the solution to my problem. Quite simply, all I want to do is be able to run perl cgi script through my Tomcat server. I uncommented everything having to do with CGI in the Tomcat web.xml conf file, restarted the server and placed my scriptmin the right place. All that happens now is the script is printed up to the screenjust like a txt file. It is executable. I checked the logs and the log says that a 304 code is sent to the browser. ANY help would be much appreciated. Thanks very much. --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
using shared objects from tomcat
Hi (again)! I still have problems useing a shared library from within a tomcat webapp. The same code works from a standalone appication but not from tomcat. If anyone can answer one or more of the following questions I would be happy. 1) Is there any way to log what a .so-file attempts to do without altering the source? This so that I can see if the .so tries anything funny thats not allowed from within tomcat. 2) Is there any way to get more information from an UnsatisfiedLinkError. Now that error is all I get, no reason or root cause at all. 3) What differs in how tomcat and a standalone java application loads libraries? And what is the restrictions on loading subsekvent libraris (ie the first one loads the ones it depends on). If I could assigne Duke Dollars, Expert Exchange Dollars or some kind of Tomcat Dollars I would. -- Andreas Andersson IT Dept. Travelstart Nordic [EMAIL PROTECTED] http://www.travelstart.se - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Trouble getting CGI script to execute
I have been reading all the online documentation I can dig up and cannot find the solution to my problem. Quite simply, all I want to do is be able to run perl cgi script through my Tomcat server. I uncommented everything having to do with CGI in the Tomcat web.xml conf file, restarted the server and placed my scriptmin the right place. All that happens now is the script is printed up to the screenjust like a txt file. It is executable. I checked the logs and the log says that a 304 code is sent to the browser. ANY help would be much appreciated. Thanks very much. --Alex Alex Brelsfoard Web Applications Developer Web Development Office Worcester Polytechnic Institute 508-831-6147 [EMAIL PROTECTED]
Re: Memory leak in tomcat 5.0.28
Marx, Mitchell E (Mitch), ALABS wrote: I see the bugzilla ID: http://issues.apache.org/bugzilla/show_bug.cgi?id=33368 Anyone know if this is present in Tomcat 4.1.30? Yes. http://issues.apache.org/bugzilla/show_bug.cgi?id=20758 is also present but is fixed in 4.1.31 Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTPconnector problem
> From: reynir [mailto:[EMAIL PROTECTED] > Subject: Re: HTTPconnector problem > > As I understand the documentation (and my past experience > shows) you are not correct. :) But we don't actually run the documentation. Here's the code of interest (from 5.0.25, the last one I downloaded the source for): if (! req.scheme().isNull()) { // use processor specified scheme to determine secure state request.setSecure(req.scheme().equals("https")); } else { // use connector scheme and secure configuration, (defaults to // "http" and false respectively) req.scheme().setString(connector.getScheme()); request.setSecure(connector.getSecure()); } If I'm reading this correctly, the connector's secure attribute will only be used if the scheme for the request has not been set. I suspect that, in your case, the scheme is "http", forcing the secure attribute for the request to false. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTPconnector problem
I have just tested this on the latest TC4.1.x from CVS this works as stated in the docs. The output I see is: is secure : true port : 8080 It is possible that this is a bug that has been fixed but I don't see any changes in the archives that look relevant (I checked back to the end of 2003). What version are you using? Can you try 4.1.31? Mark reynir wrote: Hi, As I understand the documentation (and my past experience shows) you are not correct. :) the documentation : http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html states : |secure| Set this attribute to |true| if you wish to have calls to |request.isSecure()| to return |true| for requests received by this Connector (you would want this on an SSL Connector). The default value is |false|. in short terms, this is not happening. It's not requrired to have a https schema on this connector. thanx, -reynir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Realm to LDAP USING SOAP
Depends on what SOAP library (if any) you are using. I have seen BASIC auth work with Axis (can't remember which version but it was within the last few months). A long time ago I did try to get CLIENT-CERT working with Axis but hit a Tomcat bug. The Tomcat bug has been fixed but priorities changed at work and I never went back to it. HTH Mark bohldan bohldan wrote: Im writing a client-servlet program. If i use a client (not webbrowser) is it then possible to use Tomcat Realm(JNDI) to authenticate to LDAP using SOAP protocol? Or do i have to make the authentication myself in my java servlet using JNDI (is this safe btw)? //Johan _ Hitta rätt på nätet med MSN Sök http://search.msn.se/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat Realm to LDAP USING SOAP
Im writing a client-servlet program. If i use a client (not webbrowser) is it then possible to use Tomcat Realm(JNDI) to authenticate to LDAP using SOAP protocol? Or do i have to make the authentication myself in my java servlet using JNDI (is this safe btw)? //Johan _ Hitta rätt på nätet med MSN Sök http://search.msn.se/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.0.28 Deploy apps in a /dir/appname like Context
What does work: deploying app in a /appname Context - I defined a host myhost with a /hostappbase dir as appBase - I took the sample HelloWorld app, renamed myapp and wanted it as http://myhost/myapp - I added a META-INF/context.xml file - I compiled it with "ant all" using a build.xml like the one from http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/build.xml.txt - Then compiled and validated the jsp with "ant -f deploy.xml compile" where deploy.xml is like build.xml example from tomcat-deployer-5.0.28 - I also modified the jar destfile to Navigation, reloading and even restarting the new app OK - I tried "ant -f deploy.xml deploy" => Tomcat manager undeploy and again redeploy the application, everithing OK. What does NOT work: deploying similar app in a /dir/appname Context - I want a copy of HelloWorld, copied all as myapp2 and edited build.xml deploy.xml context.xml and web.xml - THE DIFFERENCE is that now I want it as http://myhost/SOMEDIR/myapp2 - So I mkdir /hostappbase/SOMEDIR - Changed the files that way: --- build.xml --- < < --- > > < --- > --- deploy.xml --- < < --- > > < --- > path="${path}" war="/hostappbase/SOMEDIR/${webapp}.war" update="true" /> --- context.xml --- < workDir="work/Catalina/myhost/myapp" < path="/myapp" --- > workDir="work/Catalina/myhost/SOMEDIR_myapp2" > path="/SOMEDIR/myapp2" < docBase="/hostappbase/myapp" --- > docBase="/hostappbase/SOMEDIR/myapp2" --- web.xml --- (no changes) I followed the same steps and the result was: 1- when executed "ant -f deploy.xml compile" Tomcat does not realize there is a new .war and does not load nor unpacks the new app. 2- when executed "ant -f deploy.xml deploy" it seems to load the app, but I got this error from Tomcat (so ant says BUILD FAILED): StandardContext[/manager]Manager: ManagerServlet.install[/SOMEDIR/myapp2] java.net.MalformedURLException: no !/ in spec I found this note: http://java.sun.com/j2se/1.4.2/docs/api/java/net/JarURLConnection.html So I tried this change in deploy.xml: war="jar:file:/hostappbase/SOMEDIR/${webapp}.war!/" And I got a FileNotFound error from ant. I tried combinations but none of them worked. What is my mistake? Thanks in advance. __ Renovamos el Correo Yahoo!: ¡250 MB GRATIS! Nuevos servicios, más seguridad http://correo.yahoo.es - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No jsp compiles
Can we get a little detail on your environment?: - which Redhat? - Java SDK or JRE? - value of your JAVA_HOME environment variable (# echo $JAVA_HOME)? One possibility that comes to mind is you are required to have the SDK for all versions of Tomcat up though the 5.0.x series. Tomcat 5.5 uses Jikes (I think). --David Brian McGovern wrote: I just installed tomcat 5.0.28 and java 1.4.2_06 on redhat and no JSP compiles, with the following error: Even jsp with one line in them Any ideas? org.apache.jasper.JasperException: Unable to compile class for JSP org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:520) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause java.lang.NullPointerException org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.doesModernCompilerExist(CompilerAdapterFactory.java:143) org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:97) org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:929) org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758) org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382) org.apache.jasper.compiler.Compiler.compile(Compiler.java:472) org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Where is jmx.jar
I use jdk 1.5.0 + tomcat 5.5.7. jmx is integrated into jdk. -Original Message- From: sven morales [mailto:[EMAIL PROTECTED] Sent: February 7, 2005 5:11 PM To: Tomcat Users List Subject: Re: Where is jmx.jar Hi, You need to download jakarta-tomcat-5.5.7.compat.tar.gz if you plan to run Tomcat 5.5.7 with jdk 1.4.x jre. Untar it in same directory as the Tomcat5.5.7 and those jar files needed will be installed in its normal places. aka_sergio --- Phillip Qin <[EMAIL PROTECTED]> wrote: > I am trying to build tomcat 5.5 manager app. Where > can I find jmx.jar? It > used to be in ${catalina.home}/bin. > > > > > Regards, > > > PQ > > Going to war for peace is like having sex for > virginity > __ Do you Yahoo!? Yahoo! Mail - now with 250MB free storage. Learn more. http://info.mail.yahoo.com/mail_250 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] !DSPAM:4207e77e323619498442693!
jdk 1.5.0 and memory management per web-app/vhost
Hello, I've found this article: http://www.javaspecialists.co.za/archive/Issue092.html which directed me to these new features of jdk1.5: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/management/MemoryPoolMXBean.html http://java.sun.com/j2se/1.5.0/docs/api/java/lang/management/MemoryMXBean.html http://java.sun.com/j2se/1.5.0/docs/api/java/lang/management/MemoryManagerMXBean.html I wonder if these new features could be utilized, and a memory manager per web-app/vhost could be implemented in tomcat. I'll be glad to hear what everyone's opinion ? Cheers, Delian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTPconnector problem
Laba diena. Dėkojame, kad mums parašėte. Jūsų atsiųsta žinutė išsaugota mūsų duomenų bazėje. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTPconnector problem
Hi, As I understand the documentation (and my past experience shows) you are not correct. :) the documentation : http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html states : |secure| Set this attribute to |true| if you wish to have calls to |request.isSecure()| to return |true| for requests received by this Connector (you would want this on an SSL Connector). The default value is |false|. in short terms, this is not happening. It's not requrired to have a https schema on this connector. thanx, -reynir Caldarale, Charles R wrote: From: reynir [mailto:[EMAIL PROTECTED] Subject: HTTPconnector problem is secure : false port : 9099 this proves that I am accessing the correct port, but why is secure false ? is this a bug that has been fixed ? There's no bug here. You're using HTTP to access port 9099, and, by definition, that's not secure. The isSecure() method will return true for HTTPS, and you have declared that to be on port 8443. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] RE: Attn developers of Tomcat and JK
Eric, I do not use jk at this time so am not able to help you directly. If you do some surfing of the archives you will find there are typically three types of users. Total novice who are just looking for a free environment to learn in. Serious user who uses the product for every day life. Cheap user who uses the product because it is free. Often the novice will say just that. "I about as dumb as a box of rocks when it comes to Tomcat." These users will often get some sympathy from the community because we have all been there once. The serious user will often ask a question and still dig into the code themselves. On many occasion have I seen a user solve their own problem. Then the cheap user who uses the product because it is free and yet treats it as if they paid thousands of dollars for it. I am not trying to lay blame or label you, but let me ask a question. Have you looked at the source code for jk, jk2 or Tomcat? For this is the power and advantage of open source. If you own a M$ product and have an issue if they do not want to fix it you are stuck with no recourse. Usually you can't even convice them that it is a bug in the code. And this applies to others as well, I had an HP printer that had a problem, the same problem as hundreds if not thousands of other had. HP said it was everything but the printer (which is now scrapped). Yet another printer works fine in it's place. They effectivly sweep it under the rug, yet if it was open source, I bet someone would have found the bug and fixed it. If you will post your config files for jk and server.xml you might also get some feedback. Often a miscofiguration can cause all kinds of grief. One thing that peaks my curiosity is the line that says: Tomcat is probably not started or is listening on the wrong host/port (127.0.0.1:8009). How do you have the listener setup in Tomcat and what IP/name are you using in the config. Seems like sometimes jk is trying to call Tomcat on a port that is not setup to listen for it. So if you are not too disgusted to try again, please repost as stated above. Otherwise good luck on your quest for a different server. Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: javaURLContextFactory class or jar file
> From: Dave Bender [mailto:[EMAIL PROTECTED] > Subject: javaURLContextFactory class or jar file > > Where can I find the > org.apache.naming.java.javaURLContextFactory class file > or jar file that contains it? It's in common/lib/naming-java.jar, at least in 5.0.x. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is information on the number of downloads available?
You can try contacting the owner of the graphs to see if you can get more details. I do not know of any other ways to get these stats. -Tim Paul Luo Li wrote: Thanks Tim for the reply and the great link. It's difficult hard to decipher the actual numbers from the charts. Is there a chance that I can get the numbers used to generate the graphs? Also, I noticed that the chart only goes back to 2002. Does the information go back to 2000? I have bugzilla data on Tomcat 3, Tomcat 4, and Tomcat 5 going back to 2000. My plan is to fit a model using historical metrics information like LOC, download, deltas, etc., and the number of bugs in historical releases (i.e. tomcat 3.2, tomcat 4.0, and tomcat 4.1) then use the model to predict for the number of defects in the next release, given the metrics for the next release. In order to build the model, I need the download information for the historical releases. Thanks so much for the help Paul http://www.apache.org/~vgritsenko/stats/projects/tomcat.html But see the disclaimer at the bottom of the link above. -Tim Paul Luo Li wrote: Hi I'm a Ph.D. student at CMU looking for information on the number of times Tomcat is downloaded. I'm investigating defect occurrence (i.e. bugs) predictions for open source projects. I have done some preliminary work describing the defect occurrence patterns of Tomcat (and a couple of other systems, commercial and open source): http://www-2.cs.cmu.edu/~paulluo/Li-Techreport.pdf Next, I hope to predict the defect occurrence patterns using information including the number of times the code is downloaded. So, I was wondering if Tomcat tracks download information? And where I might to go get it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTTPconnector problem
> From: reynir [mailto:[EMAIL PROTECTED] > Subject: HTTPconnector problem > > is secure : false > port : 9099 > > this proves that I am accessing the correct port, but why is secure > false ? is this a bug that has been fixed ? There's no bug here. You're using HTTP to access port 9099, and, by definition, that's not secure. The isSecure() method will return true for HTTPS, and you have declared that to be on port 8443. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is information on the number of downloads available?
Thanks Tim for the reply and the great link. It's difficult hard to decipher the actual numbers from the charts. Is there a chance that I can get the numbers used to generate the graphs? Also, I noticed that the chart only goes back to 2002. Does the information go back to 2000? I have bugzilla data on Tomcat 3, Tomcat 4, and Tomcat 5 going back to 2000. My plan is to fit a model using historical metrics information like LOC, download, deltas, etc., and the number of bugs in historical releases (i.e. tomcat 3.2, tomcat 4.0, and tomcat 4.1) then use the model to predict for the number of defects in the next release, given the metrics for the next release. In order to build the model, I need the download information for the historical releases. Thanks so much for the help Paul http://www.apache.org/~vgritsenko/stats/projects/tomcat.html But see the disclaimer at the bottom of the link above. -Tim Paul Luo Li wrote: > Hi > I'm a Ph.D. student at CMU looking for information on the number of > times Tomcat is downloaded. I'm investigating defect occurrence (i.e. bugs) > predictions for open source projects. I have done some preliminary work > describing the defect occurrence patterns of Tomcat (and a couple of other > systems, commercial and open source): > http://www-2.cs.cmu.edu/~paulluo/Li-Techreport.pdf > > Next, I hope to predict the defect occurrence patterns using > information including the number of times the code is downloaded. So, I was > wondering if Tomcat tracks download information? And where I might to go get > it? > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Paul Luo Li ISRI - CS - CMU 5119 Wean Hall Pittsburgh PA, 15213 412-268-3043 [EMAIL PROTECTED] B.S. Mathematics, University of Virginia 2001. Ph.D Student Software Engineering, Carnegie Mellon University, 2001- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
No jsp compiles
I just installed tomcat 5.0.28 and java 1.4.2_06 on redhat and no JSP compiles, with the following error: Even jsp with one line in them Any ideas? org.apache.jasper.JasperException: Unable to compile class for JSP org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:520) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause java.lang.NullPointerException org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.doesModernCompilerExist(CompilerAdapterFactory.java:143) org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:97) org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:929) org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758) org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382) org.apache.jasper.compiler.Compiler.compile(Compiler.java:472) org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
RE: Session Objects
Thanks for responding. To manage session between an apllication and web servers. Is there any way to get that worked in clustered enviornment? Thanks Jagga "Dale, Matt" <[EMAIL PROTECTED]> wrote: Yes it will, this won't work accross a cluster. You need to use the regular session manager. Is there any reason why you put the sessions in a singleton? Ta Matt -Original Message- From: Jagadeesha T [mailto:[EMAIL PROTECTED] Sent: 08 February 2005 17:25 To: tomcat-user@jakarta.apache.org Subject: Session Objects Hi all, I' am storing session objects in a SINGLEON class object to keep all active sessions. Does it give any problems in clustered enviornment since singleton is a static referrence. Regards, Jagga __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com Any opinions expressed in this E-mail may be those of the individual and not necessarily the company. This E-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this E-mail in error and that any use or copying is strictly prohibited. If you have received this E-mail in error please notify the beCogent postmaster at [EMAIL PROTECTED] Unless expressly stated, opinions in this email are those of the individual sender and not beCogent Ltd. You must take full responsibility for virus checking this email and any attachments. Please note that the content of this email or any of its attachments may contain data that falls within the scope of the Data Protection Acts and that you must ensure that any handling or processing of such data by you is fully compliant with the terms and provisions of the Data Protection Act 1984 and 1998. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? All your favorites on one personal page Try My Yahoo!
Re: Session Objects
Could you explain why this won't work across a cluster? Thanks. On Tue, 8 Feb 2005 17:28:59 -, Dale, Matt <[EMAIL PROTECTED]> wrote: > > Yes it will, this won't work accross a cluster. > Hi all, > I' am storing session objects in a SINGLEON class object to keep all > active sessions. Does it give any problems in clustered enviornment since > singleton is a static referrence. > > Regards, > Jagga > -- The radiance of all the stars does not equal a sixteenth part of the moon's radiance, likewise, good deeds giving us merit, all these do not equal a sixteenth part of the merit of loving-kindness.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: outOfMemory exception under high load
Just a thought, I was having the same problem using JNDI for database connection. Our database pool was going crazy due to a lot of connections left unterminated and database memory usage was enormous. Restarting Tomcat would only help for a day or two and than OutOfMemory errors would come up again. Restarting the database, gave us several weeks until the error started coming up again once the memory used by database grew. Thinking that it had something to do with the memory it took to maintain the pool. Oleg On Mon, 7 Feb 2005 23:02:36 -0600, Caldarale, Charles R <[EMAIL PROTECTED]> wrote: > > From: Dale, Matt [mailto:[EMAIL PROTECTED] > > Subject: RE: outOfMemory exception under high load > > > > It could be your permanent generation that is running out of > > space. Get a hold of jvmstat to determine if this is the case. > > Another possibility is that you're exceeding your limit on the number of open > files. Exceeding any underlying OS limit is usually translated to an > OutOfMemory exception by the JVM. > > - Chuck > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you received > this in error, please contact the sender and delete the e-mail and its > attachments from all computers. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
javaURLContextFactory class or jar file
Where can I find the org.apache.naming.java.javaURLContextFactory class file or jar file that contains it? I'm trying to set up a simple JUnit test case JDNI fixture to create the JDNI context for my test cases. But I can't find where the class file sits. Does anybody have any idea? I would have guessed it's in the bootstrap.jar file, but when I include that in my classpath, I still get: javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.naming.java.javaURLContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.naming.java.javaURLContextFactory] Where does Tomcat get it from if not the bootstrap.jar file? Thanks in advance. Dave
RE: Session Objects
Yes it will, this won't work accross a cluster. You need to use the regular session manager. Is there any reason why you put the sessions in a singleton? Ta Matt -Original Message- From: Jagadeesha T [mailto:[EMAIL PROTECTED] Sent: 08 February 2005 17:25 To: tomcat-user@jakarta.apache.org Subject: Session Objects Hi all, I' am storing session objects in a SINGLEON class object to keep all active sessions. Does it give any problems in clustered enviornment since singleton is a static referrence. Regards, Jagga __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com Any opinions expressed in this E-mail may be those of the individual and not necessarily the company. This E-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this E-mail in error and that any use or copying is strictly prohibited. If you have received this E-mail in error please notify the beCogent postmaster at [EMAIL PROTECTED] Unless expressly stated, opinions in this email are those of the individual sender and not beCogent Ltd. You must take full responsibility for virus checking this email and any attachments. Please note that the content of this email or any of its attachments may contain data that falls within the scope of the Data Protection Acts and that you must ensure that any handling or processing of such data by you is fully compliant with the terms and provisions of the Data Protection Act 1984 and 1998. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session Objects
> From: Jagadeesha T [mailto:[EMAIL PROTECTED] > I' am storing session objects in a SINGLEON class > object to keep all active sessions. Does it give any problems > in clustered enviornment since singleton is a static referrence. Yes. Singletons are one-per-classloader. Classloaders are per-webapp, per-virtual-machine. So you will have one instance of your singleton for each node in your cluster. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Session Objects
Hi all, I' am storing session objects in a SINGLEON class object to keep all active sessions. Does it give any problems in clustered enviornment since singleton is a static referrence. Regards, Jagga __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Is information on the number of downloads available?
Nice. I was wondering if you know what has been used to generate the charts... Thank you in advance. --- Tim Funk <[EMAIL PROTECTED]> wrote: > http://www.apache.org/~vgritsenko/stats/projects/tomcat.html > > But see the disclaimer at the bottom of the link > above. > > > -Tim > > Paul Luo Li wrote: > > > Hi > > I'm a Ph.D. student at CMU looking for > information on the number of > > times Tomcat is downloaded. I'm investigating > defect occurrence (i.e. bugs) > > predictions for open source projects. I have done > some preliminary work > > describing the defect occurrence patterns of > Tomcat (and a couple of other > > systems, commercial and open source): > > http://www-2.cs.cmu.edu/~paulluo/Li-Techreport.pdf > > > > Next, I hope to predict the defect occurrence > patterns using > > information including the number of times the code > is downloaded. So, I was > > wondering if Tomcat tracks download information? > And where I might to go get > > it? > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > = [--°--] __ Do you Yahoo!? All your favorites on one personal page Try My Yahoo! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Is it possible to setup a custom ServerSocketFactory?
Hi all, I am using Tomcat 4.1.27, on a Windows XP SP2 host. I have tried to implement a custom ServerSocketFactory, and configured my CoyoteConnector to use it as its factory in the server.xml file. But, although an instance is created on startup, it seems no call is made to any of its createSocket() methods. Is there anything special that must be done for the connector to use my factory? It seems that CoyoteConnector is creating the ServerSocket by itself, or at least, without asking the specified factory. Thanks in advance, Rodrigo Ruiz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is information on the number of downloads available?
http://www.apache.org/~vgritsenko/stats/projects/tomcat.html But see the disclaimer at the bottom of the link above. -Tim Paul Luo Li wrote: Hi I'm a Ph.D. student at CMU looking for information on the number of times Tomcat is downloaded. I'm investigating defect occurrence (i.e. bugs) predictions for open source projects. I have done some preliminary work describing the defect occurrence patterns of Tomcat (and a couple of other systems, commercial and open source): http://www-2.cs.cmu.edu/~paulluo/Li-Techreport.pdf Next, I hope to predict the defect occurrence patterns using information including the number of times the code is downloaded. So, I was wondering if Tomcat tracks download information? And where I might to go get it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Is information on the number of downloads available?
Hi I'm a Ph.D. student at CMU looking for information on the number of times Tomcat is downloaded. I'm investigating defect occurrence (i.e. bugs) predictions for open source projects. I have done some preliminary work describing the defect occurrence patterns of Tomcat (and a couple of other systems, commercial and open source): http://www-2.cs.cmu.edu/~paulluo/Li-Techreport.pdf Next, I hope to predict the defect occurrence patterns using information including the number of times the code is downloaded. So, I was wondering if Tomcat tracks download information? And where I might to go get it? Thanks for all the help Paul Li Paul Luo Li ISRI - CS - CMU 5119 Wean Hall Pittsburgh PA, 15213 412-268-3043 [EMAIL PROTECTED] B.S. Mathematics, University of Virginia 2001. Ph.D Student Software Engineering, Carnegie Mellon University, 2001- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] RE: Attn developers of Tomcat and JK
Classic! " What's your problem? have you found something better at the same cost (0$)? If it doesn't fit your needs, don't use it." " If you want support, buy a supported product or a version of Tomcat that is re-sold by a company that offers commercial support. If you wish to pay for somebody's time to fix this, feel free to make the offer. If you want a free product, be prepared for the lack of support that entails. If you want a free product *and* free support, move to Oz; you're on the wrong planet." See http://jakarta.apache.org/tomcat/faq/tomcatuser.html#why And another person telling me to play World of Warcraft. So far I've gotten several responses back. And they all say the same thing. "The product sucks so go find another one." I guess I am living on Earth, just like the rest of you.
Re: Attn developers of Tomcat and JK
http://jakarta.apache.org/tomcat/faq/tomcatuser.html#why -Tim Eric Sandusky wrote: To the developers of Tomcat and JK: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Support Information Regarding - C0000005
Thank you for emailing Blizzard Entertainments Technical Support Department. In order to provide you with greater assistance, we have developed an automated reply system which evaluates your message and generates a detailed response towards it. Please read through this message as our automated reply system has helped many of our customers. If the response given below does not assist you or it is not relevant towards your message, please reply back to this email and a live technician will respond to you as soon as possible. == Support Information Regarding - C005: == If you are getting the error "Unhandled Exception: Access Violation C005": Uninstall and reinstall the game and download and install the latest patch from: (http://www.blizzard.com/patches) If this doesn't work, please try some of our other solutions: For Warcraft III Reign of Chaos: We recommend running in a selective startup to improve performance and stability. Firewall software, such as Zone Alarm, can cause lockups or prevent the game from starting. For instructions on how to run your computer in a selective startup, please visit our site at: (http://www.blizzard.com/support/?id=agn0558p). If the solution above does not help, please try the steps below. Download and install the latest DirectX from (http://www.microsoft.com/windows/directx/default.aspx?url=/windows/directx/downloads/default.htm) Make sure you have the latest drivers for your Video and Sound cards, next. A list of manufacturers with contact information can be found at (http://www.blizzard.com/support/?id=msi0369p). Download and install the latest chipset drivers for your motherboard. Check the motherboard manufacturer's website for updated chipset drivers, first. If you can't find updated drivers at the manufacturer's website, the next two most common locations for chipset drivers are (http://www.viaarena.com/?PageID=2) and (http://www.intel.com/support/chipsets/) If Warcraft III still has errors after updating drivers, download war3.reg from (http://ftp.blizzard.com/pub/war3/other/) and save it to your Windows Desktop. Once the file has been downloaded, double-click on it to import the registry info. This file will set Warcraft III to mute sound, run with the basic settings for video and set the refresh rate for the monitor to 60Hz. Once the game has started, you may select the options menu and adjust the video and sound settings as desired. For StarCraft users: Click on Start. Click on Run. Type "regedit" and click Ok. Click on the + icon beside the "HKey_Local_Machine" branch. Click on the + icon beside the "Software" branch. Select the "Battle.net" branch and press the delete key. Click on the + icon beside the "HKey_Current_User" branch. Click on the + icon beside the "Software" branch. Select the "Battle.net" branch and press the delete key. For Diablo II and Diablo II: Lord of Destruction: The first step in fixing this problem is to make sure you have the latest patch for the game. You can download the latest patch by going to (http://www.blizzard.com/patches). Next, download and install the latest chipset drivers for your motherboard. Check the motherboard manufacturer's website for updated chipset drivers, first. The two most common locations for chipset drivers are (http://www.viaarena.com/?PageID=2) and (http://www.intel.com/support/chipsets/). The next step if the patch does not work is to play the game in 2D mode if you are currently running in 3D. You can change this setting by re-running the Video Test. To run this test, click on Start, then Programs, then Diablo II and then Video Test. Also, try turning off the Automap as a troubleshooting step. Check your CD-ROM settings using the information provided at the following link: (http://www.blizzard.com/support/?id=mdb0404p) If this error persists, please send us any new D2#.txt and/or D2debug.txt files from the Diablo II folder on your hard drive. This will allow us to better troubleshoot your problem. Finally, you may have noticed that Diablo II causes the computer to work really hard. This is largely due to the many textures that are being used by the game at any given time, especially in 3D modes. Because of this, sometimes users who have this problem do not have trouble with any other programs. Sometimes this error will occur if your computer gets too hot, so anything you can do to lower the operating temperature of your computer might be useful. Lowering the clock speed will lower the operating temperature. You should also make sure that your processor is adequately cooled with a cooling fan and heatsink. Your processor manufacturer has specific recommendations for cooling fans for some of their chips. Please visit us on our Blizzard Entertainment Support site at (http://www.blizzard.com/support/?id=mdt0274p) for our latest
[OT] RE: Attn developers of Tomcat and JK
> From: Eric Sandusky [mailto:[EMAIL PROTECTED] [long FOAD rant elided] If you want support, buy a supported product or a version of Tomcat that is re-sold by a company that offers commercial support. If you wish to pay for somebody's time to fix this, feel free to make the offer. If you want a free product, be prepared for the lack of support that entails. If you want a free product *and* free support, move to Oz; you're on the wrong planet. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Attn developers of Tomcat and JK
What's your problem? have you found something better at the same cost (0$)? If it doesn't fit your needs, don't use it. --- Eric Sandusky <[EMAIL PROTECTED]> wrote: > To the developers of Tomcat and JK: > > As I can sense that not one single person is willing > to respond to this > issue, I can only assume that this tomcat-user > community is worthless. Not > only have I submitted this issue back 6 months ago, > but a similar post was > made by the user "A jie" twice within the last week. > > If you are too ashamed that your software is not > reliable enough to be > installed in a production environment, at least have > the decency of telling > us that. When I have to deal with user session data > being sent back to the > wrong client, sessions getting lost, and numerous > log errors stating that > the request/response cannot be fulfilled, I can only > come to one > conclusion.. Tomcat and the JK/JK2 connector are not > reliable. See below > and tell me that those messages would not cause > problems for the client. > > [Mon Feb 07 13:30:20 2005] [info] > jk_open_socket::jk_connect.c (183): > connect() failed errno = 61 > [Mon Feb 07 13:30:20 2005] [info] > ajp_connect_to_endpoint::jk_ajp_common.c > (862): Failed connecting to tomcat. Tomcat is > probably not started or is > listening on the wrong host/port (127.0.0.1:8009). > Failed errno = 61 > [Mon Feb 07 13:30:20 2005] [info] > ajp_send_request::jk_ajp_common.c (1186): > Error connecting to the Tomcat process. > [Mon Feb 07 13:30:20 2005] [info] > ajp_service::jk_ajp_common.c (1665): > Sending request to tomcat failed, recoverable > operation attempt=2 > [Mon Feb 07 13:30:20 2005] [error] > ajp_service::jk_ajp_common.c (1673): > Error connecting to tomcat. Tomcat is probably not > started or is listening > on the wrong port. worker=ajp13w failed errno = 61 > [Mon Feb 07 13:30:20 2005] [error] > HttpExtensionProc::jk_isapi_plugin.c > (937): service() failed > > If Tomcat + JK cannot process every request/response > on a Windows server > that is dual-xeon 3.0 Ghz processors with 4 GB of > memory, then what machine > would? > > And doesn't it seem strange how the JK2 project has > been mysteriously > abandoned? Thanks for going off in a seemingly > better direction only to > jump ship and leave everyone SOL. It makes me think > that this whole Tomcat > development effort is more of just a hobby and not > something to be taken > seriously. > > If anyone is willing to contact me on this issue, I > would be more than happy > to talk one-on-one. If you want to tell me that > this is not the forum for > ranting about Tomcat or JK, it should be. If you > want to blackball me from > this community, go ahead, I'm not getting any help > from it as it is. I can > only hope that this message reaches the people who > supposedly support this > software and lights a fire underneath them to > improve it or tell us that it > just doesn't work. > > Eric > > -Original Message- > From: Eric Sandusky > [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 02, 2005 11:40 AM > To: Tomcat Users List > Subject: ISAPI redirector warnings > > While running Tomcat 5 with IIS and JK2.. > > > > The Windows Application Logs often log several > Warnings at the same point in > time, see below for example. The problem is, these > Warnings pile up in the > Windows Event logs and force the Administrator to > manually clear out the > logs daily or weekly. > > > > I am not looking to simply suppress these messages, > but find a solution to > the actual problem. This issue seems to occur at > random and things such as > session confusion (user A sees user B's data) and > other noticeable issues > happen at or around the same time as these warnings. > > > > What is the reason for these log entries? > > > > How can I eliminate these log entries? > > > > Error: [jk_worker_ajp13.c (648)]: ajp13.service() > Error forwarding > ajp13:localhost:8009 1 0 > > Error: [jk_worker_ajp13.c (546)]: ajp13.service() > ajpGetReply recoverable > error 3 > > Error: [jk_handler_response.c (140)]: > handler.response() Error sending > response > > Error: [jk_service_iis.c (126)]: > jk_ws_service_t::head, > ServerSupportFunction failed > > Error: [jk_worker_ajp13.c (546)]: ajp13.service() > ajpGetReply recoverable > error 3 > > Error: [jk_handler_response.c (140)]: > handler.response() Error sending > response > > Error: [jk_service_iis.c (126)]: > jk_ws_service_t::head, > ServerSupportFunction failed > > > > Configuration: > > Windows 2000 or Windows 2003 Server > > Apache Tomcat 5.0.25 or 5.0.28 > > Microsoft IIS 5 or 6 > > JK2 2.0.4 connector > > > > Workers2.properties > > [shm:] > > info=Shared memory file. Required for multiprocess > servers > > file=d:\tomcat5.0.28\work\jk20.shm > > size=100 > > > > # Define the communication channel > > [channel.socket:localhost:8009] > > tomcatId=localhost:8009 > > > > [ajp13:local
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.doesModernCompilerExist(CompilerAdapterFactory.java:143)
Hello, I recently installed tomcat 5.0.28 and java 1.4.2_06. I get the default app and can execute servlets, but if i execute any jsp that is NOT defined in the jsp-examples web app, i get the error above. Full stack trace below: I have no idea what is causing this. Please help. type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:520) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause java.lang.NullPointerException org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.doesModernCompilerExist(CompilerAdapterFactory.java:143) org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:97) org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:929) org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758) org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382) org.apache.jasper.compiler.Compiler.compile(Compiler.java:472) org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
Re: [SOLVED] Form Auth + xml users database
nobody can help me? On Mon, 7 Feb 2005 09:57:32 +0100, Omar Adobati <[EMAIL PROTECTED]> wrote: > Thx for ur answers, I have reied what you say about the second > question, but it's do not work. This is how I have changed my > "context.xml" file: > === > > workDir="work\Catalina\photoalbum\" path="/" cacheTTL="0" > cachingAllowed="false" displayName="bannerEmbedded beta" docBase="." > cacheMaxSize="0" reloadable="true"> > resourceName="PhotoAlbum"/> > directory="logs/photoalbum/" fileDateFormat="-MM-dd" suffix=".txt" > prefix="photoalbum_access_log."/> > > name="PhotoAlbum"/> > > > factory > org.apache.catalina.users.MemoryUserDatabaseFactory > > > pathname > conf/Catalina/photoalbum.localhost/photoalbum-users.xml > > > > === > > I have removed the ResourceParams from the server.xml file and move it > into the context.xml but in the log I can read this errors messages: > 1) javax.naming.NameNotFoundException: Name PhotoAlbum is not bound in > this Context > 2) GRAVE: Catalina.start: > LifecycleException: No UserDatabase component found under key PhotoAlbum > 3) 2005-02-07 09:55:30 UserDatabaseRealm[photoalbum.localhost]: > Exception looking up UserDatabase under key PhotoAlbum > javax.naming.NameNotFoundException: Name PhotoAlbum is not bound in this > Context > > do u know why? I have I have give you all the elements you need to help me. > > On Sun, 06 Feb 2005 22:21:21 +0100, Mario Winterer > <[EMAIL PROTECTED]> wrote: > > Hi! > > > > I'm happy you could solve your problem now! Seems the reason was the > > missing Realm-definition in your context.xml. > > > > To Question 1) > > Tomcat offers a separate JNDI-namespace for each web application (so if > > you have 4 web applications you will have 4 namespaces). These > > namespaces are configured in the -elements of the corresponsing > > web-applications. To define resources, you have to nest a > > -element in your -element (which should be in > > context.xml). > > A resource that is defined in the namespace of a web application cannot > > be seen by other web applications (because the namespaces are separated > > from each other). > > Sometimes, a resource may be required by more than one web application. > > To avoid configuring this resource several times - once per context - > > tomcat offers another namespace that is global and exists only once per > > tomcat instance. If you define a resource there, you can use it in each > > web application, that is allowed to use it. > > So how can you allow a web application to use a global resource? Simply > > "link" the global resource into the local JNDI-namespace of the > > web-application! This can be done by nesting a element in > > the element of the web-application that should be allowed to > > use the resource. When defining a -element, you must > > specify, which global resource you want to link into the namespace > > (attribut "global"), which type the resource is that you want to link > > (attribut "type"), and which name it should have in the local namespace > > (attribut "name") - this name can be equal to the global name. > > > > So the server.xml and context.xml hierarchy could look like the > > following (sorry for the "text-art" - use a fixed width font for "best > > results"): > > > > +- Server > > | > > +- GlobalNamingResources > > | +- Resource GlobResA > > | +- Resource GlobResB > > | > > +- Service > > +- Engine > > +- Realm X > > +- Host www.A.org > > | +- Context /A1 (defined in context.xml) > > | | +- ResourceLink to GlobResA, name: LocResA > > | | > > | +- Context /A2 (defined in context.xml) > > | | +- ResourceLink to GlobResA, name: LocResA > > | | +- ResourceLink to GlobResB, name: LocResB > > | | > > | +- Context /A3 (defined in context.xml) > > | +- Resource, name LocalResA > > | > > +- Host www.B.org > >+- Context /B1 > >| +- ResourceLink to GlobResA, name: LocResA > >| > >+- Context /B2 > > +- ResourceLink to GlobResB, name: LocResB > > > > Question 2) If you do not want to change server.xml (e.g. because you > > want to deploy your application to a foreign server and you cannot > > modify server.xml there), you could define a local JNDI-Resource in the > > -element of your web-application instead of the > > GlobalNamingResource (simply move the resource-definition from > > into your -element). If you do this, of > > course you do not need the any more! > > So you do not have to touch server.xml because all configurations can be > > done inside context.xml which is in the meta-inf directory of your web > > application. > > > > I hope, my explanations where understandable! > > > > Best regards, > > Tex > > > > > > Omar Adobati wrote: > > > > >changes in server.xml: > > >=== > > > > > > > > > > >name="PhotoAlbum"/> >
Attn developers of Tomcat and JK
To the developers of Tomcat and JK: As I can sense that not one single person is willing to respond to this issue, I can only assume that this tomcat-user community is worthless. Not only have I submitted this issue back 6 months ago, but a similar post was made by the user "A jie" twice within the last week. If you are too ashamed that your software is not reliable enough to be installed in a production environment, at least have the decency of telling us that. When I have to deal with user session data being sent back to the wrong client, sessions getting lost, and numerous log errors stating that the request/response cannot be fulfilled, I can only come to one conclusion.. Tomcat and the JK/JK2 connector are not reliable. See below and tell me that those messages would not cause problems for the client. [Mon Feb 07 13:30:20 2005] [info] jk_open_socket::jk_connect.c (183): connect() failed errno = 61 [Mon Feb 07 13:30:20 2005] [info] ajp_connect_to_endpoint::jk_ajp_common.c (862): Failed connecting to tomcat. Tomcat is probably not started or is listening on the wrong host/port (127.0.0.1:8009). Failed errno = 61 [Mon Feb 07 13:30:20 2005] [info] ajp_send_request::jk_ajp_common.c (1186): Error connecting to the Tomcat process. [Mon Feb 07 13:30:20 2005] [info] ajp_service::jk_ajp_common.c (1665): Sending request to tomcat failed, recoverable operation attempt=2 [Mon Feb 07 13:30:20 2005] [error] ajp_service::jk_ajp_common.c (1673): Error connecting to tomcat. Tomcat is probably not started or is listening on the wrong port. worker=ajp13w failed errno = 61 [Mon Feb 07 13:30:20 2005] [error] HttpExtensionProc::jk_isapi_plugin.c (937): service() failed If Tomcat + JK cannot process every request/response on a Windows server that is dual-xeon 3.0 Ghz processors with 4 GB of memory, then what machine would? And doesn't it seem strange how the JK2 project has been mysteriously abandoned? Thanks for going off in a seemingly better direction only to jump ship and leave everyone SOL. It makes me think that this whole Tomcat development effort is more of just a hobby and not something to be taken seriously. If anyone is willing to contact me on this issue, I would be more than happy to talk one-on-one. If you want to tell me that this is not the forum for ranting about Tomcat or JK, it should be. If you want to blackball me from this community, go ahead, I'm not getting any help from it as it is. I can only hope that this message reaches the people who supposedly support this software and lights a fire underneath them to improve it or tell us that it just doesn't work. Eric -Original Message- From: Eric Sandusky [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 02, 2005 11:40 AM To: Tomcat Users List Subject: ISAPI redirector warnings While running Tomcat 5 with IIS and JK2.. The Windows Application Logs often log several Warnings at the same point in time, see below for example. The problem is, these Warnings pile up in the Windows Event logs and force the Administrator to manually clear out the logs daily or weekly. I am not looking to simply suppress these messages, but find a solution to the actual problem. This issue seems to occur at random and things such as session confusion (user A sees user B's data) and other noticeable issues happen at or around the same time as these warnings. What is the reason for these log entries? How can I eliminate these log entries? Error: [jk_worker_ajp13.c (648)]: ajp13.service() Error forwarding ajp13:localhost:8009 1 0 Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply recoverable error 3 Error: [jk_handler_response.c (140)]: handler.response() Error sending response Error: [jk_service_iis.c (126)]: jk_ws_service_t::head, ServerSupportFunction failed Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply recoverable error 3 Error: [jk_handler_response.c (140)]: handler.response() Error sending response Error: [jk_service_iis.c (126)]: jk_ws_service_t::head, ServerSupportFunction failed Configuration: Windows 2000 or Windows 2003 Server Apache Tomcat 5.0.25 or 5.0.28 Microsoft IIS 5 or 6 JK2 2.0.4 connector Workers2.properties [shm:] info=Shared memory file. Required for multiprocess servers file=d:\tomcat5.0.28\work\jk20.shm size=100 # Define the communication channel [channel.socket:localhost:8009] tomcatId=localhost:8009 [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [uri:/Concept60/*] worker=ajp13:localhost:8009 Server.xml isapi_redirector2.reg [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\2.0] "workersFile"="d:\\tomcat5.0.28\\conf\\workers2.properties" "extensionUri"="/jakarta2/isapi_redirector2.dll" "logLevel"="debug" "serverRoot"="d:\\tomcat5.0.28\\" - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm
RE: JTDS help
> From: Charles P. Killmer [mailto:[EMAIL PROTECTED] > I am > going to run filemon and watch for access denied messages, then regmon > and watch for similar things. The network is very fast, the db server > is not being used by anyone else. It seems to me that if it were > environmental, it would affect these other programming languages the > same. I checked and the jtds.jar file is in tomcat\common\lib. > > Any other thoughts while you wait for the results from filemon and > regmon? Basically, I suspect a delay being introduced, most likely by some unexpected authentication. Last twice I saw a 2-3 second delay, both were from a SQL Server trying to authenticate and not having a domain controller within easy reach. What user is your Tomcat server running as, what protocol are you using to connect to SQL Server? And if you run osql.exe as that same user on that same machine, what behaviour do you see? Other steps to look for delays: 1. Fire up a SQL Profiler. Watch for activity. How soon after the request for the page is made, does the connection request get made? 2. What's the CPU usage on the Tomcat box? On the SQL box? 3. With a network sniffer, monitor the traffic flow between the two boxes. What's being sent when? I'm aware that I could be barking up entirely the wrong tree here - especially if your Tomcat isn't running as a service and is running as your domain user account - but it just might be worth a check. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JTDS help
Hey Charles, I'm sure it's quite frustrating, but I've already shown that your precise code runs way faster than your original statistics, and that was only on a modest box. It serves no purpose therefore to believe it could be the language of choice, because I cannot replicate your speed issue. See what your monitoring brings back. What kind of setup are you running? Allistair. > -Original Message- > From: Charles P. Killmer [mailto:[EMAIL PROTECTED] > Sent: 08 February 2005 15:33 > To: Tomcat Users List > Subject: RE: JTDS help > > > I don't mean to be contrary, I am just trying to pin this down. The > database and tomcat server are only separated by a 10/100 > switch. I am > going to run filemon and watch for access denied messages, then regmon > and watch for similar things. The network is very fast, the db server > is not being used by anyone else. It seems to me that if it were > environmental, it would affect these other programming languages the > same. I checked and the jtds.jar file is in tomcat\common\lib. > > Any other thoughts while you wait for the results from filemon and > regmon? > > Thank you > Charles > > -Original Message- > From: Allistair Crossley [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 08, 2005 8:44 AM > To: Tomcat Users List > Subject: RE: JTDS help > > Hi, > > No it was a totally raw test of your code which by virtue of using > DriverManager does not use connection pooling even if I do have it > enabled in my web app. > > jTDS installation is simply adding the JAR to tomcat/common/lib > > Are you running Tomcat on the same server as the database? > > Config file won't have anything to do with this. I am certain it is > environmental. > > Ali. > > > -Original Message- > > From: Charles P. Killmer [mailto:[EMAIL PROTECTED] > > Sent: 08 February 2005 14:41 > > To: Tomcat Users List > > Subject: RE: JTDS help > > > > > > Well I must have missed something because it isn't working > correctly. > > ;) Were you using connection pooling in your test? Perhaps I have > > something messed up in a config file? Or installed jTDS > incorrectly? > > > > Thanks for all your help. > > Charles > > > > -Original Message- > > From: Allistair Crossley [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, February 08, 2005 3:17 AM > > To: Tomcat Users List > > Subject: RE: JTDS help > > > > Hi Charles, > > > > I've just taken your code and run it through our Tomcat > 5.5, jTDS, SQL > > > Server 2000 web application and it took approx. 0.5s to compile and > > subsequent requests were instantaneous < 0.5s. > > > > I would look again at the issues I first noted, perhaps there is > > something you have missed. > > > > Cheers, Allistair. > > > > > -Original Message- > > > From: Charles P. Killmer [mailto:[EMAIL PROTECTED] > > > Sent: 07 February 2005 22:42 > > > To: Tomcat Users List > > > Subject: RE: JTDS help > > > > > > > > > When I strip the code to simply this, > > > > > > <%@ page language="java" import="java.sql.*"%> <% > Connection conn = > > > DriverManager.getConnection("jdbc:jtds:sqlserver://*.*.*.*:143 > > > 3/dbname;u > > > ser=*;password=**"); > > > conn.close(); > > > %> > > > > > > It still runs slowly. And yes it is multiple refreshes. > > > > > > I have tried to use connection pooling but have not been > > able to get > > > it working yet. Also the thing that I run into with connection > > > pooling the inability to use the SQL Statement of "select > > @@IDENTITY > > > from table". > > > With connection pooling, you run the risk of getting the ID for a > > > record that someone else inserted with the same connection. > > > > > > If connection pooling is the only option, I can work around that > > > issue. > > > But it seems that if PHP, ASP, ASP.NET... Can access the > > database just > > > > > fine without connection pooling, JSP should be able to as well. > > > > > > Any thoughts? > > > Thanks for all your input. > > > Charles > > > > > > -Original Message- > > > From: Mario Winterer [mailto:[EMAIL PROTECTED] > > > Sent: Monday, February 07, 2005 2:43 PM > > > To: Tomcat Users List > > > Subject: Re: JTDS help > > > > > > I do not think, jsp compilation is the problem - well, the first > > > request will last long, but after the jsp is compiled, subsequent > > > calls will not be remarkable slower than executing pure compiled > > > servlet code. > > > (Charles, I hope you did not measure the time for the > first request > > > only > > > - which indeed includes compilation time, but for > subsequent calls > > > too). > > > So to me opening the connection is the major problem. > > Because the code > > > > > itself contains html-output, I think using jsp is quite ok. > > > The code would be much cleaner, if Charles used the JSTL > > tag-library: > > > > > > <%@ page language="java"%> > > > <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %> <%@ > > >
RE: JTDS help
I don't mean to be contrary, I am just trying to pin this down. The database and tomcat server are only separated by a 10/100 switch. I am going to run filemon and watch for access denied messages, then regmon and watch for similar things. The network is very fast, the db server is not being used by anyone else. It seems to me that if it were environmental, it would affect these other programming languages the same. I checked and the jtds.jar file is in tomcat\common\lib. Any other thoughts while you wait for the results from filemon and regmon? Thank you Charles -Original Message- From: Allistair Crossley [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 08, 2005 8:44 AM To: Tomcat Users List Subject: RE: JTDS help Hi, No it was a totally raw test of your code which by virtue of using DriverManager does not use connection pooling even if I do have it enabled in my web app. jTDS installation is simply adding the JAR to tomcat/common/lib Are you running Tomcat on the same server as the database? Config file won't have anything to do with this. I am certain it is environmental. Ali. > -Original Message- > From: Charles P. Killmer [mailto:[EMAIL PROTECTED] > Sent: 08 February 2005 14:41 > To: Tomcat Users List > Subject: RE: JTDS help > > > Well I must have missed something because it isn't working correctly. > ;) Were you using connection pooling in your test? Perhaps I have > something messed up in a config file? Or installed jTDS incorrectly? > > Thanks for all your help. > Charles > > -Original Message- > From: Allistair Crossley [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 08, 2005 3:17 AM > To: Tomcat Users List > Subject: RE: JTDS help > > Hi Charles, > > I've just taken your code and run it through our Tomcat 5.5, jTDS, SQL > Server 2000 web application and it took approx. 0.5s to compile and > subsequent requests were instantaneous < 0.5s. > > I would look again at the issues I first noted, perhaps there is > something you have missed. > > Cheers, Allistair. > > > -Original Message- > > From: Charles P. Killmer [mailto:[EMAIL PROTECTED] > > Sent: 07 February 2005 22:42 > > To: Tomcat Users List > > Subject: RE: JTDS help > > > > > > When I strip the code to simply this, > > > > <%@ page language="java" import="java.sql.*"%> <% Connection conn = > > DriverManager.getConnection("jdbc:jtds:sqlserver://*.*.*.*:143 > > 3/dbname;u > > ser=*;password=**"); > > conn.close(); > > %> > > > > It still runs slowly. And yes it is multiple refreshes. > > > > I have tried to use connection pooling but have not been > able to get > > it working yet. Also the thing that I run into with connection > > pooling the inability to use the SQL Statement of "select > @@IDENTITY > > from table". > > With connection pooling, you run the risk of getting the ID for a > > record that someone else inserted with the same connection. > > > > If connection pooling is the only option, I can work around that > > issue. > > But it seems that if PHP, ASP, ASP.NET... Can access the > database just > > > fine without connection pooling, JSP should be able to as well. > > > > Any thoughts? > > Thanks for all your input. > > Charles > > > > -Original Message- > > From: Mario Winterer [mailto:[EMAIL PROTECTED] > > Sent: Monday, February 07, 2005 2:43 PM > > To: Tomcat Users List > > Subject: Re: JTDS help > > > > I do not think, jsp compilation is the problem - well, the first > > request will last long, but after the jsp is compiled, subsequent > > calls will not be remarkable slower than executing pure compiled > > servlet code. > > (Charles, I hope you did not measure the time for the first request > > only > > - which indeed includes compilation time, but for subsequent calls > > too). > > So to me opening the connection is the major problem. > Because the code > > > itself contains html-output, I think using jsp is quite ok. > > The code would be much cleaner, if Charles used the JSTL > tag-library: > > > > <%@ page language="java"%> > > <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %> <%@ > > taglib prefix="sql" uri="http://java.sun.com/jstl/sql"; %> > > sql="SELECT * FROM accounts" var="accounts" > > dataSource="jndi/myDataSource"/> > > > >> value="${acc.ID}"/> value="${acc.Name}"/> > > > > > > Best regards, > > Tex > > > > David Smith wrote: > > > > > Ok. You're doing this in a jsp. That means Tomcat is: > > > > > > 1) Compiling your jsp to a servlet class. > > > 2) Building a connection from scratch as opposed to picking up a > > > pooled connection > > > 3) Running the query. > > > > > > Of these, the first one is the most expensive operation > followed by > > > two. If you want fast, try doing this with a pooled > connection and > > > from compiled servlet code. > > > > > > --David > > > > > > Charles P. Killmer wrote: > > > > > >> Network results > > >> Ping statistics for *.*.*.*: > > >> Pa
HTTPconnector problem
Hi, I'm using the following setup in my server.xml (4.1. of tomcat). and when I run the following jsp code : <% out.write("is secure : "+ request.isSecure()); out.write("port : "+ request.getServerPort()); %> I get the following results : is secure : false port : 9099 this proves that I am accessing the correct port, but why is secure false ? is this a bug that has been fixed ? thanx -reynir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Does CoyoteConnector's connectionLinger option work?
Hi all, I am having problems with the configuration of a Tomcat 4.1.27 server on a Windows XP box. Although I use the following connector configuration in my server.xml file: I am getting lots of TIME_WAIT sockets in my computer. The client app is located in a remote machine, and since I disabled the SO_LINGER option on it, I stopped to get TIME_WAITs in the client side. Setting the connectionLinger attribute to -1 should have made accept sockets to close inmediately without passing by this state (at least, that is the behaviour I am getting in the client side). Is there something wrong in my statements, or I have found a bug? Thanks in advance, Rodrigo Ruiz -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.6 - Release Date: 07/02/2005 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JTDS help
Hi, No it was a totally raw test of your code which by virtue of using DriverManager does not use connection pooling even if I do have it enabled in my web app. jTDS installation is simply adding the JAR to tomcat/common/lib Are you running Tomcat on the same server as the database? Config file won't have anything to do with this. I am certain it is environmental. Ali. > -Original Message- > From: Charles P. Killmer [mailto:[EMAIL PROTECTED] > Sent: 08 February 2005 14:41 > To: Tomcat Users List > Subject: RE: JTDS help > > > Well I must have missed something because it isn't working correctly. > ;) Were you using connection pooling in your test? Perhaps I have > something messed up in a config file? Or installed jTDS incorrectly? > > Thanks for all your help. > Charles > > -Original Message- > From: Allistair Crossley [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 08, 2005 3:17 AM > To: Tomcat Users List > Subject: RE: JTDS help > > Hi Charles, > > I've just taken your code and run it through our Tomcat 5.5, jTDS, SQL > Server 2000 web application and it took approx. 0.5s to compile and > subsequent requests were instantaneous < 0.5s. > > I would look again at the issues I first noted, perhaps there is > something you have missed. > > Cheers, Allistair. > > > -Original Message- > > From: Charles P. Killmer [mailto:[EMAIL PROTECTED] > > Sent: 07 February 2005 22:42 > > To: Tomcat Users List > > Subject: RE: JTDS help > > > > > > When I strip the code to simply this, > > > > <%@ page language="java" import="java.sql.*"%> <% Connection conn = > > DriverManager.getConnection("jdbc:jtds:sqlserver://*.*.*.*:143 > > 3/dbname;u > > ser=*;password=**"); > > conn.close(); > > %> > > > > It still runs slowly. And yes it is multiple refreshes. > > > > I have tried to use connection pooling but have not been > able to get > > it working yet. Also the thing that I run into with connection > > pooling the inability to use the SQL Statement of "select > @@IDENTITY > > from table". > > With connection pooling, you run the risk of getting the ID for a > > record that someone else inserted with the same connection. > > > > If connection pooling is the only option, I can work around that > > issue. > > But it seems that if PHP, ASP, ASP.NET... Can access the > database just > > > fine without connection pooling, JSP should be able to as well. > > > > Any thoughts? > > Thanks for all your input. > > Charles > > > > -Original Message- > > From: Mario Winterer [mailto:[EMAIL PROTECTED] > > Sent: Monday, February 07, 2005 2:43 PM > > To: Tomcat Users List > > Subject: Re: JTDS help > > > > I do not think, jsp compilation is the problem - well, the first > > request will last long, but after the jsp is compiled, subsequent > > calls will not be remarkable slower than executing pure compiled > > servlet code. > > (Charles, I hope you did not measure the time for the first request > > only > > - which indeed includes compilation time, but for subsequent calls > > too). > > So to me opening the connection is the major problem. > Because the code > > > itself contains html-output, I think using jsp is quite ok. > > The code would be much cleaner, if Charles used the JSTL > tag-library: > > > > <%@ page language="java"%> > > <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %> <%@ > > taglib prefix="sql" uri="http://java.sun.com/jstl/sql"; %> > > sql="SELECT * FROM accounts" var="accounts" > > dataSource="jndi/myDataSource"/> > > > >> value="${acc.ID}"/> value="${acc.Name}"/> > > > > > > Best regards, > > Tex > > > > David Smith wrote: > > > > > Ok. You're doing this in a jsp. That means Tomcat is: > > > > > > 1) Compiling your jsp to a servlet class. > > > 2) Building a connection from scratch as opposed to picking up a > > > pooled connection > > > 3) Running the query. > > > > > > Of these, the first one is the most expensive operation > followed by > > > two. If you want fast, try doing this with a pooled > connection and > > > from compiled servlet code. > > > > > > --David > > > > > > Charles P. Killmer wrote: > > > > > >> Network results > > >> Ping statistics for *.*.*.*: > > >> Packets: Sent = 140, Received = 140, Lost = 0 (0% loss), > > Approximate > > >> round trip times in milli-seconds: > > >> Minimum = 0ms, Maximum = 0ms, Average = 0ms Query Analyzer > > returns 85 > > > > >> rows in 0 seconds. I modified it to only return Name and > ID and it > > >> still runs slow. So it cant be row size, network > latency, hardware > > >> should be ruled out by the fact that it runs super fast > > through query > > > > >> analyzer, and PHP and ASP.NET. Its only when I write the > > code in JSP > > >> for Tomcat that it slows down. > > >> > > >> Charles > > >> > > >> > > >> -Original Message- > > >> From: Allistair Crossley > [mailto:[EMAIL PROTECTED] Sent: > > >> Monday, February 07, 2005 11