RE: dodgy session class
thanks for your reply Peter. unfortunately none of the applications has explicitly configured sessions manager. I have managed to consistently reproduce the problem. The problem involves two webapps, app1 and app2. App1 is distributable. App2 contains a filter that forwards requests to app1. As it turns out all sessions created via filter are instances of StandardSession! This is with app1 being distributable and with cluster session manager. Making app2 distributable doesnt seem to have any effect on the sessions that are being created in app1 context. I've attached a test case with two sample webapps, to run them you just have to make sure crossContext is enabled for app2 and context of app1 is actually called /app1. App1 does some nasty hack to display what Class is actually hiding behind session facade, so you would have to excuse me for that. Another thing that i've noticed along the way: if a request goes to app1 via filter in app2 two sessions are created, one for each context. Filter in app2 does not create sessions explicitly (as you will see from the example) and session would not be created for app2 context if filter didnt forward requests to app1 context. The question is why session gets created implicitly in context of app2? It is not that I cannot live with it, just cant think of a logical explanation to this. Ideas anyone? Regards, Vlad -Original Message- From: Peter Rossbach [mailto:[EMAIL PROTECTED] Sent: Sat 2/12/2005 9:22 AM To: Tomcat Users List Cc: Subject:Re: dodgy session class Hmm, please check that all your applications with distributable=true have no configured Manager in there context.xml's regards Peter Filip Hanik - Dev schrieb: Any chance you have a test case to reproduce this? Shouldn't happen, unless the way sessions are created have changed. Filip - Original Message - From: [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Friday, February 11, 2005 11:47 AM Subject: dodgy session class Hi, I'm running tomcat 5.0.30 on two machines A and B (Linux RHAS3). When tomcat A restarts it fails to sync session state with session state not received or something to that effect and tomcat B logs this message: 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] ERROR org.apache.catalina.cluster.session.SimpleTcpReplicationManager - Unable to receive message through TCP channel java.lang.ClassCastException at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageR eceived(SimpleTcpReplicationManager.java:530) at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageD ataReceived(SimpleTcpReplicationManager.java:596) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(Sim pleTcpCluster.java:580) at org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:70 ) at org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpRep licationThread.java:129) at org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationT hread.java:67) I changed SimpleTcpReplicationManager to output class names of the sessions it is trying to cast to ReplicatedSession and got the following picture: 11 Feb 2005 17:21:44 [Cluster-MembershipReceiver] INFO org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.56.21: 4001,192.168.56.21,4001, alive=3] 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
Re: commons-logging logger instances - how to initialize in replicated session objects
Richard, You should also be carefull with the static keyword if you are using a clustered session. Its meaning is completely different that when running in just one jvm so I would remove it to avoid confusion. Since you don't need to replicate the loggers, you could also define them as transient, so they will not be serialized during session replication. In my classes, I usually use a protected transient Log logger declaration so you can also avoid to redeclare loggers for your subclasses. On Sat, 12 Feb 2005 06:43:03 -0700, Richard Mixon (qwest) [EMAIL PROTECTED] wrote: Thanks Trond, I had forgotten about readObject.That may be a better option than creating yet another utility method. Trond G. Ziarkowski wrote: Hi, I'm maybe stepping out of my territory here, but I think that static members are not serialized/deserialized. To re-initialize your static logger maybe you should try to implement the readObject(java.io.ObjectInputStream in) method from the java.io.Serializable interface something like this: readObject(...) { super.readObject(...); log = LogFactory.getLog(...); } Hope this is of some help Trond - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Roberto Cosenza http://robcos.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: dodgy session class
hm, another attempt to send an attachement. -Original Message- From: Ilyschenko, Vlad Sent: Sun 2/13/2005 1:32 AM To: tomcat-user@jakarta.apache.org Cc: Subject:RE: dodgy session class thanks for your reply Peter. unfortunately none of the applications has explicitly configured sessions manager. I have managed to consistently reproduce the problem. The problem involves two webapps, app1 and app2. App1 is distributable. App2 contains a filter that forwards requests to app1. As it turns out all sessions created via filter are instances of StandardSession! This is with app1 being distributable and with cluster session manager. Making app2 distributable doesnt seem to have any effect on the sessions that are being created in app1 context. I've attached a test case with two sample webapps, to run them you just have to make sure crossContext is enabled for app2 and context of app1 is actually called /app1. App1 does some nasty hack to display what Class is actually hiding behind session facade, so you would have to excuse me for that. Another thing that i've noticed along the way: if a request goes to app1 via filter in app2 two sessions are created, one for each context. Filter in app2 does not create sessions explicitly (as you will see from the example) and session would not be created for app2 context if filter didnt forward requests to app1 context. The question is why session gets created implicitly in context of app2? It is not that I cannot live with it, just cant think of a logical explanation to this. Ideas anyone? Regards, Vlad -Original Message- From: Peter Rossbach [mailto:[EMAIL PROTECTED] Sent: Sat 2/12/2005 9:22 AM To: Tomcat Users List Cc: Subject:Re: dodgy session class Hmm, please check that all your applications with distributable=true have no configured Manager in there context.xml's regards Peter Filip Hanik - Dev schrieb: Any chance you have a test case to reproduce this? Shouldn't happen, unless the way sessions are created have changed. Filip - Original Message - From: [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Friday, February 11, 2005 11:47 AM Subject: dodgy session class Hi, I'm running tomcat 5.0.30 on two machines A and B (Linux RHAS3). When tomcat A restarts it fails to sync session state with session state not received or something to that effect and tomcat B logs this message: 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] ERROR org.apache.catalina.cluster.session.SimpleTcpReplicationManager - Unable to receive message through TCP channel java.lang.ClassCastException at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageR eceived(SimpleTcpReplicationManager.java:530) at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageD ataReceived(SimpleTcpReplicationManager.java:596) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(Sim pleTcpCluster.java:580) at org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:70 ) at org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpRep licationThread.java:129) at org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationT hread.java:67) I changed SimpleTcpReplicationManager to output class names of the sessions it is trying to cast to ReplicatedSession and got the following picture: 11 Feb 2005 17:21:44 [Cluster-MembershipReceiver] INFO org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.56.21: 4001,192.168.56.21,4001, alive=3] 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
RE: dodgy session class
sorry for the duplicate emails. it doesnt seem like the attachement is getting through for one reason or another, so here is the test case: http://www.jstripe.com/testcase.tar.gz -Original Message- From: Ilyschenko, Vlad Sent: Sun 2/13/2005 1:32 AM To: tomcat-user@jakarta.apache.org Cc: Subject:RE: dodgy session class thanks for your reply Peter. unfortunately none of the applications has explicitly configured sessions manager. I have managed to consistently reproduce the problem. The problem involves two webapps, app1 and app2. App1 is distributable. App2 contains a filter that forwards requests to app1. As it turns out all sessions created via filter are instances of StandardSession! This is with app1 being distributable and with cluster session manager. Making app2 distributable doesnt seem to have any effect on the sessions that are being created in app1 context. I've attached a test case with two sample webapps, to run them you just have to make sure crossContext is enabled for app2 and context of app1 is actually called /app1. App1 does some nasty hack to display what Class is actually hiding behind session facade, so you would have to excuse me for that. Another thing that i've noticed along the way: if a request goes to app1 via filter in app2 two sessions are created, one for each context. Filter in app2 does not create sessions explicitly (as you will see from the example) and session would not be created for app2 context if filter didnt forward requests to app1 context. The question is why session gets created implicitly in context of app2? It is not that I cannot live with it, just cant think of a logical explanation to this. Ideas anyone? Regards, Vlad -Original Message- From: Peter Rossbach [mailto:[EMAIL PROTECTED] Sent: Sat 2/12/2005 9:22 AM To: Tomcat Users List Cc: Subject:Re: dodgy session class Hmm, please check that all your applications with distributable=true have no configured Manager in there context.xml's regards Peter Filip Hanik - Dev schrieb: Any chance you have a test case to reproduce this? Shouldn't happen, unless the way sessions are created have changed. Filip - Original Message - From: [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Friday, February 11, 2005 11:47 AM Subject: dodgy session class Hi, I'm running tomcat 5.0.30 on two machines A and B (Linux RHAS3). When tomcat A restarts it fails to sync session state with session state not received or something to that effect and tomcat B logs this message: 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] ERROR org.apache.catalina.cluster.session.SimpleTcpReplicationManager - Unable to receive message through TCP channel java.lang.ClassCastException at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageR eceived(SimpleTcpReplicationManager.java:530) at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageD ataReceived(SimpleTcpReplicationManager.java:596) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(Sim pleTcpCluster.java:580) at org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:70 ) at org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpRep licationThread.java:129) at org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationT hread.java:67) I changed SimpleTcpReplicationManager to output class names of the sessions it is trying to cast to ReplicatedSession and got the following picture: 11 Feb 2005 17:21:44 [Cluster-MembershipReceiver] INFO org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.56.21: 4001,192.168.56.21,4001, alive=3] 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb
RE: URL protocol handler issues
I had a similar problem, which I posted last week. You should find it searching the Subject field for pluggable protocols in web apps if you kee pold messages. What I found out so far is this: - Defining the protocol handler doesn't do any harm. The URL class searches through the system property java.protocol.handler.pkgs if it doesn't get a protocol handler from the factory. - The problem is that URL tries to load the class with Class.forName(String) method (Check out the method static URLStreamHandler getURLStreamHandler(String protocol)). - Class.forName(String) calls the method ClassLoader.getCallerClassLoader(), which returns null. I think this means it uses the remodial classloader - The premodial classloader cannot find the class becaus it is not in the bootstrap classpath. - Subsequently the system class loader is asked to load the class. This classloader cannot find the class either, because the classes in the web application are not in the classpath when tomcat was started. - To solve the problem temporarily is put the protocol handler in the class path. - The disadvantage with this method is you need to distribute the protocol handler separately. And if you need classes from the web application, you need to add the webapp class repository the protocol handler's list of repositories. Martin Goldhahn -Original Message- From: Peter Crowther [mailto:[EMAIL PROTECTED] Sent: Friday, February 11, 2005 2:59 PM To: Tomcat Users List Subject: URL protocol handler issues Environment: Tomcat 5.0.28, built from source. I'm trying to persuade Tomcat to allow me to use a custom URL scheme ('bod3vfs'), both in webapps and in some of the behind-the-scenes setup - for example, I have a custom HostConfig that examines a virtual file system. I've tried the following approaches to getting this integrated; none of them appear to work. Ideas welcome! 1) Create the handler in org.bodington.core.protocol.bod3vfs.Handler. Package that into bodington3.jar; place in server/lib. Call a static routine just after startup to amend java.protocol.handler.pkgs to include org.bodington.core.protocol. Result: MalformedURLException when asking for bod3vfs:*. 2) As per 1, but add -Djava.protocol.handler.pkgs=org.bodington.core.protocol. Result as 1. 3) Amend DirContextURLStreamHandlerFactory to include the following: public URLStreamHandler createURLStreamHandler(String protocol) { if (protocol.equals(jndi)) { return new DirContextURLStreamHandler(); } else if (protocol.equals(bod3vfs)) { return new org.bodington.core.protocol.bod3vfs.Handler(); } else { return null; } } ... and ensure that the factory replaces the standard factory before it's required, in my custom HostConfig (which is successfully loaded from bodington3.jar). Result: java.lang.reflect.InvocationTargetException caused by java.lang.NoClassDefFoundError: org/bodington/core/protocol/bod3vfs/Handler at the point that the runtime attempts to load DirContextURLStreamHandlerFactory. Note that the compilation was successful, and that the invoking class has been loaded successfully from the same jar that contains the handler. If I replace the return statement with 'return null', DirContextURLStreamHandlerFactory loads and runs successfully. 4) Copy the Handler class into catalina.jar and repeat 3. Same result. Remy, the original code for DirContextURLStreamHandlerFactory is yours, I think. Any particular reason you replaced the factory rather than setting the packages? - Peter -- Peter Crowther, Director, Melandra Limited John Dalton House, 121 Deansgate, Manchester M3 2AB t: +44 (0)161 828 8736 f: +44 (0)161 832 5683 - 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]
JspC exception
Hi, JspC error while doing PreCompilation, I 'am using ant 1.6.2 and tomcat 5. When I call jspc from ant it is thworing invaid cast exception. In JspRunTimeContext class. It is getting the current thread classloader and casting to URL classloader.. parentClassLoader = (URLClassLoader)Thread.currentThread().getContextClassLoader(); This is because Thread.currentThread().getContextClassLoader() is returning AntClassLoader. which is incompatible with URLClassLoader. Hence thrwoing ClassCastException. The detail exception is, Please don't consider the line number in the below stack Trace. The code thrwoing the exception is above given in bold font of org.apache.jasper.compiler.JspRuntimeContext class. [java] java.lang.ClassCastException [java] at org.apache.jasper.compiler.JspRuntimeContext.init(JspRuntimeContext.java:46) [java] at org.apache.jasper.JspC.initServletContext(JspC.java:866) [java] at org.apache.jasper.JspC.execute(JspC.java:735) [java] at org.apache.jasper.JspC.main(JspC.java:71) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:324) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:193) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:130) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:705) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:177) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:83) [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [java] at org.apache.tools.ant.Task.perform(Task.java:364) [java] at org.apache.tools.ant.Target.execute(Target.java:341) [java] at org.apache.tools.ant.Target.performTasks(Target.java:369) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1214) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1062) [java] at org.apache.tools.ant.Main.runBuild(Main.java:673) [java] at org.apache.tools.ant.Main.startAnt(Main.java:188) [java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196) [java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55) I 'am stuck up in this, This is a class loader issue. It would be a great help if anybody has a solution for this. After this exception, there is a code to set current thread class loader to URL classLoader in JspC.java. Regards, Jagga - Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term'
Re: manager application
Hi, after installing tomcat there is no user configured to access these apps. To do this, add the following to your tomcat-users.xml: role rolename=manager/ role rolename=admin/ user username=user password=pw roles=admin,manager/ btw: when using tomcat 5.5.x you have to download the admin app separately, since it is no longer delivered with tomcat. Jens Joachim Syscon GmbH E-Mail: [EMAIL PROTECTED] - Original Message - From: P.M [EMAIL PROTECTED] To: Jarkarta - TOMCAT Apache tomcat-user@jakarta.apache.org Sent: Sunday, February 13, 2005 3:42 PM Subject: manager application Hi, I open the localhost:8080 without any trouble now, but i hace an error message 403 everyting that i try to access to manager or admin applications. i tested all username and password which are in tomcat-users.xml, but nothing work.. i know from windows install exe file, that another profile existed : admin with empty password...but even if this one doesn't work. does anyone have seen it already ? thx, Maileen __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo - 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: URL protocol handler issues
From: Martin Goldhahn [mailto:[EMAIL PROTECTED] I had a similar problem, which I posted last week. You should find it searching the Subject field for pluggable protocols in web apps if you keep old messages. I keep some, but managed to delete that - a few days before it became highly relevant :-(. Thanks, Martin. - The problem is that URL tries to load the class with Class.forName(String) method (Check out the method static URLStreamHandler getURLStreamHandler(String protocol)). How are you examining the source of this method, by the way? - To solve the problem temporarily is put the protocol handler in the class path. - The disadvantage with this method is you need to distribute the protocol handler separately. And if you need classes from the web application, you need to add the webapp class repository the protocol handler's list of repositories. Hmm. That's going to be fun - there's a good few jars that would be needed. I'll see if I can separate them out. Martin, thanks for the input. I'm still interested in *why* the expected classloader isn't used - anyone got any insights? - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat hackers ...
If you use relative URLS (with ..) on tour site - it is probably a bad(not evil, just poorly written) bot impersonating IE. -Tim B Wiley wrote: Hello, I've been getting some things in my logs like ... 217.20.113.110 - - [13/Feb/2005:09:41:39 -0500] GET /Myapp/../Myapp/../Myapp/../Myapp/../Myapp/../Myapp/../Myapp/../hosting.html HTTP/1.1 200 5564 - Mozilla/4.0 (compatible; MSIE 5.16; Mac_PowerPC) What is this guy getting from this ? Am I just paranoid or what ??? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: URL protocol handler issues
-Original Message- From: Peter Crowther [mailto:[EMAIL PROTECTED] Sent: Monday, February 14, 2005 12:20 PM To: Tomcat Users List Subject: RE: URL protocol handler issues How are you examining the source of this method, by the way? If you downloaded the JDK you already have the source code of the URL class on your hard disk ($JDK_HOME/src.zip). - To solve the problem temporarily is put the protocol handler in the class path. - The disadvantage with this method is you need to distribute the protocol handler separately. And if you need classes from the web application, you need to add the webapp class repository the protocol handler's list of repositories. Hmm. That's going to be fun - there's a good few jars that would be needed. I'll see if I can separate them out. Martin, thanks for the input. I'm still interested in *why* the expected classloader isn't used - anyone got any insights? The document at http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html elaborates on class loading. The reason why neither the system class loader nor the premodial classloader load your class is that each webapp has its own classloader that is separated from the rest of tomcat, i.e. class com.mycomp.MyClass in webapp A is a different type than com.mycomp.MyClass in webapp B. The tomcat plugin for Eclipse uses a classlaoder DevClassLoader that could provide a solution to the problem. But again, the class loader mut be put in tomcat's classpath or the VM's bootstrap path and cannot be packaged together with your webapp. --- Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session lost on netscape, mozilla and firefox, but not IE and Opera
If you've got a Valve className=org.apache.catalina.valves.RequestDumperValve/ defined for the Engine/ node in server.xml for your Tomcat installation, you should be able to see cookies being passed in HTTP requests: == 2005-02-02 10:30:39 RequestDumperValve[engine]: REQUEST URI =/calendar/DownloadEvents 2005-02-02 10:30:39 RequestDumperValve[engine]: authType=null 2005-02-02 10:30:39 RequestDumperValve[engine]: characterEncoding=null 2005-02-02 10:30:39 RequestDumperValve[engine]: cookie=n.gp.8c52f99421cdaa97=20050123 2005-02-02 10:30:39 RequestDumperValve[engine]: cookie=n.gp.01a0d577f34f043b=20050319 2005-02-02 10:30:39 RequestDumperValve[engine]: header=accept=*/* 2005-02-02 10:30:39 RequestDumperValve[engine]: header=accept-language=en-us 2005-02-02 10:30:39 RequestDumperValve[engine]: header=accept-encoding=gzip, deflate ::: 2005-02-02 10:30:39 RequestDumperValve[engine]: requestedSessionId=null 2005-02-02 10:30:39 RequestDumperValve[engine]: scheme=http 2005-02-02 10:30:39 RequestDumperValve[engine]: serverName=sample.com 2005-02-02 10:30:39 RequestDumperValve[engine]: serverPort=80 2005-02-02 10:30:39 RequestDumperValve[engine]: servletPath=/calendar/DownloadEvents 2005-02-02 10:30:39 RequestDumperValve[engine]: isSecure=false == The cookies in the above sample are app-specific and not Tomcat session cookies, but give the general idea. You should also check the security settings/preferences of the browsers in question as such settings can constrain the browser's use of cookies.
Re: The requested resource (/myApp/servlet/TestingServlet) is not available.
Admittedly, as another poster noted, a tour through the docs (specifically the Servlet spec) would help you tremendously in figuring this out yourself. To answer your question -- your url should be http://localhost:8080/myApp/TestingServlet. For your own sanity, read the spec though. It provides some really good info. Here's a url to the spec version you have defined in your web.xml: http://www.jcp.org/aboutJava/communityprocess/final/jsr053/ --David Marco Mastrocinque wrote: Hi All, I'm new to Tomcat and Servlets, I'm having a problem with one of my first Servlets: This is my program: import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.util.*; public class TestingServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.println(HTML); out.println(HEAD); out.println(TITLEServlet Testing/TITLE); out.println(/HEAD); out.println(BODY); out.println(Welcome to the Servlet Testing Center); out.println(/BODY); out.println(/HTML); } } This is my web.xml file: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; wep-app servlet servlet-nameTesting/servlet-name servlet-classTestingServlet/servlet-class /servlet /wep-app I'm using Tomcat version 5.0.28. I create the Directory structure under Tomcat, underneath the webapps subdirectory: myApp | WEB-INF | classes I compile the file TestingServlet.java using javac -classpath C:\tomcat\common\lib\servlet-api.jar TestingServlet.jar Place the file TestingServelt.jar in the classes subdirectory. Place the file web.xml file in the WEB-INF subdirectory. I start Tomcat. The manager application says it there, and it seems to be okay. I type in the address bar of IE the following http://locahost:8080/myApp/servlet/TestingServlet I get the following message, from Tomcat The requested resource (/myApp/servlet/TestingServlet) is not available. I know it should be pretty simple, but sometimes the simplest things are the hardest to correct! Any suggestions most appreciated. Thanks Marco Mastrocinque - 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: manager application
To use the manager app you have to add a user into the tomcat-users.xml with the manager role. Ta Matt -Original Message- From: P.M [mailto:[EMAIL PROTECTED] Sent: 13 February 2005 14:43 To: Jarkarta - TOMCAT Apache Subject: manager application Hi, I open the localhost:8080 without any trouble now, but i hace an error message 403 everyting that i try to access to manager or admin applications. i tested all username and password which are in tomcat-users.xml, but nothing work.. i know from windows install exe file, that another profile existed : admin with empty password...but even if this one doesn't work. does anyone have seen it already ? thx, Maileen __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any opinions expressed in this E-mail may be those of the individual and not necessarily the company. This E-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this E-mail in error and that any use or copying is strictly prohibited. If you have received this E-mail in error please notify the beCogent postmaster at [EMAIL PROTECTED] Unless expressly stated, opinions in this email are those of the individual sender and not beCogent Ltd. You must take full responsibility for virus checking this email and any attachments. Please note that the content of this email or any of its attachments may contain data that falls within the scope of the Data Protection Acts and that you must ensure that any handling or processing of such data by you is fully compliant with the terms and provisions of the Data Protection Act 1984 and 1998. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat + SSL, apache
Is there any way to have the Tomcat with SSL and a front-end Apache, wich should only serve as a interface between client and tomcat? I mean tomcat should serve the certificates and do all the ssl, apache only to redirect traffic to it. thanks. Laurentiu VasiescuNetwork Administrator S.A. Tri-Pen TravelMaster Technologies, SRL Eastern Europe - Bucharest (Romania) Office: +40 (31) 401 1152+40 (31) 402 5027 Fax: +40 (21) 323 4357 E-mail: [EMAIL PROTECTED] Web: http://www.tri-pen.ro Confidentiality Notice: This email message, including any attachments,is for the sole use of the intended recipient(s) and may contain confidentialand privileged information. Any unauthorized review, use, disclosure ordistribution is prohibited. If you are not the intended recipient, pleasecontact Tri-Pen TavelMaster Technologies at +40 (31) 401 1152 and destroyall copies of the original message.
Build a portal
Hi! I have built an intranet for a while now and have build everything in small discrete parts that are quite independat of each other. Using the Single sign on valve made it easy to integrate the parts and since we are using a frameset the menus wasn't a problem. Now we are going to replace our frameset with includes and now I forsee a pain in the neck keeping look and feel consistent since I don't have the framset but have to keep a copy of the common components in every web-app. I am really hoping that I have missed something but isn't there a way to have common components in one place only? Thanks in advance Roland Carlsson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: What does each part of a className mean?
Thanks Peter I Just wanted you to know that I sure do appreciate the help . I know how important time is. The SSL was not working and there was no classname under the SSL section of the server.xml file so I was trying a few different names. I was trying some different classnames to see if I could get the SSL to work and yes you are right if you change the class name and take a guess the server will not even start. Using the default name from the how to docs will get the server started but the SSL still did not work .So now I can scratch that off the list and look at the keytool .exe file. Are there certain directories that should hold the keystore file and other related SSL files.? Does Tomcat expect to see the keystore file and certs in a certain default location under tomcat ? In the past I have been told no from Verisign but from the docs that I have read it sure looks that way. Thanks again for the help on the class name that makes sense. I just wasn't sure if that name was right or just an example that was suposed to be replaced by our domain name. Christopher W. Hosler Network Administrator Ingham County MIS Department Email [EMAIL PROTECTED] As water reflects the face So a mans heart reflects the man [EMAIL PROTECTED] 2/11/2005 4:00:08 AM From: Chris Hosler [mailto:[EMAIL PROTECTED] I am having a problem getting SSL to work on my tomcat 5 sever so I would like to know what each segment of the class name means from the server.xml file (className=org.apache.coyote.tomcat5.CoyoteConnector) and how it affect the SSL on my server. When I looked at my server.xml file the classname was not there I have removed the rem statements but SSL does not work I think I have it wrong. Do I even need to add the classname can I run without it Just use the port 8443? Do I need to change the org.apache.coyote.tomcat5.CoyoteConnector and change it to my domain name/server name ? Any help would be great It's the Java package and class name of the connector to use - think of it as the full postal address of the code. That package name is internal to Tomcat, and is set by the developers. If you change it in your config file, unless you have another appropriate connector in a library somewhere, you'll *definitely* screw up your configuration. If you're interested in the gory details of where the name comes from, open up server/lib/catalina.jar in your tomcat installation with something like Winzip and follow the package names down - you'll find the .class file in there. - Peter - 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: What does each part of a className mean?
From: Chris Hosler [mailto:[EMAIL PROTECTED] Are there certain directories that should hold the keystore file and other related SSL files.? Does Tomcat expect to see the keystore file and certs in a certain default location under tomcat ? In the past I have been told no from Verisign but from the docs that I have read it sure looks that way. Not as far as I can see. I'm on Windows, and Tomcat 4.0 (not yet done this on 5.x), and followed http://jakarta.apache.org/tomcat/tomcat-4.0-doc/ssl-howto.html specifying '-keystore c:\keys\keystore'. I then added the following to my server.xml: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8443 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=100 debug=0 scheme=https secure=true useURIValidationHack=false disableUploadTimeout=true Factory className=org.apache.coyote.tomcat4.CoyoteServerSocketFactory clientAuth=false protocol=TLS keystoreFile=c:\keys\keystore keystorePass=.../ /Connector Works for me, but your setup may well vary. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: What does each part of a className mean?
I tried to buy as tomcat5 book this weekend but could not find one the only book they had was a tomcat 4. In the ssl section they did talk about moving the keystore file or adding a path statement during the creation of the keystore. They also talked a little about the importance of the default locations. When I talked to a guy from verisign during the creation he said that was one of the differences of 5 over 4. That it did not matter where the keystore or the cert was placed as long as there were no errors during the install. Right now the keystore and certs are placed off the root something like the c:\j2sdk1.4.2_06\bin\. This location is the same directory that holds the keytool.exe file that I used to create the keystore. The keytool.exe just dumped everything into its home location. The server is under c:\apache\tomcat not sure if this is the root problem or if I am just barking at the moon. Christopher W. Hosler Network Administrator Ingham County MIS Department Email [EMAIL PROTECTED] As water reflects the face So a mans heart reflects the man [EMAIL PROTECTED] 2/14/2005 9:27:37 AM From: Chris Hosler [mailto:[EMAIL PROTECTED] Are there certain directories that should hold the keystore file and other related SSL files.? Does Tomcat expect to see the keystore file and certs in a certain default location under tomcat ? In the past I have been told no from Verisign but from the docs that I have read it sure looks that way. Not as far as I can see. I'm on Windows, and Tomcat 4.0 (not yet done this on 5.x), and followed http://jakarta.apache.org/tomcat/tomcat-4.0-doc/ssl-howto.html specifying '-keystore c:\keys\keystore'. I then added the following to my server.xml: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8443 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=100 debug=0 scheme=https secure=true useURIValidationHack=false disableUploadTimeout=true Factory className=org.apache.coyote.tomcat4.CoyoteServerSocketFactory clientAuth=false protocol=TLS keystoreFile=c:\keys\keystore keystorePass=.../ /Connector Works for me, but your setup may well vary. - Peter - 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: dodgy session class
Sorry, I want to test your example with JDK 5 and tomcat 5.5. (cvs head) but your test.jsp used some sun internal classes that not supported with jdk 5. test.jsp ::: reflectionFactory.newFieldAccessor(f).get(session) The methode newFiledAccessor not exist anymore! Please change the example, then I can check the tests. Please, open a bug report. It is easier to discuss this issue and you can upload your example Thanx Peter [EMAIL PROTECTED] schrieb: sorry for the duplicate emails. it doesnt seem like the attachement is getting through for one reason or another, so here is the test case: http://www.jstripe.com/testcase.tar.gz -Original Message- From: Ilyschenko, Vlad Sent: Sun 2/13/2005 1:32 AM To: tomcat-user@jakarta.apache.org Cc: Subject: RE: dodgy session class thanks for your reply Peter. unfortunately none of the applications has explicitly configured sessions manager. I have managed to consistently reproduce the problem. The problem involves two webapps, app1 and app2. App1 is distributable. App2 contains a filter that forwards requests to app1. As it turns out all sessions created via filter are instances of StandardSession! This is with app1 being distributable and with cluster session manager. Making app2 distributable doesnt seem to have any effect on the sessions that are being created in app1 context. I've attached a test case with two sample webapps, to run them you just have to make sure crossContext is enabled for app2 and context of app1 is actually called /app1. App1 does some nasty hack to display what Class is actually hiding behind session facade, so you would have to excuse me for that. Another thing that i've noticed along the way: if a request goes to app1 via filter in app2 two sessions are created, one for each context. Filter in app2 does not create sessions explicitly (as you will see from the example) and session would not be created for app2 context if filter didnt forward requests to app1 context. The question is why session gets created implicitly in context of app2? It is not that I cannot live with it, just cant think of a logical explanation to this. Ideas anyone? Regards, Vlad -Original Message- From: Peter Rossbach [mailto:[EMAIL PROTECTED] Sent: Sat 2/12/2005 9:22 AM To: Tomcat Users List Cc: Subject:Re: dodgy session class Hmm, please check that all your applications with distributable=true have no configured Manager in there context.xml's regards Peter Filip Hanik - Dev schrieb: Any chance you have a test case to reproduce this? Shouldn't happen, unless the way sessions are created have changed. Filip - Original Message - From: [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Friday, February 11, 2005 11:47 AM Subject: dodgy session class Hi, I'm running tomcat 5.0.30 on two machines A and B (Linux RHAS3). When tomcat A restarts it fails to sync session state with session state not received or something to that effect and tomcat B logs this message: 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] ERROR org.apache.catalina.cluster.session.SimpleTcpReplicationManager - Unable to receive message through TCP channel java.lang.ClassCastException at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageR eceived(SimpleTcpReplicationManager.java:530) at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageD ataReceived(SimpleTcpReplicationManager.java:596) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(Sim pleTcpCluster.java:580) at org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:70 ) at org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpRep licationThread.java:129) at org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationT hread.java:67) I changed SimpleTcpReplicationManager to output class names of the sessions it is trying to cast to ReplicatedSession and got the following picture: 11 Feb 2005 17:21:44 [Cluster-MembershipReceiver] INFO org.apache.catalina.cluster.tcp.SimpleTcpCluster - Replication member added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.56.21: 4001,192.168.56.21,4001, alive=3] 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO org.apache.catalina.cluster.session.SimpleTcpReplicationManager - SessionClass=org.apache.catalina.cluster.session.ReplicatedSession 11 Feb 2005 17:21:49
Re: Setting ContentType and encoding for all jsp pages
Ethan Sutin wrote: http://java.sun.com/products/servlet/Filters.html I tried also with this filter /** * @web.filter name=ContentType * @web.filter-mapping url-pattern=*.jsp */ public class ContentTypeFilter implements Filter { public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { //response.setContentType(application/xhtml+xml;charset=UTF-8); response.setContentType(application/xhtml+xml); chain.doFilter(request, response); } } It gets called properly (as some println showed) but the ContentType is still text/html. If I use setContentType(application...;charset=UTF-8), the charset=... part is preserved in the ContentType that I get, but application... is replaced by text/html. Do someone know what is rewriting the HTTP Header? -- Gioele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can't do log rotation on windows
Ive got tomcat 4 running on a win2003 server and it spits its log messages to a catalina.out file. Once a day I want to rotate the log copy it, zip up the copy and truncate the original. I do this on linux with a simple shell script. Tomcat is running during all of this and has its mitts into the file but linux doesnt seem to care. Different story on windows, however. The short story is that catalina.out is corrupted big time. Ive had 2 ideas to work around this. One is to stop the service before truncating the file and start it up again afterwards. This works but win2003 cant always restart the service, like 50% of the time. So Ive given up on this route. I need a solution that works while tomcat is running. The only idea Ive had for this is to try to get tomcat to use a filelogger like it provides for its contexts. I made the changes to server.xml but then never did doodly squat. I know Im not the only one thats had trouble doing this on windows as Ive seen other notes to list about it. I posted a note a while back (attached) but no response. Is it because no one runs tomcat on windows? -Tom ---BeginMessage--- Title: Tomcat 4 logging on Windows How do you configure Tomcat 4 on windows to redirect output to a filelogger type class the creates a new log file every day and releases old log file handles so the log can be rotated? I am talking about global output that normally goes to the console window, stdout and stderr, not context logging. Looking at the server.xml one would believe that this is already configured: !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ But this doesn't seem to do anything. -Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ---End Message--- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Build a portal
On Mon, 14 Feb 2005 14:39:57 +0100, Roland Carlsson [EMAIL PROTECTED] wrote: Hi! I have built an intranet for a while now and have build everything in small discrete parts that are quite independat of each other. Using the Single sign on valve made it easy to integrate the parts and since we are using a frameset the menus wasn't a problem. Now we are going to replace our frameset with includes and now I forsee a pain in the neck keeping look and feel consistent since I don't have the framset but have to keep a copy of the common components in every web-app. I am really hoping that I have missed something but isn't there a way to have common components in one place only? Not really a Tomcat question and it isn't very clear exactly what you are after but I am guessing you might want to use something like the ROOT webapp to store all the common static files and then you can refer to them with absolute links like href=/media/images/logo.gif Regards, -- Jason Bainbridge KDE - Conquer Your Desktop - http://kde.org KDE Web Team - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat + SSL, apache
Don't think so. Apache takes on the connection and therefore is in charge of the SSL handshake. So you will have to confiure apache to support SSL. They only way to make tomcat handle the handshake is to make it directly available to the browser. But guess you allready kind of suspected it :) Regards, Wouter On Mon, 14 Feb 2005 15:25:59 +0200, Laurentiu Vasiescu [EMAIL PROTECTED] wrote: Is there any way to have the Tomcat with SSL and a front-end Apache, wich should only serve as a interface between client and tomcat? I mean tomcat should serve the certificates and do all the ssl, apache only to redirect traffic to it. thanks. Laurentiu Vasiescu Network Administrator S.A. Tri-Pen TravelMaster Technologies, SRL Eastern Europe - Bucharest (Romania) Office: +40 (31) 401 1152 +40 (31) 402 5027 Fax: +40 (21) 323 4357 E-mail: [EMAIL PROTECTED] Web: http://www.tri-pen.ro Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact Tri-Pen TavelMaster Technologies at +40 (31) 401 1152 and destroy all copies of the original message. -- Regards, Wouter Boers business: http://www.abcdarium.nl personal: http://www.ikke.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat + SSL, apache
On Mon, 14 Feb 2005 15:25:59 +0200, Laurentiu Vasiescu [EMAIL PROTECTED] wrote: Is there any way to have the Tomcat with SSL and a front-end Apache, wich should only serve as a interface between client and tomcat? I mean tomcat should serve the certificates and do all the ssl, apache only to redirect traffic to it. thanks. Google for configuring Apache as a Forward Proxy, I think that should do what you want but not 100% sure. Regards, -- Jason Bainbridge KDE - Conquer Your Desktop - http://kde.org KDE Web Team - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What does each part of a className mean?
Chris, When I talked to a guy from verisign during the creation he said that was one of the differences of 5 over 4. That it did not matter where the keystore or the cert was placed as long as there were no errors during the install. Right now the keystore and certs are placed off the root something like the c:\j2sdk1.4.2_06\bin\. This location is the same directory that holds the keytool.exe file that I used to create the keystore. The keytool.exe just dumped everything into its home location. The server is under c:\apache\tomcat not sure if this is the root problem or if I am just barking at the moon. I believe I sent you this offlist several days ago, but perhaps not. In any case, you can specify any location for your keystoreFile, you just need to put that information into the Connector element so TC (version 4 or 5!) knows where to find it. And I wouldn't recommend leaving your keystore file where it is now :-) Delete it and recreate in a location of your choice. The instructions below are for a Linux system, so adapt for your Windows environment as necessary... Following these instructions should take all of 5 minutes... I didn't have SSL enabled on my dev machine, so to test this I 1) uncommented the SSL Connector, changing the port to 443 so I wouldn't have to type in the port in the address bar 2) ran keytool prompt% $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA -keystore /etc/.keystore -keypass woohoo 3) added that info to the Connector Connector port=443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 scheme=https secure=true clientAuth=false sslProtocol=TLS keystoreFile=/etc/.keystore keystorePass=woohoo / And that's it; worked right off the bat. If yours isn't behaving as you expect, you might want to redo the install from scratch, just to be sure, and then check the logs if it's still not responding. 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]
FW: Re: Missing application web.xml Tomcat 5.5.7
Hi All. I'm still having trouble with this issue. I'm not able to upload a .WAR file through the html web application manager but the same war manually exploded and placed into the /webapps directory works fine. I've included the web.xml to see if anybody can determine why Tomcat's rejecting it. I've Included the stdout log file. Some notesfrom thelog4j tomcat debugfile: Line 91: Tomcat has found the context.xml and moved it to $CatalinaRoot$\conf\Catalina\localhost\ROOT.xml Line 537: org.apache.catalina.core.StandardContext - Starting ROOT Line 7542: org.apache.catalina.startup.ContextConfig - Missing application web.xml, using defaults only Line 7744: org.apache.catalina.startup.HostConfig - Checking context[] redeploy resource C:\SuperFly\Tomcat 5.5\webapps\ROOT Line 7746: ContainerBackgroundProcessor[StandardEngine[Catalina]] org.apache.catalina.core.StandardContext - Stopping Line 7825: Delete C:\SuperFly\Tomcat 5.5\webapps\ROOT.war Here's what I see when I deploy: Click upload. Tomcat moves ROOT.war into $CatalinaRoot$\webapps\. Context.xml, from inside the .war file seen in $CatalinaRoot$\conf\localhost. Application appears in manager/html. A few seconds later the application dissappears and all files are deleted. The tomcat sample war file appears to be broken too: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample/ I'm open to suggestions. More info below. Thanks, Joe From: Joe Reger, Jr. [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 02, 2005 11:58 AMTo: 'tomcat-user@jakarta.apache.org'Subject: Re: Missing application web.xml Hi! I'm having problems with the "Missing application web.xml" erroron dev machines running Windows XP,. Tomcat 5.5.7, Java 5.0. It happens when I try to deploy a war file by using the Manager app or by placing it in the /webapps directory. Here are some of the things I've done, each time trying to deploy the resulting WAR file with no success and the same error: 1) Completely emptied the /webapps directory (per Paul's success below). 2) Verified existence of web.xml inside WAR file. 3) Uninstalled ROOT app and verified file removal from /webapps directory. 4) Checked order of elements in web.xml to fit spec. 5) Validated web.xml in Intellij Idea against http://java.sun.com/dtd/web-app_2_3.dtd 6) Changed web-app tag from the sample web.xml in documentation to the one used in Manager app from 5.5.7 build: web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4" 7) Removed all comments and spaces from web.xml. When I unpack theWAR manually and place theunpacked files in /webapps the application works fine. Tomcat likes the web.xml, but it can't seem to find it inside of the WAR file. Incidentally, when I watch my /webapps directory during a Manager deploy, the ROOT.war file does appear for a few seconds. It appears that Tomcat is trying to find a web.xml inside of it, fails and then deletes the file. I use Ant to build the WAR file: jar jarfile="ROOT.war"fileset dir="${files}" excludes="**/*.java"//jar Any help appreciated. Seen this on two development XP machines today. Best, Joe Reger ---Original MessageI just wanted to follow up and get into the record what I think is the solution to the problem I asked about on 1/20. I turns out that the reason I was getting "Missing application web.xml" errors in my stdout.log was because of a problem that arose during the undeployment precipitated by my deployment of a new build. It appears (just based on Tomcat's behavior) that when you move a WAR file into the webapps directory, the first thing Tomcat tries to do is delete the old unpacked version. In my case, it failed to do that because (as I found) the servlet had open file handles to files inside the servlet's context directory. Windows XP doesn't let you delete files that it thinks are "in use", and I suspect that is the trouble Tomcat was running into. Anyway, it deleted everything except those files, including the web.xml file, which it then reported as missing. When I modified my code to make sure the files were closed after being read, the problem went away. Well, I haven't had the fix in place long enough to be sure it has gone away, but at the very least it certainly seems to have helped a great deal, so I think the problem is solved. --Paul Lynch (eph1v3t8 @ mailblocks.com) ?xml version=1.0 encoding=ISO-8859-1? !-- !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; -- web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
RE: Re: Missing application web.xml Tomcat 5.5.7
I have the similar problem - org.apache.catalina.startup.ContextConfig - Missing application web.xml, using defaults only. The app is not deployed. The war is uploaded and context.xml is copied. It only happens in tc 5.5. I haven't done a search thru tomcat-user list. Maybe it has already been answered. -Original Message- From: Joe Reger, Jr. [mailto:[EMAIL PROTECTED] Sent: February 14, 2005 10:37 AM To: tomcat-user@jakarta.apache.org Subject: FW: Re: Missing application web.xml Tomcat 5.5.7 Hi All. I'm still having trouble with this issue. I'm not able to upload a .WAR file through the html web application manager but the same war manually exploded and placed into the /webapps directory works fine. I've included the web.xml to see if anybody can determine why Tomcat's rejecting it. I've Included the stdout log file. Some notes from the log4j tomcat debug file: Line 91: Tomcat has found the context.xml and moved it to $CatalinaRoot$\conf\Catalina\localhost\ROOT.xml Line 537: org.apache.catalina.core.StandardContext - Starting ROOT Line 7542: org.apache.catalina.startup.ContextConfig - Missing application web.xml, using defaults only Line 7744: org.apache.catalina.startup.HostConfig - Checking context[] redeploy resource C:\SuperFly\Tomcat 5.5\webapps\ROOT Line 7746: ContainerBackgroundProcessor[StandardEngine[Catalina]] org.apache.catalina.core.StandardContext - Stopping Line 7825: Delete C:\SuperFly\Tomcat 5.5\webapps\ROOT.war Here's what I see when I deploy: Click upload. Tomcat moves ROOT.war into $CatalinaRoot$\webapps\. Context.xml, from inside the .war file seen in $CatalinaRoot$\conf\localhost. Application appears in manager/html. A few seconds later the application dissappears and all files are deleted. The tomcat sample war file appears to be broken too : http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample/ http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample/ I'm open to suggestions. More info below. Thanks, Joe _ From: Joe Reger, Jr. [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 02, 2005 11:58 AM To: 'tomcat-user@jakarta.apache.org' Subject: Re: Missing application web.xml Hi! I'm having problems with the Missing application web.xml error on dev machines running Windows XP,. Tomcat 5.5.7, Java 5.0. It happens when I try to deploy a war file by using the Manager app or by placing it in the /webapps directory. Here are some of the things I've done, each time trying to deploy the resulting WAR file with no success and the same error: 1) Completely emptied the /webapps directory (per Paul's success below). 2) Verified existence of web.xml inside WAR file. 3) Uninstalled ROOT app and verified file removal from /webapps directory. 4) Checked order of elements in web.xml to fit spec. 5) Validated web.xml in Intellij Idea against http://java.sun.com/dtd/web-app_2_3.dtd http://java.sun.com/dtd/web-app_2_3.dtd 6) Changed web-app tag from the sample web.xml in documentation to the one used in Manager app from 5.5.7 build: web-app xmlns=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd version=2.4 7) Removed all comments and spaces from web.xml. When I unpack the WAR manually and place the unpacked files in /webapps the application works fine. Tomcat likes the web.xml, but it can't seem to find it inside of the WAR file. Incidentally, when I watch my /webapps directory during a Manager deploy, the ROOT.war file does appear for a few seconds. It appears that Tomcat is trying to find a web.xml inside of it, fails and then deletes the file. I use Ant to build the WAR file: jar jarfile=ROOT.war fileset dir=${files} excludes=**/*.java/ /jar Any help appreciated. Seen this on two development XP machines today. Best, Joe Reger ---Original Message I just wanted to follow up and get into the record what I think is the solution to the problem I asked about on 1/20. I turns out that the reason I was getting Missing application web.xml errors in my stdout.log was because of a problem that arose during the undeployment precipitated by my deployment of a new build. It appears (just based on Tomcat's behavior) that when you move a WAR file into the webapps directory, the first thing Tomcat tries to do is delete the old unpacked version. In my case, it failed to do that because (as I found) the servlet had open file handles to files inside the servlet's context directory. Windows XP doesn't let you delete files that it thinks are in use, and I suspect that is the trouble Tomcat was running into. Anyway, it deleted
RE: [OT] Automated tool for creating mime-multipart e-mail from web page
my ISP does this... send an email with image attachments, that all show up in the right places, and without that download warning. I'd be more interested in a really good JavaMail tutorial that shows me how to create the javamail mime multi-parts. Every page I find on google seems to have a slightly different take on it. Mike Curwen -Original Message- From: Robert Hunt [mailto:[EMAIL PROTECTED] Sent: Saturday, February 12, 2005 1:08 PM To: tomcat-user@jakarta.apache.org Subject: [OT] Automated tool for creating mime-multipart e-mail from web page I'd like to push a copy of a web page via e-mail in a background Tomcat thread/servlet. The idea is to serve up-to-date news and info without requiring patrons/subscribers to follow a link to the original page or require them bypass the Outlook Express warning about some items blocked to prevent sender from identifying your computer. That is, I'd like to use Java (and javamail) to create a mime/multipart message that bundles *everything* including items from link, img and script (et. al.) tags. Much like the IE Save As... web page archive to create a .MHT from a URL -- but have it done in an automated fashion. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Jakarta Tomcat Connector and IIS; no log being generated.
I'm having a bit of trouble getting isapi_redirect.dll to work and generate a log. If anyone can see what step I'm missing please let me know. I have done the following. I am running a Windows Server 2003. My Tomcat version is 5.0.28. My IIS version is 6.0. 1.. In the registry I created a new registry key named HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0 2.. Added a string value with the name extension_uri and a value of the full path to the folder containing isap_redirect.dll 3.. Added a string value with the name log_file and a value pointing to my jakarta logs directory. 4.. Added a string value with the name log_level and a value of debug 5.. Added a string value with the name worker_file and a value which is the full path to my workers.properties file 6.. Added a string value with the name worker_mount_file and a value which is the full path to my uriworkermap.properties file 7.. Using the IIS management console, added a new virtual directory to my IIS web site. The name of the virtual directory is jakarta. Its physical path is the directory where I placed isapi_redirect.dll. Assigned it with execute access. 8.. Using the IIS management console, added isapi_redirect.dll as a filter in my IIS web site. Named it jakarta and set its executable to the full path to isapi_redirect.dll. 9.. Edited Filter DLLs key under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3SVC\Parameters. Inserted the full path to isapi_redirect.dll. The green arrow showing activity in IIS is active for the filter. Nothing comes up when going to http://localhost/example/Menu My tomcat servlet comes up when going to http://localhost:8080/example/Menu My workers.properties file has worker.ajp13w.host=localhost worker.ajp13w.port=8009 worker.ajp13w.type=ajp13 My uriworkermap.properties file has /example/*=ajp13w I get no logs file in the location i placed the log file or anywhere else on my system for isapi. Thanks for any help. John Gordon
AW: Can't do log rotation on windows
Hi I've got tomcat 4 running on a win2003 server and it spits it's log messages to a catalina.out file. Once a day I want to rotate the log - copy it, zip up the copy and truncate the original. I do this on linux with a simple shell script. Tomcat is running during all of this and has its mitts into the file but linux doesn't seem to care. Different story on windows, however. The short story is that catalina.out is corrupted big time. Lesson: Never modify a file that another process is actively writing to. This is not supposed to work. Neighter on windows, nor on linux. Luck for you, that this works on Linux. The os should lock that file inbetween, but since stdout is redirected different way on both oses, there are different possibilities. One is to stop the service before truncating the file and start it up again afterwards. This works but win2003 can't always restart the service, like 50% of the time. So I've given up on this route. I need a solution that works while tomcat is running. Propably you got bind: port in use. Stop the service, wait some time, do your work, restart the service. This should work. At least it works here. Basically to stop means to tell the service that it shall stop. Tomcat might take some more time. Furthermore, the os might take some time to realise, that the socket is available again. The only idea I've had for this is to try to get tomcat to use a filelogger like it provides for it's contexts. I made the changes to server.xml but then never did doodly squat. I know I'm not the only one that's had trouble doing this on windows as I've seen other notes to list about it. I posted a note a while back (attached) but no response. Is it because no one runs tomcat on windows? This would be the best way, but involved changing your logging scheme in your application. stdout redirection is not possible through loggers, afaik. Regards Steffen smime.p7s Description: S/MIME cryptographic signature
RE: Tale of two servers
Thanks for all responses. I have some new info. 1. Reverse lookup is disabled on both machines. That probably rules out DNS resolution. 2. The better-but-slower machine is running java 1.5. The worse-but-faster machine is running 1.4.2 with the compatibility package. 3. Finally, and the most hopeful point, the better-but-slower server is running Norton virus services. Restarting the machine in safe mode (w/ networkin) solved the problem. Does this settle it? If so, what particular setting in Norton is responsible for this? Many thanks in advance, Dola --- George Sexton [EMAIL PROTECTED] wrote: The most common thing for this kind of issue is DNS resolution. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 On Thu, 10 Feb 2005 01:19:10 -0800 (PST), Dola Woolfe [EMAIL PROTECTED] wrote: The offender is a super duper new dell desktop with 4gb of ram, etc. It's running java 1.5 and is committed to nothing by tomcat. The winner is a rinky-dink 2 year old laptop with little ram, and lots of spyware sucking out cpu. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tale of two servers
From: Dola Woolfe [mailto:[EMAIL PROTECTED] 3. Finally, and the most hopeful point, the better-but-slower server is running Norton virus services. Restarting the machine in safe mode (w/ networkin) solved the problem. Does this settle it? If so, what particular setting in Norton is responsible for this? Real-time scanning. Turn it off completely if you can; turn it off on your webapp and any application directory, plus your database files, if you can't. If your IT team insist that you run real-time scanning, insist that they buy you a big enough server to cope with their paranoia ;-). - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat + SSL, apache
Actually I believe its the opposite. Apache serves the certificate the communication between Tomcat and Apache shouldnt be public anyway. From: Laurentiu Vasiescu [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org To: tomcat-user@jakarta.apache.org Subject: tomcat + SSL, apache Date: Mon, 14 Feb 2005 15:25:59 +0200 Is there any way to have the Tomcat with SSL and a front-end Apache, wich should only serve as a interface between client and tomcat? I mean tomcat should serve the certificates and do all the ssl, apache only to redirect traffic to it. thanks. Laurentiu Vasiescu Network Administrator S.A. Tri-Pen TravelMaster Technologies, SRL Eastern Europe - Bucharest (Romania) Office: +40 (31) 401 1152 +40 (31) 402 5027 Fax: +40 (21) 323 4357 E-mail: [EMAIL PROTECTED] Web: http://www.tri-pen.ro Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact Tri-Pen TavelMaster Technologies at +40 (31) 401 1152 and destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: dodgy session class
hi Peter, the problem was to do with tomcat 5.0.30 running on java 1.4.2, so it may not be relevant to tomcat 5.5 at all :( I have to say that that code is to conveniently display real session class on the page only, it employs java 1.4.2 trickery to bypass security constraints as session facade's attribute session is private :(. So feel free to remove the offending piece and check the session instance with debugger, it will show you the required information just as well. I am however is going to modify the sample to work on java 1.5 as well, not sure how to implement that 1.4.2 workaround yet, but i'll figure it out. Regards, Vlad -Original Message- From: Peter Rossbach [mailto:[EMAIL PROTECTED] Sent: Mon 2/14/2005 2:57 PM To: Tomcat Users List Cc: Subject:Re: dodgy session class Sorry, I want to test your example with JDK 5 and tomcat 5.5. (cvs head) but your test.jsp used some sun internal classes that not supported with jdk 5. test.jsp ::: reflectionFactory.newFieldAccessor(f).get(session) The methode newFiledAccessor not exist anymore! Please change the example, then I can check the tests. Please, open a bug report. It is easier to discuss this issue and you can upload your example Thanx Peter [EMAIL PROTECTED] schrieb: sorry for the duplicate emails. it doesnt seem like the attachement is getting through for one reason or another, so here is the test case: http://www.jstripe.com/testcase.tar.gz -Original Message- From: Ilyschenko, Vlad Sent: Sun 2/13/2005 1:32 AM To:tomcat-user@jakarta.apache.org Cc: Subject: RE: dodgy session class thanks for your reply Peter. unfortunately none of the applications has explicitly configured sessions manager. I have managed to consistently reproduce the problem. The problem involves two webapps, app1 and app2. App1 is distributable. App2 contains a filter that forwards requests to app1. As it turns out all sessions created via filter are instances of StandardSession! This is with app1 being distributable and with cluster session manager. Making app2 distributable doesnt seem to have any effect on the sessions that are being created in app1 context. I've attached a test case with two sample webapps, to run them you just have to make sure crossContext is enabled for app2 and context of app1 is actually called /app1. App1 does some nasty hack to display what Class is actually hiding behind session facade, so you would have to excuse me for that. Another thing that i've noticed along the way: if a request goes to app1 via filter in app2 two sessions are created, one for each context. Filter in app2 does not create sessions explicitly (as you will see from the example) and session would not be created for app2 context if filter didnt forward requests to app1 context. The question is why session gets created implicitly in context of app2? It is not that I cannot live with it, just cant think of a logical explanation to this. Ideas anyone? Regards, Vlad -Original Message- From: Peter Rossbach [mailto:[EMAIL PROTECTED] Sent: Sat 2/12/2005 9:22 AM To:Tomcat Users List Cc: Subject: Re: dodgy session class Hmm, please check that all your applications with distributable=true have no configured Manager in there context.xml's regards Peter Filip Hanik - Dev schrieb: Any chance you have a test case to reproduce this? Shouldn't happen, unless the way sessions are created have changed. Filip - Original Message - From: [EMAIL PROTECTED] To: tomcat-user@jakarta.apache.org Sent: Friday, February 11, 2005 11:47 AM Subject: dodgy session class Hi, I'm running tomcat 5.0.30 on two machines A and B (Linux RHAS3). When tomcat A restarts it fails to sync session state with session state not received or something to that effect and tomcat B logs this message: 11 Feb 2005 17:21:49 [org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] ERROR org.apache.catalina.cluster.session.SimpleTcpReplicationManager - Unable to receive message through TCP channel java.lang.ClassCastException at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageR eceived(SimpleTcpReplicationManager.java:530) at org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageD ataReceived(SimpleTcpReplicationManager.java:596) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(Sim pleTcpCluster.java:580) at org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:70 ) at org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpRep licationThread.java:129) at org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationT hread.java:67) I changed SimpleTcpReplicationManager to output class names of the sessions it is trying to cast to ReplicatedSession and got the following picture: 11 Feb 2005 17:21:44 [Cluster-MembershipReceiver]
RE: Tale of two servers
Sorry for being dumb, but where is that option? Can't seem to find it. The Option categories I have are Auto-Protect Script Blocing Manual Scan Email Instant Messenger LiveUpdate Threat Categories Mescellaneous Thanks --- Peter Crowther [EMAIL PROTECTED] wrote: From: Dola Woolfe [mailto:[EMAIL PROTECTED] 3. Finally, and the most hopeful point, the better-but-slower server is running Norton virus services. Restarting the machine in safe mode (w/ networkin) solved the problem. Does this settle it? If so, what particular setting in Norton is responsible for this? Real-time scanning. Turn it off completely if you can; turn it off on your webapp and any application directory, plus your database files, if you can't. If your IT team insist that you run real-time scanning, insist that they buy you a big enough server to cope with their paranoia ;-). - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail - now with 250MB free storage. Learn more. http://info.mail.yahoo.com/mail_250 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tale of two servers
From: Dola Woolfe [mailto:[EMAIL PROTECTED] Sorry for being dumb, but where is that option? Can't seem to find it. The Option categories I have are Auto-Protect Sorry, Dola, I meant auto-protect - different AVs have different names for it. You may wish to turn it off temporarily by right-clicking the Norton icon in the system tray and disabling it, to see what effect it has. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Jakarta Tomcat Connector and IIS; no log being generated.
John Gordon wrote: I'm having a bit of trouble getting isapi_redirect.dll to work and generate a log. If anyone can see what step I'm missing please let me know. I have done the following. I am running a Windows Server 2003. My Tomcat version is 5.0.28. My IIS version is 6.0. I get no logs file in the location i placed the log file or anywhere else on my system for isapi. Does the account under which the W3SVC is running has a 'Full Access' permission to the log path? Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tale of two servers
Not sure if this will work but I think the option referred to is not available on the newer versions. Try to add the Tomcat folder to the list of exclusions under the Auto-Protect menu. Doug - Original Message - From: Dola Woolfe [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Monday, February 14, 2005 12:21 PM Subject: RE: Tale of two servers Sorry for being dumb, but where is that option? Can't seem to find it. The Option categories I have are Auto-Protect Script Blocing Manual Scan Email Instant Messenger LiveUpdate Threat Categories Mescellaneous Thanks --- Peter Crowther [EMAIL PROTECTED] wrote: From: Dola Woolfe [mailto:[EMAIL PROTECTED] 3. Finally, and the most hopeful point, the better-but-slower server is running Norton virus services. Restarting the machine in safe mode (w/ networkin) solved the problem. Does this settle it? If so, what particular setting in Norton is responsible for this? Real-time scanning. Turn it off completely if you can; turn it off on your webapp and any application directory, plus your database files, if you can't. If your IT team insist that you run real-time scanning, insist that they buy you a big enough server to cope with their paranoia ;-). - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail - now with 250MB free storage. Learn more. http://info.mail.yahoo.com/mail_250 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat + SSL, apache
Didier McGillis wrote: Actually I believe its the opposite. Apache serves the certificate the communication between Tomcat and Apache shouldnt be public anyway. Apache makes the SSL handshake and passes any client certificate to Tomcat. Any servlet sees that like it came directly from Tomcat. Communication between apache and tomcat is not encrypted, so if you are concerned about the security, put the apache on the box with two NIC cards, and use the second for the apache-tomcat communication. AJP14 protocol will have encryption embedded, so until then :). Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tale of two servers
Dola Woolfe wrote: Thanks for all responses. I have some new info. 3. Finally, and the most hopeful point, the better-but-slower server is running Norton virus services. Restarting the machine in safe mode (w/ networkin) solved the problem. Does this settle it? If so, what particular setting in Norton is responsible for this? Antivirus software on a production system? You must be joking ;)! Are you reading emails on that box or what? You should consider restricting access to the box only to the authorized people, and have some sort of policy what sortware and for what pupose can be installed on that box. This will be the ultimate antivirus software thought. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tale of two servers
From: Mladen Turk [mailto:[EMAIL PROTECTED] Antivirus software on a production system? You must be joking ;)! rant Unfortunately not. All too often, corporate policy says that *all* boxes must have AV installed on them, and it is increasingly a sacking offence to disable it. The larger the corporation, it seems, the more likely that this is the policy. Yes, this is a knee-jerk reaction. No, I wouldn't expect it to change - in fact, I'd expect it to get worse as more middle managers play things 'safe'. So we'll get poorly-performing systems at best, and subtle errors that cost organisations millions of pounds at worst, as perfectly innocent filesystem accesses time out due to poor AV configuration. But, never mind, some manager has covered his/her ass, so everything's fine. /rant - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FW: Re: Missing application web.xml Tomcat 5.5.7
Hi, Where are you getting this $CatalinaRoot ? I don't see this env var set in catalina.sh. aka_sergio --- Joe Reger, Jr. [EMAIL PROTECTED] wrote: Hi All. I'm still having trouble with this issue. I'm not able to upload a .WAR file through the html web application manager but the same war manually exploded and placed into the /webapps directory works fine. I've included the web.xml to see if anybody can determine why Tomcat's rejecting it. I've Included the stdout log file. Some notes from the log4j tomcat debug file: Line 91: Tomcat has found the context.xml and moved it to $CatalinaRoot$\conf\Catalina\localhost\ROOT.xml Line 537: org.apache.catalina.core.StandardContext - Starting ROOT Line 7542: org.apache.catalina.startup.ContextConfig - Missing application web.xml, using defaults only Line 7744: org.apache.catalina.startup.HostConfig - Checking context[] redeploy resource C:\SuperFly\Tomcat 5.5\webapps\ROOT Line 7746: ContainerBackgroundProcessor[StandardEngine[Catalina]] org.apache.catalina.core.StandardContext - Stopping Line 7825: Delete C:\SuperFly\Tomcat 5.5\webapps\ROOT.war Here's what I see when I deploy: Click upload. Tomcat moves ROOT.war into $CatalinaRoot$\webapps\. Context.xml, from inside the .war file seen in $CatalinaRoot$\conf\localhost. Application appears in manager/html. A few seconds later the application dissappears and all files are deleted. The tomcat sample war file appears to be broken too : http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample/ I'm open to suggestions. More info below. Thanks, Joe _ From: Joe Reger, Jr. [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 02, 2005 11:58 AM To: 'tomcat-user@jakarta.apache.org' Subject: Re: Missing application web.xml Hi! I'm having problems with the Missing application web.xml error on dev machines running Windows XP,. Tomcat 5.5.7, Java 5.0. It happens when I try to deploy a war file by using the Manager app or by placing it in the /webapps directory. Here are some of the things I've done, each time trying to deploy the resulting WAR file with no success and the same error: 1) Completely emptied the /webapps directory (per Paul's success below). 2) Verified existence of web.xml inside WAR file. 3) Uninstalled ROOT app and verified file removal from /webapps directory. 4) Checked order of elements in web.xml to fit spec. 5) Validated web.xml in Intellij Idea against http://java.sun.com/dtd/web-app_2_3.dtd 6) Changed web-app tag from the sample web.xml in documentation to the one used in Manager app from 5.5.7 build: web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 7) Removed all comments and spaces from web.xml. When I unpack the WAR manually and place the unpacked files in /webapps the application works fine. Tomcat likes the web.xml, but it can't seem to find it inside of the WAR file. Incidentally, when I watch my /webapps directory during a Manager deploy, the ROOT.war file does appear for a few seconds. It appears that Tomcat is trying to find a web.xml inside of it, fails and then deletes the file. I use Ant to build the WAR file: jar jarfile=ROOT.war fileset dir=${files} excludes=**/*.java/ /jar Any help appreciated. Seen this on two development XP machines today. Best, Joe Reger ---Original Message I just wanted to follow up and get into the record what I think is the solution to the problem I asked about on 1/20. I turns out that the reason I was getting Missing application web.xml errors in my stdout.log was because of a problem that arose during the undeployment precipitated by my deployment of a new build. It appears (just based on Tomcat's behavior) that when you move a WAR file into the webapps directory, the first thing Tomcat tries to do is delete the old unpacked version. In my case, it failed to do that because (as I found) the servlet had open file handles to files inside the servlet's context directory. Windows XP doesn't let you delete files that it thinks are in use, and I suspect that is the trouble Tomcat was running into. Anyway, it deleted everything except those files, including the web.xml file, which it then reported as missing. When I modified my code to make sure the files were closed after being read, the problem went away. Well, I haven't had the fix in place long enough to be sure it has gone away, but at the very least it certainly seems to have helped a great deal, so I think the problem is solved. --Paul Lynch (eph1v3t8 @ mailblocks.com)
Re: Jakarta Tomcat Connector and IIS; no log being generated.
Yeah, it does have full access permission. Does the account under which the W3SVC is running has a 'Full Access' permission to the log path? Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to prevent multiple threads per session
I have a bit of a problem where deep in a servlet there is some synchronized code that is synchronized on an object in session. On a rare occasion, that code runs very slowly when a long report is running or a database slows. This causes the users of the application to keep clicking stop and refresh- thinking their request is going to run. Recently when the server stopped responding, I did a kill -3 and found almost all of the threads waiting for that synchronzied session object- meaning 1 user had managed to consume a large number of threads be click refresh. I realize that I could modify the code to fail out if it couldn't grab the monitor in a set period of time, but I'd prefer to cancel the thread that has no web browser endpoint associated with it- the one that holds the monitor and won't release it until its done with its query. Basically, if someone refreshes, I'd like to abort any threads they already have running- or simply allow tomcat to abort the processing when the threads endpoint goes away. Is there any way I can accomplish this? I'm using Tomcat 4.1.31 and Mod_jk2 on apache 2.0.52 Thanks, Byron == Byron Guernsey Senior Software Architect GE Consumer Industrial Systems (502) 452 - 5101
Re: Memory leak in tomcat 5.0.28
Marx, Mitchell E (Mitch), ALABS wrote: I see the bugzilla ID: http://issues.apache.org/bugzilla/show_bug.cgi?id=33368 Anyone know if this is present in Tomcat 4.1.30? This is now fixed in CVS for TC4. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tale of two servers
Hi, Proud to say I'm not going to cover my ass (if I don't have to :). But I remember there were some worms that hit your computer even if you didn't do anything on it. One day my non-av'ed computer just went down with SoBig, I think, while Norton caught it on all other computers. So perhaps it is a good idea even on servers with restricted access. Dola --- Peter Crowther [EMAIL PROTECTED] wrote: From: Mladen Turk [mailto:[EMAIL PROTECTED] Antivirus software on a production system? You must be joking ;)! rant Unfortunately not. All too often, corporate policy says that *all* boxes must have AV installed on them, and it is increasingly a sacking offence to disable it. The larger the corporation, it seems, the more likely that this is the policy. Yes, this is a knee-jerk reaction. No, I wouldn't expect it to change - in fact, I'd expect it to get worse as more middle managers play things 'safe'. So we'll get poorly-performing systems at best, and subtle errors that cost organisations millions of pounds at worst, as perfectly innocent filesystem accesses time out due to poor AV configuration. But, never mind, some manager has covered his/her ass, so everything's fine. /rant - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tale of two servers
On Mon, 14 Feb 2005 13:41:22 -0800 (PST), Dola Woolfe [EMAIL PROTECTED] wrote: Hi, Proud to say I'm not going to cover my ass (if I don't have to :). But I remember there were some worms that hit your computer even if you didn't do anything on it. One day my non-av'ed computer just went down with SoBig, I think, while Norton caught it on all other computers. So perhaps it is a good idea even on servers with restricted access. This is where you need to block ports and disable services on the servers that shouldn't be there plus if SoBig or another variety of virus/worm is getting on your network then the hole is elsewhere not on your server. Alternatively it makes a damn good business case to move your Tomcat over to Linux or a flavour of Unix. :) Regards, -- Jason Bainbridge KDE - Conquer Your Desktop - http://kde.org KDE Web Team - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Coldfusion MX 7 Tomcat
I am trying to configure Coldfusion J2EE with Tomcat on Mac OS X 10.3.8 I have successfully configured Tomcat and deployed CFMX J2EE. by placing the cfusion.war file in webapps My problem is that when i configure the cfusion app to be the context root, It will not process the .cfm pages. I tried renaming the default ROOT folder and changing cfusion.war to ROOT.war. At first it looks like it deployed correctly but when trying to open a .CFM page. I get nothing but a blank page. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple broken Tomcat Linux daemon instances with jsvc?
Hi all, Summary: Using jsvc may result in multiple running instances of the Tomcat servlet engine on the same machine with the same pid file. Is this an intended behavior? Background, Details: I intend to use Tomcat 5.5 in a commercial environment with multiple virtual hosts. It appears that when adding a virtual host, Tomcat needs to be re-started to recognize a new host entry in server.xml. Furthermore, something like jsvc (from the Apache Jakarta Commons Daemon project) must be used to call the servlet destroy() methods in order to have a controlled shutdown without losing data e.g. user sessions. Tomcat includes shell scripts that execute jsvc. I adapted such a script and added the parameter --pidfile as documented in http://jakarta.apache.org/commons/daemon/jsvc.html jsvc creates a pid file as expected, however it does not delete it when its process is killed. jsvc also creates multiple instances even if the pid file exists. Consequently, multiple instances of Tomcat may exist of which only one can be deleted via the pid file. I am trying to understand what I am missing here because I think that the described scenario is not acceptable in a professional environment. Or maybe further development is needed. Many thanks in advance for you comments. Bernard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem with context JDBCRealm
Hi, I'm trying to configure tomcat 5.5 with a context realm using FORM authentication. My login page works when the realm is part of the engine or host element of server.xml, but when I move it to the context element, I receive an error (in the log file) stating that no login configuration could be found. Does anyone know what this means, and how to solve it? Thanks, Curtis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wrapper.properties to command line
wrapper.properties is for the Jakarta NT service to construct a command line. Well and good. But I can't get a stack trace off it (either obviously [Ctrl-Esc], or with a tool (http://tmitevski.users.mcs2.netarray.com/stacktrace.jsp)). So I want to start it from the console. So, how do I figure out what my command line is? There are a whole heap of libraries, and I don't (didn't - no choice now) want to have to build it myself. Why is information not [easily] available (and how come nobody else has wanted it?). So, to summarise, is there a way to get a java command line out of wrapper.properties? Cheers Stephen
TC 5.0.28 AdminTool -- nodes under Tomcat Server throwing exceptions
TC 5.0.28 running out of the box, the admin tool works fine; tree view expands and all nodes are accessible. Trying to run the admin tool with my own (pared down) server.xml generates the following when clicking the Service (Catalina) node: javax.servlet.ServletException: Define tag cannot set a null value org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) admin.service.service_jsp._jspService(service_jsp.java:848) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 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:237) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) == I can click the handle and have the tree view expand ok, but clicking the node triggers the exception. The Logger and Valve nodes work OK. However, the Host (localhost) node and each Context (/xxx) node also kick: Host: 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:440) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Context: Error retrieving attribute debug
[OT] Re: tomcat hackers ...
Hello, I've been getting some things in my logs like ... Always good to see people reading their logs. 217.20.113.110 - - [13/Feb/2005:09:41:39 -0500] "GET You could look that IP address up, try either dig or nslookup (or on Mac OS X there iseven a GUI network utility with an easy interface to looking up domain names). /Myapp/../Myapp/../Myapp/../Myapp/../Myapp/../Myapp/../Myapp/../hosting.html If every /.. is balanced by a preceding /Myapp, that's going nowhere in particular fast. I'd explain it, but calculate the path out yourself. Then check it from outside, say, from your home box, just so you get comfortable with it. Try putting an extra ../ various places. If the path substring were 32Kbytes long or longer, you could guess it was an attempt at hiding a buffer overflow. Also, attempts at getting a shell on a MSWxxx box tend to end in command.com or something.lib, so it doesn't look like that. The one remaining danger, if /hosting.html is supposed to be restricted access, it might be an attempt to hide an access to it. HTTP/1.1" 200 5564 "-" "Mozilla/4.0 (compatible; MSIE 5.16; Mac_PowerPC)" Bleagh. Talk about a browser no one should be using any more, ... What is this guy getting from this ? Am I just paranoid or what ??? Like I say, you can always put the url together from your logs and try it from an external box to see. Paranoia is good. But you should follow up on it yourself. -- Joel Rees [EMAIL PROTECTED] digitcom, inc. 株式会社デジコム Kobe, Japan +81-78-672-8800 ** http://www.ddcom.co.jp ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tale of two servers
Proud to say I'm not going to cover my ass (if I don't have to :). Covering your backside is fine, just make sure you cover it with something appropriate and effective. But I remember there were some worms that hit your computer even if you didn't do anything on it. One day my non-av'ed computer just went down with SoBig, I think, while Norton caught it on all other computers. That's kind of like saying it's good to make everyone wear those 80+ pound suits of armor so you can leave the fort gate open. So perhaps it is a good idea even on servers with restricted access. Armor rusts, too: http://securityresponse.symantec.com and check the updates for Symantec. I understand anyone using Symantec products is being encouraged to be sure those updates are in place ASAP. Whether management wants to bog servers down with anti-v or not is their decision, but if they want to be good neighbors and good citizens, they need to hire or train someone who can set up correct firewalls and demilitarized zones, etc. -- Joel Rees [EMAIL PROTECTED] digitcom, inc. 株式会社デジコム Kobe, Japan +81-78-672-8800 ** http://www.ddcom.co.jp ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FW: Re: Missing application web.xml Tomcat 5.5.7
Hi, I'm just using that to represent the root tomcat installation directory. For me it's C:\Superfly\Tomcat 5.5\. For you it may be different. Are you having any trouble with the web.xml file when deployinga WAR through the manager app? Joe -Original Message- From: sven morales [mailto:[EMAIL PROTECTED] Sent: Monday, February 14, 2005 1:12 PM To: Tomcat Users List Subject: Re: FW: Re: Missing application web.xml Tomcat 5.5.7 Hi, Where are you getting this $CatalinaRoot ? I don't see this env var set in catalina.sh. aka_sergio --- Joe Reger, Jr. [EMAIL PROTECTED] wrote: Hi All. I'm still having trouble with this issue. I'm not able to upload a .WAR file through the html web application manager but the same war manually exploded and placed into the /webapps directory works fine. I've included the web.xml to see if anybody can determine why Tomcat's rejecting it. I've Included the stdout log file. Some notes from the log4j tomcat debug file: Line 91: Tomcat has found the context.xml and moved it to $CatalinaRoot$\conf\Catalina\localhost\ROOT.xml Line 537: org.apache.catalina.core.StandardContext - Starting ROOT Line 7542: org.apache.catalina.startup.ContextConfig - Missing application web.xml, using defaults only Line 7744: org.apache.catalina.startup.HostConfig - Checking context[] redeploy resource C:\SuperFly\Tomcat 5.5\webapps\ROOT Line 7746: ContainerBackgroundProcessor[StandardEngine[Catalina]] org.apache.catalina.core.StandardContext - Stopping Line 7825: Delete C:\SuperFly\Tomcat 5.5\webapps\ROOT.war Here's what I see when I deploy: Click upload. Tomcat moves ROOT.war into $CatalinaRoot$\webapps\. Context.xml, from inside the .war file seen in $CatalinaRoot$\conf\localhost. Application appears in manager/html. A few seconds later the application dissappears and all files are deleted. The tomcat sample war file appears to be broken too : http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample/ I'm open to suggestions. More info below. Thanks, Joe _ From: Joe Reger, Jr. [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 02, 2005 11:58 AM To: 'tomcat-user@jakarta.apache.org' Subject: Re: Missing application web.xml Hi! I'm having problems with the Missing application web.xml error on dev machines running Windows XP,. Tomcat 5.5.7, Java 5.0. It happens when I try to deploy a war file by using the Manager app or by placing it in the /webapps directory. Here are some of the things I've done, each time trying to deploy the resulting WAR file with no success and the same error: 1) Completely emptied the /webapps directory (per Paul's success below). 2) Verified existence of web.xml inside WAR file. 3) Uninstalled ROOT app and verified file removal from /webapps directory. 4) Checked order of elements in web.xml to fit spec. 5) Validated web.xml in Intellij Idea against http://java.sun.com/dtd/web-app_2_3.dtd 6) Changed web-app tag from the sample web.xml in documentation to the one used in Manager app from 5.5.7 build: web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 7) Removed all comments and spaces from web.xml. When I unpack the WAR manually and place the unpacked files in /webapps the application works fine. Tomcat likes the web.xml, but it can't seem to find it inside of the WAR file. Incidentally, when I watch my /webapps directory during a Manager deploy, the ROOT.war file does appear for a few seconds. It appears that Tomcat is trying to find a web.xml inside of it, fails and then deletes the file. I use Ant to build the WAR file: jar jarfile=ROOT.war fileset dir=${files} excludes=**/*.java/ /jar Any help appreciated. Seen this on two development XP machines today. Best, Joe Reger ---Original Message I just wanted to follow up and get into the record what I think is the solution to the problem I asked about on 1/20. I turns out that the reason I was getting Missing application web.xml errors in my stdout.log was because of a problem that arose during the undeployment precipitated by my deployment of a new build. It appears (just based on Tomcat's behavior) that when you move a WAR file into the webapps directory, the first thing Tomcat tries to do is delete the old unpacked version. In my case, it failed to do that because (as I found) the servlet had open file handles to files inside the servlet's context directory. Windows XP doesn't let you delete files that it thinks are in use, and I suspect that is the trouble Tomcat was running into. Anyway, it deleted everything except those files,
5.0.28 catalina.properties file
It appears that listing a specific jar file, as opposed to *.jar in a directory, doesn't work right in catalina.properties in 5.0.28. At least, I just converted a non-working to a working configuration by replacing a set of jar file pathnames with a pathname to x/*.jar where x is a dir containing the same two jars. This seems so unlikely that I don't want to go to bugzilla before giving someone a chance to give me some idea what I must have missed.
RE: 5.0.28 catalina.properties file
From: Benson Margulies [mailto:[EMAIL PROTECTED] Subject: 5.0.28 catalina.properties file I just converted a non-working to a working configuration by replacing a set of jar file pathnames with a pathname to x/*.jar where x is a dir containing the same two jars. How about posting your exact before and after config lines? What exactly was the result of attempting to use the non-working configuration? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FW: Re: Missing application web.xml Tomcat 5.5.7
Hi, Using $CATALINA_HOME and or $CATALINA_BASE is the more proper way to describe those directory references. No I am not having trouble with web.xml file when deploying a WAR file. I'm trying to assist you troubleshoot. Are you trying to deploy an additional ROOT.war? There is an existing ROOT context that came as stock installed and this will most likely conflict with the new one with same name you are trying to deploy. So either remove the existing one or rename your ROOT.war to another name. aka_sergio --- Joe Reger, Jr. [EMAIL PROTECTED] wrote: Hi, I'm just using that to represent the root tomcat installation directory. For me it's C:\Superfly\Tomcat 5.5\. For you it may be different. Are you having any trouble with the web.xml file when deployinga WAR through the manager app? Joe -Original Message- From: sven morales [mailto:[EMAIL PROTECTED] Sent: Monday, February 14, 2005 1:12 PM To: Tomcat Users List Subject: Re: FW: Re: Missing application web.xml Tomcat 5.5.7 Hi, Where are you getting this $CatalinaRoot ? I don't see this env var set in catalina.sh. aka_sergio --- Joe Reger, Jr. [EMAIL PROTECTED] wrote: Hi All. I'm still having trouble with this issue. I'm not able to upload a .WAR file through the html web application manager but the same war manually exploded and placed into the /webapps directory works fine. I've included the web.xml to see if anybody can determine why Tomcat's rejecting it. I've Included the stdout log file. Some notes from the log4j tomcat debug file: Line 91: Tomcat has found the context.xml and moved it to $CatalinaRoot$\conf\Catalina\localhost\ROOT.xml Line 537: org.apache.catalina.core.StandardContext - Starting ROOT Line 7542: org.apache.catalina.startup.ContextConfig - Missing application web.xml, using defaults only Line 7744: org.apache.catalina.startup.HostConfig - Checking context[] redeploy resource C:\SuperFly\Tomcat 5.5\webapps\ROOT Line 7746: ContainerBackgroundProcessor[StandardEngine[Catalina]] org.apache.catalina.core.StandardContext - Stopping Line 7825: Delete C:\SuperFly\Tomcat 5.5\webapps\ROOT.war Here's what I see when I deploy: Click upload. Tomcat moves ROOT.war into $CatalinaRoot$\webapps\. Context.xml, from inside the .war file seen in $CatalinaRoot$\conf\localhost. Application appears in manager/html. A few seconds later the application dissappears and all files are deleted. The tomcat sample war file appears to be broken too : http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample/ I'm open to suggestions. More info below. Thanks, Joe _ From: Joe Reger, Jr. [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 02, 2005 11:58 AM To: 'tomcat-user@jakarta.apache.org' Subject: Re: Missing application web.xml Hi! I'm having problems with the Missing application web.xml error on dev machines running Windows XP,. Tomcat 5.5.7, Java 5.0. It happens when I try to deploy a war file by using the Manager app or by placing it in the /webapps directory. Here are some of the things I've done, each time trying to deploy the resulting WAR file with no success and the same error: 1) Completely emptied the /webapps directory (per Paul's success below). 2) Verified existence of web.xml inside WAR file. 3) Uninstalled ROOT app and verified file removal from /webapps directory. 4) Checked order of elements in web.xml to fit spec. 5) Validated web.xml in Intellij Idea against http://java.sun.com/dtd/web-app_2_3.dtd 6) Changed web-app tag from the sample web.xml in documentation to the one used in Manager app from 5.5.7 build: web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 7) Removed all comments and spaces from web.xml. When I unpack the WAR manually and place the unpacked files in /webapps the application works fine. Tomcat likes the web.xml, but it can't seem to find it inside of the WAR file. Incidentally, when I watch my /webapps directory during a Manager deploy, the ROOT.war file does appear for a few seconds. It appears that Tomcat is trying to find a web.xml inside of it, fails and then deletes the file. I use Ant to build the WAR file: jar jarfile=ROOT.war fileset dir=${files} excludes=**/*.java/ /jar Any help appreciated. Seen this on two development XP machines today. Best, Joe Reger ---Original Message I just wanted to follow up and get into the record what I think is the solution to the problem I asked
Re: TC 5.0.28 AdminTool -- nodes under Tomcat Server throwing exceptions
Hi, Can you post the pared down server.xml? The stock server.xml is mostly comments anyways, so which elements did you remove to cause these exceptions? aka_sergio --- Robert Hunt [EMAIL PROTECTED] wrote: TC 5.0.28 running out of the box, the admin tool works fine; tree view expands and all nodes are accessible. Trying to run the admin tool with my own (pared down) server.xml generates the following when clicking the Service (Catalina) node: javax.servlet.ServletException: Define tag cannot set a null value org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) admin.service.service_jsp._jspService(service_jsp.java:848) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 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:237) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) == I can click the handle and have the tree view expand ok, but clicking the node triggers the exception. The Logger and Valve nodes work OK. However, the Host (localhost) node and each Context (/xxx) node also kick: Host: 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:440) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Context: Error retrieving attribute debug __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to prevent multiple threads per session
Hi, Filters. There was a filter code developed by Ivelin Ivanov and Kevin Chipalkowsky that maybe be applicable to your needs. It is called RequestControlFilter. If a user makes two request, A and B then A will be processed first while B waits. When A finishes, B will be processed. If a user makes three or more requests ( e.g. A, B, and C) then the first will be processed (A), and then the after it finishes the last will be processed (C), and any intermediate requests will be skipped (B). aka_sergio --- Guernsey, Byron (GE Consumer Industrial) [EMAIL PROTECTED] wrote: I have a bit of a problem where deep in a servlet there is some synchronized code that is synchronized on an object in session. On a rare occasion, that code runs very slowly when a long report is running or a database slows. This causes the users of the application to keep clicking stop and refresh- thinking their request is going to run. Recently when the server stopped responding, I did a kill -3 and found almost all of the threads waiting for that synchronzied session object- meaning 1 user had managed to consume a large number of threads be click refresh. I realize that I could modify the code to fail out if it couldn't grab the monitor in a set period of time, but I'd prefer to cancel the thread that has no web browser endpoint associated with it- the one that holds the monitor and won't release it until its done with its query. Basically, if someone refreshes, I'd like to abort any threads they already have running- or simply allow tomcat to abort the processing when the threads endpoint goes away. Is there any way I can accomplish this? I'm using Tomcat 4.1.31 and Mod_jk2 on apache 2.0.52 Thanks, Byron == Byron Guernsey Senior Software Architect GE Consumer Industrial Systems (502) 452 - 5101 __ Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. http://info.mail.yahoo.com/mail_250 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Jakarta Tomcat Connector and IIS; no log being generated.
Hello! I have another workaround on connecting tomcat and iis... I used shiftomat. download the file and install it... it will automatically configure your system hasle free. http://www.shiftomat.com/opensource/ Aris -Original Message- From: John Gordon [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 12:14 AM To: tomcat-user@jakarta.apache.org Subject: Jakarta Tomcat Connector and IIS; no log being generated. I'm having a bit of trouble getting isapi_redirect.dll to work and generate a log. If anyone can see what step I'm missing please let me know. I have done the following. I am running a Windows Server 2003. My Tomcat version is 5.0.28. My IIS version is 6.0. 1.. In the registry I created a new registry key named HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi Redirector\1.0 2.. Added a string value with the name extension_uri and a value of the full path to the folder containing isap_redirect.dll 3.. Added a string value with the name log_file and a value pointing to my jakarta logs directory. 4.. Added a string value with the name log_level and a value of debug 5.. Added a string value with the name worker_file and a value which is the full path to my workers.properties file 6.. Added a string value with the name worker_mount_file and a value which is the full path to my uriworkermap.properties file 7.. Using the IIS management console, added a new virtual directory to my IIS web site. The name of the virtual directory is jakarta. Its physical path is the directory where I placed isapi_redirect.dll. Assigned it with execute access. 8.. Using the IIS management console, added isapi_redirect.dll as a filter in my IIS web site. Named it jakarta and set its executable to the full path to isapi_redirect.dll. 9.. Edited Filter DLLs key under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W3SVC\Parameters. Inserted the full path to isapi_redirect.dll. The green arrow showing activity in IIS is active for the filter. Nothing comes up when going to http://localhost/example/Menu My tomcat servlet comes up when going to http://localhost:8080/example/Menu My workers.properties file has worker.ajp13w.host=localhost worker.ajp13w.port=8009 worker.ajp13w.type=ajp13 My uriworkermap.properties file has /example/*=ajp13w I get no logs file in the location i placed the log file or anywhere else on my system for isapi. Thanks for any help. John Gordon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
VB: SV: Build a portal
Hi! I'm sorry for not being clear in my question. I have dynamic content, much are info-screens that should be visible all the time. Since these info-screens are from different webapps i'm having trouble to combine them into one page. If I read you correctly you are only speeking about static content and not dynmaic content? Perhaps there are some other product that could handle this problem? Thanks in advance Roland Carlsson Den 05-02-14 16.07, skrev Jason Bainbridge [EMAIL PROTECTED]: On Mon, 14 Feb 2005 14:39:57 +0100, Roland Carlsson [EMAIL PROTECTED] wrote: Hi! I have built an intranet for a while now and have build everything in small discrete parts that are quite independat of each other. Using the Single sign on valve made it easy to integrate the parts and since we are using a frameset the menus wasn't a problem. Now we are going to replace our frameset with includes and now I forsee a pain in the neck keeping look and feel consistent since I don't have the framset but have to keep a copy of the common components in every web-app. I am really hoping that I have missed something but isn't there a way to have common components in one place only? Not really a Tomcat question and it isn't very clear exactly what you are after but I am guessing you might want to use something like the ROOT webapp to store all the common static files and then you can refer to them with absolute links like href=/media/images/logo.gif Regards, -- Jason Bainbridge KDE - Conquer Your Desktop - http://kde.org KDE Web Team - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SV: Build a portal
p align=leftbfont face=Arial size=2GFI MailSecurity's HTML threat engine found HTML scripts in this email and has disabled them./font/b/pHi! You can make use of Windows Sharepoint Portal Server. But that's too expensive... If you know how to use XFRAME!-- and DIV then you can combine all your webapps into one webapp.. =) and make it somewhat like a dashboard... =) Aris -Original Message- From: Roland Carlsson [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 3:06 PM To: TomcatUsers Subject: VB: SV: Build a portal Hi! I'm sorry for not being clear in my question. I have dynamic content, much are info-screens that should be visible all the time. Since these info-screens are from different webapps i'm having trouble to combine them into one page. If I read you correctly you are only speeking about static content and not dynmaic content? Perhaps there are some other product that could handle this problem? Thanks in advance Roland Carlsson Den 05-02-14 16.07, skrev Jason Bainbridge [EMAIL PROTECTED]: On Mon, 14 Feb 2005 14:39:57 +0100, Roland Carlsson [EMAIL PROTECTED] wrote: Hi! I have built an intranet for a while now and have build everything in small discrete parts that are quite independat of each other. Using the Single sign on valve made it easy to integrate the parts and since we are using a frameset the menus wasn't a problem. Now we are going to replace our frameset with includes and now I forsee a pain in the neck keeping look and feel consistent since I don't have the framset but have to keep a copy of the common components in every web-app. I am really hoping that I have missed something but isn't there a way to have common components in one place only? Not really a Tomcat question and it isn't very clear exactly what you are after but I am guessing you might want to use something like the ROOT webapp to store all the common static files and then you can refer to them with absolute links like href=/media/images/logo.gif Regards, -- Jason Bainbridge KDE - Conquer Your Desktop - http://kde.org KDE Web Team - [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: SV: Build a portal
You can make use of Windows Sharepoint Portal Server. But that's too expensive... If you know how to use IFRAME and DIV then you can combine all your webapps into one webapp.. =) and make it somewhat like a dashboard... =) Aris -Original Message- From: Roland Carlsson [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 3:06 PM To: TomcatUsers Subject: VB: SV: Build a portal Hi! I'm sorry for not being clear in my question. I have dynamic content, much are info-screens that should be visible all the time. Since these info-screens are from different webapps i'm having trouble to combine them into one page. If I read you correctly you are only speeking about static content and not dynmaic content? Perhaps there are some other product that could handle this problem? Thanks in advance Roland Carlsson Den 05-02-14 16.07, skrev Jason Bainbridge [EMAIL PROTECTED]: On Mon, 14 Feb 2005 14:39:57 +0100, Roland Carlsson [EMAIL PROTECTED] wrote: Hi! I have built an intranet for a while now and have build everything in small discrete parts that are quite independat of each other. Using the Single sign on valve made it easy to integrate the parts and since we are using a frameset the menus wasn't a problem. Now we are going to replace our frameset with includes and now I forsee a pain in the neck keeping look and feel consistent since I don't have the framset but have to keep a copy of the common components in every web-app. I am really hoping that I have missed something but isn't there a way to have common components in one place only? Not really a Tomcat question and it isn't very clear exactly what you are after but I am guessing you might want to use something like the ROOT webapp to store all the common static files and then you can refer to them with absolute links like href=/media/images/logo.gif Regards, -- Jason Bainbridge KDE - Conquer Your Desktop - http://kde.org KDE Web Team - [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]