RE: ROOT/index.jsp- REASON WHY EDITING FAILS
I have been experimenting with precompiling my jsp's on Tomcat 5 and have a few questions. Most of my questions are based on the information on: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html 1) What is the difference between using the jspc target (with compile=true) as opposed to using the compile target? Are there any pros or cons to each method and which is the preferred way? 2) Once my jsp pages are precompiled I am left with .class files. What are the pros or cons of deploying these directly to CATALINA_HOME/work/Catalina/localhost/${webapp} instead of putting the .class files into WEB-INF/classes and then mapping all the servlets in web.xml? I actually like the fact that when you put them into the work directory, you can still modify the .jsp files in the webapp and have them recompile which is not possible in the second method. Thanks, Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5 clustering question...
We have a developed an large scale application that is clustered using WebLogic. I have been exploring getting the app clustered on Tomcat as a learning experience and to possibly sway the management away from WebLogic. I have Tomcat 5.0.19 set up with the latest production version of Apache using mod_jk. I have one Tomcat instance configured to use port 8080 and another on 9090 on a RedHat 9.0 box. I am setting LD_ASSUME_KERNEL to 2.4. No error messages are displayed during startup. I have done enough testing to feel confident in the Apache/jk_mod/tomcat configuration. For example, I can use Tomcat's included SessionExample to go to host:8080 and enter a session variable, and when I then go to host:9090 the variable is displayed along with the correct session id. The session has .worker1 appended to the end of the string. I can add variables and bounce back and forth (through apache, 8080, and 9090 url's) and all variables are displayed correctly with the same session id. This indicates to me that the two clusters are aware of each other and are passing session information back and forth. I can confirm this in the catalina.out log. In our app the web.xml contains the distributable/ tag and both Tomcat instances have the useDirtyFlag set to false. Now, when I log into our app and start driving around I receive several of the following exception: Apr 14, 2004 10:15:29 AM org.apache.catalina.cluster.session.DeltaManager messageReceived SEVERE: Unable to receive message through TCP channel java.lang.ClassNotFoundException: com.mycompany.ourapp.common.model.ReturnPolicy at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:891) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader .java:756) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:219) at java.io.ObjectInputStream.resolveProxyClass(ObjectInputStream.java:630) at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1469) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1432) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) at org.apache.catalina.cluster.session.DeltaRequest$AttributeInfo.readExternal( DeltaRequest.java:335) at org.apache.catalina.cluster.session.DeltaRequest.readExternal(DeltaRequest.j ava:247) at org.apache.catalina.cluster.session.DeltaManager.loadDeltaRequest(DeltaManag er.java:420) at org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaManage r.java:921) at org.apache.catalina.cluster.session.DeltaManager.messageDataReceived(DeltaMa nager.java:794) at org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(SimpleT cpCluster.java:561) at org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:117) at org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplica tionThread.java:176) at org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThrea d.java:114 I have looked in our deployed .war and that class does exist. There appears to be no ryme or reason as to when the exception is thrown - it seems random with no pattern. Can anyone give me more information on what causes this exception? Any ideas? Also, when I then shutdown an instance and click on a link within the app (attempting to cause the Apache to swith over to another worker), I'm logged out of the app and the following exception is thrown: Apr 14, 2004 10:16:10 AM org.apache.catalina.cluster.session.DeltaSession tellNew SEVERE: Session event listener threw exception java.lang.IllegalStateException: getAttribute: Session already invalidated at org.apache.catalina.cluster.session.DeltaSession.getAttribute(DeltaSession.j ava:1054) at org.apache.catalina.cluster.session.DeltaSessionFacade.getAttribute(DeltaSes sionFacade.java:157) at
re: Tomcat 5 clustering question...
I was looking at the wrong part of my log from some earlier testing. On startup the two clusters are correctly transferring the state for my app: INFO: Processing Context configuration file URL ... Apr 14, 2004 10:43:50 AM org.apache.catalina.cluster.session.DeltaManager start INFO: Starting clustering manager...:/ourapp Apr 14, 2004 10:43:50 AM org.apache.catalina.cluster.session.DeltaManager start WARNING: Manager[/ourapp], requesting session state from org.apache.catalina.cluster.mcast.McastMember[tcp://127.0.0.1:4001,127.0.0.1 ,4001, alive=132536]. This operation will timeout if no session state has been received within 60 seconds Apr 14, 2004 10:43:50 AM org.apache.catalina.cluster.session.DeltaManager start INFO: Manager[/ourapp], session state received in 103 ms. Also, the class not found exception I described from my previous post does exist and does implement Serializable. Thanks, Eric - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]