Jasper throws ExceptionInInitializerError?!
Good morning, I am migrating an automated build process from a Windows 2K system to a RedHat EL 3 system, with some trouble. When I run a particular build via Ant, that uses the JSP precompiling task (jasper2), it fails, but somehow, not immediately. When I go into the output or destination directory for the jasper task, the first .java file is created ... it bombs out, though, at the place in the JSP where the Struts html:html tag is first encountered. What's more frustrating, is that on the RHEL3 system, I have tomcat4 and tomcat5 installed (4.1.31 and 5.0.30). When I provide a tomcat.home property that points to Tomcat4 (so the common/lib JARs from tomcat4 are used), it builds fine. When I specify a tomcat.home pointing to tomcat5, it fails. The Tomcat packages were installed from the JPackage project and are running against IBM's 1.4.2 JDK (Intel/x86). I've spent many hours on this, tried a variety of things, all with no success. It seems that either (a) something is missing from a CLASSPATH or (b) there is a conflict somehow. Note, the project (with the same build.xml file) runs just fine on our local systems ... my local development platform is a dual G5 (Mac) w/ Tomcat 5.0.28 - no problems here. We also use the MyEclipse plug-in to Eclipse which pre-compiles JSPs in the background for syntax checking, and it doesn't have any problem with the project configuration. Moreover, on the Win 2K box, this was all working fine, albeit compiling for a Tomcat4 target, not Tomcat5. I am at my wits end here. Any help or pointers would be most appreciated. Here's the error from the Ant build: jspc: [copy] Copying 1 file to /opt/build/checkout/Imagebank/WebRoot/WEB-INF [jasper2] log4j:WARN No appenders could be found for logger (org.apache.jasper.compiler.JspRuntimeContext). [jasper2] log4j:WARN Please initialize the log4j system properly. BUILD FAILED /opt/build/build-Imagebank.xml:9: The following error occurred while executing this line: /opt/build/checkout/Imagebank/build.xml:201: java.lang.ExceptionInInitializerError I can turn on the debugging output for Ant if more verbosity is necessary. p.s. Another project builds just fine on this platform, against tomcat5, using the same frameworks (Struts, etc.). Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc.
RE: Jasper throws ExceptionInInitializerError?!
One thing I forgot to mention - when I do turn on debug for Ant, the root cause that's shown is a NullPointerException. java.lang.ExceptionInInitializerError at java.lang.Class.forName1(Native Method) at java.lang.Class.forName(Class.java:180) at org.apache.strutsel.taglib.html.ELHtmlTagBeanInfo.class$(ELHtmlTagBeanIn fo.java:88) at org.apache.strutsel.taglib.html.ELHtmlTagBeanInfo.getPropertyDescriptors (ELHtmlTagBeanInfo.java:88) at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:477) at java.beans.Introspector.getBeanInfo(Introspector.java:390) at java.beans.Introspector.getBeanInfo(Introspector.java:159) at org.apache.jasper.compiler.Generator$TagHandlerInfo.init(Generator.jav a:3684) at org.apache.jasper.compiler.Generator$GenerateVisitor.getTagHandlerInfo(G enerator.java:2102) at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.jav a:1583) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441) ... Caused by: java.lang.NullPointerException at org.apache.struts.util.MessageResources.getMessageResources(MessageResou rces.java:577) at org.apache.struts.taglib.html.HtmlTag.clinit(HtmlTag.java:96) Googling on getMessageResources and NullPointerException gets me a bunch of hits about Struts not being configured right, etc. Basically, that Struts can't find the Resources bundle configured in struts-config.xml. Yet, if that were truly a config problem, then it wouldn't work when compiling against Tomcat4, right? And it wouldn't compile correctly on my G5 w/ Tomcat 5.0.28, right? That's my train of thought, at least ... I've gone through the source now, starting with ELHtmlTagBeanInfo as well as MessageResources.getMessageResources - stepping back through other source as needed, and I haven't come across anything that would appear to be a smoking gun. Please advise! Best, Brice Ruth -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Friday, April 01, 2005 11:21 AM To: tomcat-user@jakarta.apache.org Subject: Jasper throws ExceptionInInitializerError?! Good morning, I am migrating an automated build process from a Windows 2K system to a RedHat EL 3 system, with some trouble. When I run a particular build via Ant, that uses the JSP precompiling task (jasper2), it fails, but somehow, not immediately. When I go into the output or destination directory for the jasper task, the first .java file is created ... it bombs out, though, at the place in the JSP where the Struts html:html tag is first encountered. What's more frustrating, is that on the RHEL3 system, I have tomcat4 and tomcat5 installed (4.1.31 and 5.0.30). When I provide a tomcat.home property that points to Tomcat4 (so the common/lib JARs from tomcat4 are used), it builds fine. When I specify a tomcat.home pointing to tomcat5, it fails. The Tomcat packages were installed from the JPackage project and are running against IBM's 1.4.2 JDK (Intel/x86). I've spent many hours on this, tried a variety of things, all with no success. It seems that either (a) something is missing from a CLASSPATH or (b) there is a conflict somehow. Note, the project (with the same build.xml file) runs just fine on our local systems ... my local development platform is a dual G5 (Mac) w/ Tomcat 5.0.28 - no problems here. We also use the MyEclipse plug-in to Eclipse which pre-compiles JSPs in the background for syntax checking, and it doesn't have any problem with the project configuration. Moreover, on the Win 2K box, this was all working fine, albeit compiling for a Tomcat4 target, not Tomcat5. I am at my wits end here. Any help or pointers would be most appreciated. Here's the error from the Ant build: jspc: [copy] Copying 1 file to /opt/build/checkout/Imagebank/WebRoot/WEB-INF [jasper2] log4j:WARN No appenders could be found for logger (org.apache.jasper.compiler.JspRuntimeContext). [jasper2] log4j:WARN Please initialize the log4j system properly. BUILD FAILED /opt/build/build-Imagebank.xml:9: The following error occurred while executing this line: /opt/build/checkout/Imagebank/build.xml:201: java.lang.ExceptionInInitializerError I can turn on the debugging output for Ant if more verbosity is necessary. p.s. Another project builds just fine on this platform, against tomcat5, using the same frameworks (Struts, etc.). Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Jasper throws ExceptionInInitializerError?!
More info. Finally got Eclipse to attach to the Ant build process. Now, I find that the root problem (after stepping through a few levels) is a ClassNotFoundException for org.apache.struts.util.PropertyMessageResourcesFactory. How odd ... yet against tomcat4, this works fine, but tomcat5, it fails. What the heck?! Is this a classloader issue?! -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Friday, April 01, 2005 11:57 AM To: Tomcat Users List Subject: RE: Jasper throws ExceptionInInitializerError?! One thing I forgot to mention - when I do turn on debug for Ant, the root cause that's shown is a NullPointerException. java.lang.ExceptionInInitializerError at java.lang.Class.forName1(Native Method) at java.lang.Class.forName(Class.java:180) at org.apache.strutsel.taglib.html.ELHtmlTagBeanInfo.class$(ELHtmlTagBeanIn fo.java:88) at org.apache.strutsel.taglib.html.ELHtmlTagBeanInfo.getPropertyDescriptors (ELHtmlTagBeanInfo.java:88) at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:477) at java.beans.Introspector.getBeanInfo(Introspector.java:390) at java.beans.Introspector.getBeanInfo(Introspector.java:159) at org.apache.jasper.compiler.Generator$TagHandlerInfo.init(Generator.jav a:3684) at org.apache.jasper.compiler.Generator$GenerateVisitor.getTagHandlerInfo(G enerator.java:2102) at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.jav a:1583) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441) ... Caused by: java.lang.NullPointerException at org.apache.struts.util.MessageResources.getMessageResources(MessageResou rces.java:577) at org.apache.struts.taglib.html.HtmlTag.clinit(HtmlTag.java:96) Googling on getMessageResources and NullPointerException gets me a bunch of hits about Struts not being configured right, etc. Basically, that Struts can't find the Resources bundle configured in struts-config.xml. Yet, if that were truly a config problem, then it wouldn't work when compiling against Tomcat4, right? And it wouldn't compile correctly on my G5 w/ Tomcat 5.0.28, right? That's my train of thought, at least ... I've gone through the source now, starting with ELHtmlTagBeanInfo as well as MessageResources.getMessageResources - stepping back through other source as needed, and I haven't come across anything that would appear to be a smoking gun. Please advise! Best, Brice Ruth -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Friday, April 01, 2005 11:21 AM To: tomcat-user@jakarta.apache.org Subject: Jasper throws ExceptionInInitializerError?! Good morning, I am migrating an automated build process from a Windows 2K system to a RedHat EL 3 system, with some trouble. When I run a particular build via Ant, that uses the JSP precompiling task (jasper2), it fails, but somehow, not immediately. When I go into the output or destination directory for the jasper task, the first .java file is created ... it bombs out, though, at the place in the JSP where the Struts html:html tag is first encountered. What's more frustrating, is that on the RHEL3 system, I have tomcat4 and tomcat5 installed (4.1.31 and 5.0.30). When I provide a tomcat.home property that points to Tomcat4 (so the common/lib JARs from tomcat4 are used), it builds fine. When I specify a tomcat.home pointing to tomcat5, it fails. The Tomcat packages were installed from the JPackage project and are running against IBM's 1.4.2 JDK (Intel/x86). I've spent many hours on this, tried a variety of things, all with no success. It seems that either (a) something is missing from a CLASSPATH or (b) there is a conflict somehow. Note, the project (with the same build.xml file) runs just fine on our local systems ... my local development platform is a dual G5 (Mac) w/ Tomcat 5.0.28 - no problems here. We also use the MyEclipse plug-in to Eclipse which pre-compiles JSPs in the background for syntax checking, and it doesn't have any problem with the project configuration. Moreover, on the Win 2K box, this was all working fine, albeit compiling for a Tomcat4 target, not Tomcat5. I am at my wits end here. Any help or pointers would be most appreciated. Here's the error from the Ant build: jspc: [copy] Copying 1 file to /opt/build/checkout/Imagebank/WebRoot/WEB-INF [jasper2] log4j:WARN No appenders could be found for logger (org.apache.jasper.compiler.JspRuntimeContext). [jasper2] log4j:WARN Please initialize the log4j system properly. BUILD FAILED /opt/build/build-Imagebank.xml:9: The following error occurred while executing this line: /opt/build/checkout/Imagebank/build.xml:201: java.lang.ExceptionInInitializerError I can turn on the debugging output for Ant if more verbosity is necessary. p.s. Another project builds just fine on this platform, against tomcat5, using the same frameworks (Struts, etc.). Brice D. Ruth Sr
RE: Jasper throws ExceptionInInitializerError?!
OK, I searched the entire system for struts JAR files. The only difference I found betw. this project and the one that works is that WEB-INF/lib contained struts-legacy.jar. So, I moved that out, tried again, same problem. I checked the struts.jar and struts-el.jar files for an instance of PropertyMessageResourcesFactory and found that struts.jar did in fact contain this. I'm at a loss. The class is there, the JAR files in WEB-INF/lib are included in the jspc.classpath for the jasper taskdef. And I keep coming back to the fact that this works against the tomcat4 libs and not against the tomcat5 libs! Here's my taskdef: taskdef classname=org.apache.jasper.JspC name=jasper2 classpath id=jspc.classpath fileset dir=${tomcat.home}/common/lib include name=*jasper*.jar/ include name=*jsp*.jar/ include name=*servlet*.jar/ include name=*commons-el*.jar/ /fileset fileset dir=${webroot}/WEB-INF/lib include name=*.jar/ /fileset pathelement path=${build.dir}/ pathelement location=${env.JAVA_HOME}/lib/tools.jar/ /classpath /taskdef In the fileset for /common/lib, I was including *.jar, but I thought that something in there may be conflicting, so I enumerated just the ones I figured it needed. You can see, *.jar from WEB-INF/lib is included in the CLASSPATH. As mentioned previously, the JDK is IBM's, 1.4.2 - so JAVA_HOME is /usr/lib/jvm/java-1.4.2-ibm. Help?! -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Friday, April 01, 2005 12:36 PM To: Tomcat Users List Subject: Re: Jasper throws ExceptionInInitializerError?! It could be conflicting versions of struts. -Tim Ruth, Brice wrote: More info. Finally got Eclipse to attach to the Ant build process. Now, I find that the root problem (after stepping through a few levels) is a ClassNotFoundException for org.apache.struts.util.PropertyMessageResourcesFactory. How odd ... yet against tomcat4, this works fine, but tomcat5, it fails. What the heck?! Is this a classloader issue?! -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Friday, April 01, 2005 11:57 AM To: Tomcat Users List Subject: RE: Jasper throws ExceptionInInitializerError?! One thing I forgot to mention - when I do turn on debug for Ant, the root cause that's shown is a NullPointerException. java.lang.ExceptionInInitializerError at java.lang.Class.forName1(Native Method) at java.lang.Class.forName(Class.java:180) at org.apache.strutsel.taglib.html.ELHtmlTagBeanInfo.class$(ELHtmlTagBean In fo.java:88) at org.apache.strutsel.taglib.html.ELHtmlTagBeanInfo.getPropertyDescripto rs (ELHtmlTagBeanInfo.java:88) at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:477) at java.beans.Introspector.getBeanInfo(Introspector.java:390) at java.beans.Introspector.getBeanInfo(Introspector.java:159) at org.apache.jasper.compiler.Generator$TagHandlerInfo.init(Generator.j av a:3684) at org.apache.jasper.compiler.Generator$GenerateVisitor.getTagHandlerInfo (G enerator.java:2102) at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.j av a:1583) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441) ... Caused by: java.lang.NullPointerException at org.apache.struts.util.MessageResources.getMessageResources(MessageRes ou rces.java:577) at org.apache.struts.taglib.html.HtmlTag.clinit(HtmlTag.java:96) Googling on getMessageResources and NullPointerException gets me a bunch of hits about Struts not being configured right, etc. Basically, that Struts can't find the Resources bundle configured in struts-config.xml. Yet, if that were truly a config problem, then it wouldn't work when compiling against Tomcat4, right? And it wouldn't compile correctly on my G5 w/ Tomcat 5.0.28, right? That's my train of thought, at least ... I've gone through the source now, starting with ELHtmlTagBeanInfo as well as MessageResources.getMessageResources - stepping back through other source as needed, and I haven't come across anything that would appear to be a smoking gun. Please advise! Best, Brice Ruth -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Friday, April 01, 2005 11:21 AM To: tomcat-user@jakarta.apache.org Subject: Jasper throws ExceptionInInitializerError?! Good morning, I am migrating an automated build process from a Windows 2K system
RE: Masking JSP URL
I don't think this will work. Apache passes the URI to Tomcat via JK2, and unless JK2 can mungle the actual URI, Tomcat won't be able to figure out what JSP you're looking for if you use a shortened path. We use the Struts framework, which nicely hides the location of JSP files, or any particular file structure at all, from the URI that is used. Cheers, Brice -Original Message- From: John Lindley [mailto:[EMAIL PROTECTED] Sent: Friday, April 01, 2005 12:26 PM To: tomcat-user@jakarta.apache.org Subject: Masking JSP URL Hi all, I have what seems to be a straighforward need, but I have not yet been able to accomplish it. I am running Apache 2.0.52, Tomcat 5.0.28, mod_jk2, on Windows Server 2003. Everything seems to be running fine, but I want to be able to hide, mask, map, whatever, the URL to the jsp pages. Here is my workers2.properties file: Code: [shm] info=Scoreboard. Requried for reconfiguration and status with multiprocess servers. file=anon # Defines a load balancer named lb. Use even if you only have one machine. [lb:lb] # Example socket channel, override port and host. [channel.socket:localhost:8009] port=8009 host=127.0.0.1 # define the worker [ajp13:localhost:8009] channel=channel.socket:localhost:8009 group=lb # Map the Tomcat webapp to the Web server uri space [uri:/appname/*] group=lb [status:] info=Status worker, displays runtime information [uri:/jkstatus/*] info=The Tomcat /jkstatus handler group=status: I setup an alias in the httpd.conf file: Code: Alias /standalone/ D:/Program Files/Apache Group/Tomcat5.0.28/webapps/appname/jsp/usr/standalone/ Directory D:/Program Files/Apache Group/Tomcat5.0.28/webapps/appname/jsp/usr/standalone Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all /Directory So, if I enter http: //ipaddress/appname/jsp/usr/standalone/file.jsp, the file loads and is properly passed to Tomcat. If I enter http: //ipaddress/standalone/file.jsp, the file loads but is not passed to Tomcat. I don't want my users seeing the long, ugly URL. What is the best/easiest way to accomplish this? Any help is greatly appreciated! John __ Do you Yahoo!? Yahoo! Personals - Better first dates. More second dates. http://personals.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DBCP/JNDI/Realms
Good morning! I've been running into an intermittent problem with my database connections for authentication. It appears that periodically, the iSeries (DB2/400) that I connect to terminates all incoming ODBC/JDBC connections (one a week, apparently). What happens in my application is that users can no longer login after the connections have been dropped. The connection pool apparently doesn't try to re-initiate the connections after they've been dropped. I see an exception in my logs regarding the connection being reset, then I see an exception relating to the pool being exhausted. I'm not entirely sure what the root cause of the problem here is - in theory, DBCP should recover gracefully when a connection is reset/dropped, right? Here's the initial exception: java.sql.SQLException: Communication link failure.(Connection was dropped unexpectedly.) at com.ibm.as400.access.JDError.throwSQLException(JDError.java:365) at com.ibm.as400.access.AS400JDBCConnection.send(AS400JDBCConnection.java(Compiled Code)) at com.ibm.as400.access.AS400JDBCConnection.send(AS400JDBCConnection.java(Inlined Compiled Code)) at com.ibm.as400.access.AS400JDBCStatement.syncRPB(AS400JDBCStatement.java(Compiled Code)) at com.ibm.as400.access.AS400JDBCStatement.commonPrepare(AS400JDBCStatement.java(Compiled Code)) at com.ibm.as400.access.AS400JDBCPreparedStatement.init(AS400JDBCPreparedStatement.java(Compiled Code)) at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java(Compiled Code)) at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConnection.java(Compiled Code)) at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java(Compiled Code)) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java(Compiled Code)) at org.apache.catalina.realm.DataSourceRealm.credentials(DataSourceRealm.java:460) [snip] Here's the next one: 2004-12-06 04:39:21 DataSourceRealm[]: Exception performing authentication org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java(Compiled Code)) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java(Compiled Code)) at org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:438) at org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm.java:277) [snip] So, what I've done now to see if it helps matters any, is specify the AS400's own connection pool factory in my JNDI definition, like so: parameter namefactory/name valuecom.ibm.as400.access.AS400JDBCConnectionPoolDataSource/value /parameter Both Tomcat's form authentication as well as my application (through iBATiS) use this JNDI DataSource for connections. Can anyone shed more light on what the root cause of the problem is here? Should DBCP gracefully recover? Regards, Brice Ruth -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DBCP/JNDI/Realms
Follow-up question. Should I or should I not use the ConnectionPool implementation provided by IBM in their JDBC driver? And if I should, do the parameters provided by DBCP still apply? I have to admit, I'm a bit fuzzy on what role which component is playing in this game! Thanks!! Shapira, Yoav wrote: Hi, DBCP will NOT gracefully recover by itself. You need to configure it according to your desired behavior. Specifically, check out the testOnBorrow, testOnReturn, and testWhileIdle properties at http://jakarta.apache.org/commons/dbcp/configuration.html. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Monday, December 06, 2004 11:32 AM To: Tomcat Users List Subject: DBCP/JNDI/Realms Good morning! I've been running into an intermittent problem with my database connections for authentication. It appears that periodically, the iSeries (DB2/400) that I connect to terminates all incoming ODBC/JDBC connections (one a week, apparently). What happens in my application is that users can no longer login after the connections have been dropped. The connection pool apparently doesn't try to re-initiate the connections after they've been dropped. I see an exception in my logs regarding the connection being reset, then I see an exception relating to the pool being exhausted. I'm not entirely sure what the root cause of the problem here is - in theory, DBCP should recover gracefully when a connection is reset/dropped, right? Here's the initial exception: java.sql.SQLException: Communication link failure.(Connection was dropped unexpectedly.) at com.ibm.as400.access.JDError.throwSQLException(JDError.java:365) at com.ibm.as400.access.AS400JDBCConnection.send(AS400JDBCConnection.java( Comp iled Code)) at com.ibm.as400.access.AS400JDBCConnection.send(AS400JDBCConnection.java( Inli ned Compiled Code)) at com.ibm.as400.access.AS400JDBCStatement.syncRPB(AS400JDBCStatement.java (Com piled Code)) at com.ibm.as400.access.AS400JDBCStatement.commonPrepare(AS400JDBCStatemen t.ja va(Compiled Code)) at com.ibm.as400.access.AS400JDBCPreparedStatement.init(AS400JDBCPrepare dSta tement.java(Compiled Code)) at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConn ecti on.java(Compiled Code)) at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCConn ecti on.java(Compiled Code)) at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(Delegatin gCon nection.java(Compiled Code)) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.pr epar eStatement(PoolingDataSource.java(Compiled Code)) at org.apache.catalina.realm.DataSourceRealm.credentials(DataSourceRealm.j ava: 460) [snip] Here's the next one: 2004-12-06 04:39:21 DataSourceRealm[]: Exception performing authentication org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSour ce.j ava(Compiled Code)) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j ava( Compiled Code)) at org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:438 ) at org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceRealm. java :277) [snip] So, what I've done now to see if it helps matters any, is specify the AS400's own connection pool factory in my JNDI definition, like so: parameter namefactory/name valuecom.ibm.as400.access.AS400JDBCConnectionPoolDataSource/value /parameter Both Tomcat's form authentication as well as my application (through iBATiS) use this JNDI DataSource for connections. Can anyone shed more light on what the root cause of the problem is here? Should DBCP gracefully recover? Regards, Brice Ruth -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com
Re: DBCP/JNDI/Realms
OK, so short of waiting for this to fail again, how might I go about testing this works? Should I see if the database folks can kill the JDBC connections manually? Shapira, Yoav wrote: Hi, The DBCP parameters are for DBCP. DBCP won't magically set various properties on your IBM driver, so if you want those set you have to do it yourself. If you use IBM's pooling, as opposed to IBM's driver with DBCP's pooling, you can set those properties in your Tomcat xml configuration, as long as the factory provided by IBM supports that approach. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Monday, December 06, 2004 3:31 PM To: Tomcat Users List Subject: Re: DBCP/JNDI/Realms Follow-up question. Should I or should I not use the ConnectionPool implementation provided by IBM in their JDBC driver? And if I should, do the parameters provided by DBCP still apply? I have to admit, I'm a bit fuzzy on what role which component is playing in this game! Thanks!! Shapira, Yoav wrote: Hi, DBCP will NOT gracefully recover by itself. You need to configure it according to your desired behavior. Specifically, check out the testOnBorrow, testOnReturn, and testWhileIdle properties at http://jakarta.apache.org/commons/dbcp/configuration.html. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Monday, December 06, 2004 11:32 AM To: Tomcat Users List Subject: DBCP/JNDI/Realms Good morning! I've been running into an intermittent problem with my database connections for authentication. It appears that periodically, the iSeries (DB2/400) that I connect to terminates all incoming ODBC/JDBC connections (one a week, apparently). What happens in my application is that users can no longer login after the connections have been dropped. The connection pool apparently doesn't try to re-initiate the connections after they've been dropped. I see an exception in my logs regarding the connection being reset, then I see an exception relating to the pool being exhausted. I'm not entirely sure what the root cause of the problem here is - in theory, DBCP should recover gracefully when a connection is reset/dropped, right? Here's the initial exception: java.sql.SQLException: Communication link failure.(Connection was dropped unexpectedly.) at com.ibm.as400.access.JDError.throwSQLException(JDError.java:365) at com.ibm.as400.access.AS400JDBCConnection.send(AS400JDBCConnection.jav a( Comp iled Code)) at com.ibm.as400.access.AS400JDBCConnection.send(AS400JDBCConnection.jav a( Inli ned Compiled Code)) at com.ibm.as400.access.AS400JDBCStatement.syncRPB(AS400JDBCStatement.ja va (Com piled Code)) at com.ibm.as400.access.AS400JDBCStatement.commonPrepare(AS400JDBCStatem en t.ja va(Compiled Code)) at com.ibm.as400.access.AS400JDBCPreparedStatement.init(AS400JDBCPrepa re dSta tement.java(Compiled Code)) at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCCo nn ecti on.java(Compiled Code)) at com.ibm.as400.access.AS400JDBCConnection.prepareStatement(AS400JDBCCo nn ecti on.java(Compiled Code)) at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(Delegat in gCon nection.java(Compiled Code)) at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper. pr epar eStatement(PoolingDataSource.java(Compiled Code)) at org.apache.catalina.realm.DataSourceRealm.credentials(DataSourceRealm .j ava: 460) [snip] Here's the next one: 2004-12-06 04:39:21 DataSourceRealm[]: Exception performing authentication org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSo ur ce.j ava(Compiled Code)) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource .j ava( Compiled Code)) at org.apache.catalina.realm.DataSourceRealm.open(DataSourceRealm.java:4 38 ) at org.apache.catalina.realm.DataSourceRealm.authenticate(DataSourceReal m. java :277) [snip] So, what I've done now to see if it helps matters any, is specify the AS400's own connection pool factory in my JNDI definition, like so: parameter namefactory/name valuecom.ibm.as400.access.AS400JDBCConnectionPoolDataSource/value /parameter Both Tomcat's form authentication as well as my application (through iBATiS) use this JNDI DataSource for connections. Can anyone shed more
Re: Tomcat on CD-ROM
Just a heads up to others who might be trying this. I was able to successfully launch Tomcat (with TLD scanning), by simply setting the CATALINA_TMPDIR variable. Not sure why this didn't occur to me previously, but hey - at least it works now! If anyone wants details on what we did to put the JDK/Tomcat/and our pre-compile JSPs web-application on a CD-ROM with a read-only HSQL database, shoot me an email off-list. Ruth, Brice wrote: I've gone through the archives and read about setting loggers workDir to a writable directory, yet I'm still getting an exception thrown in tldScanJar (ContextConfig). I've checked out the code for tldScanJar and I don't see it doing anything but opening an InputStream to the JAR using JarURLConnection - does this Java class try to extract the JAR somewhere? This is on JDK 1.4.2_05, Tomcat 4.1.27, and WinXP SP2. Any guidance would be much appreciated!! -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web.xml security configuration.
[EMAIL PROTECTED] wrote: in my web.xml I have servlet-mapping servlet-namerepository/servlet-name url-pattern/repository/url-pattern /servlet-mapping servlet-mapping servlet-namegetit/servlet-name url-pattern/getit/url-pattern /servlet-mapping I.e. its a one to one, so if I understand you correctly, when I browse to http://localhost/repository/index.jsp my uril-pattern should be security-constraint web-resource-collection web-resource-nameRead-WriteArea/web-resource-name url-pattern/repository/*/url-pattern I have other (html files) in /webapps /repository /upload index.html /search index.html question. I'm assuming these are 'part of' the repository app? Is that right? What should the uri-pattern be for these? Again the browse path will be http://localhost/repository/upload/index.html I want to have different security requirements for upload and search. If I have the security constraint on repository defined with url-pattern of /*, I'm thinking that will cover all the descendents of the repository directory? Is that wrong? regards daveP Dave, That's a correct assumption. You should be able to do what you're wanting to do, the main thing to understand is that if you need to set a granular constraint, say for /repository/search/index.html, then you need to access that page as such. On the other hand, if you want to take advantage of index files, then a security constraint in the form of /repository/search/ should work (no wildcard * at the end). Its really just a pattern/glob match that takes place to determine if a security constraint should be invoked or not. This last pattern should only be invoked for /repository/search/, not for anything else. Same goes if you have one tied to /repository/. I would advise that you add an additional URL-pattern for the actual index file as well, otherwise, if that file is accessed directly, then the security constraint will not be invoked. Hope this helps! -Brice -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: web.xml security configuration.
[EMAIL PROTECTED] wrote: In my applications web.xml I have security-constraint web-resource-collection web-resource-nameRead-WriteArea/web-resource-name description accessible by users of all roles/description url-pattern/*/url-pattern!-- was /* -- http-methodGET/http-method http-methodPOST/http-method http-methodPUT/http-method http-methodDELETE/http-method /web-resource-collection auth-constraint descriptionThese roles are allowed access/description role-nameread/role-name role-namerwrite/role-name role-nameadmin/role-name /auth-constraint /security-constraint If the url-pattern is /* I get my jdbc based form showing, and password authentication using mySQL. If I change it to /repository/index.jsp, i.e. the actual file used, I don't get any authentication. Any advice on what form this element should take please? TIA, DaveP Dave, The security constraint is based on the actual URL requested, not the resource that is being accessed. So, if you're accessing: http://my.host.com/ - and its actually loading http://my.host.com/repository/index.jsp, then your security-constraint won't be triggered if you don't have /* indicated. With a constraint of /repository/index.jsp, try accessing that path directly from your browser - the constraint *should* be triggered then. -Brice -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat on CD-ROM
Any takers Ruth, Brice wrote: I've gone through the archives and read about setting loggers workDir to a writable directory, yet I'm still getting an exception thrown in tldScanJar (ContextConfig). I've checked out the code for tldScanJar and I don't see it doing anything but opening an InputStream to the JAR using JarURLConnection - does this Java class try to extract the JAR somewhere? This is on JDK 1.4.2_05, Tomcat 4.1.27, and WinXP SP2. Any guidance would be much appreciated!! -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat on CD-ROM
I've gone through the archives and read about setting loggers workDir to a writable directory, yet I'm still getting an exception thrown in tldScanJar (ContextConfig). I've checked out the code for tldScanJar and I don't see it doing anything but opening an InputStream to the JAR using JarURLConnection - does this Java class try to extract the JAR somewhere? This is on JDK 1.4.2_05, Tomcat 4.1.27, and WinXP SP2. Any guidance would be much appreciated!! -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ClientAbortException - can't catch?
I'm seeing a lot of ClientAbortExceptions being thrown in my catalina log and I've tried catching them in my Filters, since it would appear that's the logical place to catch 'em (its in the stack trace) - but for some reason, it isn't working ... they're still getting thrown. Any ideas? -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [tomcat] Re: Use of LANG=en_US in Tomcat configuration file
Ernesto Echeverría wrote: Sorry for the missing data. File = tomcat5.conf Tomcat Version = Apache Tomcat/5.0 JVM Version = 1.4.1 OS Name = Linux (Red Hat Enterprise Linux) Partly, that's the reason for my question. This seems to be data for scripting. José Ernesto Echeverría José, How was Tomcat installed? I'm not aware of any tomcat5.conf file in the official Tomcat 5 distribution. Where is this file located in your system? It may simply be used to start/stop tomcat (as an init script) - in which case, the only affect it has is indicating in the environment what the default language of the box is. And it actually indicates that to the Java runtime, not Tomcat, per-se. This doesn't in any way that I know of affect what languages Tomcat can serve to requests or anything of that nature. It may affect the localization of error messages that are produced in the Java runtime, not sure about that aspect of it. It may also affect some default of localization/internationalization routines - but, again, this is nothing that cannot be (and should be) overridden by the application itself. -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use of LANG=en_US in Tomcat configuration file
Ernesto Echeverría wrote: Can someone please explain what's the use for this line in the tomcat configuration file? What's the use of it (the line is commented) and what effect does it have on a running container? What value can it take as well? Any other variables can be set in the same file? Thanks in advance. José Ernesto Echeverría José, What file? server.xml? Where do you see this configuration line? What version of Tomcat are you using? Thanks! -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Realm configuration not working
Greetings! I've recently decided to take advantage of Tomcat's authentication mechanism, however, it doesn't appear to be working for me. I've configured a Realm in my context (through the admin tool). It is a DataSourceRealm. When I've tested everything, I keep getting pushed out to the error page that I've configured in my login settings. Since I couldn't figure out what was going on when I screwed up the debugging levels, I grabbed the source and started stepping through it in my debugger. Here's where it gets interesting. When FormAuthenticator.java gets the Realm to authenticate against: Realm realm = context.getRealm(); The Realm that is returned is Tomcat's global UserDatabaseRealm - not my DataSourceRealm. At this point, its no wonder that the authentication isn't succeeding!! Why isn't Tomcat using the Realm configured in the context?! This is on Tomcat 5.0.27 under jdk 1.4.2. Any help would be appreciated!! -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Realm configuration not working
Dennis Dai wrote: On 8/5/2004 9:26 AM, Ruth, Brice wrote: Greetings! I've recently decided to take advantage of Tomcat's authentication mechanism, however, it doesn't appear to be working for me. I've configured a Realm in my context (through the admin tool). It is a DataSourceRealm. When I've tested everything, I keep getting pushed out to the error page that I've configured in my login settings. Since I couldn't figure out what was going on when I screwed up the debugging levels, I grabbed the source and started stepping through it in my debugger. Here's where it gets interesting. When FormAuthenticator.java gets the Realm to authenticate against: Realm realm = context.getRealm(); The Realm that is returned is Tomcat's global UserDatabaseRealm - not my DataSourceRealm. At this point, its no wonder that the authentication isn't succeeding!! Why isn't Tomcat using the Realm configured in the context?! This is on Tomcat 5.0.27 under jdk 1.4.2. Any help would be appreciated!! Make sure resource-ref / in web.xml is pointing to the correct resource (ie., the one in the context). OK, I don't know what was going on ... but when I went to start copy/pasting my config files into this email, I saw that my context's XML file in Catallina/localhost didn't have a Realm in it any longer. What?! I obviously didn't dream that I configured it committed the changes ... ugh. Maybe I did forget to commit the changes, who knows?! Man-o-man. Thanks, though. Its all working now. Very nice :) -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: special chars : é è ê ï etc...
Thai DANG wrote: Hi all I have troubles with accent. Sometimes, tomcat displays the accent with a ? instead. I think it is a java configuration pb. I have the version 5.0.27 and this is what I use to launch tomcat : export JAVA_OPTS=-server export CATALINA_OPTS=-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Ddcm.home=$installDir -Dbuild. compiler.emacs=true -Djava.library.path=$installDir/lib -Xms256m -Xmx256m -XX:PermSize=128m -XX:MaxP ermSize=128m Note that $installDir is a custom dir with no importance Thanks. Thai, Are these characters encoded directly in the JSP or loaded via message bundles? How are they being output to the browser? What encoding are you using for the output? UTF-8? The default (ISO-8859-1) will not display these characters correctly. Brice -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajp over ssl
That's the best idea I can think of, too. With SSH tunnels using public key authentication, you can set it up so that the tunnel is setup from a system script, without user intervention. David Smith wrote: I'm not sure this can be done. Admittedly I didn't look all that hard -- maybe someone who did development work on the connectors can anwer. I can suggest what I did which is setup a tunnel (SSH tunnel in my case) between the two machines. Then they (the servers) can talk all they want and it covers all services routed through the tunnel -- not just apache and tomcat. Ipsec would work just as well I suspect. Probably not what you wanted, but it's a suggestion still --David Michael Jürgens wrote: Ruth, Brice wrote: Michael Jürgens wrote: Oh sorry I was a little bit tired in the morning. I want to connect the Apache securesd over an unsecure medium (Internet) An my question ist how to connect AJP 1.3 over SSL (not ssh) with jk or jk2. regards, Michael Michael, I believe you'll want to configure your Apache VirtualHost to serve your SSL requests, then use the mod_jk (or jk2) module to communicate with Tomcat. Is there any reason that your web-application (on Tomcat) needs to be aware of the SSL security? You can find documentation on securing Apache via SSL on the main Apache site (httpd.apache.org). And communicating betw. Apache and Tomcat via JK has abundant documentation as well. Good luck! No I want to connect an apache webserver over internet to a tomcat server. So far I have no problem. My problem is, how to secure the connection between apache and tomcat. regards, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Host Aliases, Wildcards
OK, I understand where you are coming from. I believe your assessment is correct. That would be nice! J. Lindberg wrote: Yes it's configured to forward requests to tomcat, [uri:*.jsp]. The thing is, I have several virtual hosts on the server and I would like to keep them separate. I have had some issues using just one host on tomcat, namely; if you have two domain names and they both have a JSP page called page.jsp, then whichever domain who compiles this page first will have the other domain use the same compiled servlet! I have used the host alias directive as found in the tomcat administration interface, it works superb on FQDN's, I just wish it would work as good using wildcards! Tomcat docs on host aliases say nothing about wildcards, so I'm assuming it's not implemented. Would be nice to see a change in this policy. :) On 2004-08-02, at 18.28, Ruth, Brice wrote: Well, you should be able to use the mod_jk (or mod_jk2) module to hand off request to any JSPs to Tomcat ... and Tomcat can just be configured under a single host, so what the incoming hostname request looks like won't matter to it ... only the context its requesting. Have you configured Apache to talk with Tomcat via JK? J. Lindberg wrote: Thanks for your reply. Yes, there is no problem with Apache web server, using ServerAlias which supports wildcards. It all works fine until it encounters a .jsp file, then it's a no-go. On 2004-08-02, at 18.18, Ruth, Brice wrote: Not sure about Tomcat, but Apache should be able to handle this with a few well-written mod_rewrite entries. J. Lindberg wrote: Hey all. I've searched the internet about this, but have come up empty handed, so I'll ask you guys; Is it at all possible to use wildcards in host aliases? I have a host, say example.com. I would like all requests to anything.example.com to alias to example.com. I've already set up the DNS server to resolve hosts accordingly. Cheers. /J. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk and cache
master wrote: hmm i don t remember if i have answer to this so i said yes that s this on tomcat port 8080 the changes are correct but on apache it still the old page, so anyone has any idea on how to solve this ? (without restarting java each time) I'm sorry, I don't have any add'l. ideas. I'm not seeing this problem locally. -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ajp over ssl
Michael Jürgens wrote: Oh sorry I was a little bit tired in the morning. I want to connect the Apache securesd over an unsecure medium (Internet) An my question ist how to connect AJP 1.3 over SSL (not ssh) with jk or jk2. regards, Michael Michael, I believe you'll want to configure your Apache VirtualHost to serve your SSL requests, then use the mod_jk (or jk2) module to communicate with Tomcat. Is there any reason that your web-application (on Tomcat) needs to be aware of the SSL security? You can find documentation on securing Apache via SSL on the main Apache site (httpd.apache.org). And communicating betw. Apache and Tomcat via JK has abundant documentation as well. Good luck! -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk and cache
master wrote: Hi, i use tomcat 4.1.30 with apache 1.3.31 but i have some problem using the mod_jk when i start tomcat all is fine but when one of the site change his configuration (new applet or somethink like that) the change are not done on apache (only on tomcat) for them to work i need to restart java completely each time, i think this come from a problem of configuration of mod_jk but i can t find which i have put the following option concerning the cache : worker.ajp13.cachesize=10 worker.ajp13.cache_timeout=600 worker.ajp13.socket_keepalive=1 worker.ajp13.socket_timeout=300 if someone has any idea it s welcome thanks If you're using the mod_jk.conf auto-generation (I assume you are from the context of your message), then its simply because the mod_jk module only generates that file when Tomcat is started, once started, that file is not modified again. Even so, as far as I know, Apache doesn't pick up modifications to its .conf files - so Apache would need to get restarted for the updated configuration to take effect. The same would be the case if you weren't running the auto-generation, you would need to add the JKMount directives to your apache configuration manually, and restart Apache for the changes to take effect. Or maybe I've misunderstood your problem? Respectfully, Brice Ruth -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TAG Lib problem
You may be having a problem with the case of your tag attribute. Try changing the case of the attribute to all lower-case: titulo and see if that helps. Pablo Carretero Sánchez wrote: Hi all, I have a problem with the Jasper compiler when I try to compile a JSP using TagLibs. The configuration is: Tomcat 5.0.19, JSDK 1.4.2. I have a simple application with: .- 1 TLD: tag nameOperacion/name tag-classcom.kutxa.kn.comun.tags.TituloOperacionTag/tag-class attribute nameMasInfo/name requiredfalse/required /attribute attribute nameTitulo/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameAncho/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameSalto/name requiredfalse/required /attribute attribute nameVolverInicio/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute /tag JSP: With on reference to the TLD: cod:Operacion Titulo=_T_DETALLE Salto=false VolverInicio=false JAVA TAG CLASS: With one attribute and method: - String Titulo - public void setTitulo(...){ } - public String getTitulo(...){ } When the jasper compile the JSP I have one error: ...Unable to find setter method for attribute org.apache.jasper.JasperException: /jkn_opkn/tmpl/es/posglobal.jsp(433,0) Unable to find setter method for attribute: Titulo at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:150) at org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2674) at org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:2822) at org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomStart(Generator.java:2156) at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1667) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213) at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1687) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213) at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219) at org.apache.jasper.compiler.Node$Root.accept(Node.java:456) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163) at org.apache.jasper.compiler.Generator.generate(Generator.java:3269) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:470) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510) at com.cidat.proclets.ProcletServiceData.pageProcletEnd(ProcletServiceData.java:427) at com.cidat.proclets.PSPServlet.service(PSPServlet.java:108) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at
Re: [tomcat] proxy to php app
This is also what we do. http://www.fiskars.com/ is a Struts/Tiles/JSP web-application, http://www.gerberblades.com/ is a PHP application, both run through the same server, Apache+Tomcat. We're not using JK2, we're using the original JK, but either way - if you setup Apache+JK(2), then you can have your cake eat it, too. You can even mix 'em in the same VirtualHost, if you want ... just use Apache's mod_rewrite rules to ensure that everything goes smoothly, if needed. Ernesto Echeverría wrote: I've started to use apache with mod_jk2, meaning that apache handles the web server content and forwards request to tomcat according to your configuration. In that way you keep using all your apache goodies, cgi-bin, php, etc... So my recommendation is: use mod_jk2, keep apache for everything else... José Ernesto Echeverría [EMAIL PROTECTED] -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Vic Cekvenich Sent: Domingo, 01 de Agosto de 2004 08:50 a.m. To: [EMAIL PROTECTED] Subject: [tomcat] proxy to php app I know how to write servlets and filters. How do I create a proxy app on tomcat that would forward to a php app? I do not know how to start. tia, .V - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: horrible problems with TC4.1 under RedHat Advanced Server
Well, first off, it appears your problem is related to your JDK, not so much Tomcat - I'm sure you've assumed as much. Have you tried grabbing other JDKs? You seem to be using Sun's JDK (which happens to be running smoothly on two RedHat ES 2.1 systems I have, no modifications were necessary to install, either). BEA has a free (right? I think so ..) JDK called JRockit, which also runs smoothly on RedHat ES 2.1 (one server here with that). Then, of course, you can grab IBM's JDKs - they have all sorts of different flavors, but I know that on one RedHat ES 2.1 box hosted externally with Rackspace, IBM's JDK was installed by default ... so I imagine there's some history there. Give a few different JDKs a whirl and see if your problems go away!! Good luck. Steve Summit wrote: I've got a big, complicated web application (too complicated to go into the details of here), and I'm having problems moving from Red Hat 9 to Red Hat Advanced Server / Enterprise Server. (The move is for support reasons.) Things were working basically okay under Red Hat 9. But under Advanced Server or Enterprise Server, I have these two problems: 1. Some pretty high percentage of the time, Tomcat fails to start. After invoking catalina.sh start, I get the errors Another exception has been detected while we were handling last error. Dumping information about last error: ERROR REPORT FILE = (N/A) PC= 0x SIGNAL= 11 FUNCTION NAME = (N/A) OFFSET= 0x LIBRARY NAME = (N/A) Simply retrying the command usually works, although sometimes it takes three tries. 2. Much more seriously, my web apps have been mysteriously hanging. They don't tend to crash or burn or emit error messages, they just... stop... responding. In one case (that is, for one of my applications) they seem to hang after acquiring and holding certain database resources, which ends up meaning that other applications running on other servers also accessing that database also hang. In some cases these hangs are accompanied by the messages org.apache.tomcat.util.threads.ThreadPool logFull SEVERE: All threads (75) are currently busy, waiting. Increase maxThreads (75) or check the servlet status I increased maxThreads (and maxProcessors, since the documentation is inconsistent) to 200, but now I just get All threads (200) are currently busy, waiting. Furthermore, it's not clear whether this thread exhaustion is the primary cause of my problems, or just one of the symptoms. I suspect that there's some pernicious incompatibility between this version of Tomcat, this version of j2sdk, and the C libraries in these releases of RedHat. (When I built these machines, I think I had to manually install a C compatibility library to get Java to work at all.) There was a message to this list a month or so ago from Harald Henkel describing some similar-sounding problems, but it doesn't look like he got an answer. He mentioned setting LD_ASSUME_KERNEL to 2.4.1, and I'm going to try this, but it sounded like that only slightly ameliorated, but didn't fix, his problem. Anybody got any ideas? Has this sort of thing happened before? (Web searches haven't really turned up anything.) Is there something I'm missing? Here are the exact details of what I'm running: Jakarta Tomcat 4.1.30 j2sdk 1.4.2_04 Working system: Red Hat Linux release 9 (Shrike) kernel 2.4.20-8smp Troublesome systems: Red Hat Enterprise Linux ES release 3 (Taroon) kernel 2.4.21-4.ELsmp Red Hat Enterprise Linux AS release 3 (Taroon Update 1) kernel 2.4.21-9.ELsmp Thanks in advance for any suggestions. Steve Summit [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: horrible problems with TC4.1 under RedHat Advanced Server
Just as an FYI - with Sun's JVM, on Redhat ES 2.1 systems, I've seen no problems ... we've been running a production system which averages about 57K visitors, 768K page views a month - on Tomcat 4.1.27 and Sun's 1.4.2 JDK (RPM install). This is running a slightly modified Rackspace kernel derivative of 2.4.9. Chong Yu Meng wrote: I think RHAS is running NPTL. If you're using IBM's Java 1.4, 1.3.x or earlier and RH9, RHEL, RHAS , you need to set LD_ASSUME_KERNEL=2.2.5. If you're using IBM's Java 1.4.1 or better on RH9, RHEL (not sure about RHAS), you don't need to set LD_ASSUME_KERNEL at all If you're using IBM's Java 1.4.1 or better on Fedora Core 2, you definitely need to upgrade your kernel version to 2.6.6-1 or better. Though, if you're using the latest 2.6.6-1.435.2.3, you may get some strange problems if you're running on a Thinkpad, so use the earlier 2.6.6-1.435 (if you can do without the security update). I have not used Sun's Java on Red Hat systems, so I cannot say what will happen. I have used Blackdown's 1.4.1, compiled with gcc 3.2 on FC2 and they work fine, even on the stock install kernel (though freezes can still happen). Although benchmarks (Volano Report) show Blackdown to be slower and possibly less scalable, I find that it performs on a wider range of Linux platforms. I find the following procedure helps me to identify the problem: After installing Java on your system, just execute java -version. If you get a segmentation fault, you should try setting LD_ASSUME_KERNEL to 2.2.5, then 2.4.1. 2.2.5 bypasses the NPTL. See which setting works for you. If you don't get a segmentation fault, try running the SwingSet2 application which should come with your Java distribution. On FC2's stock kernel, this can freeze your desktop so bad that you'll need to power down your system manually. Upgrade to the latest (or next to latest kernel) and you should be fine. There may be other problems I'm not aware of. Please post them here. I'm especially interested in hearing from people using the Sun JVM. Regards, pascal chong Peter Lin wrote: this is most definitely an issue with glibc, since I've seen it in the past on my machine. I've had it happen with Sun jvm and IBM jvm for redhat in the past. your best bet is to search the redhat mailing list for solutions to the problem. peter On Sun, 01 Aug 2004 10:54:51 -0700, David Rees [EMAIL PROTECTED] wrote: Steve Summit wrote, On 8/1/2004 6:22 AM: I've got a big, complicated web application (too complicated to go into the details of here), and I'm having problems moving from Red Hat 9 to Red Hat Advanced Server / Enterprise Server. (The move is for support reasons.) I suspect that there's some pernicious incompatibility between this version of Tomcat, this version of j2sdk, and the C libraries in these releases of RedHat. (When I built these machines, I think I had to manually install a C compatibility library to get Java to work at all.) There was a message to this list a month or so ago from Harald Henkel describing some similar-sounding problems, but it doesn't look like he got an answer. He mentioned setting LD_ASSUME_KERNEL to 2.4.1, and I'm going to try this, but it sounded like that only slightly ameliorated, but didn't fix, his problem. It's definitely some sort of JVM/OS issue, and not directly related to Tomcat. What glibc version are you running, are you running all errata for the system (up2date)? Also upgarde to the latest JDK, and finally, if it is still not stable, try a LD_ASSUME_KERNEL setting of 2.2.5. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Host Aliases, Wildcards
Not sure about Tomcat, but Apache should be able to handle this with a few well-written mod_rewrite entries. J. Lindberg wrote: Hey all. I've searched the internet about this, but have come up empty handed, so I'll ask you guys; Is it at all possible to use wildcards in host aliases? I have a host, say example.com. I would like all requests to anything.example.com to alias to example.com. I've already set up the DNS server to resolve hosts accordingly. Cheers. /J. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk and cache
master wrote: If you're using the mod_jk.conf auto-generation (I assume you are from the context of your message), then its simply because the mod_jk module only generates that file when Tomcat is started, once started, that file is not modified again. Even so, as far as I know, Apache doesn't pick up modifications to its .conf files - so Apache would need to get restarted for the updated configuration to take effect. The same would be the case if you weren't running the auto-generation, you would need to add the JKMount directives to your apache configuration manually, and restart Apache for the changes to take effect. Or maybe I've misunderstood your problem? Respectfully, Brice Ruth -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ hi, no i don t use the autoconf but that s not really the problem my problem is not about the change in the config file i speak in the change of .class file for example in a website, a simple reload of the context (with the manager) work fine for java but not for apache it doesn t take the changes Hrmpf, that is strange ... JK (to my knowledge) does no caching, so every request that matches its JKMount map parameters is handed off to Tomcat. When you change a .class file, reload the application, and access it via Tomcat directly (port 8080?) - your changes appear? But not through Apache? -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TAG Lib problem
Pablo, No, I'm afraid I don't know of any other workaround. This is all part of the tag spec, I believe, so it has to be done right ... I can only assume that BEA was lax in this regard ... but since Tomcat is the reference implementation, I'd expect it to adhere pretty closely to the specification. That's all I can provide - maybe someone else has an idea for you! Brice Pablo Carretero Sánchez wrote: Hi Brice, yes it's work, I tried it. The real problem, is that I'm working in app. migration from BEA to Tomcat, my appy is in real environment and If I change the attribute in the tld, I need change the attribute in all my jsp, that is very power change. I appreciate your info, but do you know any other work around. Thank a lot. ciao .pcs Ruth, Brice ([EMAIL PROTECTED]) escribió: You may be having a problem with the case of your tag attribute. Try changing the case of the attribute to all lower-case: titulo and see if that helps. Pablo Carretero Sánchez wrote: Hi all, I have a problem with the Jasper compiler when I try to compile a JSP using TagLibs. The configuration is: Tomcat 5.0.19, JSDK 1.4.2. I have a simple application with: .- 1 TLD: tag nameOperacion/name tag-classcom.kutxa.kn.comun.tags.TituloOperacionTag/tag-class attribute nameMasInfo/name requiredfalse/required /attribute attribute nameTitulo/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameAncho/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute attribute nameSalto/name requiredfalse/required /attribute attribute nameVolverInicio/name requiredfalse/required rtexprvaluetrue/rtexprvalue /attribute /tag JSP: With on reference to the TLD: cod:Operacion Titulo=_T_DETALLE Salto=false VolverInicio=false JAVA TAG CLASS: With one attribute and method: - String Titulo - public void setTitulo(...){ } - public String getTitulo(...){ } When the jasper compile the JSP I have one error: ...Unable to find setter method for attribute org.apache.jasper.JasperException: /jkn_opkn/tmpl/es/posglobal.jsp(433,0) Unable to find setter method for attribute: Titulo at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:150) at org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2674) at org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:2822) at org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomStart(Generator.java:2156) at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1667) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213) at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1687) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213) at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219) at org.apache.jasper.compiler.Node$Root.accept(Node.java:456) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163) at org.apache.jasper.compiler.Generator.generate(Generator.java:3269) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:470) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237
Re: [tomcat] proxy to php app
Well, Tomcat can't load PHPs, so what server are you using to server the PHP content? Why does Tomcat have to be the proxy, instead of the other way around? Writing a proxy servlet sounds like its going to be painful ... Vic Cekvenich wrote: I can't use Apache. It has to go to Tomcat. Servlets ideas to write proxy? .V Ernesto Echeverría wrote: I've started to use apache with mod_jk2, meaning that apache handles the web server content and forwards request to tomcat according to your configuration. In that way you keep using all your apache goodies, cgi-bin, php, etc... So my recommendation is: use mod_jk2, keep apache for everything else... José Ernesto Echeverría [EMAIL PROTECTED] -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Vic Cekvenich Sent: Domingo, 01 de Agosto de 2004 08:50 a.m. To: [EMAIL PROTECTED] Subject: [tomcat] proxy to php app I know how to write servlets and filters. How do I create a proxy app on tomcat that would forward to a php app? I do not know how to start. tia, .V - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Host Aliases, Wildcards
Well, you should be able to use the mod_jk (or mod_jk2) module to hand off request to any JSPs to Tomcat ... and Tomcat can just be configured under a single host, so what the incoming hostname request looks like won't matter to it ... only the context its requesting. Have you configured Apache to talk with Tomcat via JK? J. Lindberg wrote: Thanks for your reply. Yes, there is no problem with Apache web server, using ServerAlias which supports wildcards. It all works fine until it encounters a .jsp file, then it's a no-go. On 2004-08-02, at 18.18, Ruth, Brice wrote: Not sure about Tomcat, but Apache should be able to handle this with a few well-written mod_rewrite entries. J. Lindberg wrote: Hey all. I've searched the internet about this, but have come up empty handed, so I'll ask you guys; Is it at all possible to use wildcards in host aliases? I have a host, say example.com. I would like all requests to anything.example.com to alias to example.com. I've already set up the DNS server to resolve hosts accordingly. Cheers. /J. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Weird context.xml default application problem
I've heard mentioned that in the Tomcat codebase, ROOT is treated as a special identifier. As for your problem ... I believe that Tomcat does not support deployment of the default context from the META-INF directory of your web-app. You need to explicitly configure it from server.xml or from the conf/Catalina/localhost directory. What you've seen is essentially that ... it will automatically put it in the proper directory, but it will stop short of configuring the default context for you. Brice Keith Bottner wrote: This is strange! When I package my application and deploy it my context.xml file that is contained within the META-INF directory is copied to the CATALINA_BASE/conf/Catalina/localhost/app.xml properly. Here is the file for reference: Context path= docBase=app debug=3 privileged=true reloadable=false /Context My server does NOT recognize this as the default web application, instead it lists the directory contents for the webapps directory. BUT, and here is the weird part. If I manually edit the file and add or remove a line and restart appropriately, it then does get recognized as the default application. Any ideas? Or am I just getting lucky that it ever gets recognized as the default app and I should be setting this directly in server.xml? And how does the default install of tomcat always seem to recognize ROOT as the default even though there is no settings in server.xml or a context.xml file associated with it? Thanks in advance for any help, Keith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Context Descriptors: which directory
I believe if you put your context XML files in webapps, Tomcat will copy them to the Catalina directory, at which point it will consider *that* context file as the authoritative resource, so updates to your context XML in webapps won't be recognized. Not entirely sure on this, but I've had some issues with not putting them in the proper place. The correct place really is the Catalina directory, as the docs say. Charles N. Harvey III wrote: Hello. I was using Tomcat 4 and I had my foo.xml file in $catalina_home/webapps/foo.xml. This pointed Tomcat to a different directory where the application resided. Now, in Tomcat 5 I see in the docs that I am supposed to be placing these files in $catalina_home/conf/Catalina/localhost/foo.xml. Do I HAVE to? Can I configure Tomcat 5 to see them in the /webapps/ dir? Or, is that a bad practice? Just wondering. Thanks a lot. Charlie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Datasource
In addition to defining the DataSource in Tomcat's admin tool, you'll need to define the Resource in you web.xml - something like this: resource-ref !-- optional -- description Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. /description !-- local JNDI name to use in JSPs, servlets, etc. -- res-ref-name jdbc/phone /res-ref-name res-type javax.sql.DataSource /res-type res-auth Container /res-auth /resource-ref You'll also need to define a ResourceLink in your Context, that links what you want to call your DataSource locally (used in web.xml, see above) to what you called your DataSource in the admin tool (globally ... these can be the same, but don't have to be). Something like this: ResourceLink global=jdbc/phone name=jdbc/phone type=javax.sql.DataSource/ The 'global' attribute provides the name of the global JNDI resource (what was defined in the admin tool); 'name' provides the name of the local JNDI resource (what will be referenced in web.xml). That's it! You shouldn't have any problems once you've done this. Respectfully, Brice Ruth Bussie, Andre D wrote: I'm using Tomcat 5.0.19. I configured a datasource via the Tomcat Admin tool to configure a datatsource listed below is the server.xml file settings for the datasource GlobalNamingResources Resource name=jdbc/phone auth=Container type=javax.sql.DataSource description=Database for the phone application / ResourceParams name=jdbc/phone parameter namemaxWait/name value5000/value /parameter parameter namemaxActive/name value4/value /parameter parameter namepassword/name value/value /parameter parameter nameurl/name valuejdbc:hsqldb.hsql://localhost/value /parameter parameter namedriverClassName/name valueorg.hsqldb.jdbcDriver/value /parameter parameter namemaxIdle/name value2/value /parameter parameter nameusername/name valuesa/value /parameter /ResourceParams /GlobalNamingResources However when I try to access the datasource from a jsp file I get the following error 2004-07-26 10:42:19 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception javax.naming.NameNotFoundException: Name jdbc/phone is not bound in this Context Code snippet listed below % InitialContext ctx = new InitialContext(); DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/phone); Connection conn = ds.getConnection(); try{ Any suggestions on what can be causing this error. Why isn't in the context and how do I bind it to the context? -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Datasource
Shapira, Yoav wrote: Hi, You'll also need to define a ResourceLink in your Context, that links You only need a ResourceLink if your Resource is defined in GlobalNamingResources. This person's Resource is defined in his/her Context, so a ResourceLink is not needed. Another good idea would be to use a more recent Tomcat version thant 4.1.3. Yoav Shapira Yoav, No offense, but I believe you're wrong. Here's a snippet from the original email: GlobalNamingResources Resource name=jdbc/phone auth=Container type=javax.sql.DataSource description=Database for the phone application / ResourceParams name=jdbc/phone In this case, a ResourceLink is needed, in my experience. -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Datasource
Very true, I stand corrected :) Shapira, Yoav wrote: Hi, I wasn't wrong, just unable to read, it appears ;) I thought it was inside a Context declaration. Yoav Shapira Millennium Research Informatics -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 10:15 AM To: Tomcat Users List Subject: Re: Tomcat Datasource Shapira, Yoav wrote: Hi, You'll also need to define a ResourceLink in your Context, that links You only need a ResourceLink if your Resource is defined in GlobalNamingResources. This person's Resource is defined in his/her Context, so a ResourceLink is not needed. Another good idea would be to use a more recent Tomcat version thant 4.1.3. Yoav Shapira Yoav, No offense, but I believe you're wrong. Here's a snippet from the original email: GlobalNamingResources Resource name=jdbc/phone auth=Container type=javax.sql.DataSource description=Database for the phone application / ResourceParams name=jdbc/phone In this case, a ResourceLink is needed, in my experience. -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Datasource -- please help..
I believe if you're defining your DataSource in the Context directly, not in the Global Naming Resources, then you do not need the resource-ref in web.xml, nor the ResourceLink mentioned below. What code are you using to get to your connection? The JNDI lookup should be to java:comp/env/jdbc/prototypedb, in your particular case. Respectfully, Brice Ruth Shilpa Nalgonda wrote: I have defined the resource in web.xml as below... and also defined the datasouce resources under context in server.xml... even then it does not help.. I get the same error org.apache.jasper.JasperException: Name prototypedb is not bound in this Context Web.xml web-app descriptionPrototypeDB Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/prototypedb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app === server.xml == !-- JNDI datasource setup to connect to MYSQL database-- Context path=/PrototypeDBTest docBase=PrototypeDBTest debug=5 reloadable=true crossContext=true useNaming=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_PrototypeDBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/prototypedb auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/prototypedb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. -- parameter namemaxActive/name value100/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. -- parameter namemaxIdle/name value30/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- MySQL dB username and password for dB connections -- parameter nameusername/name valueantonio/value /parameter parameter namepassword/name valueplay/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter !-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default closes idle connections after 8 hours. -- parameter nameurl/name valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=true/value /parameter /ResourceParams /Context = -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 10:04 AM To: Tomcat Users List Subject: Re: Tomcat Datasource In addition to defining the DataSource in Tomcat's admin tool, you'll need to define the Resource in you web.xml - something like this: resource-ref !-- optional -- description Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. /description !-- local JNDI name to use in JSPs, servlets, etc. -- res-ref-name jdbc/phone /res-ref-name res-type javax.sql.DataSource /res-type res-auth Container /res-auth /resource-ref You'll also need to define a ResourceLink in your Context, that links what you want to call your DataSource locally (used in web.xml, see above) to what you called your DataSource in the admin tool (globally ... these can be the same, but don't have to be). Something like this: ResourceLink global=jdbc/phone name=jdbc/phone type=javax.sql.DataSource/ The 'global' attribute provides the name of the global JNDI resource (what was defined in the admin tool); 'name' provides the name of the local JNDI resource (what will be referenced in web.xml). That's it! You shouldn't have any problems once you've done this. Respectfully, Brice Ruth Bussie, Andre D wrote: I'm using Tomcat 5.0.19. I configured a datasource via the Tomcat Admin tool to configure
Re: Tomcat Datasource -- please help..
I believe that should work. I'm out of ideas ... it seems strange that the Exception you're getting is complaining about prototypedb not being bound, instead of jdbc not being bound ... usually that comes first. That's the only thing that sticks out to me, but I don't really know what to make of it! Shilpa Nalgonda wrote: Below is the code i am using to get the connection, and datasource... Context ctx = new InitialContext(); Context env = (Context)ctx.lookup(java:comp/env); DataSource ds = (DataSource) env.lookup(jdbc/prototypedb); conn = ds.getConnection(); -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 11:07 AM To: Tomcat Users List Subject: Re: Tomcat Datasource -- please help.. I believe if you're defining your DataSource in the Context directly, not in the Global Naming Resources, then you do not need the resource-ref in web.xml, nor the ResourceLink mentioned below. What code are you using to get to your connection? The JNDI lookup should be to java:comp/env/jdbc/prototypedb, in your particular case. Respectfully, Brice Ruth Shilpa Nalgonda wrote: I have defined the resource in web.xml as below... and also defined the datasouce resources under context in server.xml... even then it does not help.. I get the same error org.apache.jasper.JasperException: Name prototypedb is not bound in this Context Web.xml web-app descriptionPrototypeDB Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/prototypedb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app === server.xml == !-- JNDI datasource setup to connect to MYSQL database-- Context path=/PrototypeDBTest docBase=PrototypeDBTest debug=5 reloadable=true crossContext=true useNaming=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_PrototypeDBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/prototypedb auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/prototypedb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. -- parameter namemaxActive/name value100/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. -- parameter namemaxIdle/name value30/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- MySQL dB username and password for dB connections -- parameter nameusername/name valueantonio/value /parameter parameter namepassword/name valueplay/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter !-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default closes idle connections after 8 hours. -- parameter nameurl/name valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=true/value /parameter /ResourceParams /Context = -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 10:04 AM To: Tomcat Users List Subject: Re: Tomcat Datasource In addition to defining the DataSource in Tomcat's admin tool, you'll need to define the Resource in you web.xml - something like this: resource-ref !-- optional -- description Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. /description !-- local JNDI name to use in JSPs, servlets, etc. -- res-ref-name jdbc/phone /res-ref-name res-type javax.sql.DataSource /res-type res-auth Container
Re: Tomcat Datasource -- please help..
Well, the way I do it is adding the data source using the admin tool, then adding a resource-ref to web.xml and a ResourceLink to the Context. This keeps things a bit cleaner in my opinion. What you're doing should work .. but I can't really give you much more than that. Try defining it through the admin tool and following the instructions for adding a resource-ref to web.xml and a ResourceLink to your Context. Shilpa Nalgonda wrote: As you have said i am getting jdbc not bound exception only. But at one point i changed the env lookup to point to prototypedb instead of jdbc/prototypedb.. so thats when i get prototypedb not bound error... Anyway do you think that i have put the context to the jndi resource in the wrong place in server.xml.. where exactly should i add this in server.xml. if i add datasource using admin tool the jndi parameter gets added in GlobalNamingResouce. which is correct way... -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 11:29 AM To: Tomcat Users List Subject: Re: Tomcat Datasource -- please help.. I believe that should work. I'm out of ideas ... it seems strange that the Exception you're getting is complaining about prototypedb not being bound, instead of jdbc not being bound ... usually that comes first. That's the only thing that sticks out to me, but I don't really know what to make of it! Shilpa Nalgonda wrote: Below is the code i am using to get the connection, and datasource... Context ctx = new InitialContext(); Context env = (Context)ctx.lookup(java:comp/env); DataSource ds = (DataSource) env.lookup(jdbc/prototypedb); conn = ds.getConnection(); -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 11:07 AM To: Tomcat Users List Subject: Re: Tomcat Datasource -- please help.. I believe if you're defining your DataSource in the Context directly, not in the Global Naming Resources, then you do not need the resource-ref in web.xml, nor the ResourceLink mentioned below. What code are you using to get to your connection? The JNDI lookup should be to java:comp/env/jdbc/prototypedb, in your particular case. Respectfully, Brice Ruth Shilpa Nalgonda wrote: I have defined the resource in web.xml as below... and also defined the datasouce resources under context in server.xml... even then it does not help.. I get the same error org.apache.jasper.JasperException: Name prototypedb is not bound in this Context Web.xml web-app descriptionPrototypeDB Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/prototypedb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app === server.xml == !-- JNDI datasource setup to connect to MYSQL database-- Context path=/PrototypeDBTest docBase=PrototypeDBTest debug=5 reloadable=true crossContext=true useNaming=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_PrototypeDBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/prototypedb auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/prototypedb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. -- parameter namemaxActive/name value100/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. -- parameter namemaxIdle/name value30/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- MySQL dB username and password for dB connections -- parameter nameusername/name valueantonio/value /parameter parameter namepassword/name valueplay/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter !-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default
Re: disable URL rewriting for session tracking
Your fundamental problem is going to be that your container won't be able to know if a client supports cookies until the second request comes along. This is why on the first request, all URLs are rewritten, regardless of if cookies are enabled or not - the container just doesn't know yet. The second request will send the cookie information back to the server, at which point you would know if the client supports cookies or not (though, I don't think there'd be anyway to distinguish a client that *doesn't* support cookies from a new request entirely, that would be tricky). If all you want to do is disable URL rewriting, you can do that easily enough through a Filter. Just wrap the response in a response wrapper, disabling the encodeUrl methods that are in the parent class (just override with dummy methods). Eric Allen wrote: I need to somehow disable URL rewriting for session tracking in my application. My designer uses a:href tags all over and I don't want to change that, so I'm stuck with cookies. The problem is, tomcat doesn't appear to have any way of saying if the user doesn't accept the session cookie, throw an exception or something. I need a way to not allow the user to login if they do not support cookies. I am using Tomcat 5.0.18 and Struts 1.1. I am willing to come up with some kind of work around, but I can't find a way to hook into the low-level session handling stuff. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help (Started over again) Making Tomcat work with Apache
No, it means your ROOT context is not configured properly. These entries should be in there if Tomcat is seeing your ROOT context correctly. Does localhost:8080/test.jsp load correctly?! That should be a definitive test of if the ROOT context is configured in Tomcat. Btw - if you're not getting what you want to be getting from the mod_jk auto-generated config, feel free to use what its creating as a template and hard-code the necessary VirtualHost, JKMount, etc. configuration directives directly in your httpd.conf. Some folks think the auto-generated conf file is more trouble than its worth. Brice Phillip Blancher wrote: No it does not. Should it have this? If so, do I add it to the workers.properties? Phil Does your mod_jk.conf have an entry like this in it: JKMount / JKMount /* ?! -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Scan and help eliminate destructive viruses from your inbound and outbound e-mail and attachments. http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how I can to see the output in tomcat from windows 2000
There should be a logs directory in your TOMCAT_HOME directory ... so, if you installed Tomcat to C:\Program Files\Apache Tomcat\ - then look for a logs directory there. You'll find the same catalina.out file and catalina.err file there. Alberto Marino wrote: Note: forwarded message attached. Nuevo Yahoo! Búsquedas http://es.rd.yahoo.com/mail_es/tagline/search/image/*http://62.97.113.245/comparalo/busquedas.html Subject: how I can to see the output in tomcat from windows 2000 From: Alberto Marino [EMAIL PROTECTED] Date: Mon, 26 Jul 2004 16:57:17 +0200 (CEST) To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Hi, I would like to know how I can to see the output in tomcat for depure mi aplication. In linux I can see the catalina.out in /logs directory but in Windows 2000 I don´t know. Please help me! Thanks. Nuevo Yahoo! Búsquedas http://es.rd.yahoo.com/mail_es/tagline/search/image/*http://62.97.113.245/comparalo/busquedas.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how I can to see the output in tomcat from windows 2000
How are you starting Tomcat? If you're starting tomcat from the cmdline, then it will send STDOUT STDERR to the console. If you're starting it as a service, then it should create stdout.log and stderr.log in the TOMCAT_HOME/logs directory. If you're running Tomcat from Eclipse, or other IDEs, then STDOUT STDERR typically get redirected to the IDE's console. Caveat - if the Host in server.xml and/or your Context definition contain a logging element, then most logging will get redirected to that log file, I believe. Alberto Marino wrote: Yes, I have files like localhost_log.2004-07-24.txt but this files don´t show java output. For example, when you have in your code System.out.println(.) I don´t know where must see for the output. In linux I know that there are a file like catalina.out that show this output but in Windows 2000 I dont´t know. John Najarian [EMAIL PROTECTED] wrote:I know mine is on XP but my friend runs on 2000. You should have an stdout.log localhost_log... files in the Jakarta.../logs directory. Try doing a search under Jakarta... for files modified today. Perhaps you inadvertently put it in some other directory a maybe under another name. -Original Message- From: Alberto Marino [mailto:[EMAIL PROTECTED] Sent: Monday, July 26, 2004 12:52 PM To: Tomcat Users List Subject: Re: how I can to see the output in tomcat from windows 2000 Sorry, in mi /logs directory only there are localhost_log.2004-XX-XX.txt files but not anyone Ruth, Brice wrote:There should be a logs directory in your TOMCAT_HOME directory ... so, if you installed Tomcat to C:\Program Files\Apache Tomcat\ - then look for a logs directory there. You'll find the same catalina.out file and catalina.err file there. Alberto Marino wrote: Note: forwarded message attached. Nuevo Yahoo! Búsquedas Subject: how I can to see the output in tomcat from windows 2000 From: Alberto Marino Date: Mon, 26 Jul 2004 16:57:17 +0200 (CEST) To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Hi, I would like to know how I can to see the output in tomcat for depure mi aplication. In linux I can see the catalina.out in /logs directory but in Windows 2000 I don´t know. Please help me! Thanks. Nuevo Yahoo! Búsquedas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: deploy tool and java web services
Deploying a WAR to 'standard' Tomcat is as simple as putting the .war file in your Tomcat's webapps directory. This is the simplest deployment. Some applications require custom configuration (JNDI resources, etc.) which need to be configured through the Tomcat admin application (localhost/admin) or through server.xml or through context.xml files that you place in your webapps/ directory. Mohammad N. Tina wrote: Hi, i am still new to tomcat, i have this application, it is using JSP and XML files to get data from oracle server. i installed java web services from sun, when it asked for web container..it did not like tomcat downloaded from jakarta website, i had to download tomcat from sun website, can anyone point the difference between these two version, the application is a war file, when i try it to deploy it through manager/deploy it won't work, is there an external deploy tool. thanks __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help (Started over again) Making Tomcat work with Apache
Phillip Blancher wrote: I created a folder in the htdocs directory called WEB-INF which has an web.xml file that has inside of it the following code: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app /web-app And I am still getting the prompt to download the file. Phil Phil, Does your mod_jk.conf have an entry like this in it: JKMount / JKMount /* ?! -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help (Started over again) Making Tomcat work with Apache
Jrme Duval wrote: I am not sure about this, but your problem seems to be confirming this. I think the JSPs will not be compiled unless they are part of a web application, i.e. you are being asked to save it because it isn't a format your browser recognizes (its not a webpage). In the folder of your test.jsp, you have to create a WEB-INF folder and it has to contain a valid web.xml file (which can probably be empty aside from the wep-app/web-app tags). In my experience, this is not the case. I've deployed purely JSP driven web-applications, without a WEB-INF directory, or web.xml - until I needed a feature in web.xml (filter, servlet, etc.) Respectfully, Brice Ruth -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with default encoding
Ingo Rockel wrote: Hi, I have a problem with the default encoding of tomcat 4 and 5 which tomcat reports to the client if the client application doesn't set an encoding, e.g.: Content-Type: text/html tomcat 4.1.30 sets this to Content-Type: text/html;charset=8859_1 which isn't a valid identifier for this encoding, according to http://www.iana.org/assignments/character-sets and it causes problems with Internet Explorer, whereas charset=ISO-8859-1 works fine which 4.1.27 used to set. Is there some sort of config where I can set this default encoding (passing -Dfile.encoding to the tomcat vm didn't work). Thanx for any help, Ingo What problems specifically are you having with Internet Explorer? Most encoding issues I've come across are easily resolved by setting the contentType attribute of the 'page' directive at the top of your JSP file: %@ page contentType= text/html;charset=ISO-8859-1 % Respectfully, Brice Ruth -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mod_jk problems with Apache 1.3.31 Tomcat 4.1.30
Chris Bland wrote: Hello all, I am having trouble getting the jk connector to work with apache 1.3.31 and tomcat 4.1.30. When I try to go from apache to tomcat I am getting an internal server error. My workers.properties file is very basic worker.list=rei worker.rei.type=ajp13 worker.rei.host=rei.fdu.edu worker.rei.port=8005 worker.rei.cachesize=10 worker.rei.cache_timeout=600 worker.rei.socket_keepalive=1 worker.rei.socket_timeout=300 I have tried the static httpd.conf entries LoadModule jk_module libexec/mod_jk.so AddModule mod_jk.c JkWorkersFile /usr/local/apache/rei/conf/workers.properties JkLogFile /usr/local/apache/rei/log/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkRequestLogFormat %w %V %T JkMount /examples/* rei And I used the default non coyote connector in my server.xml file Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ There isn't any output in my log files and the /usr/local/apache/rei/log/mod_jk.log did not get created.. Any help would be appreciated. Thanks in advance. Your AJP13 connector in server.xml is listening on port 8009, and your worker.rei.port is 8005. This could be your problem. Respectfully, Brice Ruth -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat 4.1.29 problem
Christina Androne wrote: Hello I have an application deployed under tomcat 4.1.29 and recently the web server has started bahaving weird: I make a request to one of the apps servlets and I never get a response to it or get it very difficult. I have placed debug messages all over the servlet so I se everything gets executed but the response content is never returned to the browser. Stopping the tomcat service takes ages too or just hangs. I am not sure about this, but I think this started happening after I modified some stuff in the server.xml conf file. I have changed it back but this behaviour still persists. What to do? What I changed in the server.xml file: added this: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / (a new connector on 80) and changed ROOT to some other dir in Context path= docBase=ROOT debug=0/ Does anybody have a clue on what might be happening? I can attach the existing server.xml if necessary .. . Thanks, Christina Sometimes Tomcat starts acting funny if its running out of memory. Have you seen any OutOfMemory exceptions in your Tomcat log? -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Linux / Apache / Tomcat conf troubles
Julien Oix wrote: Hi everyone, I find 2 problems on my Linux/Apache/Tomcat platform : *** First, I can't manage to redirect a 500 error code page to a customized error page, even I can't see any trouble in my conf's files. # config Linux RedHat 7.1 Apache 1.3.27 (rpm) Tomcat 4.1.18 (rpm) mod_jk 1.2.2 (rpm) #apache myVH.conf ErrorDocument 500 /jsp/500.jsp #tomcat myapps/WEB-INF/web.xml error-page error-code500/error-code location/jsp/500.jsp/location /error-page apache gets a 500 error code # myapps_access_log 193.52.112.54 - - [05/Jul/2004:15:52:49 +0200] GET /Login.do HTTP/1.1 500 3990 but the browser prints the default tomcat error page and not my customized 500.jsp ... Julien, Are you using mod_jk auto-configuration generation to integrate your Tomcat Apache environments? If so, you need to ensure that your ErrorDocument directive appears in the VirtualHost that mod_jk generates. Unfortunately, to my knowledge, there is no automatic way of doing this ... you need to add that ErrorDocument directive every time mod_jk updates the .conf file. Otherwise, if you're getting a Tomcat error 500, I'm guessing that the error-page directive in your web.xml is not being properly picked up (Apache will handle 500 errors generated by Apache, Tomcat will handle 500 errors generated by Tomcat). Respectfully, Brice Ruth -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help with configuration
Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory # Deny direct access to WEB-INF and META-INF # Location /examples/WEB-INF/* AllowOverride None deny from all /Location Location /examples/META-INF/* AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory D:/IBserver/tomcat4/webapps/examples/WEB-INF/ AllowOverride None deny from all /Directory Directory D:/IBserver/tomcat4/webapps/examples/META-INF/ AllowOverride None deny from all /Directory JkMount /examples/jsp/security/protected/j_security_check ajp13 JkMount /examples/snoop ajp13 JkMount /examples/servlet/* ajp13 JkMount /examples/CompressionTest ajp13 JkMount /examples/*.jsp ajp13 JkMount /examples/servletToJsp ajp13 JkMount /examples/SendMailServlet ajp13 localhost:/tomcat-docs # Static files Alias /tomcat-docs D:/IBserver/tomcat4/webapps/tomcat-docs Directory D:/IBserver/tomcat4/webapps/tomcat-docs Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory # Deny direct access to WEB-INF and META-INF # Location /tomcat-docs/WEB-INF/* AllowOverride None deny from all /Location Location /tomcat-docs/META-INF/* AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory D:/IBserver/tomcat4/webapps/tomcat-docs/WEB-INF/ AllowOverride None deny from all /Directory Directory D:/IBserver/tomcat4/webapps/tomcat-docs/META-INF/ AllowOverride None deny from all /Directory JkMount /tomcat-docs/*.jsp ajp13 localhost:/manager # Static files Alias /manager D:/IBserver/tomcat4/webapps/../server/webapps/manager Directory D:/IBserver/tomcat4/webapps/../server/webapps/manager Options Indexes FollowSymLinks DirectoryIndex index.html index.htm index.jsp /Directory # Deny direct access to WEB-INF and META-INF # Location /manager/WEB-INF/* AllowOverride None deny from all /Location Location /manager/META-INF/* AllowOverride None deny from all /Location # # Use Directory too. On Windows, Location doesn't work unless case matches # Directory D:/IBserver/tomcat4/webapps/../server/webapps/manager/WEB-INF/ AllowOverride None deny from all /Directory Directory D:/IBserver/tomcat4/webapps/../server/webapps/manager/META-INF/ AllowOverride None deny from all /Directory JkMount /manager/list ajp13 JkMount /manager/deploy ajp13 JkMount /manager/html/* ajp13 JkMount /manager/resources ajp13 JkMount /manager/start ajp13 JkMount /manager/stop ajp13 JkMount /manager/install ajp13 JkMount /manager/*.jsp ajp13 JkMount /manager/remove ajp13 JkMount /manager/roles ajp13 JkMount /manager/sessions ajp13 JkMount /manager/serverinfo ajp13 JkMount /manager/reload ajp13 JkMount /manager/undeploy ajp13 /VirtualHost If you're using the auto-generated mod_jk.conf, you should not define your virtualhost containers in the main httpd.conf. That's one problem. The next is that by default, Tomcat tries bind ports at 8009 8080 ... 8080 is the HTTP connector, 8009 is the JK connector. If you bind these with Apache (your Listen directives) - then Tomcat cannot bind them, which means the JK connector between Apache and Tomcat cannot communicate. I'd highly suggest getting your configuration working with only Tomcat before trying to integrate Apache into the mix. Verify that you can access all the things you need to access through Tomcat's HTTP connection. Respectfully, Brice Ruth -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to configure main web app to skip URL application context
Michael Mehrle wrote: The gist of it is that I will forgo Apache altogether and run Tomcat on port 80. Now, in order to do that I need to: a) Serve index.jsp directly like this http://www.hostname.com/index.jsp (or http://www.hostname.com) instead of having to go to: http://www.hostname.com/myapp/ b) Serve the rest of my application directly in the same fashion without having to specify the webapp context I've seen this done with a Tomcat demo installation of Roller, so I know it's possible. Any input would be appreciated. Thanks! Michael What you're looking for is installing your context in the ROOT context for Tomcat. The easiest way I've found to do this is to place your web-application (exploded is what I typically do), in the appBase directory for the Host container you've configured in Tomcat's server.xml - then place a context XML in that directory that has the following content: Context path= docBase=myapp/ That's it ... point your browser to your host and you should be in good shape. Be aware - out of the box, Tomcat ships with a simple 'ROOT' application loaded into the 'ROOT' context ... you should remove this from the server.xml file first. Respectfully, Brice Ruth -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help (Started over again) Making Tomcat work with Apache
Phillip Blancher wrote: First, Thank you Brice Ruth for the email before. However I have gone a head and wiped everything out and started over. I picked up in the middle of this installation from someone else so instead of being flustered, I just started over. Here is the situation. I am setting this up first to work localhost for now, the plan is to add 5 or 6 test IP's later. TomCat works on its own at http://localhost:8080/ Apache works on its own at http://localhost/ Apache version is Apache/1.3.31 TomCat Version is 4.1.30 I am running on a Windows 2000 server I have installed the mod_jk module and configured the workers.properties file. Here is the thing. Everything boots fine, and both services work, but not together. I have placed in the localhost web space a file called test.jsp. When I go to http://localhost/test.jsp - IE prompts me to download the file. So even though there are no errors on the start of the services. They are not working together. When I go to the mod_jk_log, I find this error message. [Thu Jul 22 11:01:51 2004] [jk_connect.c (203)]: jk_open_socket, connect() failed errno = 61 [Thu Jul 22 11:01:51 2004] [jk_ajp_common.c (676)]: Error connecting to tomcat. Tomcat is probably not started or is listenning on the wrong port. Failed errno = 61 So my question is, given the files below, how do I make them talk? Is it as simple as making them listen to different ports and if so, which ones to have them listening to? Help is muchly appreciated. Phil Phil, Per Yoav's comment, remove the ajp14 connector from your workers.properties ... this is causing the error you see in the mod_jk log file. The reason that the test.jsp isn't loading correctly, is because you're not putting it somewhere that Apache knows to send it over to Tomcat. It sounds like you're putting the file either in D:/webserver/apache/Apache/htdocs, or in Tomcat's 'webapps' directory ... either place, this isn't right. To test if your Apache+mod_jk+Tomcat config is working, see if you can get to: http://localhost/manager/html/list If this prompts you for a login, then its working ... as this is the login for Tomcat's manager application. If you look in the mod_jk.conf file - you'll see that only a certain select contexts are being exported to Apache ... /manager, /admin, /examples, /tomcat-docs, /webdav (did I miss any?) - to have something like http://localhost/test.jsp work, you'd need to define a ROOT context in Tomcat (there's actually one already configured in your server.xml, its just commented out) - and then after you restart Tomcat, the mod_jk.conf file should have JKMount lines reading / and /* .. that should ensure that any file placed in the web-application the ROOT context is pointing to (webapps/ROOT, by default) - will get appropriately served up by Tomcat. So, you could enable the ROOT context in server.xml, restart Tomcat, restart Apache (to pick up the new mod_jk.conf), then put your test.jsp in webapps/ROOT - and *then* http://localhost/test.jsp *should* work. Respectfully, Brice Ruth -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with Tomcat, Struts/Tiles, and encoding
I have a Struts/Tiles application running on Tomcat 4.1.x and Tomcat 5.x with UTF-8 encoding (Polish Russian character sets, particularly) - I didn't have to do anything special for the response encoding, only for the request encoding. Here's what I put at the top of my JSPs: %@ page contentType=text/html; charset=UTF-8 % That seems to do the trick for me. The character encoding for the page is UTF-8 regardless if I'm requesting a JSP directly, or going through an Action. The entire www.fiskars.com site is Struts/Tiles driven, you can check out http://www.fiskars.com/ru_RU/index.do in particular to see the RU character set being used (in UTF-8 encoding). Like I said, the only special thing concerns request encoding ... a filter needed to be installed for that. How are you determining that the encoding being sent the the browser isn't UTF-8? Garbage characters alone won't be a good indication ... in Firefox, I go to the View menu pop-out the Character Encoding menu ... make sure that its set to UTF-8. If it is and you're still getting garbage characters, you may not be saving the JSP files as UTF-8 in your editor. In Eclipse, for instance, you need to specify that the file is UTF-8 in the file's properties (or globally for all files) .. if you don't, it will look like the characters are being inserted correctly, but when Eclipse saves the file, it converts all the characters to ISO-8859-1 which will look like garbage in the browser, even if the encoding is set to UTF-8. Hope some of this helps! Brice Susie Derkins wrote: Hi list, Im using Tiles with Catalina (4.1.29 on Linus and Windows). and Im having problems setting the responses encoding to UTF-8. I added: %@ page contentType=text/html;charset=UTF-8 pageEncoding-UTF-8 % to all my JSP pages tiles and layouts. It is the first line of each page. So now, all my JSPs call ApplicationHttpResponse.setContentType *before* accessing the pages writer. Here is the code for setContentType: public void setContentType(String type) { if (!included) getResponse().setContentType(type); } The problem is that the body of setContentType is never executed because each time a JSP calls it, included is true (I verified by stepping through the code with a debugger), which means we are inside a RequestDispatcher.include(). My guess is that it's Tiles or Struts that causes the request to be dispatch via RequestDispatcher.include. I tried to set the responses content type in a filter, but when I check in my custom tags, pageContext.getResponse().pageContext.getResponse() always returns ISO-8859-1, Tomcats default encoding. Setting the encoding in a JSP works fine as long as Struts/Tiles are not involved. Can somebody please shed some light on this? Do you know of another way of setting the encoding, that can occur before the JSPs are processed? I want to avoid having to build a custom version of Tomcat with UTF-8 as the default encoding. Thanks for your time, Sophia. __ Post your free ad now! http://personals.yahoo.ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Corrupted UTF-8 JSPs?!
Thanks much! The following article was very informative: http://www.javaworld.com/javaworld/jw-04-2004/jw-0419-multibytes_p.html adding 'encoding=UTF-8' to my JAVAC tasks in my Ant's build.xml seemed to have taken care of the problem I was seeing. The article was informative in many other ways, too. Great article, thanks! Vernon wrote: There are two recent related articles on Javaworld. They may help you in this regards. --- Ruth, Brice [EMAIL PROTECTED] wrote: I'm running into a strange issue. I have certain JSPs with UTF-8 encoded characters in them (polish characters, to be exact). My Ant build.xml precompiles the JSPs using Jasper and then packages the application into a WAR for deployment. When I develop locally with Tomcat 5.0.18, I deploy without packaging into a WAR first. However, to deploy remotely, I create a WAR, then deploy from that. Locally, the JSPs appear just as they should. After being packaged into a WAR (even if I deploy it locally to the exact same instance of Tomcat 5.0.18), the UTF-8 characters are garbaged up. The garbaging appears the same as it does when I override the page-provided UTF-8 encoding (in the browser) and manually set the encoding to ISO-8859-1. What's going on here?! By the time that the JSPs are added to the WAR, they're binary .class files, since they are precompiled! Text encodings shouldn't make a bit of difference at that point, should they?!? The JSPs loaded still tell the browser that the encoding is UTF-8 ... and UTF-8 characters in the .properties files (passed through native2ascii) are properly displayed. It seems to me that something very strange is going on ... moreover, this is going to really throw a wrench in our project if we can't get to the bottom of it! Respectfully, Brice Ruth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Corrupted UTF-8 JSPs?!
Everything is being created through Ant - the problem appeared to be resolved when I modified the javac task to use UTF-8 encoding, though I'm still not clear on why this issue would only be visible when the files go through the WAR/JAR process first. Very unclear on that. But, the problem appears to be fixed. Yansheng Lin wrote: How did you create your war file then? Through an IDE? I looked up the man page for 'jar' command. It's pretty straight-forward. Are you compressing your class files? That may modify the content of the files. Hope it helps Yan -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: June 10, 2004 15:20 To: Tomcat Users List Subject: Re: Corrupted UTF-8 JSPs?! Thanks, but I believe the problem is in the WAR packaging, somehow ... because I develop locally, deploy w/o packaging and it works fine - if I package it up again and re-deploy LOCALLY, then I get garbage ... native2ascii only works for properties files, as far as I've been able to determine. UTF-8 encoded JSPs have to have UTF-8 encoded characters, not the \u escaped characters that native2ascii creates. We only use native2ascii for our properties files Yansheng Lin wrote: developed locally, and then deployed remotely Make sure on the remote system, the Java Runtime Environment supports UTF-8 and is using it as the default encoding(export JAVA_OPTS=-Dfile.encoding=utf8). native2ascii UTF-8 encoded characters may help too. Yan -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: June 10, 2004 14:00 To: Tomcat Users List Subject: Corrupted UTF-8 JSPs?! I'm running into a strange issue. I have certain JSPs with UTF-8 encoded characters in them (polish characters, to be exact). My Ant build.xml precompiles the JSPs using Jasper and then packages the application into a WAR for deployment. When I develop locally with Tomcat 5.0.18, I deploy without packaging into a WAR first. However, to deploy remotely, I create a WAR, then deploy from that. Locally, the JSPs appear just as they should. After being packaged into a WAR (even if I deploy it locally to the exact same instance of Tomcat 5.0.18), the UTF-8 characters are garbaged up. The garbaging appears the same as it does when I override the page-provided UTF-8 encoding (in the browser) and manually set the encoding to ISO-8859-1. What's going on here?! By the time that the JSPs are added to the WAR, they're binary .class files, since they are precompiled! Text encodings shouldn't make a bit of difference at that point, should they?!? The JSPs loaded still tell the browser that the encoding is UTF-8 ... and UTF-8 characters in the .properties files (passed through native2ascii) are properly displayed. It seems to me that something very strange is going on ... moreover, this is going to really throw a wrench in our project if we can't get to the bottom of it! Respectfully, Brice Ruth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help! Moving app from TC4-TC5, blank pages, no errors!
I'm in the process of taking an application that we've been deploying to our production/stage/dev servers running TC4.1 to deploying it on our dev server running TC5.0.18. On our local development workstations, we've been deploying to TC5 for quite a while now, with no problems ... I'm not sure what the problem is deploying the web-app to TC5, but the most confusing thing is that I'm not getting any errors!!! The 'welcome-file' for the application loads, and nothing else loads! I can even put in a total garbage URL for that particular context and I don't even get a 404 error or anything! The web-app is pretty complex, with 5 or 6 filters chained together, so anywhere in there, something may be happening to a request, but shouldn't I be getting exceptions on STDOUT/STDERR?! I get nothing, not in stdout.log nor stderr.log, nor localhost_log.2004-06-10.txt. When the web-app starts, it outputs some status information as it goes through its bootstrapping (some custom messages, some Tiles messages, some Validator messages) - and that all looks perfectly normal. I also have a Logger element in my context, and the log file specified never gets created. Not sure why that would be, either. This is on a Win2K Server, with JDK1.4.2. I believe I'm running with the stock server.xml, I've installed my context in conf/Catalina/localhost as well as simply putting it in the META-INF directory of my exploded WAR. I've tried loading from a packaged WAR as well as an exploded WAR ... no luck! The web-application is built using Ant and I've spent a good bit of time developing our build process, so I'm fairly confident that its working OK - I've used two different build files, one that builds the application against TC4 APIs, the other uses the new TC5 APIs. I'm about at my wits end here ... I can't figure out what's going on!! Especially without any errors or log output!! Respectfully, Brice Ruth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help! Moving app from TC4-TC5, blank pages, no errors!
I'm not really using TC specific code, to my knowledge ... its just that TC4 had a 'servlet.jar' and TC5 has a 'servlet-apis.jar' and a 'jsp-apis.jar' ... so the build file has to account for the difference, otherwise, there really isn't any difference. I'll configure the AccessLogValve and see if I actually get any output (I'm not getting anything from my Logger!) Shapira, Yoav wrote: Hi, So you're using TC-specific code in your webapp? (Hence the need for different build files, one for TC4 and one for TC5, I imagine). Add logging output statements to your various filters so you can tell what they're doing, if anything. Enable the AccessLogValve to see if you're really getting 404s or something else (such as previous 5xx errors) are preventing normal processing. Yoav Shapira Millennium Research Informatics -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Thursday, June 10, 2004 10:58 AM To: Tomcat Users List Subject: Help! Moving app from TC4-TC5, blank pages, no errors! I'm in the process of taking an application that we've been deploying to our production/stage/dev servers running TC4.1 to deploying it on our dev server running TC5.0.18. On our local development workstations, we've been deploying to TC5 for quite a while now, with no problems ... I'm not sure what the problem is deploying the web-app to TC5, but the most confusing thing is that I'm not getting any errors!!! The 'welcome-file' for the application loads, and nothing else loads! I can even put in a total garbage URL for that particular context and I don't even get a 404 error or anything! The web-app is pretty complex, with 5 or 6 filters chained together, so anywhere in there, something may be happening to a request, but shouldn't I be getting exceptions on STDOUT/STDERR?! I get nothing, not in stdout.log nor stderr.log, nor localhost_log.2004-06-10.txt. When the web-app starts, it outputs some status information as it goes through its bootstrapping (some custom messages, some Tiles messages, some Validator messages) - and that all looks perfectly normal. I also have a Logger element in my context, and the log file specified never gets created. Not sure why that would be, either. This is on a Win2K Server, with JDK1.4.2. I believe I'm running with the stock server.xml, I've installed my context in conf/Catalina/localhost as well as simply putting it in the META-INF directory of my exploded WAR. I've tried loading from a packaged WAR as well as an exploded WAR ... no luck! The web-application is built using Ant and I've spent a good bit of time developing our build process, so I'm fairly confident that its working OK - I've used two different build files, one that builds the application against TC4 APIs, the other uses the new TC5 APIs. I'm about at my wits end here ... I can't figure out what's going on!! Especially without any errors or log output!! Respectfully, Brice Ruth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help! Moving app from TC4-TC5, blank pages, no errors!
The Access Log valve indicates that the error being generated is 404 ... I still get a blank screen with no errors in the browser, and no errors in Tomcat's logs. Here's the particular Access Log entry: 10.5.201.20 - - [10/Jun/2004:10:49:23 -0600] GET /fiskars_PL/pl_PL/index.do HTTP/1.1 404 - - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 You'll notice that the request is a Struts Action ... what's going on here?!?!?!? This application runs on TC5 just fine locally, same version of TC5 ... why won't it run on the deployment server?!?! Shapira, Yoav wrote: Hi, So you're using TC-specific code in your webapp? (Hence the need for different build files, one for TC4 and one for TC5, I imagine). Add logging output statements to your various filters so you can tell what they're doing, if anything. Enable the AccessLogValve to see if you're really getting 404s or something else (such as previous 5xx errors) are preventing normal processing. Yoav Shapira Millennium Research Informatics -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Thursday, June 10, 2004 10:58 AM To: Tomcat Users List Subject: Help! Moving app from TC4-TC5, blank pages, no errors! I'm in the process of taking an application that we've been deploying to our production/stage/dev servers running TC4.1 to deploying it on our dev server running TC5.0.18. On our local development workstations, we've been deploying to TC5 for quite a while now, with no problems ... I'm not sure what the problem is deploying the web-app to TC5, but the most confusing thing is that I'm not getting any errors!!! The 'welcome-file' for the application loads, and nothing else loads! I can even put in a total garbage URL for that particular context and I don't even get a 404 error or anything! The web-app is pretty complex, with 5 or 6 filters chained together, so anywhere in there, something may be happening to a request, but shouldn't I be getting exceptions on STDOUT/STDERR?! I get nothing, not in stdout.log nor stderr.log, nor localhost_log.2004-06-10.txt. When the web-app starts, it outputs some status information as it goes through its bootstrapping (some custom messages, some Tiles messages, some Validator messages) - and that all looks perfectly normal. I also have a Logger element in my context, and the log file specified never gets created. Not sure why that would be, either. This is on a Win2K Server, with JDK1.4.2. I believe I'm running with the stock server.xml, I've installed my context in conf/Catalina/localhost as well as simply putting it in the META-INF directory of my exploded WAR. I've tried loading from a packaged WAR as well as an exploded WAR ... no luck! The web-application is built using Ant and I've spent a good bit of time developing our build process, so I'm fairly confident that its working OK - I've used two different build files, one that builds the application against TC4 APIs, the other uses the new TC5 APIs. I'm about at my wits end here ... I can't figure out what's going on!! Especially without any errors or log output!! Respectfully, Brice Ruth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help! Moving app from TC4-TC5, blank pages, no errors!
Absolutely Shapira, Yoav wrote: Hi, How strange... Is the behavior consistent across browsers, e.g. if you try IE or Opera? Yoav Shapira Millennium Research Informatics -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Thursday, June 10, 2004 11:52 AM To: Tomcat Users List Subject: Re: Help! Moving app from TC4-TC5, blank pages, no errors! The Access Log valve indicates that the error being generated is 404 ... I still get a blank screen with no errors in the browser, and no errors in Tomcat's logs. Here's the particular Access Log entry: 10.5.201.20 - - [10/Jun/2004:10:49:23 -0600] GET /fiskars_PL/pl_PL/index.do HTTP/1.1 404 - - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 You'll notice that the request is a Struts Action ... what's going on here?!?!?!? This application runs on TC5 just fine locally, same version of TC5 ... why won't it run on the deployment server?!?! Shapira, Yoav wrote: Hi, So you're using TC-specific code in your webapp? (Hence the need for different build files, one for TC4 and one for TC5, I imagine). Add logging output statements to your various filters so you can tell what they're doing, if anything. Enable the AccessLogValve to see if you're really getting 404s or something else (such as previous 5xx errors) are preventing normal processing. Yoav Shapira Millennium Research Informatics -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Thursday, June 10, 2004 10:58 AM To: Tomcat Users List Subject: Help! Moving app from TC4-TC5, blank pages, no errors! I'm in the process of taking an application that we've been deploying to our production/stage/dev servers running TC4.1 to deploying it on our dev server running TC5.0.18. On our local development workstations, we've been deploying to TC5 for quite a while now, with no problems ... I'm not sure what the problem is deploying the web-app to TC5, but the most confusing thing is that I'm not getting any errors!!! The 'welcome-file' for the application loads, and nothing else loads! I can even put in a total garbage URL for that particular context and I don't even get a 404 error or anything! The web-app is pretty complex, with 5 or 6 filters chained together, so anywhere in there, something may be happening to a request, but shouldn't I be getting exceptions on STDOUT/STDERR?! I get nothing, not in stdout.log nor stderr.log, nor localhost_log.2004-06-10.txt. When the web-app starts, it outputs some status information as it goes through its bootstrapping (some custom messages, some Tiles messages, some Validator messages) - and that all looks perfectly normal. I also have a Logger element in my context, and the log file specified never gets created. Not sure why that would be, either. This is on a Win2K Server, with JDK1.4.2. I believe I'm running with the stock server.xml, I've installed my context in conf/Catalina/localhost as well as simply putting it in the META-INF directory of my exploded WAR. I've tried loading from a packaged WAR as well as an exploded WAR ... no luck! The web-application is built using Ant and I've spent a good bit of time developing our build process, so I'm fairly confident that its working OK - I've used two different build files, one that builds the application against TC4 APIs, the other uses the new TC5 APIs. I'm about at my wits end here ... I can't figure out what's going on!! Especially without any errors or log output!! Respectfully, Brice Ruth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied
Re: Help! Moving app from TC4-TC5, blank pages, no errors!
country=null variant=null Form: orangeThumbApp [ *** SNIP *** ] [INFO] TilesPlugin - -Tiles definition factory loaded for module ''. Filip Hanik - Dev wrote: did the context even get deployed? ie, do you have some system.out statements in your servlets when they get loaded that could tell you more info Filip - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, June 10, 2004 10:54 AM Subject: RE: Help! Moving app from TC4-TC5, blank pages, no errors! Hi, How strange... Is the behavior consistent across browsers, e.g. if you try IE or Opera? Yoav Shapira Millennium Research Informatics -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Thursday, June 10, 2004 11:52 AM To: Tomcat Users List Subject: Re: Help! Moving app from TC4-TC5, blank pages, no errors! The Access Log valve indicates that the error being generated is 404 ... I still get a blank screen with no errors in the browser, and no errors in Tomcat's logs. Here's the particular Access Log entry: 10.5.201.20 - - [10/Jun/2004:10:49:23 -0600] GET /fiskars_PL/pl_PL/index.do HTTP/1.1 404 - - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 You'll notice that the request is a Struts Action ... what's going on here?!?!?!? This application runs on TC5 just fine locally, same version of TC5 ... why won't it run on the deployment server?!?! Shapira, Yoav wrote: Hi, So you're using TC-specific code in your webapp? (Hence the need for different build files, one for TC4 and one for TC5, I imagine). Add logging output statements to your various filters so you can tell what they're doing, if anything. Enable the AccessLogValve to see if you're really getting 404s or something else (such as previous 5xx errors) are preventing normal processing. Yoav Shapira Millennium Research Informatics -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Thursday, June 10, 2004 10:58 AM To: Tomcat Users List Subject: Help! Moving app from TC4-TC5, blank pages, no errors! I'm in the process of taking an application that we've been deploying to our production/stage/dev servers running TC4.1 to deploying it on our dev server running TC5.0.18. On our local development workstations, we've been deploying to TC5 for quite a while now, with no problems ... I'm not sure what the problem is deploying the web-app to TC5, but the most confusing thing is that I'm not getting any errors!!! The 'welcome-file' for the application loads, and nothing else loads! I can even put in a total garbage URL for that particular context and I don't even get a 404 error or anything! The web-app is pretty complex, with 5 or 6 filters chained together, so anywhere in there, something may be happening to a request, but shouldn't I be getting exceptions on STDOUT/STDERR?! I get nothing, not in stdout.log nor stderr.log, nor localhost_log.2004-06-10.txt. When the web-app starts, it outputs some status information as it goes through its bootstrapping (some custom messages, some Tiles messages, some Validator messages) - and that all looks perfectly normal. I also have a Logger element in my context, and the log file specified never gets created. Not sure why that would be, either. This is on a Win2K Server, with JDK1.4.2. I believe I'm running with the stock server.xml, I've installed my context in conf/Catalina/localhost as well as simply putting it in the META-INF directory of my exploded WAR. I've tried loading from a packaged WAR as well as an exploded WAR ... no luck! The web-application is built using Ant and I've spent a good bit of time developing our build process, so I'm fairly confident that its working OK - I've used two different build files, one that builds the application against TC4 APIs, the other uses the new TC5 APIs. I'm about at my wits end here ... I can't figure out what's going on!! Especially without any errors or log output!! Respectfully, Brice Ruth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you
Corrupted UTF-8 JSPs?!
I'm running into a strange issue. I have certain JSPs with UTF-8 encoded characters in them (polish characters, to be exact). My Ant build.xml precompiles the JSPs using Jasper and then packages the application into a WAR for deployment. When I develop locally with Tomcat 5.0.18, I deploy without packaging into a WAR first. However, to deploy remotely, I create a WAR, then deploy from that. Locally, the JSPs appear just as they should. After being packaged into a WAR (even if I deploy it locally to the exact same instance of Tomcat 5.0.18), the UTF-8 characters are garbaged up. The garbaging appears the same as it does when I override the page-provided UTF-8 encoding (in the browser) and manually set the encoding to ISO-8859-1. What's going on here?! By the time that the JSPs are added to the WAR, they're binary .class files, since they are precompiled! Text encodings shouldn't make a bit of difference at that point, should they?!? The JSPs loaded still tell the browser that the encoding is UTF-8 ... and UTF-8 characters in the .properties files (passed through native2ascii) are properly displayed. It seems to me that something very strange is going on ... moreover, this is going to really throw a wrench in our project if we can't get to the bottom of it! Respectfully, Brice Ruth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Corrupted UTF-8 JSPs?!
Thanks, but I believe the problem is in the WAR packaging, somehow ... because I develop locally, deploy w/o packaging and it works fine - if I package it up again and re-deploy LOCALLY, then I get garbage ... native2ascii only works for properties files, as far as I've been able to determine. UTF-8 encoded JSPs have to have UTF-8 encoded characters, not the \u escaped characters that native2ascii creates. We only use native2ascii for our properties files Yansheng Lin wrote: developed locally, and then deployed remotely Make sure on the remote system, the Java Runtime Environment supports UTF-8 and is using it as the default encoding(export JAVA_OPTS=-Dfile.encoding=utf8). native2ascii UTF-8 encoded characters may help too. Yan -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: June 10, 2004 14:00 To: Tomcat Users List Subject: Corrupted UTF-8 JSPs?! I'm running into a strange issue. I have certain JSPs with UTF-8 encoded characters in them (polish characters, to be exact). My Ant build.xml precompiles the JSPs using Jasper and then packages the application into a WAR for deployment. When I develop locally with Tomcat 5.0.18, I deploy without packaging into a WAR first. However, to deploy remotely, I create a WAR, then deploy from that. Locally, the JSPs appear just as they should. After being packaged into a WAR (even if I deploy it locally to the exact same instance of Tomcat 5.0.18), the UTF-8 characters are garbaged up. The garbaging appears the same as it does when I override the page-provided UTF-8 encoding (in the browser) and manually set the encoding to ISO-8859-1. What's going on here?! By the time that the JSPs are added to the WAR, they're binary .class files, since they are precompiled! Text encodings shouldn't make a bit of difference at that point, should they?!? The JSPs loaded still tell the browser that the encoding is UTF-8 ... and UTF-8 characters in the .properties files (passed through native2ascii) are properly displayed. It seems to me that something very strange is going on ... moreover, this is going to really throw a wrench in our project if we can't get to the bottom of it! Respectfully, Brice Ruth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Eclipse+Ant+Tomcat 5 - problems
I'm starting to try out Tomcat 5 in our development environment, which has been running Tomcat 4.1.x to-date. Preface: our IDE is Eclipse, I use Ant with the catalina-ant tasks to install/remove our web-app from a local Tomcat installation. Everything has worked fine, though I've noticed that after my first install (once I start Eclipse and Tomcat) - anytime I remove/install the web-app, the install appears to init the app twice (my load-on-init servlet's are called twice, etc.) I never figured out what caused this, but it didn't negatively impact anything, so I didn't care. Now, with Tomcat 5 ... after a little tweaking, to my Eclipse environment, I was able to get my same install/remove task working with Ant. The only problem now is that after the initial install, when I do a remove/install, it seems to still init the app twice, only on the second init, it crokes. Talks about a property string that it can't find and then that it can't find the deployment directory for the app (the app is installed from a .WAR) Not good. So, I did some googling - found that apparent install/remove has been deprecated in favor of deploy/undeploy. Fine - so I tried using the deploy task. Apparently, ant doesn't have enough memory to deploy my 90MB+ .WAR (installing never seemed to be a problem) - and when I looked for threads on the DeployTask generating OutOfMemory exceptions, it said to increase ant's memory ... which I can't, for the life of myself, figure out how to do with Eclipse. I've previously gone done the path of having ant fork, but it caused so many problems with our builds, I'd rather not revisit that. Does anybody have anything that can help me? I'm trying out Tomcat 5 because Tomcat 4.1.x appears to have some pretty severe memory leaks with its install/remove operations - if I install/remove my web-app more than 2-3 times, Tomcat (not the Ant task and not Eclipse) runs OutOfMemory ... other users have reported that Tomcat 5 does much better in this arena. Advise on any of these issues is much appreciated!! Respectfully, Brice Ruth Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc.