RE: Mod JK - RedHat Enterprise 2.1 - Tomcat
Thanks for the various URLs. Was hoping that I would get a better answer than having to find source and compile or reinstall. Those answers are what I expect from MS. Was hoping for a simple get patch here download. This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return email and delete this communication and destroy all copies. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
No access logs!
Hello, I have installed Tomcat 5 recently, and it's not producing access logs. I have the Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=common resolveHosts=false/ but in my server.xml file, but there are no access logs produced anywhere (only localhost logs). I've tried reinstalling Tomcat 5, but no joy. I don't know much about Tomcat, so maybe I'm missing something obvious. Does anyone have any ideas? Thanks, James
Re: No access logs!
There are no Context tags. Are we getting warmer? - Original Message - From: QM [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, August 12, 2004 11:25 PM Subject: Re: No access logs! On Thu, Aug 12, 2004 at 10:19:55PM +0100, James H wrote: : I have installed Tomcat 5 recently, and it's not producing access logs. I have the : : Valve className=org.apache.catalina.valves.AccessLogValve : directory=logs prefix=localhost_access_log. suffix=.txt : pattern=common resolveHosts=false/ : : but in my server.xml file, but there are no access logs produced anywhere (only localhost logs). : : I don't know much about Tomcat, so maybe I'm missing something obvious. Does anyone have any ideas? Check Context tags for the override attr, and confirm that Valve is in the right part of server.xml. (IIRC it can be in a few places, but not all ;) For the archives: if your Valve is defined in context.xml inside a WAR file, be sure to check the deployed XML file in {tomcat}/conf/{engine}/{host}/{context}.xml (or remove it, to force Tomcat to reload the WAR files context.xml. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - 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: Apache + Tomcat socket error
John, From what you've said, I don't believe this is a Tomcat issue, but rather an Apache configuration problem. Make sure that your mod_proxy module is being loaded in the httpd.conf file ( see document: http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#proxypass ) james -Original Message- From: John Archbold [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 2:36 PM To: Tomcat Users List Subject: Re: Apache + Tomcat socket error Hi James thaanks for your help to begin with. I forgot to mention im using apache2 and tomcat5, i tried what u said and it came back with invalid command proxypass have you got any other ideas? On Mon, 19 Jul 2004 16:35:56 -0500, McClure, James [EMAIL PROTECTED] wrote: Hi John, Give this a try... To get to your application via Apache (as a proxy) you will need to configure Apache to pass the request/response via Tomcat by specifying where to go when it sees that you are asking for the specific web application. Create a new file [apache home directory]/conf/myproxy.conf In this file add these 2 proxy entries (port # is for Tomcat 4): ProxyPass /MyFirst/HelloWorld/ http://localhost:8080/MyFirst/HelloWorld ProxyPassReverse /MyFirst/HelloWorld/ http://localhost:8080/MyFirst/HelloWorld Now reference this new file in your httpd.conf file located in ...[apache home directory]/conf/ by adding the following entry at the bottom of the file: include conf/myproxy.conf Restart apache james -Original Message- From: John Archbold [mailto:[EMAIL PROTECTED] Sent: Monday, July 19, 2004 4:17 PM To: [EMAIL PROTECTED] Subject: Apache + Tomcat socket error Hello everyone, I have a simple (probably) yet difficult problem that i cant seem to fix. I installed apache (from source) and tomcat (from binary) and i compiled the jakarta connector as one should. If i issue http://localhost:8080/ i get the tomcat homepage if i issue http://localhost/ i get apache. I followed instructions from a website to set all this up you see. I even managed to compile a servlet and get it working if i issue http://localhost:8080/MyFirst/HelloWorld yet if i issue http://localhost/MyFirst/HelloWorld it is not visible, it says the resource is busy etc. I have noticed tho that the socket file that is specified to be created is infact not being created, ive tried changing the location of the socket file and even using touch to create it. Nothing seems to work. I expect this is some novice problem and im just missing something out. Can anyone help? Many many thanks (ive been trying for weeks to sort this out!) John A - 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]
DefaultContext content not available in Servlet init()
Hello users, My environment: Tomcat 4.1.24, JDK 1.4.1_02, XP. I'm attempting to move some existing jdbc initialization into my servlet's init() method which uses JNDI lookup. This is failing and yielding an exception with the message: Name jdbc is not bound in this Context. The exception is being thrown during the call to the context lookup() method. Prior to these modifications, the same logic exists in the doGet() portion of the servlet and works just fine. My current server.xml configuration contains a DefaultContext section which contains all of my various jdbc resources since these are common to all of web-apps. By trial and error, I have found that if I make a copy of the DefaultContext content and place it as a part of *each* web-app context, then the relocated logic works in init(). However, maintaining multiple entries for each jdbc source I have is not acceptable. I've seen complaints about DefaultContext not working properly, but cannot find anyone who has a workaround for this specific issue. Has anyone seen and addressed this issue successfully? James McClure [EMAIL PROTECTED]
RE: Apache + Tomcat socket error
Hi John, Give this a try... To get to your application via Apache (as a proxy) you will need to configure Apache to pass the request/response via Tomcat by specifying where to go when it sees that you are asking for the specific web application. Create a new file [apache home directory]/conf/myproxy.conf In this file add these 2 proxy entries (port # is for Tomcat 4): ProxyPass /MyFirst/HelloWorld/ http://localhost:8080/MyFirst/HelloWorld ProxyPassReverse /MyFirst/HelloWorld/ http://localhost:8080/MyFirst/HelloWorld Now reference this new file in your httpd.conf file located in ...[apache home directory]/conf/ by adding the following entry at the bottom of the file: include conf/myproxy.conf Restart apache james -Original Message- From: John Archbold [mailto:[EMAIL PROTECTED] Sent: Monday, July 19, 2004 4:17 PM To: [EMAIL PROTECTED] Subject: Apache + Tomcat socket error Hello everyone, I have a simple (probably) yet difficult problem that i cant seem to fix. I installed apache (from source) and tomcat (from binary) and i compiled the jakarta connector as one should. If i issue http://localhost:8080/ i get the tomcat homepage if i issue http://localhost/ i get apache. I followed instructions from a website to set all this up you see. I even managed to compile a servlet and get it working if i issue http://localhost:8080/MyFirst/HelloWorld yet if i issue http://localhost/MyFirst/HelloWorld it is not visible, it says the resource is busy etc. I have noticed tho that the socket file that is specified to be created is infact not being created, ive tried changing the location of the socket file and even using touch to create it. Nothing seems to work. I expect this is some novice problem and im just missing something out. Can anyone help? Many many thanks (ive been trying for weeks to sort this out!) John A - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache miss handling jsp files
I have tomcat 4 installed on a RedHat based server. I have aliases set up for a test domain. The site works fine when going to the test domain :8080, but when I try to go to the site without port :8080 the original tomcat page comes up. So it seems tomcat is working properly because the 8080 port answers correctly. So when apache answers it seems to ignore the DocumentRoot's index.jsp and serves the tomcat page. If I go to a phpinfo.php page within the DocumentRoot apache will answer properly. Can someone shed some light as to what I'm missing in the server set up. Thank you in advance for any help you can provide - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
starting tomcat on boot messes classpath
Ok, please can someone help this is driving me mad First I have tomcat 5 working fine, play around trying to get it to work with db2 jdbc driver (in shared/lib) eventually get it working. setup tomcat as daemon using jsvc and tomcat starts but won't look in shared lib and can't find the driver class... decide to skip jsvc and try and start tomcat from rc.local with... su - db2inst1 -c /usr/local/tomcat/bin/startup.sh this won't work as it can't find the JAVA_HOME env (even tho it is set) my test jsp page still works if i start tomcat manually with startup.sh but i don't want to have to do that can anyone help either with jsvc or using rc.local... here is the rc.tomcat script created for jsvc #!/bin/sh ## # # Copyright 2004 The Apache Software Foundation. # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an AS IS BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ## # # Small shell script to show how to start/stop Tomcat using jsvc # If you want to have Tomcat running on port 80 please modify the server.xml # file: # #!-- Define a non-SSL HTTP/1.1 Connector on port 80 -- #Connector className=org.apache.catalina.connector.http.HttpConnector # port=80 minProcessors=5 maxProcessors=75 # enableLookups=true redirectPort=8443 # acceptCount=10 debug=0 connectionTimeout=6/ # # That is for Tomcat-5.0.x (Apache Tomcat/5.0) # # Adapt the following lines to your configuration JAVA_HOME=/usr/lib/java CATALINA_HOME=/usr/local/tomcat DAEMON_HOME=/usr/local/tomcat/bin TOMCAT_USER=db2inst1 TMP_DIR=/var/tmp CATALINA_OPTS= CLASSPATH=\ $JAVA_HOME/lib/tools.jar:\ $CATALINA_HOME/bin/commons-daemon.jar:\ $CATALINA_HOME/bin/bootstrap.jar:\ $CATALINA_HOME case $1 in start) # # Start Tomcat # $DAEMON_HOME/jsvc \ -user $TOMCAT_USER \ -home $JAVA_HOME \ -Dcatalina.home=$CATALINA_HOME \ -Djava.io.tmpdir=$TMP_DIR \ -outfile $CATALINA_HOME/logs/catalina.out \ -errfile '1' \ $CATALINA_OPTS \ -cp $CLASSPATH \ org.apache.catalina.startup.Bootstrap # # To get a verbose JVM #-verbose \ # To get a debug of jsvc. #-debug \ ;; stop) # # Stop Tomcat # PID=`cat /var/run/jsvc.pid` kill $PID ;; *) echo Usage tomcat.sh start/stop exit 1;; esac - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
trouble with tomcat 5 and apache 1.3
Hi, I'm having some difficulties making tomcat work with apache. I only need to use apache because I need to use an auth system that uses the .htaccess files of apache. So i really don't want to have to fuss about to much. Ideally I'd like to use the apache auto configuration for tomcat but can't seem to switch it on, as per the jk2 apache howto... At present i have apache 1.3 installed from slack package and tomcat 5.0.25 which i compile from source. All on slackware 9.1. I've spent all of yesturday trying to fix this and am quite confused... Firstly, if i've compiled tomcat from source do i need to then compile a jk2 module seperatly or will this have been done. Secondly, should i be editing httpd.conf and defining workers etc there or editing server.xml and pointing apache at appropriate tomcat conf file? All I'm looking to do is have a restricted access apache document root, and then map the tomcat context of my app into it. I'm a complete noob to this so please keep it simple. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
re: authentication with ldap after doing an ldap search
Our ldap dn is namsid=number,ou=school,o=school The problem is that the student don't know their namsid, they know their uid. I need a way for tomcat to first do a search, looking for anything where uid=netid (which is what the student passed in), then use that entries dn to bind and verify the password that was also entered. Is there anyway to do this in Tomcat? I have the authentication working if the person known their namsid, but few people will as it is used internally. Thank you. -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: authentication with ldap after doing an ldap search
Thank you for the response. We have it working for php and jsp pages, but I am trying to use it with webdav, actually. My hope is to have a method that will allow people to log in to make changes to files, but anyone, currently, can read the files. I also have it where certain roles are needed for updates. I am now starting to look at slide, but I think I will face the same basic problem, due to our ldap schema. Work like you don't need the money, love like you've never been hurt, and dance like no one is watching. --- Satchel Paige -Original Message- From: Dale, Matt [mailto:[EMAIL PROTECTED] Sent: Monday, June 28, 2004 5:01 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: authentication with ldap after doing an ldap search We do something similar to authenticate against active directory. The way we do it is to have a generic log in, the application logs in and searches for what in your case would be the namsid using the uid as a parameter. You then need to bind with the namsid that you've looked up and the password to determine authentication. Ta Matt -Original Message- From: James Black [mailto:[EMAIL PROTECTED] Sent: 28 June 2004 21:55 To: Tomcat Users List Subject: re: authentication with ldap after doing an ldap search Our ldap dn is namsid=number,ou=school,o=school The problem is that the student don't know their namsid, they know their uid. I need a way for tomcat to first do a search, looking for anything where uid=netid (which is what the student passed in), then use that entries dn to bind and verify the password that was also entered. Is there anyway to do this in Tomcat? I have the authentication working if the person known their namsid, but few people will as it is used internally. Thank you. -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[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]
Toimcat / Apache / Modjk
Hello, I have posted this problem before to no avail and thought I would try again I have apache 2.049 in front of tomcat 5.025 and they are linked with modjk 1.2 I want everything for a site such as www.mydomain.com to go through tomcat EXCEPT for any php pages. Is there a way I can JkMount everything BUT something? Basically I want to mount everything EXCEPT url's ending in .php Thanks in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Toimcat / Apache / Modjk
This would work great if I was using an architecture that had definite endings, I use tapestry and they all end in different names Thank you for the input though James - Original Message - From: Dan Barron [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, June 24, 2004 12:57 PM Subject: Re: Toimcat / Apache / Modjk jk file mod_jk.conf it is like this JkMount /*.jsp worker JkMount /*.htm worker JkMount /*.whatever ext you want - just not *.php or * or jk2 file workers2.properties you would do something like [uri:/*.jsp] [uri:/*.htm] [uri:/*.whatever ext you want - just not *.php or *] hope this helps. At 08:25 AM 6/24/2004, James Sherwood wrote: Hello, I have posted this problem before to no avail and thought I would try again I have apache 2.049 in front of tomcat 5.025 and they are linked with modjk 1.2 I want everything for a site such as www.mydomain.com to go through tomcat EXCEPT for any php pages. Is there a way I can JkMount everything BUT something? Basically I want to mount everything EXCEPT url's ending in .php Thanks in advance - 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: auto-generating jk2.properties for tomcat5
Hello, I don't remember how I got this to work under tomcat4, but how would I auto-generate the jk2.properties file for tomcat5? Thank you. -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Safety of images under the WEB-INF?
Hello, I am doing a project where I dont want people to be able to link directly to certian images/files unless they are logged in through my security framework. The question is, if I put an images directory under the WEB-INF and serve the images up through a service, how safe are these images? Can they be retreived without going through my service(which i can check if they have access or not) and if so, how? Thank you, James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Too many open files on Solaris
HasanA wrote: I am having similar problem and i am running Tomcat 4.0 on Open vms 7.2. We have increased number of files open by a process to some ridiculous value but this error is still comming up. Can someone also help with this issue? If you are opening up database connections or files on the local system, you may not be closing the connection. You can use a program called losf, which is available from www.sunfreeware.com and see what it tells you about which process has the descriptors open. -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Setting the Session Id length
Hi, Fairly recently, methods appeared in org.apache.catalina.session.ManagerBase (setSessionIdLength()) to allow variation of the Session Id length, however I can't find any way of actually calling these methods. Can anyone tell me how this parameter should be set? (I'm using the embedded Tomcat within JBoss) Many thanks, James
Re: Creator -- Tomcat
[EMAIL PROTECTED] wrote: Hi! I have been working with Sun's Studio Creator early release, and am trying to transfer a project of automatically-built files to Tomcat. There seems to be no explicit documentation on how to do this. I have copied the seemingly appropriate file structure [folder with .jsp and WEB-INF folder] to Tomcat's webapps directory, but cannot get the application to start up. It is just a simple page with calculations. If you look at the logs you will find some exceptions were thrown. I don't remember all of them, but there are 2-4 jar files that need to be included. You will probably need commons-beanutils.jar commons-digester.jar I didn't try it on tomcat4, so if you are doing it there, if it works, it will require some other jar files. Just delete your logs, restart tomcat, look at the log file, find where the exception is thrown, get the new file to put in, and repeat. I have already reported this to Sun a month or so ago. -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: URL validation
Ikonne, Ike wrote: Hi Steffen, Thanks, new URL(url) doesn't work consistently. I have tried it, one can throw in an url that doesn't meet RFC 1738 but URL(url) will not catch it. You could try regular expressions. Here is a relatively simple one: (?:ftp\:|http\:|mailto\:)?(\w+\@)?(www\.)?\w+(\.\w+)+(\:\d+)? -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED]
RE: Tomcat and JSF
You have to add some jar files to your webapp, but JSF will work on Tomcat 5, I haven't tried it on Tomcat 4 in 8 mths. Work like you don't need the money, love like you've never been hurt, and dance like no one is watching. --- Satchel Paige -Original Message- From: snpe [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 08, 2004 11:25 PM To: [EMAIL PROTECTED] Subject: Tomcat and JSF Is there plan that tomcat support JSF specification ? regards Haris Peco - 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]
Unknown error in tomcat log help
Hi, I get this error in my tomcat log once and a while. It doesnt seem to affect the site any and I was just wondering if anyone knew what it was? I am using tomcat 5.025, apache 2.049 and mod_jk 1.25 Thanks ** Exception during post-request cleanup. Session id: 6A15A35F0A762F1605E9CB9417F38967 Client address: 216.108.4.73 Exceptions: org.apache.catalina.connector.ClientAbortException java.net.SocketException: Connection reset by peer: socket write error java.net.SocketOutputStream.socketWrite0(Native Method) java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) java.net.SocketOutputStream.write(SocketOutputStream.java:136) org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:465) org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:675) org.apache.jk.server.JkCoyoteHandler.doWrite(JkCoyoteHandler.java:251) org.apache.coyote.Response.doWrite(Response.java:542) org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:368) org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:398) org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:318) org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:297) org.apache.coyote.tomcat5.CoyoteOutputStream.flush(CoyoteOutputStream.java:8 5) org.apache.tapestry.request.ResponseOutputStream.forceFlush(ResponseOutputSt ream.java:149) org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:928) org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:197 ) org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:158) javax.servlet.http.HttpServlet.service(HttpServlet.java:740) javax.servlet.http.HttpServlet.service(HttpServlet.java:853) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:237) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:157) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:214) org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:198) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:152) org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137 ) org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117 ) org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:102) org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :109) org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:296) org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:372) org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:694) org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:626) org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:807) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:644) java.lang.Thread.run(Thread.java:534) ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat-5.0.24+memory leaking
Im not sure if this could be the problem or not, but it sounds like it may be a session problem as it has to do with cookies etc. When we upgraded to tomcat 5.0.24 our sessions went funny(too much to explain) When tomcat 5.0.25 came out one of the fixes had a session fix in it. We upgraded to 5.0.25 and it fixed the problem. Like I say, I dont know exactly what your problem is but it sounds like it may have to do with sessions. James - Original Message - From: anish [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 04, 2004 10:25 AM Subject: Tomcat-5.0.24+memory leaking Hi all, I am using jakarta-tomcat-5.0.24. my application loads lot of library from a third party. and when it set cookie and forward the request to some other page, application got killed. no problem with the tomcat server. if remove all cookies, then application will run. then when i set cookie and transfer request, the same problm occurs and it continues. there is no problem with the old version of tomcat, 3.2.4. is this the prob with memory leak of tomcat? please guide me to solve this issue. Thanks and regards.. Anish kumar.G.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Serving up static content through apache using mod_jk
Hi, I am trying to serve up some of our static content through Apache instead of Tomcat I am using apache 2.049 and Tomcat 5.025 with mod_jk 1.2.5 Lets say in tomcat I have a directory serving up static html called staticserve. I reach it through www.mydomain.ca/staticserve/index.html I created a virtual host like this: VirtualHost * ServerAdmin [EMAIL PROTECTED] DocumentRoot %pathtoapache%/htdocs/staticserve ServerName mydomain.ca JKMount /* ajp13 ErrorLog mylog.log /VirtualHost and transfered the contents of staticserve to the staticserve directory in htdocs. My problem is that apache is not serving up the contents in staticserve, tomcat is I think I am just missing something small, any ideas? Thanks James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.lang.OutOfMemoryError
more information please, version of tomcat and windows or linux? - Original Message - From: Matthew Chen [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, June 03, 2004 11:24 AM Subject: java.lang.OutOfMemoryError Has anyone ever experienced this error? The machine I am running has enough memory, I think it is around 2GB. The java instance just used for less than 150MB memory from prstat. Does anyone know how to increase initial tomcat memory size just like Java does? Thanks! Matt chen java.lang.OutOfMemoryError java.lang.OutOfMemoryError java.lang.OutOfMemoryError Jun 2, 2004 3:21:14 PM unknown unknown SEVERE: Error processing request java.lang.OutOfMemoryError Jun 2, 2004 3:21:14 PM unknown unknown SEVERE: Error unregistering mbean java.lang.OutOfMemoryError java.lang.OutOfMemoryError Jun 2, 2004 3:21:14 PM unknown unknown SEVERE: Unexpected error java.lang.OutOfMemoryError Jun 2, 2004 3:21:14 PM unknown unknown SEVERE: Unexpected error java.lang.OutOfMemoryError Jun 2, 2004 3:21:14 PM unknown unknown SEVERE: Unexpected error java.lang.OutOfMemoryError Jun 2, 2004 3:21:14 PM org.apache.coyote.http11.Http11Processor process SEVERE: Error processing request java.lang.OutOfMemoryError - 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: Serving up static content through apache using mod_jk
If the JKMount /* ajp13 passes everything to the jk handler, is there a way route everything but /staticserve directory to the jk handler? - Original Message - From: QM [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, June 03, 2004 11:27 AM Subject: Re: Serving up static content through apache using mod_jk On Thu, Jun 03, 2004 at 11:26:52AM -0300, James Sherwood wrote: : VirtualHost * : ServerAdmin [EMAIL PROTECTED] : DocumentRoot %pathtoapache%/htdocs/staticserve : ServerName mydomain.ca : JKMount /* ajp13 : ErrorLog mylog.log : /VirtualHost : : My problem is that apache is not serving up the contents in staticserve, : tomcat is : : I think I am just missing something small, any ideas? Yes -- the JKMount /* ajp13 directive will pass everything to the JK handler. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - 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: Serving up static content through apache using mod_jk
Yes but in my case I have a ton of directories that are dynamically changed so I want everything served through tomcat except some static stuff in one directory:) Any ideas? - Original Message - From: QM [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, June 03, 2004 11:50 AM Subject: Re: Serving up static content through apache using mod_jk On Thu, Jun 03, 2004 at 11:52:11AM -0300, James Sherwood wrote: : If the JKMount /* ajp13 passes everything to the jk handler, is there a way : route everything : but /staticserve directory to the jk handler? I've never done that, so I wouldn't know. I prefer the opposite approach: have a handful of JkMount directives, one for each Tomcat-served URI or file extension: JkMount /*.jsp JkMount /*.do JkMount /special/* JkMount /j_security_check -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - 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: Problem with tomcat 5.0.25 service
If this is on a windows machine, check the 'configure tomcat' part and make sure its pointing to the same jvm as your %java_home% is - Original Message - From: Jens Kühnberger [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 03, 2004 12:43 PM Subject: Problem with tomcat 5.0.25 service Hi, I got a problem with installing tomcat 5.0.25 as a service. When I run tomcat with the startup script (startup.bat) I don't have any problem. After installing the service (service.exe install) and running my application as a service, I get the following compilation error for every jsp page I want to run: 03.06.2004 17:25:43 org.apache.jasper.compiler.Compiler generateClass SCHWERWIEGEND: Javac exception Error running javac.exe compiler at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExtern alCompile(DefaultCompilerAdapter.java:452) at org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacExternal. java:44) at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:942) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:378) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:463) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:442) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:430) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 11) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 74) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext Valve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117 ) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex t.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:702) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:644) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: CreateProcess: javac.exe -classpath C:\tomcat5025\bin\bootstrap.jar;C:\tomcat5025\webapps\ROOT\WEB-INF\classes;C :\tomcat5025\webapps\ROOT\WEB-INF\lib\avalon-framework-cvs-20020806.jar;C:\t omcat5025\webapps\ROOT\WEB-INF\lib\batik.jar;C:\tomcat5025\webapps\ROOT\WEB- INF\lib\commons-beanutils.jar;C:\tomcat5025\webapps\ROOT\WEB-INF\lib\commons -collections.jar;C:\tomcat5025\webapps\ROOT\WEB-INF\lib\commons-digester.jar ;C:\tomcat5025\webapps\ROOT\WEB-INF\lib\commons-lang.jar;C:\tomcat5025\webap ps\ROOT\WEB-INF\lib\commons-logging.jar;C:\tomcat5025\webapps\ROOT\WEB-INF\l ib\commons-validator.jar;C:\tomcat5025\webapps\ROOT\WEB-INF\lib\fop.jar;C:\t omcat5025\webapps\ROOT\WEB-INF\lib\izmado.jar;C:\tomcat5025\webapps\ROOT\WEB -INF\lib\jakarta-oro.jar;C:\tomcat5025\webapps\ROOT\WEB-INF\lib\jakarta-rege xp-1.3.jar;C:\tomcat5025\webapps\ROOT\WEB-INF\lib\jdom.jar;C:\tomcat5025\web apps\ROOT\WEB-INF\lib\jstl.jar;C:\tomcat5025\webapps\ROOT\WEB-INF\lib\log4j. jar;C:\tomcat5025\webapps\ROOT\WEB-INF\lib\poi-2.5-final-20040302.jar;C:\tom ? at java.lang.Win32Process.create(Native Method) at
Re: Tomcat5/mod_jk Memory Leak/mod_jk bypass
I actually have it fixed now(well no ramping in 24 hours). I am using tomcat on a windows machine so I adjusted to memory in the configure tomcat in the start menu(allows you to adjust jvm startup parameters) The problem did not have anything to do with tomcat if my fix works:) - Original Message - From: Kommuru, Bhaskar [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Wednesday, June 02, 2004 6:03 AM Subject: RE: Tomcat5/mod_jk Memory Leak/mod_jk bypass I am just curious in this... Where did you set the 512m? Is your Tomcat's JVM size? Ran out of memory last night again Set to 512m and ran out at 284m Maybe I am missing a paramater in the tomcat setup on windows or something Frustrating James I was having a memory leak using mod_jk2, and it was fixed by adding request.registerRequests=false to tomcat/conf/jk2.properties. I don't know if this would work with mod_jk, but it might be worth a try. Adrian -- f y cn rd ths y cn gt a gd jb rt fpl dgm pvq! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ For information about the Standard Bank group visit our web site www.standardbank.co.za __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relating to the official business of Standard Bank Group Limited is proprietary to the group. It is confidential, legally privileged and protected by law. Standard Bank does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of the group. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. Standard Bank can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference. ___ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat5/mod_jk Memory Leak/mod_jk bypass
Ran out of memory last night again Set to 512m and ran out at 284m Maybe I am missing a paramater in the tomcat setup on windows or something Frustrating James - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, May 31, 2004 4:04 PM Subject: Re: Tomcat5/mod_jk Memory Leak/mod_jk bypass 300 mb sounds a lot, i've got a hibernate and struts flavored app running with a 128 limit, and thats being generous. I haven't measured anything but top looks happy, with 5.0.25 with jk to apache 2.0.47. Had a bit of traffic this afternoon albeit nothing heavy, had 5 simultaneously this afternoon. But nothing huge. Mark On 31 May 2004, at 17:54, James Sherwood wrote: Thanks Mark, I have it currently running bypassing the mod_jk with rewrite to port 8080. The memory has ramped to 327 mb so far which is not anything to worry about. I had this problem on our linux box but I had forgotten the -server option and that took care of it. The problem is, windows doesnt accept -server. Ill continue to monitor it with the mod_jk bypass in. James - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, May 31, 2004 12:19 PM Subject: Re: Tomcat5/mod_jk Memory Leak/mod_jk bypass I've just set 5.0.25 up and it will run with mod_jk/1.2.3-dev and Apache/2.0.47 , I'll see if i get the same thing happening. When i was having problems i was getting a decoding error written to catalina log, which 5.0.24+ hasn't given me. 5.0.24 has been working quite happily but the next man mentioned a session error so I took his word for it and upgraded. You could have tomcat being served from an ip alias, but will depend on you configuration. And might take longer than getting jk sorted. For the moment I can just say i'll keep and eye on things and see if the same happens to me. Mark On 31 May 2004, at 14:23, James Sherwood wrote: There are no errors anywhere that I can find in any logs. The memory just slowly ramps up till an out of memory error happens. James - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, May 31, 2004 9:04 AM Subject: Re: Tomcat5/mod_jk Memory Leak/mod_jk bypass What does your catalina log have to say for itself? On 31 May 2004, at 13:59, James Sherwood wrote: As I posted before, I get a memory leak using mod_jk 1.2 with Tomcat 5.0.25 and Apache 2.049 I beleive it may be related to the mod_jk connector and since I am not actually serving up anything with apache yet I want to just bypass the connector for 1 site and hit tomcat directly. I have to use apache for other things on the server so I cannot just use tomcat. Any idea the best route for this? (of course a fix for the leak is the best route:) My route works but certian urls within the site do not work(although I think I could get them working). The way I have done it is this: VirtualHost * ServerName mysite.ca RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.mysite\.ca$ [NC] RewriteRule ^(.*) http://localhost:8080$1 [p] /VirtualHost Thanks, James --- -- 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] - 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 out of memory
I upgraded to 5.0.24 and it seemed to fix the problem although there wasnt sufficient time to test as there was a session bug in 24 and I had to upgrade to 25 quickly. The memory leak is slowed but still there in 25 over 19 and this may have been the case for 24 James - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, May 28, 2004 4:46 PM Subject: Re: Tomcat 5 out of memory Upgrade to tc5.024 Its been sorted, i had the same jazz happening. I changed to 5.0.24 as no problems since. On 28 May 2004, at 19:55, Emerson Cargnin wrote: I have the same configuration (except tomcat 5.0.19 and Suse linux 9.1) and have the same problem... do you have this kind of message at your catalina.log? May 28, 2004 2:44:14 PM org.apache.jk.common.HandlerRequest invoke INFO: Unknown message 0 May 28, 2004 2:44:49 PM org.apache.jk.common.HandlerRequest invoke INFO: Unknown message 0 Emerson James Sherwood wrote: I am using Tomcat 5.025 Mod jk 1.2.5 and Apache 2.0.49 Memory just keeps ramping up untill it goes out of memory It is on a Windows 2003 server Any Ideas? Thanks James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Emerson Cargnin Analista de Sistemas Setor de Desenvolvimento de Sistemas - TRE-SC tel : (048) - 251-3700 - Ramal 3181 - 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]
Tomcat5/mod_jk Memory Leak/mod_jk bypass
As I posted before, I get a memory leak using mod_jk 1.2 with Tomcat 5.0.25 and Apache 2.049 I beleive it may be related to the mod_jk connector and since I am not actually serving up anything with apache yet I want to just bypass the connector for 1 site and hit tomcat directly. I have to use apache for other things on the server so I cannot just use tomcat. Any idea the best route for this? (of course a fix for the leak is the best route:) My route works but certian urls within the site do not work(although I think I could get them working). The way I have done it is this: VirtualHost * ServerName mysite.ca RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.mysite\.ca$ [NC] RewriteRule ^(.*) http://localhost:8080$1 [p] /VirtualHost Thanks, James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat5/mod_jk Memory Leak/mod_jk bypass
There are no errors anywhere that I can find in any logs. The memory just slowly ramps up till an out of memory error happens. James - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, May 31, 2004 9:04 AM Subject: Re: Tomcat5/mod_jk Memory Leak/mod_jk bypass What does your catalina log have to say for itself? On 31 May 2004, at 13:59, James Sherwood wrote: As I posted before, I get a memory leak using mod_jk 1.2 with Tomcat 5.0.25 and Apache 2.049 I beleive it may be related to the mod_jk connector and since I am not actually serving up anything with apache yet I want to just bypass the connector for 1 site and hit tomcat directly. I have to use apache for other things on the server so I cannot just use tomcat. Any idea the best route for this? (of course a fix for the leak is the best route:) My route works but certian urls within the site do not work(although I think I could get them working). The way I have done it is this: VirtualHost * ServerName mysite.ca RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.mysite\.ca$ [NC] RewriteRule ^(.*) http://localhost:8080$1 [p] /VirtualHost Thanks, James - 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: Tomcat5/mod_jk Memory Leak/mod_jk bypass
Thanks Mark, I have it currently running bypassing the mod_jk with rewrite to port 8080. The memory has ramped to 327 mb so far which is not anything to worry about. I had this problem on our linux box but I had forgotten the -server option and that took care of it. The problem is, windows doesnt accept -server. Ill continue to monitor it with the mod_jk bypass in. James - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, May 31, 2004 12:19 PM Subject: Re: Tomcat5/mod_jk Memory Leak/mod_jk bypass I've just set 5.0.25 up and it will run with mod_jk/1.2.3-dev and Apache/2.0.47 , I'll see if i get the same thing happening. When i was having problems i was getting a decoding error written to catalina log, which 5.0.24+ hasn't given me. 5.0.24 has been working quite happily but the next man mentioned a session error so I took his word for it and upgraded. You could have tomcat being served from an ip alias, but will depend on you configuration. And might take longer than getting jk sorted. For the moment I can just say i'll keep and eye on things and see if the same happens to me. Mark On 31 May 2004, at 14:23, James Sherwood wrote: There are no errors anywhere that I can find in any logs. The memory just slowly ramps up till an out of memory error happens. James - Original Message - From: Mark Lowe [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, May 31, 2004 9:04 AM Subject: Re: Tomcat5/mod_jk Memory Leak/mod_jk bypass What does your catalina log have to say for itself? On 31 May 2004, at 13:59, James Sherwood wrote: As I posted before, I get a memory leak using mod_jk 1.2 with Tomcat 5.0.25 and Apache 2.049 I beleive it may be related to the mod_jk connector and since I am not actually serving up anything with apache yet I want to just bypass the connector for 1 site and hit tomcat directly. I have to use apache for other things on the server so I cannot just use tomcat. Any idea the best route for this? (of course a fix for the leak is the best route:) My route works but certian urls within the site do not work(although I think I could get them working). The way I have done it is this: VirtualHost * ServerName mysite.ca RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.mysite\.ca$ [NC] RewriteRule ^(.*) http://localhost:8080$1 [p] /VirtualHost Thanks, James - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Secure web.xml and WEB-INF
Hello. Please, give me some tips how to secure (deny for reading in browser) access to web.xml and WEB-INF folder? Any suggestions are welcome:) Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5 out of memory
I am using Tomcat 5.025 Mod jk 1.2.5 and Apache 2.0.49 Memory just keeps ramping up untill it goes out of memory It is on a Windows 2003 server Any Ideas? Thanks James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Timing service in Tomcat
Sasha, Sasha Borodin wrote: Is anyone using a good 3rd party scheduling framework? Have a look at: http://www.quartzscheduler.org/quartz/(h its moved to OpenSymphony!) We're using this in part with some in-house stuff. It works well; I actually can't think of any other open -source component that's comparable. Or is this kind of stuff home-grown right now (java.util.Timer, etc.)? If you've got your own timer, where do you initialize it (like in a servlet's init() or a context listener)? For the custom stuff, we have a seperate servlet for each job/task (java.util.Timer), and a reference is stored to them in the application context, for admin purposes. We start each Timer from a single Startup servlet, which gets the majority of its parameters from the web.xml file (ideally, i'd rather this was seperated). If you have any more questions, shoot, i'll try and answer as best I can. James. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Parser Errors on startup
Yea! Adding the DOCTYPE solved my parsing problems! Thanks Mark. I realize now that I had taken it out when I was having another problem. I originally created the files using UTF-8 encoding: ?xml version=1.0 encoding=utf-8? But the parser would puke up and wouldn't even start: Apr 12, 2004 7:27:05 AM org.apache.commons.digester.Digester fatalError SEVERE: Parse Fatal Error at line 1 column -1: Document root element is missing. org.xml.sax.SAXParseException: Document root element is missing. ... I later discovered that my XML-savvy text editor was inserting a byte-order mark at the beginning of the file, which the XML parser apparently doesn't appreciate. Taking that out solved (most) of my parsing problems -- but not until after I'd butchered the file. ;) Thanks again for all the help, James Mark Thomas wrote on Sunday, April 18, 2004: Try putting ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; At the start of the web.xml file Mark -Original Message- From: James Bucanek [mailto:[EMAIL PROTECTED] Sent: Sunday, April 18, 2004 6:55 AM To: Tomcat Users List Subject: Re: Parser Errors on startup James Bucanek wrote on Saturday, April 17, 2004: Tomcat 4.1.xx/Mac OS X Server (BSD) I'm getting the following errors when I startup Tomcat, and I can't for the life of me figure out what to do about it: Well, I've managed to narrow the problem down. The Host I defined in server.xml isn't the problem. The problem is that the Host I defined caused other webapp's to be deployed automatically, and it is apparently the web.xml file that is throwing the SAXParseExceptions. I kept taking things out of the web.xml file to try and zero in on the problem. Unfortunately, I'm now left with the following web.xml: web-app /web-app Whenever I start Tomcat, or reload the web application, the following gets written to ${catalina-home}/logs/catalina.out: Apr 17, 2004 10:45:01 PM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 1 column -1: Element type web-app is not declared. org.xml.sax.SAXParseException: Element type web-app is not declared. at org.apache.crimson.parser.Parser2.error(Parser2.java:3317) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1469) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:634) at org.apache.crimson.parser.Parser2.parse(Parser2.java:333) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.catalina.startup.ContextConfig.applicationConfig(Co ntextConfig.java:282) at org.apache.catalina.startup.ContextConfig.start(ContextConfig. java:639) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(Conte xtConfig.java:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(L ifecycleSupport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext .java:3582) at org.apache.catalina.startup.HostConfig.checkWebXmlLastModified (HostConfig.java:614) at org.apache.catalina.startup.HostConfig.run(HostConfig.java:854) at java.lang.Thread.run(Thread.java:552) Note: If I have other declarations in web.xml, I get a SAX Exception for (basically) every tag in the file. They only way to eliminate this Exception is to remove the web.xml file altogether. This just doesn't make any sense to me. Any insight would be appreciated. __ James Bucanek mailto:[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] __ James Bucanek mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Parser Errors on startup
Tomcat 4.1.xx/Mac OS X Server (BSD) I'm getting the following errors when I startup Tomcat, and I can't for the life of me figure out what to do about it: Starting service Tomcat-Standalone Apache Tomcat/4.1.29-LE-jdk14 Apr 17, 2004 4:20:24 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true Apr 17, 2004 4:20:24 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true Apr 17, 2004 4:20:24 PM org.apache.struts.util.PropertyMessageResources init INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true Apr 17, 2004 4:20:30 PM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 2 column -1: Element type web-app is not declared. org.xml.sax.SAXParseException: Element type web-app is not declared. at org.apache.crimson.parser.Parser2.error(Parser2.java:3317) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1469) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:634) at org.apache.crimson.parser.Parser2.parse(Parser2.java:333) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448) ... Apr 17, 2004 4:20:30 PM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 3 column -1: Element type display-name is not declared. org.xml.sax.SAXParseException: Element type display-name is not declared. at org.apache.crimson.parser.Parser2.error(Parser2.java:3317) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1469) ... Apr 17, 2004 4:20:30 PM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 4 column -1: Element type description is not declared. org.xml.sax.SAXParseException: Element type description is not declared. at org.apache.crimson.parser.Parser2.error(Parser2.java:3317) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1469) ... Apr 17, 2004 4:20:30 PM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 7 column -1: Element type context-param is not declared. org.xml.sax.SAXParseException: Element type context-param is not declared. at org.apache.crimson.parser.Parser2.error(Parser2.java:3317) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1469) ... and about 18 more. This appears to have started after I added one additional Host declaration to my server.xml file. But there are no XML syntax errors in the file (I've parsed it with other tools), and the Host appears to be working. So why theres errors, and why do they start on line 2? __ James Bucanek mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Parser Errors on startup
James Bucanek wrote on Saturday, April 17, 2004: Tomcat 4.1.xx/Mac OS X Server (BSD) I'm getting the following errors when I startup Tomcat, and I can't for the life of me figure out what to do about it: Well, I've managed to narrow the problem down. The Host I defined in server.xml isn't the problem. The problem is that the Host I defined caused other webapp's to be deployed automatically, and it is apparently the web.xml file that is throwing the SAXParseExceptions. I kept taking things out of the web.xml file to try and zero in on the problem. Unfortunately, I'm now left with the following web.xml: web-app /web-app Whenever I start Tomcat, or reload the web application, the following gets written to ${catalina-home}/logs/catalina.out: Apr 17, 2004 10:45:01 PM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 1 column -1: Element type web-app is not declared. org.xml.sax.SAXParseException: Element type web-app is not declared. at org.apache.crimson.parser.Parser2.error(Parser2.java:3317) at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1469) at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:634) at org.apache.crimson.parser.Parser2.parse(Parser2.java:333) at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:282) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3582) at org.apache.catalina.startup.HostConfig.checkWebXmlLastModified(HostConfig.java:614) at org.apache.catalina.startup.HostConfig.run(HostConfig.java:854) at java.lang.Thread.run(Thread.java:552) Note: If I have other declarations in web.xml, I get a SAX Exception for (basically) every tag in the file. They only way to eliminate this Exception is to remove the web.xml file altogether. This just doesn't make any sense to me. Any insight would be appreciated. __ James Bucanek mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbie problem with JSP contexts virtual hosts
While I didn't get any suggestions or feedback on my original question, I believe I've found a solution. Now I just need to run it by the group to see if it's Kosher. James Bucanek wrote on Sunday, April 11, 2004: !-- Virtual host: www.hotelmidnight.net -- !-- (jlb 11-April-2004) Added virtual host -- Host name=www.hotelmidnight.net debug=0 appBase=/Users/darkthirty/Sites unpackWARs=false autoDeploy=true !-- Context for the top-level web application -- Context path= docBase=. debug=99 reloadable=true/ /Host clip web-app display-namedarkthirty/display-name descriptiondarkthirty.net artwork application/description !-- Global parameters for this web application -- context-param param-nametest/param-name param-valueSome Value/param-value /context-param /web-app The basic problem with this arrangement is that my JSP pages ran in the context of the 'jsp' servlet that's defined in ${CATALINA_HOME}/conf/web.xml for the default Host, not the Context that I defined in my web-app that I want to run in my virtual Host. So, it occurred to me that I could create may own instance of the JSP engine as my Servlet. Now that I have a Servlet to reference, I can then map all of the *.jsp files in my virtual host to that: web-app display-namedarkthirty/display-name descriptiondarkthirty.net artwork application/description !-- Global parameters available to all web applications -- context-param param-nametest/param-name param-valueSome Value/param-value /context-param servlet servlet-namejsp2/servlet-name servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class init-param param-namelogVerbosityLevel/param-name param-valueINFORMATION/param-value /init-param /servlet !-- The mapping for the JSP servlet -- servlet-mapping servlet-namejsp2/servlet-name url-pattern*.jsp/url-pattern /servlet-mapping /web-app This seems to work just great. The Manager sees my application (by name), and all of the context parameters appear in my JSP pages. As far as I can tell, there doesn't seem to be anything really bad about this solution. Except that I end up with a new instance of the JspServlet for each virtual host, which is probably a tolerable amount of overhead. My question is this: Is this the right way to accomplish this? __ James Bucanek mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
apache tomcat mod_jk index.jsp
Hello, I'm having trouble loading index.jsp from the root directory. If i browse to www.foo.com/test/ everything works. If I browse to www.foo.com (which points to the same directory) it shows the jsp tags. I'm running apache 1.3, tomcat 4.1 and mod_jk 1.2 using ApacheConfig to auto-create mod_jk.conf. httpd.conf contains: LoadModule jk_module libexec/apache/mod_jk.so AddModule mod_jk.c ServerName www.foo.com DocumentRoot /usr/local/tomcat/webapps/test Directory /usr/local/tomcat/webapps/test Options Indexes FollowSymLinks MultiViews DirectoryIndex index.jsp index.php index.html index.htm /Directory JkMount /*.jsp ajp13 Include /usr/local/tomcat/conf/auto/mod_jk.conf Thanks, James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session exists even after server restart
[EMAIL PROTECTED] wrote on Tuesday, April 13, 2004: Now I have shutdown my tomcat and started it immediately. And my session still works !!! Pretty cool, huh? Is this a BUG? If it is, then a lot of people spent an aweful lot of time introducing it. I just read Tomcat: The Definitive Guide by Jason Brittain Ian Darwin. While this covers Tomcat 4, I'm pretty sure this applies to 5 as well. The Manager tag in the server.xml file defines the session manager class. As example would be Manager className=org.apache.catalina.session.PersistentManager ... The default session manger is StandardManager. The StandardManager class preserves the state of sessions by serializing them to a file called SESSIONS.ser when the server shuts down, then restores them when it starts up again. Alternatively, you can use PersistentManager which dynamically stores session data in some kind of data store (be that files, or a database, or whatever). If you don't want this persistence behavior, replace the Manager with one which doesn't preserve sessions between server shutdown and startup. __ James Bucanek mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Newbie problem with JSP contexts virtual hosts
for the 'test' context-param I defined in my web.xml file. - The call to application.getServletContextName() returns null. - The call to config.getInitParameterNames() returns the properties fork, and logVerbosityLevel. (These are defined in {catalina_home}/conf/web.xml for the 'jsp' servlet.) All this leads me to believe that my JSP pages are not running the Context of the web application that I created. They appear to be running in the Context of the 'jsp' servlet defined in ${cataling_home}/conf/web.xml. When I reload the / application in the manager, all of my application scope objects disappear. So it would appear that the manager is reloading the 'jsp' servlet, not mine. Also, the display-name of my web app never appears anywhere. So, what am I missing? How do I deploy a collection of Java classes and a web.xml in a virtual host's directory so that the JSP pages in that site run in the Context of that web application? I'm eventually going to create other virtual hosts, and I want the JSP pages in each host to run in their own Context, with the ability to control and reload them individually. I admit that I'm dubious about the web.xml I created for my application because it doesn't declare a servlet. But my problem is that I don't really have a servlet -- just some JSP pages. Do I need to create a dummy servlet to act as a container for my JSP pages? Do I need to map *.jsp pages in the web-app? How do I do this if I don't have a servlet to reference? I think I'm a little confused as to the relationship between JSP pages, the 'jsp' servlet, and a web application. Any reading material that might clarify the relationship between these would be greatly appreciated. __ James Bucanek mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Site slow and stops responding after certain number of threads
s prasad wrote: We use the JK 2 Connector and for some of the sites we have maxProcessors=75. My understanding is when the maxProcessors limit is reached, the requests are put in queue and this will not cause the site to go down. IS this number dependent on total number of TCP/IP connections hitting that server on port 80? Is there a downfall of bumping this number very high, assuming there is enough memory on the server to allow these threads? Can anyone comment on, how to identify the current connector thread utilization? My experience is that this is not a hard limit, but will be exceeded if the requests at one time go beyond the 75, but those extra threads will be removed when they are done. If you don't mind your java application (tomcat) sharing it's processor time servicing many threads then there shouldn't be any problems. It really depends on how cpu intensive your apps are, more cpu intensive should use fewer threads, imo. -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to deploy a web application under Tomcat 5
Bachler, Elisabeth (Elisabeth) wrote: I don't quite understand what you are saying. My problem is that I don't know how to create a WAR file with the basic structure in it. I have to do it manually but I don't know how. COuld you tell me where to find the information?. Once I have this WAR file, I suppose I only have to put it under webapps and restart TOmcat, right? THanks for your patience. You can create the war file two ways, basically. One is to use ant, which has a war tag, which makes life simple. The other approach is to just create the directory structure somewhere, put your files in there, then use: jar -cf MyApp.war MyApp -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: several virtual hosts -- single application
Thanks a lot for your help Adrian. Unfortunately that hasn't helped, as CFMX doesn't parse the cfm pages, yet it works perfectly when I try http://localhost:8080/domain1 yet http://domain1:8080 which points to the same folder (i.e. myapps/domain1) just displays the cfmx code - the correct file is found but the application does not know that it should be parsing it. It must be the way in which virtual hosts are 'ignored' by the application to which they are pointed, if the target folder is not the app folder i.e. a sub-folder like 'domain1' or 'domain2' - I'm sure I just need to give Tomcat a hint that it should use CFMX when it encouters '.cfm' files but I can't seem to crack it... Anyone with any idea would be very welcome as this has been bugging me for nearly a week and I'm trying to avoid having to use Apache (which would solve the specific problem immediately, but would add another server increase complexity) Thanks, James - Original Message - From: Adrian Lanning [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, March 15, 2004 8:42 PM Subject: Re: several virtual hosts -- single application Hi James, On Linux, I've accomplished this using the following configuration: + snip from server.xml on linux + Host name=domain1 debug=0 appBase=webapps/app1 unpackWARs=true autoDeploy=true /Host Host name=domain2 debug=0 appBase=webapps/app2 unpackWARs=true autoDeploy=true /Host + snip from server.xml on linux + On Windows, try this: + snip from server.xml on windows + Host name=domain1 debug=0 appBase=webapps unpackWARs=true autoDeploy=true Context path= docBase=/app1 debug=1/ /Host Host name=domain2 debug=0 appBase=webapps unpackWARs=true autoDeploy=true Context path= docBase=/app2 debug=1/ /Host + snip from server.xml on windows + I don't know why it acts differently on windows and linux... Also, I've noticed that the windows setup seems to create two instances of each app when viewed in the manager. One as / and one as app1 or app2 (depending on which domain you log into). So this should get you started but I wouldn't use the windows setup for production. Linux you should be good to go. HTH, Adrian Lanning - Original Message - From: James Agnew [EMAIL PROTECTED] To: tomcat list [EMAIL PROTECTED] Sent: Monday, March 15, 2004 5:24 AM Subject: several virtual hosts -- single application Hello Is it possible to have several virtual hosts point to different folders within the same context under tomcat 5 standalone webserver? Host name=domain1.com debug=0 appBase=webapps Context path= docBase=domain1 debug=0 reloadable=true/ /Host Host name=domain2.com debug=0 appBase=webapps Context path= docBase=domain2 debug=0 reloadable=true/ /Host http://domain1.com -- myapps/domain1 http://domain2.com -- myapps/domain2 so that one application handles all the requests? I'm running Cold Fusion as the application and I need it to handle request for virtual hosts within its own context i.e. domain1 and domain2. I can achieve this easily with VirtualHost directive in Apache, but can't get it to work under Tomcat standalone. Is it possible? Any help much appreciated. James - 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]
Virtual Hosting with Tomcat 4.1, Apache 2.0, and mod_jk2
Is there any way to specify context mappings in the httpd.conf file? Something similar to JkUriSet? I have successfully mapped *.jsp to my mod_jk2 worker, but I'm having an issues mapping virtual hosts with the correct Tomcat context? Using uri in the workers2.properties will prove cumbersome as I have many virtual hosts, with many more ServerAliases. Recommendations on how to best handle a single Apache 2.0./Tomcat 4.1 Server instance doing a large amount of virtual hosting for several sites, and hostnames? __ James C. Montz RHCE Hosting Services Engineer James Tower http://www.jamestower.com http://www.jamestower.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
several virtual hosts -- single application
Hello Is it possible to have several virtual hosts point to different folders within the same context under tomcat 5 standalone webserver? Host name=domain1.com debug=0 appBase=webapps Context path= docBase=domain1 debug=0 reloadable=true/ /Host Host name=domain2.com debug=0 appBase=webapps Context path= docBase=domain2 debug=0 reloadable=true/ /Host http://domain1.com -- myapps/domain1 http://domain2.com -- myapps/domain2 so that one application handles all the requests? I'm running Cold Fusion as the application and I need it to handle request for virtual hosts within its own context i.e. domain1 and domain2. I can achieve this easily with VirtualHost directive in Apache, but can't get it to work under Tomcat standalone. Is it possible? Any help much appreciated. James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory Usage
bort wrote: If System.runFinalization() and System.gc() are misleading... what should I use instead, to force to garbage collection? So, the amount of memory the JVM uses, will always increase? How do I get it to decrease? You can't get it to decrease, but if you have the memory large enough so that it doesn't have to request any more from the system, it won't continue to grow. If it is growing without bounds you probably have a memory leak. JDK1.5.0beta seems to have an improved garbage collection tuning built in, and that may be of some help, but if you have a leak then all you can do it find it. You may want to learn more about garbage collection. You could use these references: http://java.sun.com/docs/hotspot/gc1.4.2/faq.html http://www-106.ibm.com/developerworks/java/library/j-jtp11253/ http://java.sun.com/docs/hotspot/gc1.4.2/ 256 was an arbitrary choice. Is there some formula I should be using (based on projected traffic)? The links above, esp the third one, should help you to determine what is a good size. -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memory Usage
Shapira, Yoav wrote: Hi, JDK1.5.0beta seems to have an improved garbage collection tuning built Care to elaborate or provide a reference? Thanks, http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html#vm_selftune Based on my own experience, doing various performance related tests with Tomcat 5, running under JDK1.5 I find it interesting to watch the size of the java application decrease, over time. I don't set anything for the heap except -mx512M, so I can see how it performs. When I run my unit tests inside of JProfiler I also can watch the total heap decrease, while the unit test is running. -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Host (no apache or iis)
Hi Could you try it again, but remove the : after 'webapps' for test1 ...assuming that was just a typo and that it still doesn't work, what context is your app in? If it's / then does http://localhost:8080 work ok? Place 2 folders in this directory so you have - http://localhost:8080/test1 http://localhost:8080/test2 If all that still works, then clear your host info, add the following in simplified your server.xml Host name=test1.mydomain.com debug=0 appBase=webapps Context path= docBase=test1 /Host Host name=test2.mydomain.com debug=0 appBase=webapps Context path= docBase=test2 /Host See if that works, if not get back to us :) James - Original Message - From: Roland Carlsson [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, March 12, 2004 8:24 PM Subject: Multiple Host (no apache or iis) Hi! I have tried to search for this but all hits seems to be about getting tomcat to work together with apache or iis. I can't figure out why my test1-domain doesn't answer at all. All I gets is a 400-error. What bother me the most is that there is nothing in the catalina.out log that indicats that there are something wrong so I don't even know where to start look. I post the Host-part of my server.xml below. Thanks in advance Roland Carlsson Host name=test1.mydomain.com debug=0 appBase=webapps: unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=test1_access_log. suffix=.txt pattern=combined resolveHosts=false/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=test1.log. suffix=.txt timestamp=true/ /Host Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=combined resolveHosts=false/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ /Host - 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]
Virtual hosts for single application context
Any ideas guys/gals? I have an application (CFMX) running under Tomcat 5.0.18 as a deployed war file within the ROOT folder i.e. $CATALINA_HOME/webapps/ROOT/ this all works perfectly and correcly parses all .cfm files. Now, I've created virtual hosts by adding the following in server.xml: Host name=website1.com debug=0 appBase=webapps Context path= docBase=website1 debug=0 reloadable=true/ /Host Host name=website2.com debug=0 appBase=webapps Context path= docBase=website2 debug=0 reloadable=true/ /Host This works, but the application (i.e. CFMX) doesn't parse the .cfm pages within the website1 and website2 folders. Is it possible to map multiple virtual hosts to a single application context so that the applications handles the page requests? Thanks, James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
virtual hosts for single application context
Hello all, I have an application (CFMX) running under Tomcat 5.0.18 as a deployed war file within the ROOT folder i.e. $CATALINA_HOME/webapps/ROOT/ this all works perfectly and correcly parses all .cfm files. Now, I've created virtual hosts by adding the following in server.xml: Host name=website1.com debug=0 appBase=webapps Context path= docBase=website1 debug=0 reloadable=true/ /Host Host name=website1.com debug=0 appBase=webapps Context path= docBase=website2 debug=0 reloadable=true/ /Host This works, but the application (i.e. CFMX) doesn't parse the .cfm pages within the website1 and website2 folders. Is it possible to map multiple virtual hosts to a single application context? Thanks, James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: https without specifying the port in address bar
If the *only* port that your company's firewall is listening on is 8443, then there's nothing you can do, as all traffic to other ports (e.g. 443 for SSL) will be dropped. If there's some kind of proxy in between, then you could use port forwarding, where the client request for port 443 is translated to 8443. The only other solution is to open up port 443 on the firewall and, if you can only run Tomcat on 8443, then set up a firewall rule to translate 443 to 8443. - Original Message - From: Forte, Graham [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 7:21 PM Subject: https without specifying the port in address bar Hello all, I am trying to stand up a site and my company has all ports except for 8443 blocked. Thus if someone types in www.mydomain.com they cant get to any of my pages. SSL is a requirement for this site. How can I set this up so that if the user types in https://www.mydomain.com they will see my pages. Right now they have to type in https://www.mydomain.com:8443/logon.jsp Thanks in advance! - 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: virtual hosts for single application context
..of course, the second host name should read 'website2.com' - apologies for typo. I've just tried the same approach with the website1 and website2 folders directly below the application context, but it still doesn't want to parse. Appreciate any input Thanks, James - Original Message - From: James Agnew [EMAIL PROTECTED] To: tomcat list [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 7:30 PM Subject: virtual hosts for single application context Hello all, I have an application (CFMX) running under Tomcat 5.0.18 as a deployed war file within the ROOT folder i.e. $CATALINA_HOME/webapps/ROOT/ this all works perfectly and correcly parses all .cfm files. Now, I've created virtual hosts by adding the following in server.xml: Host name=website1.com debug=0 appBase=webapps Context path= docBase=website1 debug=0 reloadable=true/ /Host Host name=website1.com debug=0 appBase=webapps Context path= docBase=website2 debug=0 reloadable=true/ /Host This works, but the application (i.e. CFMX) doesn't parse the .cfm pages within the website1 and website2 folders. Is it possible to map multiple virtual hosts to a single application context? Thanks, James - 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]
Preferred connection between Apache Tomcat?
Which method is best for connecting Apache to Tomcat? Should I use JNI for Apache to invoke an in-process Tomcat? Or should I run a Tomcat server and let the connector forward traffic to the server? What disadvantages does the JNI approach have? This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hiding Apache-Coyote/1.1 banner in Tomcat 5
I just like to reduce as much as possible the amount of information that a server gives out. Letting oppotunist crackers, who run a 1 minute nessus scan, know the version and type of the webserver, should IMO be avoided if possible. Sure, it won't put-off the determined cracker, but it might force some to move onto easier prey. Anyway, back to the matter in hand - do you know how one might go about this? Thanks, James On 03/08/2004 02:57 PM James Agnew wrote: I've been looking for a way to prevent security scanners such as Nessus from being able to easily read Tomcat's standalone webserver details. I'm running Tomcat 5.0.18 standalone and Nessus identifies it as follows: Server Version: Apache-Coyote/1.1 Server Banner: Apache-Coyote/1.1 I can't seen anything similar to Apache's 'ServerTokens' directive to disable/suppress the info given out. Pardon my ignorance, but what is the problem with that? Adam -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Disabling PUT and DELETE methods in Tomcat 5 standalone
So, how would I go about actually prevent PUT and DELETE for all users, logged in or otherwise? I've been hitting my head against this one for some time, with no luck. The solution needs to allow anonymous users to access the site (i.e. no login) and still prevent PUT and DELETE methods. Thanks, James On 03/08/2004 10:15 AM funkster wrote: security-constraint web-resource-collection web-resource-nameDisable Methods/web-resource-name url-pattern/*/url-pattern http-methodPUT/http-method http-methodDELETE/http-method /web-resource-collection auth-constraint role-name/role-name /auth-constraint /security-constraint I was under the impression that by not including a role-name value, then all PUT and DELETE method requests are disabled since the security constraint cannot be linked to a role. However, the fact that it doesn't work yet means I'm doing something wrong somewhere! Well, you haven't disabled it. You have protected it. As far as I can tell, you would be required to login first, and then you would be denied access. (When tomcat finds out that you are not in no roles?!) Adam -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Disabling PUT and DELETE methods in Tomcat 5 standalone
There's no implementation of the servlet doPut() and doDelete() methods so nothing can actually be put or deleted, but that's true before even creating the security constraint. Yet, testing for PUT and DELETE methods still show that they're enabled. Our security scanners still flag these methods as being available, albeit not exploitable. Is there any way to prevent the server from responding to these methods? I ran the same scan tests on one of our Apache boxes and it can back complete dead on the PUT and DELETE methods i.e. it didn't respond in any way - that's the behaviour we're looking for. Would the same not be possible on Tomcat standalone? Thanks, David - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, March 08, 2004 11:39 PM Subject: Re: Disabling PUT and DELETE methods in Tomcat 5 standalone What I was implying is that you have effectively disabled it already this way. Or are you able to do PUTs and DELETEs despite the security constraint? I'd be surprised. Adam On 03/08/2004 11:24 PM James Agnew wrote: So, how would I go about actually prevent PUT and DELETE for all users, logged in or otherwise? I've been hitting my head against this one for some time, with no luck. The solution needs to allow anonymous users to access the site (i.e. no login) and still prevent PUT and DELETE methods. Thanks, James On 03/08/2004 10:15 AM funkster wrote: security-constraint web-resource-collection web-resource-nameDisable Methods/web-resource-name url-pattern/*/url-pattern http-methodPUT/http-method http-methodDELETE/http-method /web-resource-collection auth-constraint role-name/role-name /auth-constraint /security-constraint I was under the impression that by not including a role-name value, then all PUT and DELETE method requests are disabled since the security constraint cannot be linked to a role. However, the fact that it doesn't work yet means I'm doing something wrong somewhere! Well, you haven't disabled it. You have protected it. As far as I can tell, you would be required to login first, and then you would be denied access. (When tomcat finds out that you are not in no roles?!) Adam -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.1 + tomcat 5.0.16 + java 1.4.2 Linux 2.4.20 Debian - 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: Steps to follow for SSL
Uma Checkout the section entitled 'Installing a Certificate from a Certificate Authority' here: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/ssl-howto.html You'll need to create a CSR that you send to your Certificate Authority, along with company registration details etc, for the company that has registered the domain name you're securing with a cert. It's important that these details match exactly with the registered owner details for your domain, otherwise there'll be processing delays. I use Thawte for all my secure certs with Tomcat and I've never had any problems. Here are their instructions for setting up a secure cert under Tomcat: http://kb.thawte.com/thawte/thawte/esupport.asp?id=vs15596 If you follow their instructions carefully, you should have no problems, just make sure that you use the same password for the keystore *and* the actual certificate key (just accept default prompt). If you use a password different from the default ('changeit') you'll need to add the keystorePass=your new password attribute to the Connector element. Same thing applies if you choose a different location for your keystore (the default is the home file of the user under whom Tomcat is running). If you change this, then add the keystoreFile=/path/to/keystore attribute to the Connector element. Hope this help, James - Original Message - From: [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 3:47 AM Subject: Steps to follow for SSL Hi, Can some one tell me what are the steps that I need to follow for installing SSL on Tomcat 5. I have already woked on creating a self cretified certificate and it works good. But when I purchase a certificate what are the steps that I need to do i.e importing the certificate and where to place it so that tomcat can recognize it, etc.. Thank you, Best Regards, Uma - 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]
Hiding Apache-Coyote/1.1 banner in Tomcat 5
I've been looking for a way to prevent security scanners such as Nessus from being able to easily read Tomcat's standalone webserver details. I'm running Tomcat 5.0.18 standalone and Nessus identifies it as follows: Server Version: Apache-Coyote/1.1 Server Banner: Apache-Coyote/1.1 I can't seen anything similar to Apache's 'ServerTokens' directive to disable/suppress the info given out. Any ideas? Thanks, James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
re: can't find org/apache/tomcat/util/buf/ByteChunk.class
Hello, My tomcat server is failing to start up because it can't find this class. What jar file should it be in? Thank you. I am using Tomcat 5.0.19 -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: can't find org/apache/tomcat/util/buf/ByteChunk.class
Shapira, Yoav wrote: Hola, My tomcat server is failing to start up because it can't find this class. What jar file should it be in? For tomcat 5.0.19, it's in $CATALINA_HOME/server/lib/tomcat-util.jar. I am using JDK1.5.0beta and now I can't get tomcat to run. It couldn't find tomcat-util.jar, then I copied that from the location you mentioned to /usr/java/jre/lib/ext, then it complained that it can't find org/apache/commons/logging/LogFactory, so it appears that server/lib is not being added to the classpath. -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED]
re: my problem of having a bad classpath is fixed
I just realized I had tomcat-coyote.jar in /usr/java/jre/lib/ext and that is what I think was causing the problem. I deleted it and it starts up fine now. -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat on jdk1.5
Shapira, Yoav wrote: I haven't spent time running tomcat on JDK 1.5 (I don't usually waste time on running product X on unsupported platform Y [especially if Y is alpha/beta]), so I can't help much there -- sorry ;( I think Remy has done this without any problems and even noticed a speed improvement, so maybe he others can chime in here. I was confused because it has been running fine under jdk1.5. I noticed that the garbage collection improvements help out a lot, in keeping my application relatively small and it does seem to be faster than before. Overall, jdk1.5 seems to work well, for running tomcat under. -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Self Cert Valid for only 3 months?
I have generated a Self Signed Cert using the command; Keytool -genkey -alias tomcat -keyalg RSA -keystore /var/tomcat4/.keystore Under Tomcat4 4.1.18 Successfully generated the cert, but when I view the cert in a browser, it is only valid for 3 months (2/19/2004 - 5/19/2004) Anyone know why this is only 3 months, and how can I increase this to say 24 months? __ James C. Montz RHCE Hosting Services Engineer James Tower http://www.jamestower.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to know when Tomcat has completed startup?
Jose, James, do you need the servlets to be already initialized??? Yes, and they are all defined in web.xml. The timer servlet that processes the calendars is the last to load. Another thing to consider is that the connector between Tomcat and Apache is also set up. Because Tomcat and Apache may be completly set up, but the connector takes a little longer (at lest in my case) therefore you may get a HTTP Error. This is what causes me HTTP 500 errors. The servlets are in fact all instantiated, but they are just not available on port 80 until JK2 has completed whatever it does on startup. The best thing I can think of is start the timer in a thread, and defer the thread from processing the action for a nominal duration (1/2 mins?). Still seems like a dirty way of doing it though. Maybe I should talk to the JK2 developers. Thanks James. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How Servlets work?
It's Multiple Threads pushed through a single instance. It's is parallel not serial. Any synchronization code is probably going to do more harm than good. You might want to rethink your architecture. See Flyweight Pattern [GoF]. --- saravanan [EMAIL PROTECTED] wrote: Hi all, may be not the right place to ask this question. Hope somebody is kind enough to clarify this doubt of mine. i understand, in a servlet, if i need any code to be thread safe, then i shud put that code inside a synhronized block or declared the entire method as synchronized. if my understanding is right, only instance of our serlvet class is being created. in that case how the webserver handles more than one request at the same time. i mean, is some queuing structure being followed, (i am tempted to believe it is not multithreaded)? Could anybody clarify this doubt of mine or atleast point out some ref. material for this. Thanks R.Saravanan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Are you a Techie? Get Your Free Tech Email Address Now! Visit http://www.TechEmail.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to know when Tomcat has completed startup?
Hi all, I'm trying to get a certain method within my startup class to *only* execute after Tomcat startup has fully completed. I understand I can implement a LifecycleListener, but there only seems to be before/after start/stop events. (i'm not sure that Lifecycle.AFTER_START_EVENT refers to 'startup is complete', or 'startup event was requested') In short, as part of my Startup procedure, we pre-generate(if rqd) a fornightly clandar of 'events' from some JSPs on the same Tomcat instance. The problem is mainly that we also use Apache/JK2, so a HTTP 500 error is generated (the Apache connection can be made, but Tomcat is not yet available), unless we can defer until Tomcat has started. I could, of course, defer the event for a few minutes, but that doesn't strike me as much of a graceful approach. I'm assuming this is probably pretty simple? Any pointers would be much appreciated. (not google.com, been all morning in there! :) ) James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to know when Tomcat has completed startup?
Thanks to all who replied. Solved here - even with an example ;) http://www.onjava.com/pub/a/onjava/2001/04/12/listeners.html?page=2 |contextInitialized is what I needed :) |I'll call my startup method when I know the whole ServletContext has been initialised. Cheers, James. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to know when Tomcat has completed startup?
[EMAIL PROTECTED] wrote: if your application is a struts one, you can do that with struts plugin mechanism. we actually *are* using Struts i'm intrigued as to how you would propose to do this in Struts... Regards, James. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to know when Tomcat has completed startup?
Cancel that - this is called *before* any of the servlets are initialised :( Any better ideas? James Neville wrote: contextInitialized is what I needed :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat w Java1.5 beta problem
Shawn wrote: Under Tomcat 5.0.18 with servlets compiled with 1.5 beta, I get an odd message, and the servlet won't load. When the same servlet is compiled with 1.4.2 it runs fine. I have tried compiling with: javac -source 1.5 -target 1.4 ... ? I get the complaint from both IDEs I use because of the fact that the collections have changed, in order to support generics. I haven't tried running my JDK1.5 classes under jdk1.4.2 yet, as I am still trying to get all of my unit tests to pass. g -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat w Java1.5 beta problem
I get the complaint from both IDEs I use because of the fact that the collections have changed, in order to support generics. I haven't tried running my JDK1.5 classes under jdk1.4.2 yet, as I am still trying to get all of my unit tests to pass. g Oh, I thought you had run it under Tomcat. Use ant to run your unit tests. g That is what I am doing. Also, Netbeans doesn't seem to have a problem with compiling and running the tests, if you have the external program set to jdk1.5.0. For my jdk1.4.2 unit testing I use ant though and that works fine. I have given up trying to get Netbeans or Eclipse to stop complaining about the new features I am using. -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat w Java1.5 beta problem
Shapira, Yoav wrote: I suggest rebuilding tomcat with 1.5 beta if you want to run servlets compiled using 1.5 beta. I'm not even sure my suggestion will work, as I haven't tried it myself. There has not been a tomcat release declared to support JDK 1.5 yet, although you're welcome to do building and testing for us ;) I wrote a jsp page that uses some of the management api stuff for monitoring threads, garbage collection, etc, and that works great under Tomcat 5, using jdk1.5.0. I didn't have to recompile anything. Once I get my unit tests to pass I will see how my webservices run under jdk1.5. -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
re: setting up a virtual domain on tomcat
Hello, We have a virtual host on apache: http://virtualhost.abc.edu This actually is on host.abc.edu There is a index.php that is ran automatically when you go to virtualhost.abc.edu I now have a jsp page that I want to replace the php with. People have bookmarked virtualhost.abc.edu I want their bookmarks to go to http://tomcathost.abc.edu/SomeDirectory I have an index.jsp in SomeDirectory Is there any way to make this transparent to the user, where I am not using a webpage that is redirecting them? I want some to enter: http://virtualhost.abc.edu and have them go immediately to http://tomcathost.abc.edu/SomeDirectory Thank you for any ideas. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stop displaying version info
Allan Bruce wrote: Is there a way I can get tomcat to stop displaying so much info if somebody hits a 404 or other error? Stick something like this in your web.xml file. error-page error-code500/error-code location/500.html/location /error-page error-page error-code404/error-code location/400.html/location /error-page - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jspexception in admin webapp
Apu further, this is not due to clicking save or going back or any such user action, it happens as soon as i click the Service (Catalina) link. It also happened for us with any host or context nodes. (without using the back button and on all browsers) See my post here:- http://marc.theaimsgroup.com/?l=tomcat-userm=107399516922291w=2 We have since reproduced it on a similar machine, using TC 5.0.16, and assumed it was something to do with the struts libraries that came with the binary distribution. We tried replacing them with the struts/bean etc .jars from the 1.0/1.1 distributions, to no avail. However, we managed to get a working TC 5.0.16 by building from source. I must say that the new ant build works a treat! :) I wish I could clarify the problem further, sorry I can't be any more help. James. On Tuesday 20 January 2004 02:22 pm, Apu Shah wrote: wondering if anyone has seen this while running the admin webapp from tomcat 5.0.16? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please help, I have a headache .. servlet init troubles
Allistair Crossley wrote: Do you know why my servlet initalises twice? That's my remaining issue.. If you are specifying multiple hosts, all running from the same appBase, then each web application will be deployed to each host. If this is the case, run each host from a different appBase so that you don't double deploy. James. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Please help, I have a headache .. servlet init troubles
Allistair Crossley wrote: no, it's one host, Cheers, ADC And one Connector element? (commonly 8009 for CoyoteConnector and 8080 for standalone are defined in the default server.xml) I'm purely clutching at straws here. Maybe you could post your /WEB-INF/web.xml and the $CATALINA_HOME/conf/server.xml files? James. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How can I count the number of active requests/servlets for Tomcat?
Write each request into a table with the session id? Work like you don't need the money, love like you've never been hurt, and dance like no one is watching. --- Satchel Paige - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5 - Struts Error in Admin application
Hi guys, We've just started testing TC 5.0.16, with a view to running in production. Unfortunately we're getting errors with the admin application (something we've come to rely on recently). _1. Tomcat Service Node throws this error:-_ javax.servlet.ServletException: Define tag cannot set a null value org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800) admin.service.service_jsp._jspService(service_jsp.java:840) * root cause* javax.servlet.jsp.JspException: Define tag cannot set a null value org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java:272) admin.service.service_jsp._jspService(service_jsp.java:235) _2. Host link throws this error:-_ java.lang.NullPointerException org.apache.struts.taglib.logic.CompareTagBase.condition(CompareTagBase.java:179) org.apache.struts.taglib.logic.NotEqualTag.condition(NotEqualTag.java:90) org.apache.struts.taglib.logic.ConditionalTagBase.doStartTag(ConditionalTagBase.java:218) admin.host.host_jsp._jspService(host_jsp.java:437) _3. Context Nodes throw these errors:-_ *type* Status report *message* _Error retrieving attribute debug_ *description* _The server encountered an internal error (Error retrieving attribute debug) that prevented it from fulfilling this request._ I found this entry in Bugzilla (when clicking the back button in Mozilla):- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24086 I'm using Mozilla, but the error appears on every browser available (MSIE 5/5.5/6 Mac/Pc and all Netscapes). Its plainly clear theres some kind of Struts incompatability, but is this confined to my installation, or is anyone else experiencing it? Does anyone know if the admin app has changed since 4.1.29? I can provide full logs if anyones interested. _Setup:-_ Debian 2.4.18-1 tc 5.0.16 jk 2.0.2 http 2.0.48 As a final note - I have tried this on both my development and production machines with similar results. I'm going to attempt replacing the Struts jars in the admin's WEB-INF/lib, but I reckon thats probably a dead end (last resort). I'm pretty sure its not my installation, but i'll add it to Bugzilla if i'm able to confirm. Thanks in advance for any insight. James. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Redhat9 / apxs / mod_jk2 build problem.
I have been trying to compile the mod_jk2.so connector, but having problems. I have the following: O/S - RedHat9.0 Apache2.0.48 installed from source and working standalone on port 80 443 at /usr/local/apache2 jakarta-tomcat-4.1.29 installed and working standalone on port 8080 at /usr/local/jakarta-tomcat-4.1.29 java at /usr/local/j2sdk1.4.2 (also tested and working ok) Apache was configured as follows: # ./configure --enable-rewrite --enable-speling --enable-shared=max --enable-module=so \ --enable-ssl --enable-cgi --enable-info --enable-usertrack --enable-deflate \ --enable-mime-magic --with-ssl=/usr/local/ssl I obtained jakarta-tomcat-connectors-jk2-src-current.tar.gz and did the following: # gunzip jakarta-tomcat-connectors-jk2-src-current.tar.gz # tar -xvf jakarta-tomcat-connectors-jk2-src-current.tar # cd jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2 # sh ./buildconf.sh # ./configure --with-apxs2=/usr/local/apache/bin/apxs \ --with-tomcat41=/usr/local/jakarta-tomcat-4.1.29 \ --with-jni --with-jave-home=/usr/local/j2sdk1.4.2 # make Now, according to most of the how-tos I have looked at, I should have a copy of mod_jk2.so and jkjni.so waiting for me in /usr/local/src/jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apac he2/ Unfortunatly all that is here are the following files: # ls -l ../build/jk2/apache2/ | grep mod_jk2 -rw-r--r--1 root root 3064400 Jan 12 11:48 mod_jk2.a -rw-r--r--1 root root 666 Jan 12 11:48 mod_jk2.la -rw-r--r--1 root root 10 Jan 12 11:48 mod_jk2.lo -rw-r--r--1 root root 103024 Jan 12 11:48 mod_jk2.o # ls -l ../build/jk2/apache2/ | grep jkjni -rw-r--r--1 root root 2680734 Jan 12 11:48 jkjni.a -rw-r--r--1 root root 728 Jan 12 11:48 jkjni.la I have had a look through the mailing list archives, and have seen this problem before, but unfortunately I don't see a solution for it. Any help finding a way forward is appreciated, James Snelling James Snelling [EMAIL PROTECTED] --- The views expressed here are not those of the Students' Association nor can they be assumed to be those of the writer. No liability is accepted for the accuracy or the veracity of the contents. You are held to accept this and any use to which you put any contents of this communication are entirely your responsibility. DISCLAIMER: This e-mail is intended solely for the above-mentioned recipient and it may contain confidential or privileged information. If you have received it in error, please notify us immediately and delete the e-mail. You must not copy, distribute, disclose or take any action in reliance on it. This e-mail message and any attached files have been scanned for the presence of computer viruses, however, you are advised that you open any attachments at your own risk. Nothing in this email shall be construed as constituting an order for goods or services www.upsa.org.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Obtaining URL to web-app base in ServletContextListener.
Hi all, I need to be able to find out the url to the base of an installed web-app within a ServletContextListener (running under tomcat 4.1). I have not been able to find out how to obtain this information, the closest I have managed to get is jndi:/localhost/iPackager/ with a call to sc.getResource(/) but I have no idea how to convert this to a http url... can anyone shed any light or give me some pointers to how this may be accomplished? Thanks /James === Information contained in this email message is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by email to [EMAIL PROTECTED] and destroy the original message.
Re: Connection Pooling
Justin, That would all depend on the pooling implementation you're using. Commonly, its pool.free(conn) or pool.freeConnection(conn). Remember *not* to close the connection if you're using connection pooling, as this should be handled by the pool itself. That said one of my colleagues mentioned one pooling implementation he used that returned a custom connection object when obtained from the pool (ie not a java.sql Connection object). The close() method on that connection returned it to the pool, but *didn't* actually close it. If you let us know which pooling implementation you're using, it may make things clearer ;) Cheers, James Hart, Justin wrote: Is there some manner in which a database connection should be returned to the connection pool, or is that automatic? Justin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK2 Won't create .so's for Tomcat 5/Apache 2.0.48
Thank you. Ian harwood wrote: Hi I posted how i got apache2 + tomcat41 with jk2 just yesterday if you go to the mailing list, tomcat users and click on the Archive you should be able to see it. Please let me know if this helps or if I can be of further help, have not tried with tomcat5 yet, should still work I think Ian - Original Message - From: James Myers [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 05, 2004 1:12 PM Subject: JK2 Won't create .so's for Tomcat 5/Apache 2.0.48 Hello, I have lost the remainder of what hair I had trying to get JK2 to create mod_jk2.so and jkini.so. Has anyone ever made this combination work? I'm using configure like this: ./configure --with-tomcat41=/usr/local/tomcat5.0 \ --with-apache2=/usr/local/apache2 \ --with-apxs2=/usr/local/apache2/bin/apxs Any help would be greatly appreciated. Thanks - 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-connectors
Hi, I am having similar problems, though not with the same configuration as yours. My config is: RH9, Apache 2.0.48, Tomcat 5.0.16, JK2_2.0.2. I cannot get the make files to produce the .so's. It's as if libtool is not working. I am following the instructions to the letter, but still no mod_jk2.so, or jkjni.so. Any ideas? James Shannon Scott wrote: Greetings, I hope everyone is feeling well in the new year. I recently upgraded a web server from redhat7.2 to the fedora os. The apache was upgraded in the process and now we are running Apache/2.0.47. I have been unable to get a mod_jk or mod_jk2 that will install or compile. I have tried the src files from the apache site found here: http://jakarta.apache.org/site/sourceindex.cgi but I get the following error during the make: jk_connect.c:99:28: apr_network_io.h: No such file or directory ( all the apr rpms for fedora have been installed ). Someone suggested trying the rpms at jpackage.org, so I have also tried all the source and non source rpms from jpackage.org. Does anyone have mod_jk or mod_jk2 working with tomcat 4.x on the fedora os? Any help or insight is greatly appreciated. Take Care Shannon Fedora Core 1 Apache 2.0.47 Tomcat 4.1.24 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JK2 Won't create .so's for Tomcat 5/Apache 2.0.48
Hello, I have lost the remainder of what hair I had trying to get JK2 to create mod_jk2.so and jkini.so. Has anyone ever made this combination work? I'm using configure like this: ./configure --with-tomcat41=/usr/local/tomcat5.0 \ --with-apache2=/usr/local/apache2 \ --with-apxs2=/usr/local/apache2/bin/apxs Any help would be greatly appreciated. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
re: Tomcat 5 port 80 non-root
i resolved the problem with the Can't load server.xml message. all i had to do was append $CATALINA_HOME to the classpath...the Tomcat.sh script didn't have it in there. CLASSPATH=\ $JAVA_HOME/lib/tools.jar:\ $DAEMON_HOME/dist/commons-daemon.jar:\ $CATALINA_HOME/bin/bootstrap.jar:\ $CATALINA_HOME --- i following the instructions with jsvc included with tomcat, but when i run the Tomcat.sh script i get the following in my $CATALINA_HOME\logs\catalina.out Can 't load server.xml Can 't load server.xml Jan 2, 2004 12:14:04 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 0 ms any ideas? thanks, james - You need to use jsvc to do this. The source ships in the $CATALINA_HOME/bin/jsvc.tar.gz file. You need to unpack it and build it for your system. The documentation is at: http://jakarta.apache.org/commons/daemon/jsvc.html. Nicolas nl@(protected) wrote in message news:3FF41454.9040005@(protected) hi i read that in Tomcat 5 it 's possible running the catalina on port 80 as a non-root user. like in apache httpd where you can set the user an group in the httpd.conf. regards nicolas __ Do you Yahoo!? Find out what made the Top Yahoo! Searches of 2003 http://search.yahoo.com/top2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 5 port 80 non-root
i following the instructions with jsvc included with tomcat, but when i run the Tomcat.sh script i get the following in my $CATALINA_HOME\logs\catalina.out Can't load server.xml Can't load server.xml Jan 2, 2004 12:14:04 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 0 ms any ideas? thanks, james - You need to use jsvc to do this. The source ships in the $CATALINA_HOME/bin/jsvc.tar.gz file. You need to unpack it and build it for your system. The documentation is at: http://jakarta.apache.org/commons/daemon/jsvc.html. Nicolas nl@(protected) wrote in message news:3FF41454.9040005@(protected) hi i read that in Tomcat 5 it 's possible running the catalina on port 80 as a non-root user. like in apache httpd where you can set the user an group in the httpd.conf. regards nicolas __ Do you Yahoo!? Find out what made the Top Yahoo! Searches of 2003 http://search.yahoo.com/top2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat memory usage
Andrei Ivanov wrote: I've created a context for my application and I used the manager to reload the context and now I've configured the context to be reloadable. First, start with using a profiler to ensure that your application isn't leaking memory. Look at http://issues.apache.org/bugzilla/ for anything on memory leaks wrt contexts. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat memory usage
Andrei Ivanov wrote: I've searched bugzilla, but there doesn't seem to be any bug filled about something like this. About using a profiler... could you recommend one ? JProfiler I like, mainly because of the cost, but also because it integrates in well with Netbeans. g Look at http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20758 and see if that is your problem. This may also help: http://www.junlu.com/msg/38658.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Tuning Memory leak
David Strupl wrote: I have already changed this ;-) Also added the fork attribute to true for jsp compile. It is not caused by the app - after the app starts and first 100 or so users connect the memory jumps up to approx 130 MB. But during the next 24 hours it eats more than 300 megs. From what I have seen from the profiler so far number of my objects is fairly decent. But there are more and more approx 100k (98320 chars) buffers created somewhere. I will post more precise info later after I a. upgrade to the latest and greatest JDK 1.4.2_03 b. create some HTML output of the heap Your JSP page shouldn't have any business logic in it, that should be in beans that your JSP page uses. You can test the beans in a profiler and see if there is any memory leaks. If you are using JDK1.4.1 then that will probably be your problem as there was a memory leak in the String class that was fixed in JDK1.4.2. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Classes cannot be found
Jeff Greenland wrote: Does anyone know a way around the serialization problem? If there's an easy solution, I would jump on moving all of our classes into a package immediately -- something we've been wanting to do for a few years. Thanks for the help everyone, hopefully someone has a deserialization solution as well! Write a standalone application that will go through the customer records, extract the information using the old classes, then repackage them in the new classes and reserialize them? That should work, then you can just move to the new, better, structure. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.lang.OutOfMemoryError
You may need to go modify Catalina.bat (I guess that is what it would be on Win2k), add a JAVA_OPT variable, such as JAVA_OPT=-mx512M. I don't remember if it is -mx or -mX though. This will set the highest heap size that the java application can use. You may want to set it to 2 or 3GB though instead. You may also want to use a profiler and see if you have a memory leak in your application. Work like you don't need the money, love like you've never been hurt, and dance like no one is watching. --- Satchel Paige - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: unit testing when application level scoping used
-Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, December 22, 2003 10:03 AM To: Tomcat Users List Subject: RE: unit testing when application level scoping used Cactus works beautifully with regards to servlet context and general environment setup. Should I instantiate a bean with session scope that is expected to be present? Also, how do I handle the fact that I need to log in before I can test the parts I need to test? This whole set up is very difficult to unit test, and that is bothersome, as I am certain that this is a source of considerable errors in applications. Thank you for your response. Work like you don't need the money, love like you've never been hurt, and dance like no one is watching. --- Satchel Paige - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: postgresql error
The postmaster needs to be started with the -i flag to accept TCP/IP connections. Check the Postgres documentation. James. [EMAIL PROTECTED] wrote: ***Exception: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: postgres configuration
1. You are posting off-topic for the Tomcat list (I just happen to be a postgres user) 2. RTFM, there are several references to your questions, with v simple answers. Starting the postmaster: http://www.postgresql.org/docs/7.3/interactive/postmaster-start.html Users Groups: http://www.postgresql.org/docs/7.3/interactive/user-manag.html James [EMAIL PROTECTED] wrote: Hello all i am Inserting data to postgresql question please help me solve this problem i am not given any username ans password by the time of creating db what should be the username and password and how shout i use -i option for starting postmaster pls help me configuration i made are I am connecting postgresql and inserting some data and i made in pg_hdb.conf file to host all all 127.0.0.0 255.255.255.255trust and postgresql.conf to tcpip_socket =true pls help me solve the problem Regards Dhayalan.G [EMAIL PROTECTED] root]# java HelloPostgresql test root ***Exception: org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:204) at org.postgresql.Driver.connect(Driver.java:139) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171) at HelloPostgresql.init(HelloPostgresql.java:21) at HelloPostgresql.main(HelloPostgresql.java:102) what should be the solution to solve this problem - 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: unit testing when application level scoping used
Hello, I am trying to write a unit test for an application I didn't write. There are classes in the classes directory I want to test directly. The problem is that the application uses application and session scoping for some of the classes, so they can reference the instance without having passed it into the instant I am trying to test. I hope this makes sense, I started to understand what was going on last night. How can I unit test a non-jsp page, non servlet page, when scoping is involved? Thank you for any help. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why JBoss (and Tomcat)?
Michael Coughlan wrote: I agree. Sorry to be so thick, everyone. I hope I am not too far off topic with this conversation thread, but I simply don't understand how JBoss differs from the J2EE SDK. There is a specification for J2EE, and then Sun makes an implementation of that specification, just as many other companies implement the spec. There are differences among the implementations, depending on what your needs are. JBoss for example also supports aspect oriented programming, if that will help your application out. Perhaps this will help you decide which application server to use. http://www.theserverside.com/reviews/matrix.jsp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]