Re: sharing directory between web application
Thanks a lot, but probaly this doesn't solve my problem. This is my situation, e.g. I have two images http://localhost:8080/application1/img/example.jpg http://localhost:8080/application2/img/example.jpg The image example.jpg is the same, as other resources in /img/ directory. There's a way in Tomcat to point /img/ subdir to the same physical directory? Thanks, Davide Frigerio. Mark Thomas wrote: Davide Frigerio wrote: Hi, I would you like to know if it is possibile in Tomcat to share the same directory between two different web application? Thanks, Yes, if your OS supports symlinks. See the allowLinking property in http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- Davide Ing. Frigerio Wise-Lab S.r.l. c/o Polo Regionale di Como - Politecnico di Milano P.le Gerbetto, 6 - 22100 Como (Italy) Tel: +39 031 332 7362 - Fax: +39 031 332 7321 Email: davide.frigerio/at/wise-lab.it Web: http://www.wise-lab.it - http://www.wisemodel.com -- Leggi l'informativa in base all'art.13 del D.lgs. 30 giugno 2003, 196 sul trattamento dei dati personali da parte di Wise-Lab: http://www.wise-lab.it/info_privacy.htm * Scarica il nuovo web browser FireFox, l'alternativa SICURA ad Internet Explorer: Get Firefox! http://www.spreadfirefox.com/?q=affiliatesid=28607t=1 * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
application memory leak
Hello, May be it's some kind of stupid question, but where in tomcat environment may be memory leak? I can imagine three subjects: - objects stored in application scope - objects stored in session scope - objects handled by static properties Is there any other place where objects can be referenced from and not to be gc'ed? My situation: Application eats about 40 kb on each request. More precisely - about 200m on 5000 requests, as i have measured. At start of an application I have about 100m of heap occupied. After the next gc it's about 105, and so on - after about 5000 requests it's about 300 mb occupied. I've examined all objects that are stored in application scope - so their size do not change with growth of eaten memory. Session can be relatively large, but there are about 150 sessions all the time (their number does not grow uncontrollable). By the way I removed from session any large objects - no change in memory-leak-behaviour. I've examined static properties too - there are no properties that can grow (almost all - int and string constants) I use tomcat 5.0.25 with all view pages in jsp, most controller work done by struts actions. In jsp relatively often I use construction c:set var=html.../c:set ... ${html} (pregenerate part of the page, use some data it produced [such as custom title] and only then output html) May it be memory bottleneck?.. May be it's necessary to avoid some kind of pooling of pageContext's or String handlers (or even HttpRequest objects?) in Tomcat config? BTW, is there any other well-known memory-leak issues? -- Best regards, Dmitrymailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: configuration files for war deployments
Patrick Lacson wrote: hi All, If I were to deploy my application as a .war file, where do I place the .properties configuration files? I know there's the option of auto-expanding the war file at deployment, but is there a way to keep the war file unexpanded and provide an external .properties file for the web app to read from? Most likely, in the WEB-INF/classes dir, where it can be picked up by the classloader. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Where Is A ...
Where is a exact example of how to do the jndi, jdbc datasource, and the reseorce ref necessary to get a database connection to a Oracle9i database from Tomcat 5.0.28? Gene [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Clustering problems
Read the doc and configure greater waitForAck timeouts and more pooled worker. Sender ... ackTimeout=5 maxPoolSocketLimit=40 .. I only used fastasyncqueue mode in my production system! Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=fastasyncqueue doTransmitterProcessingStats=true doProcessingStats=true doWaitAckStats=true queueTimeWait=true queueDoStats=true queueCheckLock=true waitForAck=false keepAliveTimeout=8 keepAliveMaxRequestCount=-1/ Peter Randy Paries schrieb: Hello I have two tomcat servers (flanders and krusty) Their server.xmls are below they have two nic cards. The incoming http requests come in via the 192.168 ips and go out the real ips 66.208 the 192.168 nics are on a gigbit network When my servers get really busy i messages in the log file (see below) Once this happens my httpd starts backing up and it gets real ugly fast. I have to stop both instances and restart them Does my config look ok? any suggestions? Thanks Randy From log file Aug 25, 2005 3:22:36 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberDisappeared INFO: Received member disappeared:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.0.20 4:4001,192.168.0.204,4001, a live=47087979] Aug 25, 2005 3:22:37 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster memberAdded INFO: Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.0.204:4001 ,192.168.0.204,4001, aliv e=47092679] Aug 25, 2005 3:22:51 PM org.apache.catalina.cluster.tcp.SocketSender waitForAck WARNING: Wasn't able to read acknowledgement from server[/192.168.0.204:4001] in 15000 ms. Disconnecting socket, and trying ag ain. Aug 25, 2005 3:22:51 PM org.apache.catalina.cluster.tcp.ReplicationTransmitter sendMessageData WARNING: Unable to send replicated message, is server down? java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.net.SocketInputStream.read(SocketInputStream.java:182) at org.apache.catalina.cluster.tcp.SocketSender.waitForAck(SocketSender.java:13 4) at org.apache.catalina.cluster.tcp.SocketSender.sendMessage(SocketSender.java:1 25) at org.apache.catalina.cluster.tcp.PooledSocketSender.sendMessage(PooledSocketS ender.java:119) at org.apache.catalina.cluster.tcp.ReplicationTransmitter.sendMessageData(Repli cationTransmitter.java:117) at org.apache.catalina.cluster.tcp.ReplicationTransmitter.sendMessage(Replicati onTransmitter.java:149) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.send(SimpleTcpCluster.java: 409) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.send(SimpleTcpCluster.java: 417) at org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.jav a:202) 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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:296) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:372) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:694) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:626) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:807) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:644) at java.lang.Thread.run(Thread.java:534) Aug 25, 2005 3:22:51 PM org.apache.catalina.cluster.tcp.SocketSender waitForAck WARNING: Wasn't able to read acknowledgement from server[/192.168.0.204:4001] in 15000 ms. Disconnecting socket, and trying ag ain. Aug 25, 2005 3:22:51 PM org.apache.catalina.cluster.tcp.SocketSender waitForAck WARNING: Wasn't able to read acknowledgement from server[/192.168.0.204:4001] in 15000 ms. Disconnecting
Re: Making a Database Image Show Up on a Jsp Page
Thank you, Wade and everyone else. ServletOutputStream worked perfectly. Wade Chandler wrote: --- Edmund Urbani [EMAIL PROTECTED] wrote: Philip Cote wrote: I'm trying to write to binary data from a MySQL database into a jpeg file so I can show it on a jsp page but I'm not having much luck. My bean can create files outside the servlet / jsp context using the usual java.io classes. As I understand it, java.io classes aren't allowed for EJBs. Does this apply to plain java beans as well? If so, what are the alternatives for doing what I'm trying to do? your java classes can do anything the VM process is permitted to do, unless you have restricted using a security manager and the catalina.policy file (i think eg. debian tomcat packages do that by default). i'm not sure just jow exactly you are trying to serve those images to the client and why you want to write them (temporarily) to the file system. i would probably want to send them back directly from memory after reading them from the DB as a blob (much like Larry Meadors just suggested while i was writing this ...). Edmund - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] I have never heard that EJB could not use java.io classes. That wouldn't make much sense. Even JDBC some times needs to use streams for it's data. ByteArrayOutputStream and StringWriter are at times needed to perform a task as well for certain things. Sometimes people will make a servlet like this then address this servlet for all images. You'll need to set the content type of your return and stream the bytes out of your DB to the response output in your servlet. Depending on the type of field you have used in the DB you can do something like: java.io.InputStream in = null; try { in = resultSet.getBinaryStream(columnName); java.io.BufferedInputStream bin = new java.io.BufferedInputStream(in); java.io.BufferedOutputStream bout = new java.io. BufferedOutputStream(response.getServletOutputStream()); int iread = bin.read(); while(iread!=-1) { bout.write(iread); iread = bin.read(); } bout.flush(); } finally { if(in!=null) { in.close(); } } Just be sure you have your content type setup and all you need to do there. Then you can simply have a servlet to read images and use as the endpoint in your IMG tags. It's not so bad. Wade - 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: Automatic deploy of updated war deletes the context file
The test case I am using is running on Tomcat 5.5.9. 1. The web application is deployed as a the app.war file, with no context.xml file to the wars/host directory 2. The Host configuration is as follows. Host debug=99 name=host unpackWARs=false deployXML=false Logger className=org.apache.catalina.logger.FileLogger prefix=host timestamp=false / /Host 3. In conf/Catalina/host/app.xml ?xml version='1.0' encoding='utf-8'? Context debug=9 docBase=wars/host/app.war path=/app reloadable=true workDir=work/Catalina/host/app ResourceLink global=jdbc/appDs name=jdbc/appDs type=javax.sql.DataSource/ /Context When I copy app.war into wars/host to repeploy using the automatic deployer I check the conf/Catalina/host/ and http://host/manager/list and the app.xml and the /app context are deleted. On Thu, 2005-08-25 at 16:32 -0700, Hassan Schroeder wrote: Paul Austin wrote: Right but where should it go so that tomcat doesn't delete it? I've tried setting the deployXML=false on the host and having it just in the conf/Catalina/host directory (which is my preferred location), just in the war file and all various combinations. I've used both locations -- separately! -- without problems. Are you saying that with *only* /conf/Catalina/host/context.xml, nothing in META-INF/context.xml, your deployment fails and the context.xml file is removed? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where Is A ...
Le Vendredi 26 Août 2005 03:08, Eugene Poole a écrit : Where is a exact example of how to do the jndi, jdbc datasource, and the reseorce ref necessary to get a database connection to a Oracle9i database from Tomcat 5.0.28? http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations section Oracle 8i juste below MYsql should fit your needs. Gene [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Delbecq Royal Meteorological Institute of Belgium - Is there life after /sbin/halt -p? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sharing non-session data in a cluster
Hey Joakim, you can register your own ClusterListener and send ClusterMessages with SimpleTcpCluster object. With the 5.5.11 release you can configure it and look inside following code pieces: jakarta-tomcat-catalina\modules\cluster\src\share\org\apache\catalina\cluster\session\ClusterSessionListener.java jakarta-tomcat-catalina\modules\cluster\src\share\org\apache\catalina\cluster\session\JvmRouteSessionIDBinderListener.java jakarta-tomcat-catalina\modules\cluster\src\share\org\apache\catalina\cluster\session\JvmRouteBinderValve.java jakarta-tomcat-catalina\modules\cluster\src\share\org\apache\catalina\cluster\session\SessionIDMessage.java jakarta-tomcat-catalina\modules\cluster\src\share\org\apache\catalina\cluster\session\SessionMessageImpl.java Peter Joakim Ahlén schrieb: Hi! Is there any way of sharing data within a cluster which is not stored in session? Think of this as sharing the application state or some cluster-wide global state. Regards Joakim - 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]
How to Configure Tomcat to display the error on to Client rather than into logs
Hi All, When a client asks for a jsp file and an error has been encountered by Server while compiling the .jsp to .class then I would like to display that on the client browser rather than it dumping to the log file local_host ...log. Please let me know whether there is any parameter to be set... Thanks in advance, Shyama Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments.
Re: Viewing PDF in Internet Explorer
This may be due to the version of Tomcat you are using. It sounds a lot like this bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=24970 This hit me when I tried upgrading from 4.1.27 to 4.1.29. I am not sure in which subsequest version it was fixed. It may have been 4.1.31. You could always try 5.X? Mark Sutton Client Services IT Development Fimat International Banque SA (UK Branch) SG House 41 Tower Hill London EC3N 4SG Tel: +44 20 7676 8311 e-mail:[EMAIL PROTECTED] Christoph KutzinskiTo: Tomcat Users List tomcat-user@jakarta.apache.org [EMAIL PROTECTED] cc: Subject: Re: Viewing PDF in Internet Explorer 24/08/2005 15:06 Please respond to Tomcat Users List [EMAIL PROTECTED] wrote: I should have been more clear in stating my problem. I am using a Reporting software with Tomcat. The Reporting servlet receives the report request, passes it to the Reporting Server (lives where the data is), and the Reporting Server sends it back to the client (servlet). The output HTML is automatically generated, and apparently the following is happening with PDF (the Excel plug-in works fine). A JSP-Page (or Servlet) like % response.setContentType(application/pdf); % results in the Content-Type-Header Content-Type: application/pdf;charset=ISO-8859-1 which is not allowed according to HTTP-RFCs. The charset may only be appended when the Content-Type is text/*. Just a wild guess: Have tried to set the character encoding? response.setCharacterEncoding(null) or () Christoph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** Please note that this email address will be converted from the current email address to [EMAIL PROTECTED] You are encouraged to start using this address for all future communications. Non-impartial research: Fimat UK does not produce research in circumstances in which it is appropriate to characterise it as impartial as referred to in the rules of the Financial Services Authority . All communications of Fimat UK are, however, fair, clear and not misleading. The views expressed are those of the author and do not necessarily reflect the views of other departments of Fimat or associated groups. The e-mail and any attachments are confidential. They may contain privileged information and are intended for the named addressee(s) only. If you are not the intended recipient, please notify us immediately and do not disclose, distribute, or retain this e-mail or any part of it. Unless expressly stated, opinions in this e-mail are those of the individual sender and not of the FIMAT Group. We believe but do not warrant that this e-mail and any attachments are virus free. You must therefore take full responsibility for virus checking. The FIMAT Group reserve the right to monitor e-mail communications through its networks. Where this communication constitutes a financial promotion it is issued and approved by Fimat International Banque S.A. (UK Branch) and is only intended for persons of a kind described in article 19(5) of the Financial Services and Markets Act 2000 (Financial Promotion) Order 2001. This information is not intended to be distributed to UK Private Customers (as defined by the Financial Services Authority). Fimat International Banque S.A. (UK Branch) whose registered branch in England is at SG House, 41 Tower Hill, London EC3N 4SG is authorised by the Commission Bancaire in France and by the UK Financial Services
Re: Viewing PDF in Internet Explorer
This may be due to the version of Tomcat you are using. It sounds a lot like this bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=24970 This hit me when I tried upgrading from 4.1.27 to 4.1.29. I am not sure in which subsequest version it was fixed. It may have been 4.1.31. You could always try 5.X? Mark Sutton Client Services IT Development Fimat International Banque SA (UK Branch) SG House 41 Tower Hill London EC3N 4SG Tel: +44 20 7676 8311 e-mail:[EMAIL PROTECTED] Christoph KutzinskiTo: Tomcat Users List tomcat-user@jakarta.apache.org [EMAIL PROTECTED] cc: Subject: Re: Viewing PDF in Internet Explorer 24/08/2005 15:06 Please respond to Tomcat Users List [EMAIL PROTECTED] wrote: I should have been more clear in stating my problem. I am using a Reporting software with Tomcat. The Reporting servlet receives the report request, passes it to the Reporting Server (lives where the data is), and the Reporting Server sends it back to the client (servlet). The output HTML is automatically generated, and apparently the following is happening with PDF (the Excel plug-in works fine). A JSP-Page (or Servlet) like % response.setContentType(application/pdf); % results in the Content-Type-Header Content-Type: application/pdf;charset=ISO-8859-1 which is not allowed according to HTTP-RFCs. The charset may only be appended when the Content-Type is text/*. Just a wild guess: Have tried to set the character encoding? response.setCharacterEncoding(null) or () Christoph - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** Please note that this email address will be converted from the current email address to [EMAIL PROTECTED] You are encouraged to start using this address for all future communications. Non-impartial research: Fimat UK does not produce research in circumstances in which it is appropriate to characterise it as impartial as referred to in the rules of the Financial Services Authority . All communications of Fimat UK are, however, fair, clear and not misleading. The views expressed are those of the author and do not necessarily reflect the views of other departments of Fimat or associated groups. The e-mail and any attachments are confidential. They may contain privileged information and are intended for the named addressee(s) only. If you are not the intended recipient, please notify us immediately and do not disclose, distribute, or retain this e-mail or any part of it. Unless expressly stated, opinions in this e-mail are those of the individual sender and not of the FIMAT Group. We believe but do not warrant that this e-mail and any attachments are virus free. You must therefore take full responsibility for virus checking. The FIMAT Group reserve the right to monitor e-mail communications through its networks. Where this communication constitutes a financial promotion it is issued and approved by Fimat International Banque S.A. (UK Branch) and is only intended for persons of a kind described in article 19(5) of the Financial Services and Markets Act 2000 (Financial Promotion) Order 2001. This information is not intended to be distributed to UK Private Customers (as defined by the Financial Services Authority). Fimat International Banque S.A. (UK Branch) whose registered branch in England is at SG House, 41 Tower Hill, London EC3N 4SG is authorised by the Commission Bancaire in France and by the UK Financial Services
Undeploy leaves residual files
Hi, I've noticed that undeploy of my web applications that the ROOT folder is left behind as follows; ROOT WEB-INF classes log4j.properties lib ehcache.jar struts.jar The web application has a ContextListener that calls LogManager shutdowns and Introspector.flushCaches and so fourth to attempt to release resources. Is this part of that kind of problem? Regards, Allistair. FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT
using disks SATA against SCSI in tomcat 5.5.9 cluster servers
Respected friends of the list, I am specifying Cluster nodes (hosts) to use with tomcat 5.5.9 with an apache server as dispatcher. In the specification of the disks I have doubts because the new disks SATA has great performance and speed and with cost comparative minor to the SCSI Disks. Considering applications WEB, where the WAR files are loaded in memory and having enough memory (2 Gbytes) so that there is not use of virtual memory (windows XP), would there be some advantage to use disks SCSI? or can we wait for the same performance considering disks sata 7200 rpm against disks scsi of 7200 rpm? Could anybody explain to myself this doubts? Regards Acacio Furtado Costa Pesquisa e Tecnologia GIA - Magnesita S/A ((0xx31) 3368-1349 * [EMAIL PROTECTED]
RE: using disks SATA against SCSI in tomcat 5.5.9 cluster servers
From: Acácio Furtado Costa [mailto:[EMAIL PROTECTED] In the specification of the disks I have doubts because the new disks SATA has great performance and speed and with cost comparative minor to the SCSI Disks. Considering applications WEB, where the WAR files are loaded in memory and having enough memory (2 Gbytes) so that there is not use of virtual memory (windows XP), would there be some advantage to use disks SCSI? or can we wait for the same performance considering disks sata 7200 rpm against disks scsi of 7200 rpm? Could anybody explain to myself this doubts? You will only really be able to answer this by benchmarking your application and finding out how much of the time it spends accessing the disk. SCSI disks and controllers typically have two other advantages over SATA disks and controllers: faster average seek times, and more write cache. However, if the performance under SATA is good enough, then you will not want to spend the extra for SCSI. I support a number of live applications deployed on servers using mirrored SATA disks, as they are good enough for the clients. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Malformed URL Exception: unknown protocol: c
Then I'm at loss as to what the issue is. The fact that it works in some cases, and not others, has me puzzled. I'd suggest digging into the javax.xml source and see if you can figure out the condition that throws the exception, etc. And I'm still not fully clear on whether our C:\... strings are considered valid URI's according to the spec, though they must be, as everything seems to work. Good luck. | Jay Burgess [Vertical Technology Group] | Essential Technology Links | http://www.vtgroup.com/ -Original Message- From: Franklin Phan [mailto:[EMAIL PROTECTED] Sent: Thursday, August 25, 2005 5:09 PM To: Tomcat Users List Subject: Re: Malformed URL Exception: unknown protocol: c Jay, I did that just last night. I got: C:\Program Files\Apache Group\Tomcat 4.1\webapps\htmaint\WEB-INF\work_xml Franklin Phan Cygna Energy Services www.cygna.net Jay Burgess wrote: Why don't you do: System.out.println(getServletContext().getRealPath(XML_WORK_PATH)); And see what it tells you. I'd be curious to see what you're passing to the StreamSource constructor, and how it differs from my string. Jay -Original Message- From: Franklin Phan [mailto:[EMAIL PROTECTED] Sent: Thursday, August 25, 2005 4:52 PM To: Tomcat Users List Subject: Re: Malformed URL Exception: unknown protocol: c To make things a bit more puzzling, I have a different app inside the same Tomcat 4.1.18 that uses the same XSL Transform class under its own web app context. That app works without a hitch. Why is that? Jay Burgess wrote: First, I assume you mean CLASSPATH and /lib, or PATH and /bin, but not CLASSPATH and /bin? Second, your situation has me puzzled. Mark's answer appears correct, as unknown protocol: c is typically the C:\ of a Windows filesystem path. And checking the documentation, StreamSource requires a URI, so a windows filesystem path won't work. However...my code does something very similar, and it works. The only difference is that I'm doing it for a StreamResult, not a StreamSource: String root = getServletContext().getRealPath(); String xmlFileName = root + File.separator + WEB-INF + File.separator + TestData.xml; TransformerFactory.newInstance().newTransformer().transform( new DOMSource(buffer), new StreamResult(xmlFileName)); // DOM into XML I just threw in a quick println(), and xmlFileName is equal to C:\tomcat-5.0.19\webapps\TestApp\WEB-INF\TestData.xml. Can anyone explain why mine works and Franklin's fails? Maybe I'm missing something obvious. Jay | Jay Burgess [Vertical Technology Group] | Essential Technology Links | http://www.vtgroup.com/ -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Thursday, August 25, 2005 4:21 PM To: Tomcat Users List Subject: Re: Malformed URL Exception: unknown protocol: c I assume becuase the url you pass it starts c:\ as that is the start of the XML_WORK_PATH. You need to prefix it with file:/// (or however many slashes you need to get this to work in windows). Mark Franklin Phan wrote: I use Windows XP Pro. My JAVA_HOME environment variable points to c:\j2sdk1.4.2_05. The CLASSPATH is set to have as the first element %JAVA_HOME%\bin. I've written an XSL Transform servlet that makes use of the package javax.xml.transform. Why do I get the following error: javax.servlet.ServletException: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: java.net.MalformedURLException: unknown protocol: c The four lines above actually appear altogether in one line. And the error appears to be due to the following piece of code where I'm trying to get the path to a folder on the local drive to access a file: String XML_WORK_PATH = /WEB-INF/work_xml; TransformerFactory tFactory = TransformerFactory.newInstance(); Transformer transformer = tFactory.newTransformer(new javax.xml.transform.stream.StreamSource(getServletContext().getRealPath(XML_WORK_PATH) + \\ + xslParam)); //xslParam is an XSL file name The Malformed URL Exception does not occur on another machine running Windows XP Server. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Custom SSLServerSocket implementation
Hi, I need to tell Tomcat 5.5 to use my custom SSLServerSocketFactory for backwards compatibility with our client-side software. It was relatively easy with Tomcat 4.1 (using a Factory element in the Connector configuration) but with tomcat 5.5 it doesn't work. The Connector seems to ignore the factory attribute. How can this be done with Tomcat 5.5 ? Thanks Alain Brousseau - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Automatic deploy of updated war deletes the context file
Paul Austin wrote: The test case I am using is running on Tomcat 5.5.9. 1. The web application is deployed as a the app.war file, with no context.xml file to the wars/host directory _and_ no META-INF/context.xml in the war file, right? 2. The Host configuration is as follows. Host debug=99 name=host unpackWARs=false deployXML=false Logger className=org.apache.catalina.logger.FileLogger prefix=host timestamp=false / /Host 3. In conf/Catalina/host/app.xml ?xml version='1.0' encoding='utf-8'? Context debug=9 docBase=wars/host/app.war path=/app reloadable=true workDir=work/Catalina/host/app ResourceLink global=jdbc/appDs name=jdbc/appDs type=javax.sql.DataSource/ /Context When I copy app.war into wars/host to repeploy using the automatic deployer I check the conf/Catalina/host/ and http://host/manager/list and the app.xml and the /app context are deleted. I would check your logs for errors, but also go through all your entries in your server.xml and app.xml files For instance, for the path attribute of Context: The value of this field must not be set except when statically defining a Context in server.xml, as it will be infered from the filenames used for either the .xml context file or the docBase. Sometimes the subtle config errors will bite'cha :-) -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
upgrade to 5
Hello, I'm extremely new to all this. I was wondering if it is possible to upgrade from tomcat version 3.2.3 to version 5? I've read that the upgrade from version 3 to 4 was difficult, so my guess is that I will have to go to version 4 before I can go to 5. Thanks Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: upgrade to 5
Hi there, Of course you can, you just need to be aware of what elements of Tomcat you need to configure, e.g JNDI resources and so on and then lookup the way you do that in Tomcat 5. It's not a *far* cry from Tomcat 3/4, you still use server.xml for a bunch of stuff, but it's recommended that you configure your Context using a separate file. It's all online, just be aware of what configuration you need, look at the docs, and test. Make a backup of course. Allistair. -Original Message- From: David Ellis [mailto:[EMAIL PROTECTED] Sent: 26 August 2005 16:46 To: Tomcat Users List Subject: upgrade to 5 Hello, I'm extremely new to all this. I was wondering if it is possible to upgrade from tomcat version 3.2.3 to version 5? I've read that the upgrade from version 3 to 4 was difficult, so my guess is that I will have to go to version 4 before I can go to 5. Thanks Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: upgrade to 5
Thanks, that's somewhat of a relief, although I'm sure I have plenty of work cut out for me :) Off I go - Original Message - From: Allistair Crossley [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Friday, August 26, 2005 11:48 AM Subject: RE: upgrade to 5 Hi there, Of course you can, you just need to be aware of what elements of Tomcat you need to configure, e.g JNDI resources and so on and then lookup the way you do that in Tomcat 5. It's not a *far* cry from Tomcat 3/4, you still use server.xml for a bunch of stuff, but it's recommended that you configure your Context using a separate file. It's all online, just be aware of what configuration you need, look at the docs, and test. Make a backup of course. Allistair. -Original Message- From: David Ellis [mailto:[EMAIL PROTECTED] Sent: 26 August 2005 16:46 To: Tomcat Users List Subject: upgrade to 5 Hello, I'm extremely new to all this. I was wondering if it is possible to upgrade from tomcat version 3.2.3 to version 5? I've read that the upgrade from version 3 to 4 was difficult, so my guess is that I will have to go to version 4 before I can go to 5. Thanks Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: upgrade to 5
Hey, Yep, there's always toothache to be had with these things :) Cheers, Allistair. -Original Message- From: David Ellis [mailto:[EMAIL PROTECTED] Sent: 26 August 2005 16:55 To: Tomcat Users List Subject: Re: upgrade to 5 Thanks, that's somewhat of a relief, although I'm sure I have plenty of work cut out for me :) Off I go - Original Message - From: Allistair Crossley [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Friday, August 26, 2005 11:48 AM Subject: RE: upgrade to 5 Hi there, Of course you can, you just need to be aware of what elements of Tomcat you need to configure, e.g JNDI resources and so on and then lookup the way you do that in Tomcat 5. It's not a *far* cry from Tomcat 3/4, you still use server.xml for a bunch of stuff, but it's recommended that you configure your Context using a separate file. It's all online, just be aware of what configuration you need, look at the docs, and test. Make a backup of course. Allistair. -Original Message- From: David Ellis [mailto:[EMAIL PROTECTED] Sent: 26 August 2005 16:46 To: Tomcat Users List Subject: upgrade to 5 Hello, I'm extremely new to all this. I was wondering if it is possible to upgrade from tomcat version 3.2.3 to version 5? I've read that the upgrade from version 3 to 4 was difficult, so my guess is that I will have to go to version 4 before I can go to 5. Thanks Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - 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: upgrade to 5
I would skip straight to 5. No point in going though 2 painful migrations instead of just one. All the cores stuff is the same. Read over the config docs, step up a test server play with it and when your ready update your production server. David Ellis wrote: Hello, I'm extremely new to all this. I was wondering if it is possible to upgrade from tomcat version 3.2.3 to version 5? I've read that the upgrade from version 3 to 4 was difficult, so my guess is that I will have to go to version 4 before I can go to 5. Thanks Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brian Cook Digital Services Analyst Print Time Inc. [EMAIL PROTECTED] 913.345.8900 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Automatic deploy of updated war deletes the context file
On 8/26/05, Paul Austin [EMAIL PROTECTED] wrote: The test case I am using is running on Tomcat 5.5.9. 1. The web application is deployed as a the app.war file, with no context.xml file to the wars/host directory 2. The Host configuration is as follows. Host debug=99 name=host unpackWARs=false deployXML=false Logger className=org.apache.catalina.logger.FileLogger prefix=host timestamp=false / /Host 3. In conf/Catalina/host/app.xml ?xml version='1.0' encoding='utf-8'? Context debug=9 docBase=wars/host/app.war path=/app reloadable=true workDir=work/Catalina/host/app ResourceLink global=jdbc/appDs name=jdbc/appDs type=javax.sql.DataSource/ /Context When I copy app.war into wars/host to repeploy using the automatic deployer I check the conf/Catalina/host/ and http://host/manager/list and the app.xml and the /app context are deleted. Yes, this is normal. -- x Rémy Maucherat Developer Consultant JBoss Group (Europe) SàRL x - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: newbie with a short question
Couple of things 1. You will get better responses on this list if you review the posting guide at. This post is way to vague to get specific answers. So most people are not going to respond to it. http://jakarta.apache.org/site/mail.html 2. If I follow the description correctly you are uploading a batch file to tomcat. Then loading a page with a link to that batch file. Then you are clicking on the link and it is displaying contents of the batch file. If I followed all of the correctly that is exactly what should happen. If you are clicking on an Http link that posts to a web server that server is going to try to return the requested resource. If you need to execute a file locally from Tomcat then you need to use one of the Java method calls to execute native files. This by the way is usually a bad idea. Is what ever your batch file is doing really a process that you can not recreate in java? If I have misunderstood entirely which seems likely then you may want to repost the question formated in accordance with the posting guilds lines listed above. Posts to support forums should always include a detailed step by step lise of the process that creates the failing, copies of relevant configuration files(Saying you deleted some comments in a config file does not really help. We need to see it.), and the lines of code that are believed to be failing. nick sturm wrote: ok, I have done the two things on that page: renamed the serverlet and deleted the comments around the cgi section of the web.xml config file. I created a directory (cgi-bin) under root and under WEB-INF neither of which would execute the batch file when I link to them. it would just open the batch file. thanks, sorry I'm very new to this. -n On 8/24/05, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Allistair Crossley [mailto:[EMAIL PROTECTED] Subject: RE: newbie with a short question First I cause an open/save prompt with response.addHeader(Content-Disposition, attachment; filename=somebat.bat); Then I use the response.getOutputStream() and stream the bat file down it. This requires of course that you get an inputstream to your bat file first. Copy it into your webapp somewhere and use the servlet context getRealPath(/bat/mybat.bat) and then i/o API to read it into an input stream before sending outbound again. I found that setting content type of application/msdos-x-batch failed, as did others, just send it without a content type as a open/save. I must be missing something; how does the above cause an existing .bat file on the server to be executed on the server? (That was the original question.) For the OP: the CGI doc for Tomcat can be found at http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cgi-howto.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Oracle Tomcat 5.5.x
Hello, I am trying to create an Oracle 10g datasource with connection caching enabled. In my server.xml I have the following... Resource name=jdbc/myDS auth=Container type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@my.db.com:1521:me username=my_name password=my_pass connectionCacheName=my-cache connectionCachingEnabled=true / ...under GlobalNamingResources. Is this properly creating an Oracle datasource with implicit connection caching enabled? If so, how do I verify that this datasource is pooling connections? Thanks, Bernie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to Configure Tomcat to display the error on to Client rather than into logs
What is it you want to display? The stack trace? shyama wrote: Hi All, When a client asks for a jsp file and an error has been encountered by Server while compiling the .jsp to .class then I would like to display that on the client browser rather than it dumping to the log file local_host ...log. Please let me know whether there is any parameter to be set... Thanks in advance, Shyama Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. -- Brian Cook Digital Services Analyst Print Time Inc. [EMAIL PROTECTED] 913.345.8900 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: newbie with a short question
The JVM by default does not allow you to run anything on the client. You will have to change the .properties file on the client to enable the server to interact with the client's file system etc. This is one of the reasons JavaScript is safer than VBScript. The VBVM allows the browser to do anything the logged in user can do. This is one of the reasons that VBScript is used for installing a lot if the viruses and worms. What is it that you need to do from the servlet? It looks like what you want to do is something that could be dangerous if allowed by the user. Most network administrators would go nuts with this. You may want to find some other way to accomplish what you are trying to do. Robert S. Harper Information Access Technology, Inc. -Original Message- From: Brian Cook [mailto:[EMAIL PROTECTED] Sent: Friday, August 26, 2005 10:28 AM To: Tomcat Users List Subject: Re: newbie with a short question Couple of things 1. You will get better responses on this list if you review the posting guide at. This post is way to vague to get specific answers. So most people are not going to respond to it. http://jakarta.apache.org/site/mail.html 2. If I follow the description correctly you are uploading a batch file to tomcat. Then loading a page with a link to that batch file. Then you are clicking on the link and it is displaying contents of the batch file. If I followed all of the correctly that is exactly what should happen. If you are clicking on an Http link that posts to a web server that server is going to try to return the requested resource. If you need to execute a file locally from Tomcat then you need to use one of the Java method calls to execute native files. This by the way is usually a bad idea. Is what ever your batch file is doing really a process that you can not recreate in java? If I have misunderstood entirely which seems likely then you may want to repost the question formated in accordance with the posting guilds lines listed above. Posts to support forums should always include a detailed step by step lise of the process that creates the failing, copies of relevant configuration files(Saying you deleted some comments in a config file does not really help. We need to see it.), and the lines of code that are believed to be failing. nick sturm wrote: ok, I have done the two things on that page: renamed the serverlet and deleted the comments around the cgi section of the web.xml config file. I created a directory (cgi-bin) under root and under WEB-INF neither of which would execute the batch file when I link to them. it would just open the batch file. thanks, sorry I'm very new to this. -n On 8/24/05, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Allistair Crossley [mailto:[EMAIL PROTECTED] Subject: RE: newbie with a short question First I cause an open/save prompt with response.addHeader(Content-Disposition, attachment; filename=somebat.bat); Then I use the response.getOutputStream() and stream the bat file down it. This requires of course that you get an inputstream to your bat file first. Copy it into your webapp somewhere and use the servlet context getRealPath(/bat/mybat.bat) and then i/o API to read it into an input stream before sending outbound again. I found that setting content type of application/msdos-x-batch failed, as did others, just send it without a content type as a open/save. I must be missing something; how does the above cause an existing .bat file on the server to be executed on the server? (That was the original question.) For the OP: the CGI doc for Tomcat can be found at http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cgi-howto.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
compatibility for Tomcat 3.x and Tomcat 4.x with JDK 1.4
Does anyone know where I can check for the compatibility for Tomcat 3.x and Tomcat 4.x with JDK 1.4? Is JDK 1.4 compatible with Tomcat 3.2.4 and Tomcat 4.x? My-Tien Sadler Senior Technical Support Engineer Peregrine Systems, Inc. 3611 Valley Centre Dr. San Diego, CA 92130 main: 800-960-9998 email: [EMAIL PROTECTED] Evolve WiselyTM We value your feedback - if you receive a survey on your Customer Support experience, please feel free to share your thoughts!
Waiting for sessions to be deallocated
I have been running tomcat on a test environment for the past 2 months.I have lately noticed that,when i keep using it for a while,the server hangs up and locks up my dbcp thread that connects to oracle.This is very sporadic.When i shutdown the server,i get this message Waiting for 2 Sessions to be deallocated. I have posted the thread dump below..I see yahoo.com and cnn.com.I think it is really weird.Has someone encountered this problem. Appreciate all the Help Thanks, Karthik 2005-08-26 08:27:22 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] 2005-08-26 08:27:29 StandardContext[/jsp-examples]ContextListener: contextInitialized() 2005-08-26 08:27:29 StandardContext[/jsp-examples]SessionListener: contextInitialized() 2005-08-26 08:27:30 StandardContext[/servlets-examples]ContextListener: contextInitialized() 2005-08-26 08:27:30 StandardContext[/servlets-examples]SessionListener: contextInitialized() 2005-08-26 08:39:44 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] 2005-08-26 08:39:51 StandardContext[/jsp-examples]ContextListener: contextInitialized() 2005-08-26 08:39:51 StandardContext[/jsp-examples]SessionListener: contextInitialized() 2005-08-26 08:39:52 StandardContext[/servlets-examples]ContextListener: contextInitialized() 2005-08-26 08:39:52 StandardContext[/servlets-examples]SessionListener: contextInitialized() 2005-08-26 08:39:54 StandardContext[/servlets-examples]SessionListener: contextDestroyed() 2005-08-26 08:39:54 StandardContext[/servlets-examples]ContextListener: contextDestroyed() 2005-08-26 08:39:54 StandardContext[/jsp-examples]SessionListener: contextDestroyed() 2005-08-26 08:39:54 StandardContext[/jsp-examples]ContextListener: contextDestroyed() 2005-08-26 08:40:07 StandardContext[/servlets-examples]SessionListener: contextDestroyed() 2005-08-26 08:40:07 StandardContext[/servlets-examples]ContextListener: contextDestroyed() 2005-08-26 08:40:07 StandardContext[/jsp-examples]SessionListener: contextDestroyed() 2005-08-26 08:40:07 StandardContext[/jsp-examples]ContextListener: contextDestroyed() 2005-08-26 08:43:50 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] 2005-08-26 08:43:57 StandardContext[/jsp-examples]ContextListener: contextInitialized() 2005-08-26 08:43:57 StandardContext[/jsp-examples]SessionListener: contextInitialized() 2005-08-26 08:43:58 StandardContext[/servlets-examples]ContextListener: contextInitialized() 2005-08-26 08:43:58 StandardContext[/servlets-examples]SessionListener: contextInitialized() 2005-08-26 10:39:09 StandardContext[/servlets-examples]SessionListener: contextDestroyed() 2005-08-26 10:39:09 StandardContext[/servlets-examples]ContextListener: contextDestroyed() 2005-08-26 10:39:09 StandardContext[/jsp-examples]SessionListener: contextDestroyed() 2005-08-26 10:39:09 StandardContext[/jsp-examples]ContextListener: contextDestroyed() 2005-08-26 10:39:32 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] 2005-08-26 10:39:40 StandardContext[/jsp-examples]ContextListener: contextInitialized() 2005-08-26 10:39:40 StandardContext[/jsp-examples]SessionListener: contextInitialized() 2005-08-26 10:39:41
Re: newbie with a short question
nick sturm wrote: ok, I have done the two things on that page: renamed the serverlet and deleted the comments around the cgi section of the web.xml config file. Uh, you probably want to *read* those comments :-) -- specifically !-- executableName of the exectuable used to run the -- !-- script. [perl] Perl being the default, you'll have to figure out how to use the COMMAND.COM or whatever it is for Windows. Alternatively, write a Perl wrapper for it or just rewrite your .BAT file in Perl. *Or* byte, er, bite the bullet, google `java serial port controller` and just write what you need in Java :-) Good luck, -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Automatic deploy of updated war deletes the context file
I know almost have it 'The way I want it to work (TM)' using the following configuration. - server.xml Host appBase=wars/host autoDeploy=false debug=99 name=host unpackWARs=false deployXML=false Logger className=org.apache.catalina.logger.FileLogger prefix=host timestamp=false / /Host - conf/Catalina/host/app.xml ?xml version='1.0' encoding='utf-8'? Context debug=9 docBase=app-web.war path=/app reloadable=true ResourceLink global=jdbc/appDs name=jdbc/appDs type=javax.sql.DataSource / /Context Now the final question is how can I set the path to be a sub directory? So /subdir/app. This worked on my Tomcat 5 installation on Linux but doesn't work here. It seems to just ignore the path. And YES these context files are NOT deployed as part of the war file. On Fri, 2005-08-26 at 08:33 -0700, Hassan Schroeder wrote: Paul Austin wrote: The test case I am using is running on Tomcat 5.5.9. 1. The web application is deployed as a the app.war file, with no context.xml file to the wars/host directory _and_ no META-INF/context.xml in the war file, right? 2. The Host configuration is as follows. Host debug=99 name=host unpackWARs=false deployXML=false Logger className=org.apache.catalina.logger.FileLogger prefix=host timestamp=false / /Host 3. In conf/Catalina/host/app.xml ?xml version='1.0' encoding='utf-8'? Context debug=9 docBase=wars/host/app.war path=/app reloadable=true workDir=work/Catalina/host/app ResourceLink global=jdbc/appDs name=jdbc/appDs type=javax.sql.DataSource/ /Context When I copy app.war into wars/host to repeploy using the automatic deployer I check the conf/Catalina/host/ and http://host/manager/list and the app.xml and the /app context are deleted. I would check your logs for errors, but also go through all your entries in your server.xml and app.xml files For instance, for the path attribute of Context: The value of this field must not be set except when statically defining a Context in server.xml, as it will be infered from the filenames used for either the .xml context file or the docBase. Sometimes the subtle config errors will bite'cha :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
resource processing
How are Resource elements in the server.xml file processed? For instance... Resource name=jdbc/myDS auth=Container type=javax.sql.DataSource factory=org.apache.commons.dbcp.BasicDataSourceFactory driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@my.db.com:1521:me username=me password=it connectionProperties=SetBigStringTryClob=true initialSize=0 maxActive=20 maxIdle=10 minIdle=0 maxWait=6 / ...am I correct in thinking that when Tomcat is started it will grab an instance of org.apache.commons.dbcp.BasicDataSourceFactory. It will then call getObjectInstance() to retrieve the datasource. Is the rest handled by the factory? Does Tomcat assume all remaining attributes are properties that should be sent to the object factory? Bernie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Automatic deploy of updated war deletes the context file
Paul Austin wrote: Now the final question is how can I set the path to be a sub directory? So /subdir/app. This worked on my Tomcat 5 installation on Linux but doesn't work here. It seems to just ignore the path. No idea, never had a reason to try such a configuration -- sorry! -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Undeploy leaves residual files
I had the same issues and it looks like we are using similar technologies. Struts1.2.7, Hibernate 3.0.5, Spring 1.2.3 The struts issue (I think) is caused by validator access the validator.dtd resource and no releasing it. Under WEB-INF/classes/org/apache/commons/validator/resources I added both validator_1_1_3.dtd and validator-rules_1_0.dtd. Fpr struts, I moved (added) struts-config_1_2.dtd, tiles-config_1_1.dtd, and web-app_2_3.dtd to WEB-INF/classes/org/apache/struts/resources. For ehcache.jar, I ended up moving it to the CATALINE_HOME/common/lib directory. After that, everything seems to be working okay. I only just moved the ehcache out of WEB-INF/lib yesterday so I'm still testing those waters, but for now, it appears to have solved the problem. I posted a question concerning the same issue earlier on this list but it was never answered (see ehacache prevents web app reload). I checked the Hibernate forum and found some postings but none that seemed to resolved this issue. Please let me know if you figure a way to leave ehcache under WEB-INF/lib. It really rubs me the wrong way to have to treat it special during deployment. HTH /robert Allistair Crossley wrote: Hi, I've noticed that undeploy of my web applications that the ROOT folder is left behind as follows; ROOT WEB-INF classes log4j.properties lib ehcache.jar struts.jar The web application has a ContextListener that calls LogManager shutdowns and Introspector.flushCaches and so fourth to attempt to release resources. Is this part of that kind of problem? Regards, Allistair. FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.5.9 WebStart using wrong jnlp file on launch
I am new to Tomcat and am having a hard time finding the answer to my problem. I have a simple WebStart application that I am trying to run from the webapps directory. I am getting the following WebStart -Download error: Unable to load resource: http://localhost:8080/cp130-08/StockQuote.jar;. However, when I look at the Launch file used, it is an older version that used a different class name in the resources entry: From Launch file used: resources j2se version=1.2+ / jar href=StockQuote.jar/ jar href=xerces.jar/ /resources From the actual jnlp file in the webapps directory: resources j2se version=1.2+ / jar href=StockQuoter.jar/ // note this has a r on the end of StockQuote and is the name of the actual jar file jar href=xerces.jar/ /resources I have tried Reload in the Tomcat Web Application Manager, Undeploy (which caused me to recreate the objects in the directory), and Stop and restart the Tomcat service. Where is Tomcat finding this old version of the jnlp file? Is there some sort of cache I need to clear? The only versions of the jnlp file on my entire system have the correct spelling. Tomcat is running on my local machine. Thanks Dave Murvin DRM Enterprises, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
invalidate session after calling listeners
Is there a way to set Tomcat to call listeners before invalidate() is called on a session? I'm trying to code a method to clean up specifically named files inside a working dir (in Windows XP) whenever the session times out. I can't seem to find a way to do it. Apparently, invalidate() is called prior to calling listeners, and these specifically named files that I want to clean up are named after the user ID that is stored in the HttpSession object (meaning I'd need to access the session object. I understand Resin has a setting called invalidate-after-listener and am wondering whether Tomcat has same. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Servlet EG Java EE 5 Web Tier Proposed Final Draft
We're pleased to announce the availability of the Public Review of the next versions of the specifications for the Java Web tier. This includes Servlet, JavaServer Pages (JSP), the JSP Standard Tag Library (JSTL) and JavaServer Faces (Faces). Servlet is being developed under JSR-154, JSP 2.1 is developed under JSR-245, JSTL is developed under JSR-052 and Faces 1.2 is developed under JSR-252. The expert groups are working together to improve the alignment between these these powerful web technologies. Building on the work that was accomplished with the Early Draft Review, this Public Review covers two additional areas that required better integration between JSP and Faces: - Tree Creation and Content Interweaving - Deferred expressions nested within iteration tags Please see Appendix E of the JSP spec and the Preface of the Faces spec to see details of what's changed in JSP and Faces. Please see the change-logs for the Servlet and JSTL specs for what's changed in Servlet and JSTL. To access the specifications: JSP 2.1 PR (JSR-245) http://jcp.org/aboutJava/communityprocess/pfd/jsr245/ Faces 1.2 PR (JSR-252) http://jcp.org/aboutJava/communityprocess/pfd/jsr252/ To access the change-logs Servlet 2.5 (JSR-154) http://jcp.org/aboutJava/communityprocess/maintenance/jsr154/index3.html JSTL 1.2 (JSR-052) http://jcp.org/aboutJava/communityprocess/maintenance/jsr052/index2.html Sincerely, The Web Tier Expert Groups! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Making a Database Image Show Up on a Jsp Page
Caldarale, Charles R wrote: From: Philip Cote [mailto:[EMAIL PROTECTED] Subject: Re: Making a Database Image Show Up on a Jsp Page My only sticking point is how I'm supposed to write that binary data to the jpeg file. I think the point people are trying to make is that you don't need to write any file at all. The bytes of the image should be output as part of the response stream, using the appropriate MIME type. Or maybe I don't really understand the problem. - Chuck No, it was me who didn't understand the answer. I never thought of servlets being used like that. I've always thought of them as tools that collected data from the appropriate sources and then rendered text and html and that's it. The whole idea of streaming binary data based on a different MIME type than that never occurred to me before. When I finally got it, the solution came together perfectly. It was pretty cool. THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: configuration files for war deployments
On Fri, Aug 26, 2005 at 02:16:26AM +0800, Patrick Lacson wrote: : I know that's typically where they go, but if the file is inside the : .war, how is the file going to be configured by the sysadming folks? Webapps are meant to be fairly standalone. If you require that one be configured after it has been compiled, you really have two options: 1/ give it to the sysadmins in exploded-dir format so they can tweak the files, then just run the app as such 2/ create some resource outside of the app (database, file) that the app knows to load on startup. The downside to #2 is that it still requires your app to have some knowledge of the filesystem outside of itself. That inhibits portability, not to mention running separate instances of the app (with separate configurations, that is). Furthermore, to be completely portable across containers (though not necessarily operating systems) your app must operate on the fully-qualified path to the external file. There's no such idea as a relative file location when it comes to webapps. What would be in this external config file? -QM -- software -- http://www.brandxdev.net/ tech news -- http://www.RoarNetworX.com/ code scan -- http://www.JxRef.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Loadbalancing issues with mod_jk 1.2.14
I tried to upgrade from 1.2.8 to 1.2.14 this week. I must say that the behavior of mod_jk has changed quite a bit. Especially troublesome is that the LB seems less equally distributing in 1.2.14 than it was in 1.2.8. Essentilly I experienced some Tomcats die under the load while others where bored. I know there are new settings in 1.2.14 for loadbalancing, namely lock and method. Can someone advise me which combination of flags would best recreate the loadbalancing as it was under 1.2.8? It is not that I want to stay on 1.2.8 but at this point I can't get 1.2.14 to run stable enough under high load. Thanks, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where Is A ...
Thanks, that's just what I needed. Gene [EMAIL PROTECTED] David Delbecq wrote: Le Vendredi 26 Août 2005 03:08, Eugene Poole a écrit : Where is a exact example of how to do the jndi, jdbc datasource, and the reseorce ref necessary to get a database connection to a Oracle9i database from Tomcat 5.0.28? http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations section Oracle 8i juste below MYsql should fit your needs. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: invalidate session after calling listeners
You could implement HttpSessionBindingListener and define your own valueBound and valueUnbound methods. DarekC On Fri, 2005-08-26 at 13:08, Franklin Phan wrote: Is there a way to set Tomcat to call listeners before invalidate() is called on a session? I'm trying to code a method to clean up specifically named files inside a working dir (in Windows XP) whenever the session times out. I can't seem to find a way to do it. Apparently, invalidate() is called prior to calling listeners, and these specifically named files that I want to clean up are named after the user ID that is stored in the HttpSession object (meaning I'd need to access the session object. I understand Resin has a setting called invalidate-after-listener and am wondering whether Tomcat has same. 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]
Cluster tcpThreadCount
Hello, How do I determine what value I should set tcpThreadCount to Currently I have the setting below and a very busy app server. Thanks Randy Receiver className=org.apache.catalina.cluster.tcp.ReplicationListener tcpListenAddress=10.0.0.88 tcpListenPort=4001 tcpSelectorTimeout=100 tcpThreadCount=6 / Sender className=org.apache.catalina.cluster.tcp.ReplicationTransmitter replicationMode=pooled autoConnect=true waitForAck=true sendAllSessions=false sendAllSessionsSize=100 compress=true ackTimeout=15000/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom SSLServerSocket implementation
Alain Brousseau [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I need to tell Tomcat 5.5 to use my custom SSLServerSocketFactory for backwards compatibility with our client-side software. It was relatively easy with Tomcat 4.1 (using a Factory element in the Connector configuration) but with tomcat 5.5 it doesn't work. The Connector seems to ignore the factory attribute. How can this be done with Tomcat 5.5 ? You can't implement a custom SSLServerSocketFactory in TC 5.5. You can however implement a custom SSLImplementation. You need to extend o.a.t.u.net.SSLImplementation (implementing the abstract methods), and then use something like: Connector port=443 secure=true scheme=https sSLImplementation=com.myfirm.mypackage.MySSLImplementation / Thanks Alain Brousseau - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: invalidate session after calling listeners
Darek, I've tried your suggestion. As I've said before: I need to access the Session object. This is what I have: package abcd; import java.io.*; import javax.servlet.http.*; public class AbcdSessionListener implements HttpSessionBindingListener { private String userId; public void valueBound(HttpSessionBindingEvent se) { HttpSession session = se.getSession(); userId = (String)session.getValue(userId); } public void valueUnbound(HttpSessionBindingEvent se) { AbcdUtil util = new AbcdUtil(); HttpSession session = se.getSession(); // ---This is not possible because the session is already invalidated at this point. String userId = (String)session.getValue(userId); // Clean up the folder of old XML files by the same user from previous login (uses the AbcdUtil class) String XML_WORK_PATH = /WEB-INF/work_xml; File[] files = util.fileSearch(session.getServletContext().getRealPath(XML_WORK_PATH), userId + _*.*); for (int i = 0; i files.length; i++) { files[i].delete(); } } } // End AbcdSessionListener And I use the following in a JSP: jsp:useBean id=listener class=abcd.AbcdSessionListener scope=session / % session.setAttribute(sessionListener, listener); % All this fails with or without a listener element in the web.xml entry (and how should one decide whether or not to put one in web.xml?). If you read the Servlet API Documentation for the HttpSession Interface (http://jakarta.apache.org/tomcat/tomcat-5.5-doc/servletapi/index.html), it says: For session that are invalidated or expire, notifications are sent after the session has been invalidated or expired. Pretty useless, if you ask me. Any advice? Franklin Darek Czarkowski wrote: You could implement HttpSessionBindingListener and define your own valueBound and valueUnbound methods. DarekC On Fri, 2005-08-26 at 13:08, Franklin Phan wrote: Is there a way to set Tomcat to call listeners before invalidate() is called on a session? I'm trying to code a method to clean up specifically named files inside a working dir (in Windows XP) whenever the session times out. I can't seem to find a way to do it. Apparently, invalidate() is called prior to calling listeners, and these specifically named files that I want to clean up are named after the user ID that is stored in the HttpSession object (meaning I'd need to access the session object. I understand Resin has a setting called invalidate-after-listener and am wondering whether Tomcat has same. 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]