Default encoding in tomcat 5.5.29
Dear users, could you please advice me what is a default encoding in tomcat 5.5.29: I have found two links but I am not sure what is correct: - http://www.velocityreviews.com/forums/t130011-tomcat-5-default-encoding.html - http://wiki.apache.org/tomcat/FAQ/CharacterEncoding#Q1 Is the default encoding ISO8859-1 or UTF-8? -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with shutting down tomcat5.5.29
What I see in the start.log file is: 2012-04-05 15:28:04,557 [main] INFO org.apache.coyote.http11.Http11BaseProtocol - Initializing Coyote HTTP/1.1 on http-8080 2012-04-05 15:28:04,560 [main] INFO org.apache.catalina.startup.Catalina - Initialization processed in 1062 ms 2012-04-05 15:28:04,727 [main] INFO org.apache.catalina.core.StandardService - Starting service Catalina 2012-04-05 15:28:04,731 [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet Engine: Apache Tomcat/5.5.27 2012-04-05 15:28:04,743 [main] INFO org.apache.catalina.core.StandardHost - XML validation disabled 2012-04-05 15:28:06,229 [main] INFO org.apache.catalina.loader.WebappClassLoader - validateJarFile(/opt/repgen/servlet/WEB-INF/lib/servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class 2012-04-05 15:28:06,312 [main] INFO org.apache.coyote.http11.Http11BaseProtocol - Starting Coyote HTTP/1.1 on http-8080 2012-04-05 15:28:06,423 [main] INFO org.apache.jk.common.ChannelSocket - JK: ajp13 listening on /127.0.0.1:8009 2012-04-05 15:28:06,425 [main] INFO org.apache.jk.server.JkMain - Jk running ID=0 time=0/15 config=null 2012-04-05 15:28:06,453 [main] INFO org.apache.catalina.storeconfig.StoreLoader - Find registry server-registry.xml at classpath resource 2012-04-05 15:28:06,514 [main] INFO org.apache.catalina.startup.Catalina - Server startup in 1954 ms Here is mention ajp13. It is not correct one, right? Is it possible that during the shutting down of tomcat5 stopping operation will take more then 2 minutes? When I am commented out Listener section then during the stopping tomcat5 Failed is not mentioned but in stop.log file Exception is still there. How to avoid that Exception message will not be there? best reagrds Petr Dne 5. dubna 2012 14:19 Konstantin Kolinko knst.koli...@gmail.com napsal(a): 2012/4/5 Petr Hracek phrac...@gmail.com: Dear all, I now that I am using pretty old version of tomcat5, but I have a tricky problem. On the server is run apache2.2.21 and tomcat5 together. tomcat5 is used only as servlet container and not web server. Both are connected together over AJP1.3 interface. In configuration file of apache2 is mentioned: ProxyPass /appl1 ajp://localhost:8009/appl1 ProxyPassReverse /appl1 ajp://localhost:8009/appl1 During the stopping of tomcat5 I can see in log files: /var/log/tomcat5/base/catalina.out: 2012-04-05 11:56:17,492 [main] INFO org.apache.coyote.http11.Http11BaseProtocol - Pausing Coyote HTTP/1.1 on http-8080 2012-04-05 11:56:18,495 [main] INFO org.apache.catalina.core.StandardService - Stopping service Catalina 2012-04-05 11:56:18,520 [main] INFO org.apache.coyote.http11.Http11BaseProtocol - Stopping Coyote HTTP/1.1 on http-8080 2012-04-05 11:56:18,521 [main] INFO org.apache.catalina.core.AprLifecycleListener - Failed shutdown of Apache Portable Runtime Tomcat-Native shared library failed to shut down. I do not know why. Did it start? Do you use Apr versions of Tomcat connectors? (You will see that when Tomcat starts). If you no not need it you can comment away the AprLifecycleListener in server.xml. I do not remember whether there were some specific issues in 5.5.29 - you may look at the changelog. The message really does not matter much if you shut down Tomcat as a whole. /var/log/tomcat5/base/stop.log Using CATALINA_BASE: /srv/www/tomcat5/base/ Using CATALINA_HOME: /usr/share/tomcat5 Using CATALINA_TMPDIR: /srv/www/tomcat5/base//temp Using JRE_HOME: /usr/lib/jvm/java 2012-04-05 11:56:19,282 [main] ERROR org.apache.catalina.startup.Catalina - Catalina.stop: java.net.ConnectException: Connection refused Attempt to stop Tomcat that is already stopped (and thus do not listen on the shutdown port anymore). at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.init(Unknown Source) at java.net.Socket.init(Unknown Source) at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435) in server.xml file are used tags: Listener className=org.apache.catalina.core.AprLifecycleListener / Listener className
Re: Catalina.policy file for security option
I have move during the starting of catalina in security nd now I am in the stage that in catalina.out log files I have: access: access allowed (java.io.FilePermission /usr/share/tomcat5/common/classes/log4j.properties read) access: access denied (java.io.FilePermission /usr/share/tomcat5/common/classes/log4j.properties read) access: access denied (javax.management.MBeanPermission org.apache.commons.modeler.BaseModelMBean#-[Catalina:J2EEApplication=none,J2EEServer=none,j2eeType=WebModule,name=//localhost/PM] registerMBean) access: access allowed (java.lang.RuntimePermission setContextClassLoader) access: access denied (javax.management.MBeanPermission org.apache.commons.modeler.BaseModelMBean#-[Catalina:J2EEApplication=none,J2EEServer=none,j2eeType=WebModule,name=//localhost/PM] registerMBean) access: access allowed (java.io.FilePermission /usr/share/tomcat5/server/lib/catalina.jar read) access: access denied (java.io.FilePermission /usr/share/tomcat5/server/lib/catalina.jar read) access: access denied (javax.management.MBeanPermission org.apache.commons.modeler.BaseModelMBean#-[null:port=8080,type=ProtocolHandler] registerMBean) access: access allowed (java.net.SocketPermission localhost:8080 listen,resolve) access: access allowed (java.lang.RuntimePermission shutdownHooks) access: access allowed (java.net.SocketPermission localhost:8005 listen,resolve) access: access allowed (java.lang.RuntimePermission exitVM.1) access: access allowed (java.lang.RuntimePermission shutdownHooks) access: access allowed (java.util.logging.LoggingPermission control) But in output lsof -i | grep java is not mentioned and tomcat. Dne 8. listopadu 2011 14:15 Petr Hracek phrac...@gmail.com napsal(a): When I have set CATALINA_OPTS to: linux:/var/log/tomcat5/base # echo $CATALINA_OPTS -Djava.security.debug=all linux:/var/log/tomcat5/base # in log I see: domain 1 ProtectionDomain CodeSource=CodeSource, url=file:/usr/share/tomcat5/bin/bootstrap.jar, no certificates ClassLoader=sun.misc.Launcher$AppClassLoader@8e208e2 no principals Permissions: static: java.security.Permissions@8930893 ( (java.io.FilePermission /usr/share/tomcat5/bin/bootstrap.jar read) (java.lang.RuntimePermission exitVM) ) Dne 8. listopadu 2011 13:51 Petr Hracek phrac...@gmail.com napsal(a): Yes the tomcat should be run as a back-end server (AJP) with apache2-2.2.21. I have add to the catalina.policy following permission: permission javax.management.MBeanServerPermission createMBeanServer; permission javax.management.MBeamPermission com.javamonitor.mbeans.*,*; permission javax.management.MBeanTrustPermission register; permission javax.management.MBeanServerPermission findMBeanServer; permission java.net.SocketPermission java-monitor.com:80, connect; permission java.net.SocketPermission java-monitor.com:80, resolve; In the log of catalina.out I see: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded). log4j:WARN Please initialize the log4j system properly. But as in ps -ef | grep java and lsof -i | grep java I did not see any 8009 and 8005 port or even that tomcat5 is not starting. Where could be a problem? Dne 7. listopadu 2011 12:29 André Warnier a...@ice-sa.com napsal(a): Petr Hracek wrote: Dear tomcat users, I have try to configure my really old tomcat5 configuration (for using -security). but tomcat is not running. Petr, can you be a bit more specific ? what is not running ? does it start ? does it crash after starting ? is it just not answering requests ? are there error messages anywhere ? On my system tomcat5 is run only as servlet engine and not as web server. Do you mean for example that it runs as a back-end server (through AJP e.g.), with a front-end webserver serving all static content ? Do you have any example catalina.policy file? My catalina.policy file is: // == SYSTEM CODE PERMISSIONS = // These permissions apply to javac grant codeBase file:${java.home}/lib/- { permission java.security.AllPermission; }; // These permissions apply to all shared system extensions grant codeBase file:${java.home}/jre/lib/ext/- { permission java.security.AllPermission; }; // These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre grant codeBase file:${java.home}/../lib/- { permission java.security.AllPermission; }; // These permissions apply to all shared system extensions when // ${java.home} points at $JAVA_HOME/jre grant codeBase file:${java.home}/lib/ext/- { permission java.security.AllPermission; }; // == CATALINA CODE PERMISSIONS === // These permissions apply to the launcher code grant codeBase file:${catalina.home}/bin/commons-launcher.jar { permission java.security.AllPermission; }; // These permissions apply
Re: Catalina.policy file for security option
Yes the tomcat should be run as a back-end server (AJP) with apache2-2.2.21. I have add to the catalina.policy following permission: permission javax.management.MBeanServerPermission createMBeanServer; permission javax.management.MBeamPermission com.javamonitor.mbeans.*,*; permission javax.management.MBeanTrustPermission register; permission javax.management.MBeanServerPermission findMBeanServer; permission java.net.SocketPermission java-monitor.com:80, connect; permission java.net.SocketPermission java-monitor.com:80, resolve; In the log of catalina.out I see: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded). log4j:WARN Please initialize the log4j system properly. But as in ps -ef | grep java and lsof -i | grep java I did not see any 8009 and 8005 port or even that tomcat5 is not starting. Where could be a problem? Dne 7. listopadu 2011 12:29 André Warnier a...@ice-sa.com napsal(a): Petr Hracek wrote: Dear tomcat users, I have try to configure my really old tomcat5 configuration (for using -security). but tomcat is not running. Petr, can you be a bit more specific ? what is not running ? does it start ? does it crash after starting ? is it just not answering requests ? are there error messages anywhere ? On my system tomcat5 is run only as servlet engine and not as web server. Do you mean for example that it runs as a back-end server (through AJP e.g.), with a front-end webserver serving all static content ? Do you have any example catalina.policy file? My catalina.policy file is: // == SYSTEM CODE PERMISSIONS = // These permissions apply to javac grant codeBase file:${java.home}/lib/- { permission java.security.AllPermission; }; // These permissions apply to all shared system extensions grant codeBase file:${java.home}/jre/lib/ext/- { permission java.security.AllPermission; }; // These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre grant codeBase file:${java.home}/../lib/- { permission java.security.AllPermission; }; // These permissions apply to all shared system extensions when // ${java.home} points at $JAVA_HOME/jre grant codeBase file:${java.home}/lib/ext/- { permission java.security.AllPermission; }; // == CATALINA CODE PERMISSIONS === // These permissions apply to the launcher code grant codeBase file:${catalina.home}/bin/commons-launcher.jar { permission java.security.AllPermission; }; // These permissions apply to the daemon code grant codeBase file:${catalina.home}/bin/commons-daemon.jar { permission java.security.AllPermission; }; // These permissions apply to the commons-logging API grant codeBase file:${catalina.home}/bin/commons-logging-api-1.1.1.jar { permission java.security.AllPermission; }; // These permissions apply to the server startup code grant codeBase file:${catalina.home}/bin/bootstrap.jar { permission java.security.AllPermission; }; // These permissions apply to the JMX server grant codeBase file:${catalina.home}/bin/jmx.jar { permission java.security.AllPermission; }; // These permissions apply to JULI grant codeBase file:${catalina.home}/bin/tomcat-juli.jar { permission java.util.PropertyPermission java.util.logging.config.class, read; permission java.util.PropertyPermission java.util.logging.config.file, read; permission java.io.FilePermission ${java.home}${file.separator}lib${file.separator}logging.properties, read; permission java.lang.RuntimePermission shutdownHooks; permission java.io.FilePermission ${catalina.base}${file.separator}conf${file.separator}logging.properties, read; permission java.util.PropertyPermission catalina.base, read; permission java.util.logging.LoggingPermission control; permission java.io.FilePermission ${catalina.base}${file.separator}logs, read, write; permission java.io.FilePermission ${catalina.base}${file.separator}logs${file.separator}*, read, write; permission java.lang.RuntimePermission getClassLoader; // To enable per context logging configuration, permit read access to the appropriate file. // Be sure that the logging configuration is secure before enabling such access // eg for the examples web application: // permission java.io.FilePermission ${catalina.base}${file.separator}webapps${file.separator}examples${file.separator}WEB-INF${file.separator}classes${file.separator}logging.properties, read; }; // These permissions apply to the servlet API classes // and those that are shared across all class loaders // located in the common directory grant codeBase file:${catalina.home}/common/- { permission java.security.AllPermission; }; // These permissions
Re: Catalina.policy file for security option
When I have set CATALINA_OPTS to: linux:/var/log/tomcat5/base # echo $CATALINA_OPTS -Djava.security.debug=all linux:/var/log/tomcat5/base # in log I see: domain 1 ProtectionDomain CodeSource=CodeSource, url=file:/usr/share/tomcat5/bin/bootstrap.jar, no certificates ClassLoader=sun.misc.Launcher$AppClassLoader@8e208e2 no principals Permissions: static: java.security.Permissions@8930893 ( (java.io.FilePermission /usr/share/tomcat5/bin/bootstrap.jar read) (java.lang.RuntimePermission exitVM) ) Dne 8. listopadu 2011 13:51 Petr Hracek phrac...@gmail.com napsal(a): Yes the tomcat should be run as a back-end server (AJP) with apache2-2.2.21. I have add to the catalina.policy following permission: permission javax.management.MBeanServerPermission createMBeanServer; permission javax.management.MBeamPermission com.javamonitor.mbeans.*,*; permission javax.management.MBeanTrustPermission register; permission javax.management.MBeanServerPermission findMBeanServer; permission java.net.SocketPermission java-monitor.com:80, connect; permission java.net.SocketPermission java-monitor.com:80, resolve; In the log of catalina.out I see: log4j:WARN No appenders could be found for logger (org.apache.catalina.startup.Embedded). log4j:WARN Please initialize the log4j system properly. But as in ps -ef | grep java and lsof -i | grep java I did not see any 8009 and 8005 port or even that tomcat5 is not starting. Where could be a problem? Dne 7. listopadu 2011 12:29 André Warnier a...@ice-sa.com napsal(a): Petr Hracek wrote: Dear tomcat users, I have try to configure my really old tomcat5 configuration (for using -security). but tomcat is not running. Petr, can you be a bit more specific ? what is not running ? does it start ? does it crash after starting ? is it just not answering requests ? are there error messages anywhere ? On my system tomcat5 is run only as servlet engine and not as web server. Do you mean for example that it runs as a back-end server (through AJP e.g.), with a front-end webserver serving all static content ? Do you have any example catalina.policy file? My catalina.policy file is: // == SYSTEM CODE PERMISSIONS = // These permissions apply to javac grant codeBase file:${java.home}/lib/- { permission java.security.AllPermission; }; // These permissions apply to all shared system extensions grant codeBase file:${java.home}/jre/lib/ext/- { permission java.security.AllPermission; }; // These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre grant codeBase file:${java.home}/../lib/- { permission java.security.AllPermission; }; // These permissions apply to all shared system extensions when // ${java.home} points at $JAVA_HOME/jre grant codeBase file:${java.home}/lib/ext/- { permission java.security.AllPermission; }; // == CATALINA CODE PERMISSIONS === // These permissions apply to the launcher code grant codeBase file:${catalina.home}/bin/commons-launcher.jar { permission java.security.AllPermission; }; // These permissions apply to the daemon code grant codeBase file:${catalina.home}/bin/commons-daemon.jar { permission java.security.AllPermission; }; // These permissions apply to the commons-logging API grant codeBase file:${catalina.home}/bin/commons-logging-api-1.1.1.jar { permission java.security.AllPermission; }; // These permissions apply to the server startup code grant codeBase file:${catalina.home}/bin/bootstrap.jar { permission java.security.AllPermission; }; // These permissions apply to the JMX server grant codeBase file:${catalina.home}/bin/jmx.jar { permission java.security.AllPermission; }; // These permissions apply to JULI grant codeBase file:${catalina.home}/bin/tomcat-juli.jar { permission java.util.PropertyPermission java.util.logging.config.class, read; permission java.util.PropertyPermission java.util.logging.config.file, read; permission java.io.FilePermission ${java.home}${file.separator}lib${file.separator}logging.properties, read; permission java.lang.RuntimePermission shutdownHooks; permission java.io.FilePermission ${catalina.base}${file.separator}conf${file.separator}logging.properties, read; permission java.util.PropertyPermission catalina.base, read; permission java.util.logging.LoggingPermission control; permission java.io.FilePermission ${catalina.base}${file.separator}logs, read, write; permission java.io.FilePermission ${catalina.base}${file.separator}logs${file.separator}*, read, write; permission java.lang.RuntimePermission getClassLoader; // To enable per context logging configuration, permit read access to the appropriate file. // Be sure
Catalina.policy file for security option
pattern=common resolveHosts=false/ -- !-- Valve className=org.apache.catalina.valves.FastCommonAccessLogValve directory=logs prefix=localhost_access_log. suffix=.txt pattern=common resolveHosts=false/ -- /Host /Engine /Service /Server Thank you in advance. If any logs will be need I can provide of course. -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
How to start tomcat5 with -security
) at java.security.AccessController.doPrivileged(Native Method) at java.util.logging.LogManager.clinit(Unknown Source) at java.util.logging.Logger.getLogger(Unknown Source) at com.sun.jmx.remote.util.ClassLogger.init(Unknown Source) at javax.management.NotificationBroadcasterSupport.clinit(Unknown Source) at javax.management.MBeanServerDelegate.init(Unknown Source) at com.sun.jmx.mbeanserver.MBeanServerDelegateImpl.init(Unknown Source) at com.sun.jmx.mbeanserver.JmxMBeanServer.newMBeanServerDelegate(Unknown Source) at javax.management.MBeanServerBuilder.newMBeanServerDelegate(Unknown Source) at javax.management.MBeanServerFactory.newMBeanServer(Unknown Source) at javax.management.MBeanServerFactory.createMBeanServer(Unknown Source) at javax.management.MBeanServerFactory.createMBeanServer(Unknown Source) at org.apache.catalina.startup.Bootstrap.createClassLoader(Bootstrap.java:189) at org.apache.catalina.startup.Bootstrap.initClassLoaders(Bootstrap.java:98) at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:213) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:410) Caused by: java.lang.NullPointerException at org.apache.catalina.startup.Catalina.await(Catalina.java:616) at org.apache.catalina.startup.Catalina.start(Catalina.java:576) ... 6 more What can be the problem? -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
HANDLER THREAD PROBLEM: java.io.IOException: Stream broken
Dear users. during the development of my component sometimes I am receiving following error: HANDLER THREAD PROBLEM: java.io.IOException: Stream broken java.io.IOException: Stream broken at org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Ajp12ConnectionHandler.java:426) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:147) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:534) HANDLER THREAD PROBLEM: java.io.IOException: Stream broken java.io.IOException: Stream broken at org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Ajp12ConnectionHandler.java:426) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:147) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:534) HANDLER THREAD PROBLEM: java.io.IOException: Stream broken java.io.IOException: Stream broken at org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Ajp12ConnectionHandler.java:426) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:147) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:534) HANDLER THREAD PROBLEM: java.io.IOException: Stream broken java.i.. Could you please let me know how I can diagnose whether error is in the my application or in tomcat side (some configuration troubles?) I have used some debug levels In my XML file for servlet: http://tomcat.apache.org/tomcat-5.5-doc/default-servlet.html#where init-param param-namedebug/param-name param-value0/param-value /init-param but I did not found any trouble. Thank you in advance Petr -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: HANDLER THREAD PROBLEM: java.io.IOException: Stream broken
It seems that after upgrading to tomcat5.5 all is working. But some times ps -ef or top shown me that java process is consuming 100% CPU usage Before that there was used tomcat 3.2.1 version JRE which was used was 1.4.2. Dne 11. července 2011 12:36 Pid p...@pidster.com napsal(a): On 11/07/2011 09:06, André Warnier wrote: Platform ? Tomcat version (x.y.z) ? Java version ? mod_jk/isapi version ? What are you/your component doing when the error happens ? I mean, does the error happen when a tau neutrino strikes the CPU, or when you pull the network cable, or when ? And, why would you be *developing* under Tomcat 5.5, which is two major versions behind the current Tomcat 7.x version ? Also, is AJP1.2 really what you mean to be using? The current version of the protocol is 1.3. http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html The mod_jk/isapi versions are currently 1.2.x but this is not related. p Petr Hracek wrote: Dear users. during the development of my component sometimes I am receiving following error: HANDLER THREAD PROBLEM: java.io.IOException: Stream broken java.io.IOException: Stream broken at org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Ajp12ConnectionHandler.java:426) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:147) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:534) HANDLER THREAD PROBLEM: java.io.IOException: Stream broken java.io.IOException: Stream broken at org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Ajp12ConnectionHandler.java:426) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:147) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:534) HANDLER THREAD PROBLEM: java.io.IOException: Stream broken java.io.IOException: Stream broken at org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Ajp12ConnectionHandler.java:426) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:147) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:534) HANDLER THREAD PROBLEM: java.io.IOException: Stream broken java.i.. Could you please let me know how I can diagnose whether error is in the my application or in tomcat side (some configuration troubles?) I have used some debug levels In my XML file for servlet: http://tomcat.apache.org/tomcat-5.5-doc/default-servlet.html#where init-param param-namedebug/param-name param-value0/param-value /init-param but I did not found any trouble. Thank you in advance Petr - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: HANDLER THREAD PROBLEM: java.io.IOException: Stream broken
Upgrading to the latest version of tomcat is not so easy on the customer side. It needs time therefore we have only tomcat 5.5 version. Under SLES10 there is tomcat 5.5 version on the SLES11 there is tomcat 6 version. Dne 11. července 2011 15:56 Pid p...@pidster.com napsal(a): On 11/07/2011 14:30, Petr Hracek wrote: It seems that after upgrading to tomcat5.5 all is working. But some times ps -ef or top shown me that java process is consuming 100% CPU usage Before that there was used tomcat 3.2.1 version JRE which was used was 1.4.2. Right... So again I'll point you to André's comment below... And, why would you be *developing* under Tomcat 5.5, which is two major versions behind the current Tomcat 7.x version ? I'd really be looking at developing on Tomcat 6.0.latest at a minimum. p -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: user tomcat authentication
First authentication is done so that if in the browser exists relevant HTTP COOKIE and validation of that cookie is done then page should be shown. 2011/6/12 Mark Thomas ma...@apache.org: On 12/06/2011 20:29, Pid wrote: On 12/06/2011 17:12, Petr Hracek wrote: And what about in case that I have my own program for accessing to the specific databases where the passwords are stored as hashes? Are there any possibilities how to run that program for getting unhashed password from database? Why not hash the inbound password, then send compare it against the one in the DB, rather than decoding it? The Realm implementations can handle this, if you're using a standard hashing method that Java recognises. Hopefully you've not invented your own hashing method. Hmm. Hash functions are meant to be one way. It should be impossible to retrieve an unhashed password from the database. I hope that the original description is inaccurate rather than an example of (yet another) badly broken home-grown security solution that needs to be thrown away. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: user tomcat authentication
First authentication is done so that if in the browser exists relevant HTTP COOKIE and validation of that cookie is done then page should be shown. How to do that I do not know from the tomcat point of view. Is there any possiblity how to check valid HTTP COOKIE otherwise showing loging page. If HTTP COOKIE is not existing than logging has to be done over my one program. How to do that I do not know as well. Are there any examples? 2011/6/13 Petr Hracek phrac...@gmail.com: First authentication is done so that if in the browser exists relevant HTTP COOKIE and validation of that cookie is done then page should be shown. 2011/6/12 Mark Thomas ma...@apache.org: On 12/06/2011 20:29, Pid wrote: On 12/06/2011 17:12, Petr Hracek wrote: And what about in case that I have my own program for accessing to the specific databases where the passwords are stored as hashes? Are there any possibilities how to run that program for getting unhashed password from database? Why not hash the inbound password, then send compare it against the one in the DB, rather than decoding it? The Realm implementations can handle this, if you're using a standard hashing method that Java recognises. Hopefully you've not invented your own hashing method. Hmm. Hash functions are meant to be one way. It should be impossible to retrieve an unhashed password from the database. I hope that the original description is inaccurate rather than an example of (yet another) badly broken home-grown security solution that needs to be thrown away. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Best Regards / S pozdravem Petr Hracek -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: user tomcat authentication
Only the simple question, What is the flag which URLs are protected? I have found that link http://tomcat-configure.blogspot.com/2009/01/tomcat-web-xml.html and specially section: How to secure your application with JAAS ? Let's say that my htdocs directory is there: /opt/testApp/htdocs/index.html and servlet storage is there: /opt/testApp/servlet/ Logging page is mention here: /opt/globalPages/htdocs/index.html How to configure https://ipaddress/testApp/ so that if HTTP COOKIE is not defined then /opt/globalPages/htdocs/index.html will be shown otherwise /opt/testApp/htdocs/index.html will be shown. Thank you very much 2011/6/13 Pid p...@pidster.com: On 13/06/2011 07:50, Petr Hracek wrote: First authentication is done so that if in the browser exists relevant HTTP COOKIE and validation of that cookie is done then page should be shown. How to do that I do not know from the tomcat point of view. Is there any possiblity how to check valid HTTP COOKIE otherwise showing loging page. If HTTP COOKIE is not existing than logging has to be done over my one program. How to do that I do not know as well. Are there any examples? From the little information you give, you're describing container managed security. FORM auth as defined by the Servlet Spec can do just that. You configure a Realm, some elements in web.xml which define where the login form error pages are, and which URLs are protected. p 2011/6/13 Petr Hracek phrac...@gmail.com: First authentication is done so that if in the browser exists relevant HTTP COOKIE and validation of that cookie is done then page should be shown. 2011/6/12 Mark Thomas ma...@apache.org: On 12/06/2011 20:29, Pid wrote: On 12/06/2011 17:12, Petr Hracek wrote: And what about in case that I have my own program for accessing to the specific databases where the passwords are stored as hashes? Are there any possibilities how to run that program for getting unhashed password from database? Why not hash the inbound password, then send compare it against the one in the DB, rather than decoding it? The Realm implementations can handle this, if you're using a standard hashing method that Java recognises. Hopefully you've not invented your own hashing method. Hmm. Hash functions are meant to be one way. It should be impossible to retrieve an unhashed password from the database. I hope that the original description is inaccurate rather than an example of (yet another) badly broken home-grown security solution that needs to be thrown away. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Best Regards / S pozdravem Petr Hracek -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: user tomcat authentication
And what about in case that I have my own program for accessing to the specific databases where the passwords are stored as hashes? Are there any possibilities how to run that program for getting unhashed password from database? best regards Petr Dne 10.6.2011 16:23, Pid napsal(a): On 10/06/2011 11:26, Petr Hracek wrote: Dear tomcat users, I would like to ask you how can I authenticate users to access tomcat page? My users are stored in standard /etc/passwd file I'm not sure I'd give Tomcat access to the local user authentication. or users which are stored in another database engine than Realm You can configure a DataSource a DataSourceRealm to point at any database. p thank you in advance - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
user tomcat authentication
Dear tomcat users, I would like to ask you how can I authenticate users to access tomcat page? My users are stored in standard /etc/passwd file or users which are stored in another database engine than Realm thank you in advance -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
VJDBC and tomcat5
Hello gyus, I would like to ask you if you have any experiances with vjdbc(http://vjdbc.sourceforge.net/)? I am trying to configurate them together with old tomcat 5 (tomcat5-5.5.27) but without any success? Servlet is stored in /srv/www/tomcat5/base/webapps/vjdbc directory. web.xml file is (under /srv/www/tomcat5/base/webapps/vjdbc/WEB-INF/web.xml): linux:/srv/www/tomcat5/base/webapps/vjdbc/WEB-INF # cat web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app servlet servlet-nameVJdbcServlet/servlet-name servlet-classde.simplicit.vjdbc.server.servlet.ServletCommandSink/servlet-class init-param param-nameconfig-resource/param-name param-value/WEB-INF/config/vjdbc-exam.xml/param-value /init-param /servlet session-config session-timeout 300 /session-timeout /session-config /web-app linux:/srv/www/tomcat5/base/webapps/vjdbc/WEB-INF # Could you please advice me why http://IP_address/vjdbc/VJdbcServlet is not working. When I have inserted in log4j.properties file logging then in catalina.out is not mentioned any output. linux:/srv/www/tomcat5/base/webapps/vjdbc/WEB-INF # cat /usr/share/tomcat5/common/classes/log4j.properties log4j.logger.de.simplicit.vjdbc=DEBUG, A1 log4j.rootLogger=INFO, A1 log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1.layout=org.apache.log4j.PatternLayout # Print the date in ISO 8601 format log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n linux:/srv/www/tomcat5/base/webapps/vjdbc/WEB-INF # Thank you in advance -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JSP pages are not loaded. Only HTML source code
Thank you for explanation for me. How can be handled ProxyPassReverse for case ProxyPassMatch ^/XYtest/servlet/(.*)$ ajp://localhost:8009/XYtest/$1 Is it enough to have ProxyPassReversy /XYtest/servlet ajp://localhost:8009/XYtest/servlet Directory structure in servlet directory is: /opt/test/servlet/WEB-INF /opt/test/servlet/WEB-INF/lib and jar files /opt/test/servlet/WEB-INF/web.xml /opt/test/servlet/WEB-INF/c-rt.tld /opt/test/servlet/WEB-INF/c.tld /opt/test/servlet/jsp/Viewer/View.jsp web.xml file is following: web-app display-nameMIB Viewer/display-name jsp-config taglib taglib-urihttp://java.sun.com/jstl/core-rt/taglib-uri taglib-location/WEB-INF/c-rt.tld/taglib-location /taglib taglib taglib-urihttp://java.sun.com/jstl/core/taglib-uri taglib-location/WEB-INF/c.tld/taglib-location /taglib taglib taglib-urihttp://www.pse.siemens.com/unity/nbcs/taglib-uri taglib-location/WEB-INF/nbcs.tld/taglib-location /taglib /jsp-config /web-app Thank you in advance 2011/3/9 André Warnier a...@ice-sa.com: Mark Thomas wrote: On 09/03/2011 16:02, André Warnier wrote: Now from the train.. When you request a URL such as this from Tomcat : (http://hostname)/ABC/DEF/hij.jsp Tomcat uses the first component of the path (/ABC) as mapping for the web application. It then passes the request to the application ABC. Not strictly correct. Tomcat compares the URL to the list of context paths and the longest match wins. In the example above the context path may be any of the following: / /ABC /ABC/DEF you simply can't tell from looking at the URL. You have to know what context paths are currently configured. That is certainly more correct than my simplified explanation, but,at this point, likely to confuse the OP a bit more, maybe ? Quoting selectively from Petr's previous posts : ... in the Catalina configuration directory (/etc/tomcat5/base/Catalina/localhost/XYtest.xml) is following context ... (now) Apache things are in directory /opt/test/htdocs tomcat things are in directory /opt/test/servlet (/etc/tomcat5/base/Catalina/localhost/)XYtest.xml is now: ?xml version='1.0' encoding='utf-8'? Context docBase=/opt/test/servlet allowLinking=true /Context And jsp are stored in /opt/test/servlet/jsp/Viewer/View.jsp ... end quote and he didn't say -- but I presume --, that web.xml is in /opt/test/servlet/WEB-INF/web.xml So, Petr, to bring all this together : 1) in /etc/tomcat5/base/Catalina/localhost/XYtest.xml : docBase=/opt/test/servlet 2) in the Apache config : ProxyPassMatch ^/XYtest/(.*\.jsp)$ ajp://localhost:8009/XYtest/$1 Because if you just use ProxyPass /XYtest ajp://localhost:8009/Xytest then a URL like /XYtest/index.html will also be passed to Tomcat, and Tomcat will not find it, considering the location of your Apache things above. 3) in the file index.html : frame src=/XyTest/jsp/Viewer/View.jsp ... Alternatively, you could do : 1a) in /etc/tomcat5/base/Catalina/localhost/XYtest.xml : docBase=/opt/test/servlet 2a) in the Apache config : ProxyPassMatch ^/XYtest/servlet/(.*)$ ajp://localhost:8009/XYtest/$1 3a) in the file index.html : frame src=/XyTest/servlet/jsp/Viewer/View.jsp ... (in this case, the ProxyPassMatch directive will strip the /servlet part, which confuses Tomcat) When (if?) the above is working, then I will suggest a better (and simpler) layout for the files and directives. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JSP pages are not loaded. Only HTML source code
I have changed sources so that the actuall state is following: Apache things are in directory /opt/test/htdocs tomcat things are in directory /opt/test/servlet XYtest.xml is now: ?xml version='1.0' encoding='utf-8'? Context docBase=/opt/test/servlet allowLinking=true /Context And jsp are stored in /opt/test/servlet/jsp/Viewer/View.jsp Updated HTML file stored in /opt/test/htdocs is: frameset rows=63,40,* frameborder=0 frame src=logo.html name=logo noresize scrolling=no marginwidth=0 marginheight= 0 frame src=/XYtest/servlet/jsp/Viewer/View.jsp name=toolbar noresize scrolling=no marginwidth=0 marginhei ght=0 frame src=/XYtest/servlet/jsp/Viewer/View2.jsp name=ctrl /frameset Apache has been updated accordingly: ProxyPass /XYtest/servlet ajp://localhost:8009/XYtest/servlet ProxyPassReverse /XYtest/servlet ajp://localhost:8009/XYtest/servlet Unfortunatelly it shows me: HTTP 404 message /XYtest/servlet/jsp/Viewer/View.jsp description The requested resource (/XYtest/servlet/jsp/Viewer/View.jsp) is not available. What is wrong? Other servlets which did not used JSP are working properly. Thank you in advance Petr 2011/3/8 André Warnier a...@ice-sa.com: Petr Hracek wrote: Dear users, I would like to asked you on the some thing regarding JSP pages. On the Linux whereis installed apache 2.2.14 and tomcat 5.5.28 that's an old version of Tomcat. You should be using at least a 6.0.x version by now. I would like to run JSP pages. JSP pages should be run over mod_proxy_ajp. URL is: http://IP_address/XYtest/jsp/Viewer/index.html ProxyPass /XYtest/*.jsp ajp://localhost:8009/XYtest ProxyPassReverse /XYtest/*.jsp ajp://localhost:8009/XYtest JSP page is called from HTML (index.html) and FRAME src view.jsp mentioned above. but instead of showing JSP page HTML source code is shown. Do you know what could be a reason? in the Catalina configuration directory (/etc/tomcat5/base/Catalina/localhost/XYtest.xml) is following context file test# cat /etc/tomcat/5/base/Catalina/locahost/XYtest.xml ?xml version='1.0' encoding='utf-8'? Context docBase=/opt/test/XYtest allowLinking=true /Context test# structure in Linux is: /opt/test/XYtest/jsp/Viewer where are located files index.html and view.jsp which is part of FRAME As a general observation : it looks like you are trying to serve the same directory from Apache httpd and from Tomcat. That is generally a quite bad idea in terms of security, and also in terms of confusion, as you are experiencing here. To understand what is happening, you must look at it from the browser point of view. Step 1 : Your initial html document index.html is : frameset rows=63,40,* frameborder=0 frame src=logo.html name=logo noresize scrolling=no marginwidth=0 marginheight= 0 frame src=View.jsp name=toolbar noresize scrolling=no marginwidth=0 marginhei ght=0 frame src=View2.jsp name=ctrl /frameset and the browser loads it from the URL : http://IP_address/XYtest/jsp/Viewer/index.html Step 2 : In this document, the browser finds a reference to another document : frame src=View.jsp .. The browser interprets that relative URL on the base of the origin of the current page, and then it asks the server for that document. So the browser requests the document (the inside frame) from the URL : http://IP_address/XYtest/jsp/Viewer/View.jsp Step 3 : The Apache httpd server receives the request for http://IP_address/XYtest/jsp/Viewer/View.jsp and it tries to match it with your proxy statement : ProxyPass /XYtest/*.jsp ajp://localhost:8009/XYtest It does not match (see below), so Apache httpd serves it itself, directly from disk. That is why you see the source : Tomcat never sees this request, and Apache has no idea that a .jsp file is anything else than text. Now why does it not match ? Because the ProxyPass directive does not understand wildcards or regexp. For that, you should us ProxyPassMatch, for example like this : ProxyPassMatch /XYtest/.*\.jsp$ ajp://localhost:8009/XYtest But it is still a bad idea. Why ? Suppose that in the directory /opt/test/XYtest, there is a sub-directory named WEB-INF, and in that directory is a file web.xml. This file is a configuration file for your Tomcat web application, and it may contain things like passwords for accessing a database for example. For that reason (security), Tomcat /never/ allows a user to request a document within the WEB-INF sub-directory of a web application. But with your setup, anyone can ask for the URL : http://IP_address/XYtest/WEB-INF/web.xml and Apache httpd will happily return that file (also as a text file). So, with you setup, you are bypassing an important security feature of Tomcat, because you are allowing Apache httpd to go around it. There are different possibilities to fix your configuration. The first one would be to do this in Apache : ProxyPass /XYtest ajp://localhost:8009/XYtest and NOT define the directory /opt
Re: JSP pages are not loaded. Only HTML source code
You mean that in HTML file I should remove servlet? Is this web.xml file correct? ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app display-nameViewer/display-name jsp-property-group url-pattern/jsp/Viewer/*.jsp/url-pattern /jsp-property-group jsp-config taglib taglib-urihttp://java.sun.com/jstl/core-rt/taglib-uri taglib-location/WEB-INF/c-rt.tld/taglib-location /taglib taglib taglib-urihttp://java.sun.com/jstl/core/taglib-uri taglib-location/WEB-INF/c.tld/taglib-location /taglib /jsp-config /web-app best regards Petr 2011/3/9 André Warnier a...@ice-sa.com: Quickly, because I have to get a train.. I think that this : Context docBase=/opt/test/servlet allowLinking=true togethet with this : frame src=/XYtest/servlet/jsp/Viewer/View.jsp is wrong. You have a servlet too many there. In other words, /XYtest/ already points to /opt/test/servlet. If you say /XYtest/servlet/x, you are pointing to /opt/test/servlet/servlet/x, no ? Petr Hracek wrote: I have changed sources so that the actuall state is following: Apache things are in directory /opt/test/htdocs tomcat things are in directory /opt/test/servlet XYtest.xml is now: ?xml version='1.0' encoding='utf-8'? Context docBase=/opt/test/servlet allowLinking=true /Context And jsp are stored in /opt/test/servlet/jsp/Viewer/View.jsp Updated HTML file stored in /opt/test/htdocs is: frameset rows=63,40,* frameborder=0 frame src=logo.html name=logo noresize scrolling=no marginwidth=0 marginheight= 0 frame src=/XYtest/servlet/jsp/Viewer/View.jsp name=toolbar noresize scrolling=no marginwidth=0 marginhei ght=0 frame src=/XYtest/servlet/jsp/Viewer/View2.jsp name=ctrl /frameset Apache has been updated accordingly: ProxyPass /XYtest/servlet ajp://localhost:8009/XYtest/servlet ProxyPassReverse /XYtest/servlet ajp://localhost:8009/XYtest/servlet Unfortunatelly it shows me: HTTP 404 message /XYtest/servlet/jsp/Viewer/View.jsp description The requested resource (/XYtest/servlet/jsp/Viewer/View.jsp) is not available. What is wrong? Other servlets which did not used JSP are working properly. Thank you in advance Petr 2011/3/8 André Warnier a...@ice-sa.com: Petr Hracek wrote: Dear users, I would like to asked you on the some thing regarding JSP pages. On the Linux whereis installed apache 2.2.14 and tomcat 5.5.28 that's an old version of Tomcat. You should be using at least a 6.0.x version by now. I would like to run JSP pages. JSP pages should be run over mod_proxy_ajp. URL is: http://IP_address/XYtest/jsp/Viewer/index.html ProxyPass /XYtest/*.jsp ajp://localhost:8009/XYtest ProxyPassReverse /XYtest/*.jsp ajp://localhost:8009/XYtest JSP page is called from HTML (index.html) and FRAME src view.jsp mentioned above. but instead of showing JSP page HTML source code is shown. Do you know what could be a reason? in the Catalina configuration directory (/etc/tomcat5/base/Catalina/localhost/XYtest.xml) is following context file test# cat /etc/tomcat/5/base/Catalina/locahost/XYtest.xml ?xml version='1.0' encoding='utf-8'? Context docBase=/opt/test/XYtest allowLinking=true /Context test# structure in Linux is: /opt/test/XYtest/jsp/Viewer where are located files index.html and view.jsp which is part of FRAME As a general observation : it looks like you are trying to serve the same directory from Apache httpd and from Tomcat. That is generally a quite bad idea in terms of security, and also in terms of confusion, as you are experiencing here. To understand what is happening, you must look at it from the browser point of view. Step 1 : Your initial html document index.html is : frameset rows=63,40,* frameborder=0 frame src=logo.html name=logo noresize scrolling=no marginwidth=0 marginheight= 0 frame src=View.jsp name=toolbar noresize scrolling=no marginwidth=0 marginhei ght=0 frame src=View2.jsp name=ctrl /frameset and the browser loads it from the URL : http://IP_address/XYtest/jsp/Viewer/index.html Step 2 : In this document, the browser finds a reference to another document : frame src=View.jsp .. The browser interprets that relative URL on the base of the origin of the current page, and then it asks the server for that document. So the browser requests the document (the inside frame) from the URL : http://IP_address/XYtest/jsp/Viewer/View.jsp Step 3 : The Apache httpd server receives the request for http://IP_address/XYtest/jsp/Viewer/View.jsp and it tries to match it with your proxy statement : ProxyPass /XYtest/*.jsp ajp://localhost:8009/XYtest It does not match (see below), so Apache httpd serves it itself, directly from disk. That is why you see the source : Tomcat never sees this request, and Apache has
JSP pages are not loaded. Only HTML source code
Dear users, I would like to asked you on the some thing regarding JSP pages. On the Linux whereis installed apache 2.2.14 and tomcat 5.5.28 I would like to run JSP pages. JSP pages should be run over mod_proxy_ajp. URL is: http://IP_address/XYtest/jsp/Viewer/index.html ProxyPass /XYtest/*.jsp ajp://localhost:8009/XYtest ProxyPassReverse /XYtest/*.jsp ajp://localhost:8009/XYtest JSP page is called from HTML (index.html) and FRAME src view.jsp mentioned above. but instead of showing JSP page HTML source code is shown. Do you know what could be a reason? in the Catalina configuration directory (/etc/tomcat5/base/Catalina/localhost/XYtest.xml) is following context file test# cat /etc/tomcat/5/base/Catalina/locahost/XYtest.xml ?xml version='1.0' encoding='utf-8'? Context docBase=/opt/test/XYtest allowLinking=true /Context test# structure in Linux is: /opt/test/XYtest/jsp/Viewer where are located files index.html and view.jsp which is part of FRAME -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: JSP pages are not loaded. Only HTML source code
Structure of the document is following: index.html frameset rows=63,40,* frameborder=0 frame src=logo.html name=logo noresize scrolling=no marginwidth=0 marginheight= 0 frame src=View.jsp name=toolbar noresize scrolling=no marginwidth=0 marginhei ght=0 frame src=View2.jsp name=ctrl /frameset Sorry for wrong explanation. I hope that this is correct. 2011/3/8 Zbynek Vavros zbynek_vav...@cz.ibm.com: Dear user, are you sure using JSP inside HTML is good idea? JSPs are going to be translated into servlet anyway and HTML will not :) Cant you use JSP inside JSP? Zbynek Kind Regards / Mit freundlichen Grüßen / Üdvözlettel / S pozdravem: Zbynek VAVROS (Embedded Development image moved to file: pic22417.gif) Delivery Centre 616 00, Brno Central Europe Technicka 21 Brno SITE Czech Republic (Embedded image moved to file: pic27057.gif) Phone: 420-53341- x6283 Mobile: E-mail: zbynek_vav...@cz.ibm.com IBM Global Services Delivery Center Czech Republic, s.r.o. Registered address: Brno, Technicka 2995/21, Zip code: 61600, Company ID: 26244535 Entered in the Commercial Register maintained by the Regional Court in Brno (Part C, Entry 39922) IBM Global Services Delivery Center Czech Republic, s.r.o. Sídlo: Brno, Technická 2995/21, PSČ 61600 IČ: 26244535 Zapsaná v obchodním rejstříku, vedeném Krajským soudem v Brně oddíl C, vlozka 39922 | | From: | | --| |Petr Hracek phrac...@gmail.com | --| | | To: | | --| |Tomcat Users List users@tomcat.apache.org | --| | | Date: | | --| |03/08/2011 10:50 AM | --| | | Subject: | | --| |JSP pages are not loaded. Only HTML source code | --| Dear users, I would like to asked you on the some thing regarding JSP pages. On the Linux whereis installed apache 2.2.14 and tomcat 5.5.28 I would like to run JSP pages. JSP pages should be run over mod_proxy_ajp. URL is: http://IP_address/XYtest/jsp/Viewer/index.html ProxyPass /XYtest/*.jsp ajp://localhost:8009/XYtest ProxyPassReverse /XYtest/*.jsp ajp://localhost:8009/XYtest JSP page is called from HTML (index.html) and FRAME src view.jsp mentioned above. but instead of showing JSP page HTML source code is shown. Do you know what could be a reason? in the Catalina configuration directory (/etc/tomcat5/base/Catalina/localhost/XYtest.xml) is following context file test# cat /etc/tomcat/5/base/Catalina/locahost/XYtest.xml ?xml version='1.0' encoding='utf-8'? Context docBase=/opt/test/XYtest allowLinking=true /Context test# structure in Linux is: /opt/test/XYtest/jsp/Viewer where are located files index.html and view.jsp which is part of FRAME -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
More traces from tomcat 3.2.X
Dear users of tomcat, could you please advice me how to increase logs in tomcat 3.2.X? I know that it is unsupported version now but on the one of the our server I have a problem with high load of CPU when the servlet is exiting. I could not find any reason why the servelt consume high load of CPU. Is there any way how to specify in XML configuration files more logs during the calling servlets? Thank you in advance -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
servlets under tomcat5 consume huge CPU usage
Dear tomcat users, I would like to ask you on the some thing regarding servlets running under tomcat 5 linux OS. How could I detect if servlet is running or not? Output of command ps -ef | grep java does not help me enought. I could not catch what java process is used by servlets Are there any special setting in tomcat5 which could show me more information? Thank you in advance -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: servlets under tomcat5 consume huge CPU usage
Dear users, I do not understand correctly. I am linux administrator but the command like 'thread dump' is not existing. Do you have any example? Thank you in advance Petr 2011/1/19 Mark Thomas ma...@apache.org: On 19/01/2011 08:29, Petr Hracek wrote: Dear tomcat users, I would like to ask you on the some thing regarding servlets running under tomcat 5 linux OS. How could I detect if servlet is running or not? Output of command ps -ef | grep java does not help me enought. I could not catch what java process is used by servlets Are there any special setting in tomcat5 which could show me more information? Use a thread dump. You can match thread IDs with ps output if you need to. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: servlets under tomcat5 consume huge CPU usage
Super thank you. The programs like 'jps' and 'jstack' are directorly in tomcat5 distribution or it has to be compiled on the system? 2011/1/19 Ronald Klop ronald-mailingl...@base.nl: Su to the user running tomcat. Run 'jps'. Find the pid of the process running 'Bootstrap'. Run 'jstack pid'. This gives you the thread dump. The id's of the threads (in hex) correspond to the pid's (in decimal) of the threads in ps -H or top with threads on. You can also find the pid with ps like you are likely used to. Ronald. Op woensdag, 19 januari 2011 11:05 schreef Petr Hracek phrac...@gmail.com: Dear users, I do not understand correctly. I am linux administrator but the command like 'thread dump' is not existing. Do you have any example? Thank you in advance Petr 2011/1/19 Mark Thomas ma...@apache.org: On 19/01/2011 08:29, Petr Hracek wrote: Dear tomcat users, I would like to ask you on the some thing regarding servlets running under tomcat 5 linux OS. How could I detect if servlet is running or not? Output of command ps -ef | grep java does not help me enought. I could not catch what java process is used by servlets Are there any special setting in tomcat5 which could show me more information? Use a thread dump. You can match thread IDs with ps output if you need to. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat5 and ajp13 (port 8009) localhost only
Dear tomcat users, I would like to configure tomcat5 so that ajp13 which used port 8009 will listen on localhost only. In the front of tomcat5 is apache 2.2. Could you please help me how to do that so that output of command lsof -i | grep java will show me that 8009 will be only localhost and not openned for all? system:~ # lsof -i | grep java java 3245 root 41u IPv613052 TCP *:8819 (LISTEN) java 3245 root 47u IPv613517 TCP *:8818 (LISTEN) java 3245 root 69u IPv613581 TCP localhost:8820 (LISTEN) java 4752 tomcat 66u IPv6 12088996 TCP *:http-alt (LISTEN) java 4752 tomcat 68u IPv6 12089001 TCP *:8009 (LISTEN) java 4752 tomcat 71u IPv6 12089004 TCP localhost:8005 (LISTEN) system:~ # Thank you in advance -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Authentication of proxy over own module
Sorry I have posted to the wrong conference. Add the end of this mail youc can find where I have a problem? 2010/6/17 Pid p...@pidster.com On 16/06/2010 10:08, Petr Hracek wrote: Sorry my wrong explanation. I have ment the when the request is authorized/authenticated by my module how the request should be sent to the proxy IP address define in apache module: RewriteRule ^/PAC$ http://192.168.0.23:8080/PACAdmin [P] RewriteRule ^/PAC/(.*) http://192.168.0.23:8080/PACAdmin/$1 [P] RewriteRule ^/([^/]+)$ ${foo:$1|/$1} [L] RewriteRule ^/([^/]+)/(.*) ${foo:$1|/opt/apache/htdocs/ssldocs/$1}/$2 [L] Location /PAC/ ProxyPass http://192.168.0.23:8080/PACAdmin ProxyPassReverse http://192.168.0.23:8080/PACAdmin ProxyPassReverseCookie /PACAdmin /PAC Order Allow,deny Allow from all /Location Can you explain again what it is you're trying to achieve, please? p Best regards Petr 2010/6/15 basteon bast...@gmail.com hm, redirect itsn't proxing , as i understood ;) redirect it's wen you communicate client and target server directly and no proxing anymore. in case todo proxy in your module there should be server and client parts, I've not seen your module, maybe it's under NDA, and so on... but you can have a look at scgi module there client in apache api, but it working in another way. there... static apr_status_t open_socket(apr_socket_t **sock, request_rec *r) { //snip and rv = apr_socket_connect(*sock, sockaddr); if (rv) { //snip On 15 June 2010 20:49, Petr Hracek phrac...@gmail.com wrote: That's a good sentence. You mention: if you did auth in your own module there should be accepted stream and when it passed auth you must sent it through own module to target server. May be this is a my problem. When the request is authorized/authenticated by my module how and where I have to sent to the target server. How can I do it? Redirect? Thank you in advance Petr 2010/6/15 basteon bast...@gmail.com no, about sniffing i meant sniff traffic on the network interface. I don't know how catch up ReverseProxy requests, but if you did auth in your own module there should be accepted stream and when it passed auth you must sent it through own module to target server. or it should working as proxy you must thinking about sessions accepted\passed auth, then init auth from own module to target server. but, why you did it at all? what's purposes on it double auth? On 15/06/2010, Petr Hracek phrac...@gmail.com wrote: But I am using ReverseProxy as well, right? I mean in my own module to sniff traffic when the request is ReverseProxy and them going to the target? How I can catch that request is Reverse Proxy (not defined in Browser settings)? Is that any handler for that case and where should I try to catch the request? In post_read_request? Could you please let me more detailly what do you think? best regards. Petr 2010/6/14 basteon bast...@gmail.com I uses reverce proxy, but you can try sniff traffic between proxy and target On 14 June 2010 13:52, Petr Hracek phrac...@gmail.com wrote: If you mean that RewriteRule should be like that: RewriteMap foo txt:/opt/apache/conf/foo.map RewriteRule ^/([^/]+)$ ${foo:$1|/$1} [L] RewriteRule ^/([^/]+)/(.*) ${foo:$1|/opt/apache/htdocs/ ssldocs/$1}/$2 [L] RewriteRule ^/PAC$ http://192.168.0.23:8080/PACAdmin [P] RewriteRule ^/PAC/(.*) http://192.168.0.23:8080/PACAdmin/$1 [P] Unfortuantelly in this case I see /opt/PAC/htdocs error was not found but this is true because of main index is on the machine 192.168.0.23:8080. Therefore I am receiving HTTP error 404. Or shall I do? IfModule mod_authz_host.c Location /PAC/ ProxyPass http://192.168.0.23:8080/PACAdmin ProxyPassReverse http://192.168.0.23:8080/PACAdmin ProxyPassReverseCookie /PACAdmin /PAC AuthType FOOM require valid-user satisfy Any /Location /IfModule Thank you in advance Petr 2010/6/14 basteon bast...@gmail.com hm, looks like if there double auth, therefore you should put client account trough your module instead of just redirect these client. On 14 June 2010 11:36, Petr Hracek phrac...@gmail.com wrote: Yes this is done simillary in my own module but I have an problem. When the URL is authorized (successfully) then URL http://192.168.0.23:8080/PAC is shown as 404 Unknown. Unfortuntatelly I could not find any reason why it is not found because of URL is a Proxy? See my apache2 configuration file Eric mentioned: Don't constrain your directives to stuff under Directory / if you want them to apply to proxy requests. These are never mapped to a directory. But Unfortunatelly I do not understand what shall I do. How shall I defined my directives. Any help? 2010/6/14
Re: Authentication of proxy over own module
Sorry my wrong explanation. I have ment the when the request is authorized/authenticated by my module how the request should be sent to the proxy IP address define in apache module: RewriteRule ^/PAC$ http://192.168.0.23:8080/PACAdmin [P] RewriteRule ^/PAC/(.*) http://192.168.0.23:8080/PACAdmin/$1 [P] RewriteRule ^/([^/]+)$ ${foo:$1|/$1} [L] RewriteRule ^/([^/]+)/(.*) ${foo:$1|/opt/apache/htdocs/ssldocs/$1}/$2 [L] Location /PAC/ ProxyPass http://192.168.0.23:8080/PACAdmin ProxyPassReverse http://192.168.0.23:8080/PACAdmin ProxyPassReverseCookie /PACAdmin /PAC Order Allow,deny Allow from all /Location Best regards Petr 2010/6/15 basteon bast...@gmail.com hm, redirect itsn't proxing , as i understood ;) redirect it's wen you communicate client and target server directly and no proxing anymore. in case todo proxy in your module there should be server and client parts, I've not seen your module, maybe it's under NDA, and so on... but you can have a look at scgi module there client in apache api, but it working in another way. there... static apr_status_t open_socket(apr_socket_t **sock, request_rec *r) { //snip and rv = apr_socket_connect(*sock, sockaddr); if (rv) { //snip On 15 June 2010 20:49, Petr Hracek phrac...@gmail.com wrote: That's a good sentence. You mention: if you did auth in your own module there should be accepted stream and when it passed auth you must sent it through own module to target server. May be this is a my problem. When the request is authorized/authenticated by my module how and where I have to sent to the target server. How can I do it? Redirect? Thank you in advance Petr 2010/6/15 basteon bast...@gmail.com no, about sniffing i meant sniff traffic on the network interface. I don't know how catch up ReverseProxy requests, but if you did auth in your own module there should be accepted stream and when it passed auth you must sent it through own module to target server. or it should working as proxy you must thinking about sessions accepted\passed auth, then init auth from own module to target server. but, why you did it at all? what's purposes on it double auth? On 15/06/2010, Petr Hracek phrac...@gmail.com wrote: But I am using ReverseProxy as well, right? I mean in my own module to sniff traffic when the request is ReverseProxy and them going to the target? How I can catch that request is Reverse Proxy (not defined in Browser settings)? Is that any handler for that case and where should I try to catch the request? In post_read_request? Could you please let me more detailly what do you think? best regards. Petr 2010/6/14 basteon bast...@gmail.com I uses reverce proxy, but you can try sniff traffic between proxy and target On 14 June 2010 13:52, Petr Hracek phrac...@gmail.com wrote: If you mean that RewriteRule should be like that: RewriteMap foo txt:/opt/apache/conf/foo.map RewriteRule ^/([^/]+)$ ${foo:$1|/$1} [L] RewriteRule ^/([^/]+)/(.*) ${foo:$1|/opt/apache/htdocs/ ssldocs/$1}/$2 [L] RewriteRule ^/PAC$ http://192.168.0.23:8080/PACAdmin [P] RewriteRule ^/PAC/(.*) http://192.168.0.23:8080/PACAdmin/$1 [P] Unfortuantelly in this case I see /opt/PAC/htdocs error was not found but this is true because of main index is on the machine 192.168.0.23:8080. Therefore I am receiving HTTP error 404. Or shall I do? IfModule mod_authz_host.c Location /PAC/ ProxyPass http://192.168.0.23:8080/PACAdmin ProxyPassReverse http://192.168.0.23:8080/PACAdmin ProxyPassReverseCookie /PACAdmin /PAC AuthType FOOM require valid-user satisfy Any /Location /IfModule Thank you in advance Petr 2010/6/14 basteon bast...@gmail.com hm, looks like if there double auth, therefore you should put client account trough your module instead of just redirect these client. On 14 June 2010 11:36, Petr Hracek phrac...@gmail.com wrote: Yes this is done simillary in my own module but I have an problem. When the URL is authorized (successfully) then URL http://192.168.0.23:8080/PAC is shown as 404 Unknown. Unfortuntatelly I could not find any reason why it is not found because of URL is a Proxy? See my apache2 configuration file Eric mentioned: Don't constrain your directives to stuff under Directory / if you want them to apply to proxy requests. These are never mapped to a directory. But Unfortunatelly I do not understand what shall I do. How shall I defined my directives. Any help? 2010/6/14 basteon bast...@gmail.com I guess that you can found reply in man 3 pam and do pam auth in own module if that necessary. On 14 June
Re: Gracefull restart of tomcat
Hello *, Manager application is not installed on the system. You mentioned that it depends on the configuration. Configuration of tomcat which is used is delivered by OS. In the /etc/tomcat5/base/Catalina/localhost is only relevant XML file. which contains path and docbase where tomcat can find servlets and other jar files. War files are not used. Only jar files with web.xml files. 2010/5/31 Pid p...@pidster.com On 31/05/2010 11:40, Petr Hracek wrote: Dear users, I would like to ask you on the some thing which regards to the application deployment and neccessary restart of tomcat5. Tomcat 5? That's pretty old, and not supported any more. When I am some servlet which are run under tomcat and I have build up the new jar files for my application is it enought to copy this file to my location without neccessary restart of tomcat? Depends on your configuration. Which you haven't posted. Is there any gracefull restart of tomcat like in apache2? Is there any mechanishm how to update servlets when tomcat is already running so that tomcat 5 will not be restarted and new servlets will be loaded? You can update/replace the war file. This may trigger an application restart, depending on your configuration. The manager application can also be used to update and restart web applications. p -- Best Regards / S pozdravem Petr Hracek
Re: Gracefull restart of tomcat
Hello *, my context file foo.xml is: ?xml version='1.0' encoding='utf-8'? Context path=/foo docBase=/opt/foo/servlet allowLinking=true /Context my server.xml file is: Server port=8005 shutdown=SHUTDOWN Listener className=org.apache.catalina.core.AprLifecycleListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources Service name=Catalina Connector port=8080 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 connectionTimeout=2 disableUploadTimeout=true / Connector port=8009 enableLookups=false redirectPort=8443 protocol=AJP/1.3 / Engine name=Catalina defaultHost=localhost Realm className=org.apache.catalina.realm.UserDatabaseRealm resourceName=UserDatabase/ Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false /Host /Engine /Service /Server If more config files will be neccessary I will provide. 2010/6/1 Pid p...@pidster.com On 01/06/2010 11:31, Petr Hracek wrote: Hello *, I have make a really big error. Tomcat which is installed on the our systems is: tomcat5-5.5.27-0.8.39 If I have in /etc/tomcat5/base/Catalina/localhost file like foo.xml wich referes to /opt/foo/servlet. After uploading new jar files to /opt/foo/servlet how I can tell to tomcat that servlet has to be reloaded. Perhaps I need to be more specific: *post your config files to the list*. p Thanks for your responses Best Regards Petr Hracek 2010/6/1 Pid * p...@pidster.com mailto:p...@pidster.com On 1 Jun 2010, at 10:01, Petr Hracek phrac...@gmail.com mailto:phrac...@gmail.com wrote: Hello *, Manager application is not installed on the system. You mentioned that it depends on the configuration. Configuration of tomcat which is used is delivered by OS. In the /etc/tomcat5/base/Catalina/localhost is only relevant XML file. If you know which config files are relevant you already know the answer to your problem, no? You should upgrade to a newer version of Tomcat - 5.0 is very very old. p which contains path and docbase where tomcat can find servlets and other jar files. War files are not used. Only jar files with web.xml files. 2010/5/31 Pid mailto:p...@pidster.comp...@pidster.com mailto:p...@pidster.com On 31/05/2010 11:40, Petr Hracek wrote: Dear users, I would like to ask you on the some thing which regards to the application deployment and neccessary restart of tomcat5. Tomcat 5? That's pretty old, and not supported any more. When I am some servlet which are run under tomcat and I have build up the new jar files for my application is it enought to copy this file to my location without neccessary restart of tomcat? Depends on your configuration. Which you haven't posted. Is there any gracefull restart of tomcat like in apache2? Is there any mechanishm how to update servlets when tomcat is already running so that tomcat 5 will not be restarted and new servlets will be loaded? You can update/replace the war file. This may trigger an application restart, depending on your configuration. The manager application can also be used to update and restart web applications. p -- Best Regards / S pozdravem Petr Hracek -- Best Regards / S pozdravem Petr Hracek -- Best Regards / S pozdravem Petr Hracek
Gracefull restart of tomcat
Dear users, I would like to ask you on the some thing which regards to the application deployment and neccessary restart of tomcat5. When I am some servlet which are run under tomcat and I have build up the new jar files for my application is it enought to copy this file to my location without neccessary restart of tomcat? Is there any gracefull restart of tomcat like in apache2? Is there any mechanishm how to update servlets when tomcat is already running so that tomcat 5 will not be restarted and new servlets will be loaded? Thank you in advance -- Best Regards / S pozdravem Petr Hracek
Problem with downloading file over servlet
Hello *, In my servlet I am collecting some information which are stored on the UnixWare system. The generated files are stored on the system correctly and after transferring via scp to the Windows all is OK. But when I am trying to download that files over servlet and https I receive following error: java.lang.ClassCastException: sun.net.www.protocol.http.HttpURLConnection cannot be cast to javax.net.ssl.HttpsURLConnection at de.siemens.icn.hipath.unity.as.repgen.api.ServletRequestThread.downloadReport(ServletRequestThread.java:658) at de.siemens.icn.hipath.unity.as.repgen.api.ServletRequestThread.parseRunReportLine(ServletRequestThread.java:731) at de.siemens.icn.hipath.unity.as.repgen.api.ServletRequestThread.run(ServletRequestThread.java:242) Do you know what is the reason of that failure? Thank you in advance -- Best Regards / S pozdravem Petr Hracek - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Problem with starting tomcat5
Yes you are right bad configuration in web.xml. In the conf/Catalina/localhost/ is RepGen.xml and in web.xml file is /ReportRenderer. When I change them to /servlet/ReportRenderer no it's wokring. Best Regards Petr 2010/4/28 André Warnier a...@ice-sa.com Petr Hracek wrote: Hello *, thanks for all your responses and good advises. Now tomcat 5.5.28 and apache 1.3 is running. Also mod_jk (AJP13) is running as well. In the mod_jk.log file I have found that servlet is successfully found and mapped over JkMount. Communication seems to be OK. But what I have found that HTTP 404 error occurs. Yes, and it comes back from Tomcat, who apparently cannot find whatever should be at the path /RepGen/servlet/ReportRenderer So, what is below the tomcat_dir/webapps directory ? And what is in the file tomcat_dir/webapps/RepGen/WEB-INF/web.xml ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Best Regards / S pozdravem Petr Hracek
Re: Problem with starting tomcat5
in the RepGen.xml file is: ?xml version='1.0' encoding='utf-8'? Context path=/RepGen docBase=/opt/repgen/servlet /Context and in web.xml I have: servlet-mapping servlet-nameReportRenderer/servlet-name url-pattern/servlet/ReportRenderer/url-pattern /servlet-mapping When I am calling URL: /RepGen/servlet/ReportRenderer then HTML page is shown correctly. If this is wrong why the page is shown? best regards Petr 2010/4/29 Pid p...@pidster.com On 29/04/2010 07:34, Petr Hracek wrote: Yes you are right bad configuration in web.xml. In the conf/Catalina/localhost/ is RepGen.xml and in web.xml file is /ReportRenderer. Then surely the correct URL to call is: /RegGen/ReportRenderer When I change them to /servlet/ReportRenderer no it's wokring. Why would it? p Best Regards Petr 2010/4/28 André Warnier a...@ice-sa.com Petr Hracek wrote: Hello *, thanks for all your responses and good advises. Now tomcat 5.5.28 and apache 1.3 is running. Also mod_jk (AJP13) is running as well. In the mod_jk.log file I have found that servlet is successfully found and mapped over JkMount. Communication seems to be OK. But what I have found that HTTP 404 error occurs. Yes, and it comes back from Tomcat, who apparently cannot find whatever should be at the path /RepGen/servlet/ReportRenderer So, what is below the tomcat_dir/webapps directory ? And what is in the file tomcat_dir/webapps/RepGen/WEB-INF/web.xml ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Best Regards / S pozdravem Petr Hracek
Re: Problem with starting tomcat5
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html I will delete them. Will the servlets work when I will delete path from the context file? Best Regards Petr 2010/4/29 Caldarale, Charles R chuck.caldar...@unisys.com From: Petr Hracek [mailto:phrac...@gmail.com] Subject: Re: Problem with starting tomcat5 in the RepGen.xml file is: ?xml version='1.0' encoding='utf-8'? Context path=/RepGen docBase=/opt/repgen/servlet Take out the path attribute; it's not allowed here. When I am calling URL: /RepGen/servlet/ReportRenderer then HTML page is shown correctly. Then why did you say earlier that it's not working? Is there actually a problem here? - 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. -- Best Regards / S pozdravem Petr Hracek
Re: Problem with starting tomcat5
Could please explain me more detailly what do you mean with the sentence about servlets? I am user with tomcat and beginner with servlets Thank you in advance Best Regards Petr Hracek 2010/4/29 Caldarale, Charles R chuck.caldar...@unisys.com From: Petr Hracek [mailto:phrac...@gmail.com] Subject: Re: Problem with starting tomcat5 http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Which says, among other things: path The value of this field must not be set except when statically defining a Context in server.xml, as it will be inferred from the filenames used for either the .xml context file or the docBase. Will the servlets work when I will delete path from the context file? That depends on how well you coded the servlets. - 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. -- Best Regards / S pozdravem Petr Hracek
Re: Problem with starting tomcat5
[debug] jk_ajp_common.c (1336): 02003B 7D 20 50 20 7B 66 6F 6E 74 2D 66 61 6D 69 6C - ;}.P.{font-famil [debug] jk_ajp_common.c (1336): 021079 3A 54 61 68 6F 6D 61 2C 41 72 69 61 6C 2C 73 - y:Tahoma,Arial,s [debug] jk_ajp_common.c (1336): 022061 6E 73 2D 73 65 72 69 66 3B 62 61 63 6B 67 72 - ans-serif;backgr [debug] jk_ajp_common.c (1336): 02306F 75 6E 64 3A 77 68 69 74 65 3B 63 6F 6C 6F 72 - ound:white;color [debug] jk_ajp_common.c (1336): 02403A 62 6C 61 63 6B 3B 66 6F 6E 74 2D 73 69 7A 65 - :black;font-size [debug] jk_ajp_common.c (1336): 02503A 31 32 70 78 3B 7D 41 20 7B 63 6F 6C 6F 72 20 - :12px;}A.{color. [debug] jk_ajp_common.c (1336): 02603A 20 62 6C 61 63 6B 3B 7D 41 2E 6E 61 6D 65 20 - :.black;}A.name. [debug] jk_ajp_common.c (1336): 02707B 63 6F 6C 6F 72 20 3A 20 62 6C 61 63 6B 3B 7D - {color.:.black;} [debug] jk_ajp_common.c (1336): 028048 52 20 7B 63 6F 6C 6F 72 20 3A 20 23 35 32 35 - HR.{color.:.#525 [debug] jk_ajp_common.c (1336): 029044 37 36 3B 7D 2D 2D 3E 3C 2F 73 74 79 6C 65 3E - D76;}--/style [debug] jk_ajp_common.c (1336): 02a020 3C 2F 68 65 61 64 3E 3C 62 6F 64 79 3E 3C 68 - ./headbodyh [debug] jk_ajp_common.c (1336): 02b031 3E 48 54 54 50 20 53 74 61 74 75 73 20 34 30 - 1*HTTP.Status.40* [debug] jk_ajp_common.c (1336): 02c034 20 2D 20 2F 52 65 70 47 65 6E 2F 73 65 72 76 - *4.-./RepGen/serv* [debug] jk_ajp_common.c (1336): 02d06C 65 74 2F 52 65 70 6F 72 74 52 65 6E 64 65 72 - *let/ReportRender* [debug] jk_ajp_common.c (1336): 02e065 72 3C 2F 68 31 3E 3C 48 52 20 73 69 7A 65 3D - *er*/h1HR.size= [debug] jk_ajp_common.c (1336): 02f022 31 22 20 6E 6F 73 68 61 64 65 3D 22 6E 6F 73 - 1.noshade=nos [debug] jk_ajp_common.c (1336): 030068 61 64 65 22 3E 3C 70 3E 3C 62 3E 74 79 70 65 - hadepbtype [debug] jk_ajp_common.c (1336): 03103C 2F 62 3E 20 53 74 61 74 75 73 20 72 65 70 6F - /b.*Status.repo* [debug] jk_ajp_common.c (1336): 032072 74 3C 2F 70 3E 3C 70 3E 3C 62 3E 6D 65 73 73 - *rt*/ppb*mess* [debug] jk_ajp_common.c (1336): 033061 67 65 3C 2F 62 3E 20 3C 75 3E 2F 52 65 70 47 - *age*/b.u/*RepG* [debug] jk_ajp_common.c (1336): 034065 6E 2F 73 65 72 76 6C 65 74 2F 52 65 70 6F 72 - *en/servlet/Repor* [debug] jk_ajp_common.c (1336): 035074 52 65 6E 64 65 72 65 72 3C 2F 75 3E 3C 2F 70 - *tRenderer*/u/p [debug] jk_ajp_common.c (1336): 03603E 3C 70 3E 3C 62 3E 64 65 73 63 72 69 70 74 69 - pbdescripti [debug] jk_ajp_common.c (1336): 03706F 6E 3C 2F 62 3E 20 3C 75 3E 54 68 65 20 72 65 - on/b.uThe.re [debug] jk_ajp_common.c (1336): 038071 75 65 73 74 65 64 20 72 65 73 6F 75 72 63 65 - quested.resource [debug] jk_ajp_common.c (1336): 039020 28 2F 52 65 70 47 65 6E 2F 73 65 72 76 6C 65 - .(*/RepGen/servle* [debug] jk_ajp_common.c (1336): 03a074 2F 52 65 70 6F 72 74 52 65 6E 64 65 72 65 72 - *t/ReportRenderer* [debug] jk_ajp_common.c (1336): 03b029 20 69 73 20 6E 6F 74 20 61 76 61 69 6C 61 62 - ).*is.not.availab* [debug] jk_ajp_common.c (1336): 03c06C 65 2E 3C 2F 75 3E 3C 2F 70 3E 3C 48 52 20 73 - le./u/pHR.s [debug] jk_ajp_common.c (1336): 03d069 7A 65 3D 22 31 22 20 6E 6F 73 68 61 64 65 3D - ize=1.noshade= [debug] jk_ajp_common.c (1336): 03e022 6E 6F 73 68 61 64 65 22 3E 3C 68 33 3E 41 70 - noshadeh3Ap [debug] jk_ajp_common.c (1336): 03f061 63 68 65 20 54 6F 6D 63 61 74 2F 35 2E 35 2E - ache.Tomcat/5.5. [debug] jk_ajp_common.c (1336): received from ajp13 pos=0 len=2 max=8192 [debug] jk_ajp_common.c (1336): 05 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - [debug] jk_ajp_common.c (1940): AJP13 protocol: Reuse is OK [debug] jk_ajp_common.c (757): (ajp13) resetting endpoint with sd = 11 [debug] jk_ajp_common.c (3010): recycling connection pool slot=0 for worker ajp13 [debug] mod_jk.c (2410): Service finished with status=404 for worker=ajp13 [debug] jk_ajp_common.c (1336): received from ajp13 pos=0 len=82 max=8192 [debug] jk_ajp_common.c (1336): 04 01 94 00 09 4E 6F 74 20 46 6F 75 6E 64 00 00 - *.Not.Found..* [debug] jk_ajp_common.c (1336): 001002 00 0C 43 6F 6E 74 65 6E 74 2D 54 79 70 65 00 - ...Content-Type. [debug] jk_ajp_common.c (1336): 002000 17 74 65 78 74 2F 68 74 6D 6C 3B 63 68 61 72 - ..text/html;char [debug] jk_ajp_common.c (1336): 003073 65 74 3D 75 74 66 2D 38 00 00 0E 43 6F 6E 74 - set=utf-8...Cont [debug] jk_ajp_common.c (1336): 004065 6E 74 2D 4C 65 6E 67 74 68 00 00 04 31 30 34 - ent-Length...104 [debug] jk_ajp_common.c (1336): 005032 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - 2... [debug] jk_ajp_common.c (660): status = 404 Does it error mean that servlet has bad PERMISSIONS? If yes what permission should be there? 555 for directory? What can be a problem now? Best Regards Petr Hracek 2010/4/27 André Warnier a...@ice-sa.com Petr Hracek wrote: Hello *, may be you already answered to my problem but I did not find any response why the problem
Problem with starting tomcat5
sys 117 Apr 27 11:12 PM.xml -rw-r--r--1 root sys 105 Apr 27 11:12 RepGen.xml /var/apache/tomcat# Could you please let me know where I did a problem? -- Best Regards / S pozdravem Petr Hracek
Re: Problem with starting tomcat5
First of all, - where should be placed servlet.jar file from my application if not in /opt/repgen/ servlet/WEB-INF/lib/ When I run the tomcat under user apache then output is following: /# tail -f /var/apache/tomcat/logs/catalina.out WARNING: Default charset ISO-10646-Minimum-European-Subset not supported, using ISO-8859-1 instead Created MBeanServer with ID: 1386000:1283f0632fa:-8000:server:1 Apr 27, 2010 1:28:37 PM org.apache.catalina.core.AprLifecycleListener init INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/java2-1.4.2/jre/lib/i386/client:/opt/java2-1.4.2/jre/lib/i386:/opt/java2-1.4.2/jre/../lib/i386:/usr/lib Apr 27, 2010 1:28:48 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Apr 27, 2010 1:28:49 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 33400 ms Apr 27, 2010 1:28:55 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Apr 27, 2010 1:28:55 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.29 Apr 27, 2010 1:28:56 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Apr 27, 2010 1:29:04 PM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/opt/repgen/servlet/WEB-INF/lib/servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class Apr 27, 2010 1:29:20 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Apr 27, 2010 1:29:23 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Apr 27, 2010 1:29:24 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=10/660 config=null Apr 27, 2010 1:29:25 PM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource Apr 27, 2010 1:29:26 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 36790 ms -- Best Regards / S pozdravem Petr Hracek 2010/4/27 Konstantin Kolinko knst.koli...@gmail.com 2010/4/27 Petr Hracek phrac...@gmail.com: WARNING: Default charset ISO-10646-Minimum-European-Subset not supported, using ISO-8859-1 instead Do not know what prints the above. Apr 27, 2010 12:15:59 PM org.apache.catalina.core.AprLifecycleListener init INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/java2-1.4.2/jre/lib/i386/client:/opt/java2-1.4.2/jre/lib/i386:/opt/java2-1.4.2/jre/../lib/i386:/usr/lib The above can be ignored. Apr 27, 2010 12:16:19 PM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/opt/repgen/servlet/WEB-INF/lib/servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class Remove servlet.jar from your web application. It should not be there. java.io.FileNotFoundException: /opt/apache/tomcat/work/Catalina/localhost/RepGen/tldCache.ser (No such file or directory) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.init(FileOutputStream.java:179) at java.io.FileOutputStream.init(FileOutputStream.java:131) at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:320) It tries to write tldCache.ser file and cannot. Check your permissions. BTW, this message is printed to stderr. A patch to print this message to the log file is already proposed for 5.5 (BZ 48179), but is not applied yet. Apr 27, 2010 12:16:30 PM org.apache.jasper.EmbeddedServletOptions init SEVERE: The scratchDir you specified: /opt/apache/tomcat/work/Catalina/localhost/RepGen is unusable. Again, the directory is not writeable. Content of the directory /opt/apache/tomcat/conf/Catalina/localhost is: /var/apache/tomcat# l /opt/apache/tomcat/conf/Catalina/localhost/ total 6 -rw-r--r--1 root sys 105 Apr 27 11:12 PM-Reports.xml -rw-r--r--1 root sys 117 Apr 27 11:12 PM.xml -rw-r--r--1 root sys 105 Apr 27 11:12 RepGen.xml /var/apache/tomcat# Could you please let me know where I did a problem? 1. Do not run Tomcat as root. 2. If you have ever run Tomcat as root, - remove all subdirectories and files from logs, temp and work subdirectories of $CATALINA_BASE - make sure, that the above directories as well as $CATALINA_BASE/conf/Catalina/, $CATALINA_BASE/webapps and the files in them are writeable. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Startin tomcat5 instead of jsvc with java
Hello *, from the documention I have read that tomcat5.5 ( http://tomcat.apache.org/tomcat-5.5-doc/setup.html) can be started with the help of command jsvc. Is there any other possibility how to start up tomcat with java? I wouldn't start tomcat 5.5 over rcScript stored in /etc/init.d/ Thank you in advance Petr