problem in configuration of Tomcat5.0.28 and SSL in Linux
Hello I am configuring SSL with tomcat 5.0.28 .I ahve followed the following two steps only 1.Generating the keystore by following command keytool -genkey -alias tomcat -keyalg RSA -keystore /path/to/my/keystore 2. specifying the following in the server.xml -- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -- Connector port=8443 minProcessors=5 maxProcessors=75 enableLookups=true disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true; clientAuth=false sslProtocol=TLS keystoreFile=/path/to/my/keystore keystoreType=JKS keystorePass=password / Now my problem is i am able to configure it in windows 2000 operating system and am able to connect to the url https://localhost:8443/ . But when i did the sam configuration in the linux OS and tomcat started successfully , i could not connect to thehttps://localhost:8443/ URL . It is showing page cannot be displyed though i am able to connect to http://localhost:8080/ URL . Can any one help me out ... Thanks in advance ... with regards mridu -- View this message in context: http://www.nabble.com/problem-in-configuration-of-Tomcat5.0.28-and-SSL-in-Linux-tf3814430.html#a10797664 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
where can I define if a webapp will startup or not
Hi, I'm looking for the opportunity to enable or disable a webapp for startup. I have an application which I can disable during the tomcat is running, and if this happens I want that this state is persistent also for a tomcat restart, but I do not know where I can define this. I just found the load on startup tag in the web.xml but it seems that this will be used for ordering the webapp start. Thanks for your help -- View this message in context: http://www.nabble.com/where-can-I-define-if-a-webapp-will-startup-or-not-tf3814492.html#a10797903 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Installer including web application and tomcat
Hello, we recently purchased JIRA, which is offering a standalone version for windows and for linux which already includes a tomcat server. Can anyone give me hint where to find informations to do something similiar with my web application? Maybe also a mysql server can be included? Thanks a lot Rene - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installer including web application and tomcat
I just did exactly the same for some of our international clients, that do not have internet-access / slow internet-connections. However, I did that for windows only. The procedure as follows: - I used a free installer (google for InnoSetup), you can also choose your preferred cross-platform-installer, if you like - Unpack tomcat (the installation-zip or tar) to the installation-source-directory - change, if you like, the port from 8080 to 80 - move your war-archives to $catalina_home/webapps - as a database, I used memory-based HSQLDB since it doesn't require an additional JVM and it's pretty easy to include it as a bundle into tomcat - just another jar-archive - pack Tomcat and your database it with the installer-program - tell the installer-program to run $catalina_home/bin/service.bat to install Tomcat as a service, in case you're running windows - tell your installer to create some nice start-menue-entries like your app - http://localhost/yourapp; That's it so far. Cheers Gregor -- what's puzzlin' you, is the nature of my game gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: where can I define if a webapp will startup or not
Search google for webapp lifecycle listeners :) Reading spec also helps ... I know it is long but it helps ... One of them which tells well is http://download-west.oracle.com/docs/cd/B32110_01/web.1013/b28959/listen er.htm Reagards Guru -Original Message- From: oj [mailto:[EMAIL PROTECTED] Sent: 25 May 2007 07:44 To: users@tomcat.apache.org Subject: where can I define if a webapp will startup or not Hi, I'm looking for the opportunity to enable or disable a webapp for startup. I have an application which I can disable during the tomcat is running, and if this happens I want that this state is persistent also for a tomcat restart, but I do not know where I can define this. I just found the load on startup tag in the web.xml but it seems that this will be used for ordering the webapp start. Thanks for your help -- View this message in context: http://www.nabble.com/where-can-I-define-if-a-webapp-will-startup-or-not -tf3814492.html#a10797903 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Installer including web application and tomcat
Thanks a lot! I will try out the procedure you described. Anyone knows a similiar procedure for a linux based installer. Regards René On Fri, 25 May 2007 11:54:49 +0200 Gregor Schneider [EMAIL PROTECTED] wrote: I just did exactly the same for some of our international clients, that do not have internet-access / slow internet-connections. However, I did that for windows only. The procedure as follows: - I used a free installer (google for InnoSetup), you can also choose your preferred cross-platform-installer, if you like - Unpack tomcat (the installation-zip or tar) to the installation-source-directory - change, if you like, the port from 8080 to 80 - move your war-archives to $catalina_home/webapps - as a database, I used memory-based HSQLDB since it doesn't require an additional JVM and it's pretty easy to include it as a bundle into tomcat - just another jar-archive - pack Tomcat and your database it with the installer-program - tell the installer-program to run $catalina_home/bin/service.bat to install Tomcat as a service, in case you're running windows - tell your installer to create some nice start-menue-entries like your app - http://localhost/yourapp; That's it so far. Cheers Gregor -- what's puzzlin' you, is the nature of my game gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
file upload problem
Hi, I have opencms and jforum installed on tomcat 5.0. Im using mod_jk for connection with Apache 2.0. When i try to upload a file with opencms or jforum through port 8080(pure tomcat) the upload happens fast. When i do the same thing through apache(port 80) the upload takes a long time. Sometimes it even times out. The stack trace shows the following error in opencms. 11 May 2007 12:42:32,668 ERROR [rg.opencms.util.CmsRequestUtil: 539] Error parsing multipart request org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly Everything else works fine. all the requests are beeing forwarded to tomcat correctly. here is an outtake of the server.xml: Service name=Catalina ... Connector port=8080 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=6 bufferSize=8192 proxyName=example.com proxyPort=80 / ... Connector port=8009 disableUploadTimeout=false minProcessors=5 maxProcessors=256 protocol=AJP/1.3 enableLookups=false redirectPort=8443 debug=0 / ... Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Context path=/ docBase=/usr/share/tomcat5/server/opencms /Context .../service this is an outtake of the httpd.conf RewriteEngine on RewriteLog /var/log/apache2/rewrite.log RewriteLogLevel 2 # Note: instead of adding your own configuration here, consider # adding it in your own file (/etc/apache2/httpd.conf.local) # putting its name into APACHE_CONF_INCLUDE_FILES in # /etc/sysconfig/apache2 -- this will make system updates # easier :) # getting rid of opencms in the url # If the requested URI is located in the resources folder, do not forward the request SetEnvIfNoCase Request_URI ^/opencms/resources/.*$ no-jk # If the requested URI is static content do not forward the request SetEnvIfNoCase Request_URI ^/export/.*$ no-jk # If the requested URI is NOT located in the resources folder. # Prepend an /opencms/opencms to everything that does not already starts with it # and force the result to be handled by the next URI-handler ([PT]) (JkMount in this case) RewriteCond %{REQUEST_URI} !^/opencms/resources/.*$ RewriteCond %{REQUEST_URI} !^/resources/.*$ RewriteCond %{REQUEST_URI} !^/export/.*$ RewriteCond %{REQUEST_URI} !^/RE-Forum(.*)$ RewriteCond %{REQUEST_URI} !^/opencms/.*$ RewriteRule !^opencms(.*)$ /opencms%{REQUEST_URI} [PT] RewriteRule ^opencms(.*)$ /%{REQUEST_URI} [PT] RewriteRule ^opencms(.*)$ /$1 [PT] # These are the settings for static export. If the requested resource is not already # statically exported create a new request to the opencms404 handler. This has to be # a new request, because the current would net get through mod_jk because of the no-jk var. RewriteCond %{REQUEST_URI} ^/export/.*$ RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME}/index_export.html !-f RewriteRule .* /opencms/opencms/handle404?exporturi=%{REQUEST_URI}%{QUERY_STRING} [P] # If the request starts with /opencms/resources, delete the /opencms prefix RewriteCond %{REQUEST_URI} ^/opencms/resources/.*$ RewriteRule ^/(.*)$ /$1 DocumentRoot /usr/share/tomcat5/server/opencms/ JkWorkersFile /usr/share/tomcat5/conf/workers.properties JkLogLevelinfo JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkOptions +ForwardKeySize +ForwardURICompat JkMount /* ajp13 JkMount /opencms/* ajp13 JkMount /export/* ajp13 JkMount /resources/* ajp13 JkMount /RE-Forum/* ajp13 This is the conguarion file fir mod_jk # simple configuration for apache (for AJP connector, modul mod_jk.so) IfModule mod_jk.c JkWorkersFile /etc/tomcat5/base/workers.properties JkLogFile /var/log/tomcat5/base/mod_jk.log # Log level to be used by mod_jk JkLogLevel info # The following line makes apache aware of the location of # the /servlets-examples context Alias /servlets-examples /srv/www/tomcat5/base/webapps/servlets-examples Directory /srv/www/tomcat5/base/webapps/servlets-examples Options Indexes FollowSymLinks allow from all /Directory # The following line makes apache aware of the location of # the /jsp-examples context Alias /jsp-examples /srv/www/tomcat5/base/webapps/jsp-examples Directory /srv/www/tomcat5/base/webapps/jsp-examples Options Indexes FollowSymLinks allow from all /Directory Alias /RE-Forum /srv/www/tomcat5/base/webapps/RE-Forum Directory srv/www/tomcat5/base/webapps/RE-Forum Options Indexes FollowSymLinks allow from all /Directory # The following line mounts all JSP files and the /servlet/ uri to tomcat JkMount /servlets-examples/servlet/* ajp13 JkMount /jsp-examples/*.jsp ajp13 JkMount /RE-Forum/*
Re: AW: AW: logging log4j of my application
Marc, What jar are you talking about? I have a similar problem. Got log4j working with my application based on spring running on tomcat 5.5.17 but have troubles to set up logging for Spring/Whatever is using commons logging in my log4j xml. Searching on the net reveals that this might be tomcat/commons-logging problems, but following various suggestions didn't help me. I won't put here various configuration files as they are correct (working with my app./ log file gets created - appender for spring only, but no logging messages for spring goes into it nor to anywhere else). I have commons-logging-api.jar in $TOMCAT_HOME.bin (v 1.0.4) log4j.1.2.4.jar + commons-loggin.jar in WEB-INF/lib. No other log4j configuration/jars lying around neither is set in tomcats configs. I also tried it with spring's jpetstore sample application, but didn't work either. Does anybody have any idea? Or an idea how to try to discover the problem (no logging, no pointers)? Thanks a lot, Mirek On 5/22/07, Marc Rameder [EMAIL PROTECTED] wrote: Sorry for spaming but solution is found! Jar file was corrupted. Thanks @ all marc -Ursprüngliche Nachricht- Von: Marc Rameder [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 22. Mai 2007 16:38 An: 'Tomcat Users List' Betreff: AW: AW: AW: logging log4j of my application First of all thanks for your help!!! But I didn't find a solution until now. After revising the source code if found the main problem. I am using commons logging and not log4j. By using log4j all works fine. import org.apache.log4j.Logger; import org.apache.log4j.BasicConfigurator; private static final Logger LOG = Logger.getLogger(User.class); However with commons logging it doesn't. import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; private static final Log LOG = LogFactory.getLog(User.class); May somebody have an idea to solve the problem at the bottom with this new aspect? Regards marc -Ursprüngliche Nachricht- Von: Rainer Jung [mailto:[EMAIL PROTECTED] Gesendet: Montag, 21. Mai 2007 16:59 An: Tomcat Users List Betreff: Re: AW: AW: logging log4j of my application Your config looks OK to me. Sometimes such a thing happens, if one starts the process unintended as root, who then owns the log file and after starting again as non-root, the process user can not write to the file... You can add -Dlog4j.debug to the startup options of your Tomcat. Then catalina.out will contain information about log4j parsing its config, like log4j: Using URL [file:.../conf/log4j.properties] for automatic log4j configuration. log4j: Reading configuration from URL file:.../conf/log4j.properties log4j: Parsing for [root] with value=[DEBUG,FILE]. ... log4j: End of parsing for FILE. log4j: Setting property [file] to [/home/jung/.../logs/RPSSERVER.log]. log4j: setFile called: /home/jung/.../logs/RPSSERVER.log, true ... Maybe you will detect something strange in this output. Regards, Rainer Marc Rameder wrote: The output of the log file should be information about hibernate, spring and my development in the net.thefource package. I have used this log4j.properties for a GUI application where it is working fine and also by testing the server with JUnit all debug information are displayed. I am starting the tomcat with the startup.bat. Hence it is not a service. A example for the GUI application would be: 14:07:25,500 () [INFO ] CollectionFactory (clinit) - JDK 1.4+ collections available marc log4j.rootLogger=DEBUG,FILE #ConsoleAppender log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%x) [%-5p] %c{1} (%M) - %m%n #FileAppender log4j.appender.FILE=org.apache.log4j.FileAppender log4j.appender.FILE.layout=org.apache.log4j.PatternLayout log4j.appender.FILE.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%x) [%-5p] %c{1} (%M) - %m%n log4j.appender.FILE.File=${catalina.home}/logs/RPSSERVER.log log4j.appender.FILE.File.MaxFileSize=1MB # Keep one backup file log4j.appender.FileApp.MaxBackupIndex=1 log4j.appender.FileApp.layout=org.apache.log4j.PatternLayout log4j.appender.FileApp.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%x) [%-5p] %c{1} (%M) - %m%n log4j.logger.org.apache.catalina=WARN, CONSOLE log4j.logger.org.apache.catalina.core=WARN, CONSOLE log4j.logger.org.apache.catalina.session=WARN, CONSOLE log4j.logger.net.thefource=DEBUG ,CONSOLE log4j.logger.org.apache.commons=WARN, CONSOLE log4j.logger.org.hibernate=INFO, CONSOLE log4j.logger.org.hibernate.type=INFO, CONSOLE log4j.logger.org.springframework=INFO, CONSOLE -Ursprüngliche Nachricht- Von: Rainer Jung [mailto:[EMAIL PROTECTED] Gesendet: Montag, 21. Mai 2007 13:55 An: Tomcat Users List Betreff: Re: AW: logging log4j of my application All right, so we assume, there are no log4j things lying around in your Tomcat apart from your webapp. Also
Re: DBCP
It didn't work, I put the following in Context.xml: Resource name=jdbc/mydb auth=Container type=oracle.jdbc.pool.OracleDataSource factory=oracle.jdbc.pool.OracleDataSourceFactory user=hr password=hr driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@localhost:1521:orcldb maxActive=20 maxIdle=10 maxwait=-1/ and i got the following exception: javax.servlet.ServletException: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleDataSourceFactory] org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:855) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:784) org.apache.jsp.jsp.testDBCP_jsp._jspService(testDBCP_jsp.java:75) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) is there any jar file that should be in lib??? On 5/24/07, Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohammed, Mohammed Zabin wrote: You know what? I am confusing with this. Shall i put the following code in web.xml in my web application or web.xml on config folder, shall i use server.xml or context.xml Use META-INF/context.xml in your WAR file or deployment directory. Don't use ${TOMCAT_HOME}/conf/Catalina/[host]/[app].xml unless there's a really good reason to do so. Put your Resource in context.xml and remove all Resource configuration from server.xml. Remove any resource-ref you have in your web.xml. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGVZCk9CaO5/Lv0PARAvY4AJ9LdP/csNjVWn3ZU9OVzv527gyWygCfTJmS 3EScAagRpgYlErF8uPLvF9E= =MAx6 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat webapp startup order
Hi all, I have vanilla tomcat 5.5 installed. I also have axis2 web application deploying on every startup. the problem is that the axis2 web app needs to read a url from the same tomcat server, only that the server is not yet started because in the same moment is yet deploying the axis2 web app. is there any way to solve/work-around this problem? Regards, Nencho
RE: tomcat webapp startup order
-Original Message- From: Nencho Lupanov [mailto:[EMAIL PROTECTED] Sent: Friday, May 25, 2007 7:22 AM To: Tomcat Users List Subject: tomcat webapp startup order Hi all, I have vanilla tomcat 5.5 installed. I also have axis2 web application deploying on every startup. the problem is that the axis2 web app needs to read a url from the same tomcat server, only that the server is not yet started because in the same moment is yet deploying the axis2 web app. is there any way to solve/work-around this problem? You can start a thread in the ServletContextListener of the 1st application which allows the application to complete startup from Tomcat's perspective. Then the thread you started can wait / retry until it can read the 2nd URL at which time you can have the thread mark the 1st application as available / ready / whatever. Tim Regards, Nencho - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat webapp startup order
Hi Tim, That's a pretty good idea, Thanks. 2007/5/25, Tim Lucia [EMAIL PROTECTED]: -Original Message- From: Nencho Lupanov [mailto:[EMAIL PROTECTED] Sent: Friday, May 25, 2007 7:22 AM To: Tomcat Users List Subject: tomcat webapp startup order Hi all, I have vanilla tomcat 5.5 installed. I also have axis2 web application deploying on every startup. the problem is that the axis2 web app needs to read a url from the same tomcat server, only that the server is not yet started because in the same moment is yet deploying the axis2 web app. is there any way to solve/work-around this problem? You can start a thread in the ServletContextListener of the 1st application which allows the application to complete startup from Tomcat's perspective. Then the thread you started can wait / retry until it can read the 2nd URL at which time you can have the thread mark the 1st application as available / ready / whatever. Tim Regards, Nencho - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat webapp startup order
Or you can delay your intialization code to the first hit to webapplication (if faisable, using a requestfilter for example). At startup, tomcat won't respond to any request until all webapps have been started, so if filter code is reached, all webapps have been started. En l'instant précis du 25/05/07 13:28, Tim Lucia s'exprimait en ces termes: -Original Message- From: Nencho Lupanov [mailto:[EMAIL PROTECTED] Sent: Friday, May 25, 2007 7:22 AM To: Tomcat Users List Subject: tomcat webapp startup order Hi all, I have vanilla tomcat 5.5 installed. I also have axis2 web application deploying on every startup. the problem is that the axis2 web app needs to read a url from the same tomcat server, only that the server is not yet started because in the same moment is yet deploying the axis2 web app. is there any way to solve/work-around this problem? You can start a thread in the ServletContextListener of the 1st application which allows the application to complete startup from Tomcat's perspective. Then the thread you started can wait / retry until it can read the 2nd URL at which time you can have the thread mark the 1st application as available / ready / whatever. Tim Regards, Nencho - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DBCP
Mohammed Zabin wrote: It didn't work, I put the following in Context.xml: Resource name=jdbc/mydb auth=Container type=oracle.jdbc.pool.OracleDataSource factory=oracle.jdbc.pool.OracleDataSourceFactory user=hr password=hr driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@localhost:1521:orcldb maxActive=20 maxIdle=10 maxwait=-1/ and i got the following exception: javax.servlet.ServletException: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleDataSourceFactory] org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:855) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:784) org.apache.jsp.jsp.testDBCP_jsp._jspService(testDBCP_jsp.java:75) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) is there any jar file that should be in lib??? Yes, I think someone already pointed out that you'll need an Oracle JDBC driver. p On 5/24/07, Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohammed, Mohammed Zabin wrote: You know what? I am confusing with this. Shall i put the following code in web.xml in my web application or web.xml on config folder, shall i use server.xml or context.xml Use META-INF/context.xml in your WAR file or deployment directory. Don't use ${TOMCAT_HOME}/conf/Catalina/[host]/[app].xml unless there's a really good reason to do so. Put your Resource in context.xml and remove all Resource configuration from server.xml. Remove any resource-ref you have in your web.xml. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGVZCk9CaO5/Lv0PARAvY4AJ9LdP/csNjVWn3ZU9OVzv527gyWygCfTJmS 3EScAagRpgYlErF8uPLvF9E= =MAx6 -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Re: DBCP
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pid, Pid wrote: Mohammed Zabin wrote: java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleDataSourceFactory [snip] is there any jar file that should be in lib??? Yes, I think someone already pointed out that you'll need an Oracle JDBC driver. Though nobody posted this specifically on this thread, any search of the archives for ClassNotFoundException connection pool should have come up with the same response... over and over and over and over... I'm sorry, Mohammed, but the archives are there for a reason. It's very unlikely that nobody but you has ever experienced a particular error. It's worth searching the archives (or just STFW) before asking a question like this. You would have had your question answered yesterday instead of having to wait, and we wouldn't have had to drag the information out of you. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGVteQ9CaO5/Lv0PARAlcpAJ91GY8pbLGCrlPoIud0nsguZxwylwCcDeDH 2XOrJZ17lD+Gube3z0VZkBk= =M5Nj -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
If xerces is in WEB-INF/lib this is used for deployment/web.xml parsing on tomcat6 (bug or feature?)
Hi, today i played around with tomcat 6 (latest). I have an old webapp wich used Xerces 2.0.0. The Webapp deploys fine and runs without Problems until i try to reload the Context. In this case i get a NullpointerException fro xerces when it tries to load web.xml via JNDI. I played around with it and found that: - when xerces is not present in WEB-INF/web.xml, the jdk-builtin xml parser is used (com.sun...) - when xerces is present in WEB-INF/web.xml, it is used to parse web.xml during deployment and during reload - in the 2nd case reload fails because the old xerces cannot read from JNDI I'm not sure how to solve this. I could change the Xerces version of my application but this is the first of many apps i want to migrate to tomcat 6. Maybe some of this apps will not work with newer xerces. I think tomcat should _not_ use a parser which is within the webapp's lib directory for tomcat-specific tasks. What do you think? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: AW: logging log4j of my application
Ok My problem is solved. After reading some more documentation on commons-logging. The trick is in $TOMCAT_HOME\bin\commons-logging-api.jar. It doesn't contain the Adapters for Log4j. Because it's on the container class path, it is always used, even if you put newer version into webapp\WEB-INF\lib After replacing it with commons-logging-api-1.1.jar (renamed because tomcat has this name hard coded somewhere) and putting commons-logging-adapters-1.1.jar into webapp\WEB-INF\lib, it's all good. Mirek On 5/25/07, Mirek Kopriva [EMAIL PROTECTED] wrote: Marc, What jar are you talking about? I have a similar problem. Got log4j working with my application based on spring running on tomcat 5.5.17 but have troubles to set up logging for Spring/Whatever is using commons logging in my log4j xml. Searching on the net reveals that this might be tomcat/commons-logging problems, but following various suggestions didn't help me. I won't put here various configuration files as they are correct (working with my app./ log file gets created - appender for spring only, but no logging messages for spring goes into it nor to anywhere else). I have commons-logging-api.jar in $TOMCAT_HOME.bin (v 1.0.4) log4j.1.2.4.jar + commons-loggin.jar in WEB-INF/lib. No other log4j configuration/jars lying around neither is set in tomcats configs. I also tried it with spring's jpetstore sample application, but didn't work either. Does anybody have any idea? Or an idea how to try to discover the problem (no logging, no pointers)? Thanks a lot, Mirek On 5/22/07, Marc Rameder [EMAIL PROTECTED] wrote: Sorry for spaming but solution is found! Jar file was corrupted. Thanks @ all marc -Ursprüngliche Nachricht- Von: Marc Rameder [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 22. Mai 2007 16:38 An: 'Tomcat Users List' Betreff: AW: AW: AW: logging log4j of my application First of all thanks for your help!!! But I didn't find a solution until now. After revising the source code if found the main problem. I am using commons logging and not log4j. By using log4j all works fine. import org.apache.log4j.Logger; import org.apache.log4j.BasicConfigurator ; private static final Logger LOG = Logger.getLogger(User.class); However with commons logging it doesn't. import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; private static final Log LOG = LogFactory.getLog(User.class); May somebody have an idea to solve the problem at the bottom with this new aspect? Regards marc -Ursprüngliche Nachricht- Von: Rainer Jung [mailto:[EMAIL PROTECTED] Gesendet: Montag, 21. Mai 2007 16:59 An: Tomcat Users List Betreff: Re: AW: AW: logging log4j of my application Your config looks OK to me. Sometimes such a thing happens, if one starts the process unintended as root, who then owns the log file and after starting again as non-root, the process user can not write to the file... You can add -Dlog4j.debug to the startup options of your Tomcat. Then catalina.out will contain information about log4j parsing its config, like log4j: Using URL [file:.../conf/log4j.properties] for automatic log4j configuration. log4j: Reading configuration from URL file:.../conf/log4j.properties log4j: Parsing for [root] with value=[DEBUG,FILE]. ... log4j: End of parsing for FILE. log4j: Setting property [file] to [/home/jung/.../logs/RPSSERVER.log]. log4j: setFile called: /home/jung/.../logs/RPSSERVER.log, true ... Maybe you will detect something strange in this output. Regards, Rainer Marc Rameder wrote: The output of the log file should be information about hibernate, spring and my development in the net.thefource package. I have used this log4j.properties for a GUI application where it is working fine and also by testing the server with JUnit all debug information are displayed. I am starting the tomcat with the startup.bat. Hence it is not a service. A example for the GUI application would be: 14:07:25,500 () [INFO ] CollectionFactory (clinit) - JDK 1.4+ collections available marc log4j.rootLogger=DEBUG,FILE #ConsoleAppender log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%x) [%-5p] %c{1} (%M) - %m%n #FileAppender log4j.appender.FILE=org.apache.log4j.FileAppender log4j.appender.FILE.layout=org.apache.log4j.PatternLayout log4j.appender.FILE.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%x) [%-5p] %c{1} (%M) - %m%n log4j.appender.FILE.File=${catalina.home}/logs/RPSSERVER.log log4j.appender.FILE.File.MaxFileSize=1MB # Keep one backup file log4j.appender.FileApp.MaxBackupIndex=1 log4j.appender.FileApp.layout=org.apache.log4j.PatternLayout log4j.appender.FileApp.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%x) [%-5p] %c{1} (%M) - %m%n log4j.logger.org.apache.catalina=WARN,
Re: How-to make default Running status = false
On Thu, May 24, 2007 at 09:01:13PM -0400, Rashmi Rubdi wrote: On 5/23/07, Roger Tismeer [EMAIL PROTECTED] wrote: It takes about 4 minutes or so to (re)start Tomcat granted I have 30 webapps loaded, but isn't there a switch somewhere that I can toggle to not auto-start any non-Tomcat webapps? I was in a similar situation as you've mentioned above. I find that keeping the Context descriptor outside server.xml makes it a lot easier to switch between applications. I'll have to remember that one. Thanks! Say your apps are named app1, app2, app3 etc and if you access them as http://localhost:8080/app1 http://localhost:8080/app2 http://localhost:8080/app3 , then you would define the Context for each app under Tomcat's /conf/Catalina/localhost/ as app1.xml , app2.xml and app3.xml Now if you want Tomcat to only load app1 , you just disable the other XML files by renaming them as in app2.xml_disable app3.xml_something In that case, you have to either ensure that your webapp.s do not contain META-INF/context.xml or that the Host has deployXML='false'. Otherwise the webapp itself will supply a Context. Tomcat will generate a Context on its own in some circumstances which I've not yet completely worked out from the documentation. How did you disable this? -- Mark H. Wood, Lead System Programmer [EMAIL PROTECTED] Typically when a software vendor says that a product is intuitive he means the exact opposite. pgpDtCY1Wnipw.pgp Description: PGP signature
RE: Possible bug?
I never use SSL with Tomcat, but do you really want to load 4k rows a time? -Original Message- From: Hoa Doan [mailto:[EMAIL PROTECTED] Sent: Thursday, May 24, 2007 5:11 PM To: users@tomcat.apache.org Subject: Possible bug? I am accessing a page on my server that outputs about 4000+ records and displaying them in a table. The page loads fine w/o SSL enable but with SSL it just stop around the 2000th row. I have no idea why this is happening. - Pinpoint customers who are looking for what you sell. NOTICE: This message (including any attachments) from Momentum Systems, Inc. contains information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you are hereby notified that any dissemination of this message is strictly prohibited. If you have received this message in error, please do not read, copy or forward this message. Please permanently delete all copies and any attachments and notify the sender immediately by reply email or by calling our Office at 703.740.9300. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Server.xml Sort on Start
On Thu, May 24, 2007 at 07:37:25PM -0700, Kyle B wrote: [snip] In regards to Mark's statement. I'm not opposed to writing some XML parsing tools to play nice with Tomcat. However, I'm still left trying to figure out how Tomcat sorts that HashMap it creates for all Host elements. I've looked for patterns that I just can't find. It's not sorted by element order in the server.xml, nor by name attribute, or appBase. Given the information that hosts are collected in a HashMap: Tomcat isn't sorting anything, and you can't sort a HashMap*. Hashing functions are designed to distribute a large key space over a much smaller set of buckets in constant time. The more apparently random the relationship between input and output, the better for this purpose, in most cases. The entries in a hashtable are deliberately DISordered on insertion. Hashing data is like hashing meat and potatoes: the result is expected to be finely divided and well mixed. --- * You could sort its content into some other data structure, but apparently that's not done here. -- Mark H. Wood, Lead System Programmer [EMAIL PROTECTED] Typically when a software vendor says that a product is intuitive he means the exact opposite. pgpGLPMxopvps.pgp Description: PGP signature
RES: pre-compile
Hi Bem, It worked... I was using jstl 1.2 and everything worked when I changed to 1.1.2. Thanks a lot. Now, I need to monitor if this change won't bring me some side effect. -Mensagem original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome de ben short Enviada em: quinta-feira, 24 de maio de 2007 17:52 Para: Tomcat Users List Assunto: Re: pre-compile Looks like you need the taglibs dependency. Try adding these to your pom. dependency groupIdtaglibs/groupId artifactIdstandard/artifactId version1.1.2/version scopecompile/scope /dependency dependency groupIdjavax.servlet/groupId artifactIdjstl/artifactId version1.1.2/version scopecompile/scope /dependency On 5/24/07, Rogerio Baldini das Neves [EMAIL PROTECTED] wrote: I am using this plugin like in tutorial. But it's happing some strange with item: org.apache.taglibs.standard.tag.rt.core.ForTokensTag.setItems(Ljava/lang/Str ing;)V -Mensagem original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome de ben short Enviada em: quinta-feira, 24 de maio de 2007 17:06 Para: Tomcat Users List Assunto: Re: pre-compile Have a look at this maven 2 plugin http://mojo.codehaus.org/jspc-maven-plugin/usage.html Ben On 5/24/07, Rogerio Baldini das Neves [EMAIL PROTECTED] wrote: I need to do it in maven. But send me your solution, if I don't be able to solve my problem with maven, I will use yours. Thank you. -Mensagem original- De: Milanez, Marcus [mailto:[EMAIL PROTECTED] Enviada em: quinta-feira, 24 de maio de 2007 15:34 Para: Tomcat Users List Assunto: RES: pre-compile I know how to do it using ANT. Would you like it? -Mensagem original- De: Rogerio Baldini das Neves [mailto:[EMAIL PROTECTED] Enviada em: quinta-feira, 24 de maio de 2007 15:30 Para: users@tomcat.apache.org Assunto: pre-compile Hi Guys, I'd like to pre-compile my jsps for Tomcat 6 using maven. Anybody knows how it is possible ? I've tried to compile using jspc-maven-plugin 1.4.6 and 1.4.7-SNAPSHOT. But in both I've received the message: org.apache.taglibs.standard.tag.rt.core.ForTokensTag.setItems(Ljava/lang /Str ing;)V when accessing some pages. Thanks, Rogerio Baldini - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.7.6/815 - Release Date: 22/5/2007 15:49 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.7.6/815 - Release Date: 22/5/2007 15:49 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.7.6/815 - Release Date: 22/5/2007 15:49 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pre-compile
At a guess i would say that if your jsp's compiled ok then all should be good. Sorry to the tomcat guys for this post being a bit off topic. On 5/25/07, Rogerio Baldini das Neves [EMAIL PROTECTED] wrote: Hi Bem, It worked... I was using jstl 1.2 and everything worked when I changed to 1.1.2. Thanks a lot. Now, I need to monitor if this change won't bring me some side effect. -Mensagem original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome de ben short Enviada em: quinta-feira, 24 de maio de 2007 17:52 Para: Tomcat Users List Assunto: Re: pre-compile Looks like you need the taglibs dependency. Try adding these to your pom. dependency groupIdtaglibs/groupId artifactIdstandard/artifactId version1.1.2/version scopecompile/scope /dependency dependency groupIdjavax.servlet/groupId artifactIdjstl/artifactId version1.1.2/version scopecompile/scope /dependency On 5/24/07, Rogerio Baldini das Neves [EMAIL PROTECTED] wrote: I am using this plugin like in tutorial. But it's happing some strange with item: org.apache.taglibs.standard.tag.rt.core.ForTokensTag.setItems(Ljava/lang/Str ing;)V -Mensagem original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome de ben short Enviada em: quinta-feira, 24 de maio de 2007 17:06 Para: Tomcat Users List Assunto: Re: pre-compile Have a look at this maven 2 plugin http://mojo.codehaus.org/jspc-maven-plugin/usage.html Ben On 5/24/07, Rogerio Baldini das Neves [EMAIL PROTECTED] wrote: I need to do it in maven. But send me your solution, if I don't be able to solve my problem with maven, I will use yours. Thank you. -Mensagem original- De: Milanez, Marcus [mailto:[EMAIL PROTECTED] Enviada em: quinta-feira, 24 de maio de 2007 15:34 Para: Tomcat Users List Assunto: RES: pre-compile I know how to do it using ANT. Would you like it? -Mensagem original- De: Rogerio Baldini das Neves [mailto:[EMAIL PROTECTED] Enviada em: quinta-feira, 24 de maio de 2007 15:30 Para: users@tomcat.apache.org Assunto: pre-compile Hi Guys, I'd like to pre-compile my jsps for Tomcat 6 using maven. Anybody knows how it is possible ? I've tried to compile using jspc-maven-plugin 1.4.6 and 1.4.7-SNAPSHOT. But in both I've received the message: org.apache.taglibs.standard.tag.rt.core.ForTokensTag.setItems(Ljava/lang /Str ing;)V when accessing some pages. Thanks, Rogerio Baldini - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.7.6/815 - Release Date: 22/5/2007 15:49 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.7.6/815 - Release Date: 22/5/2007 15:49 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.7.6/815 - Release Date: 22/5/2007 15:49 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 6.X: Can't serialize Web Service classes working on 5.5 series
I have a working application that uses Tomcat and web services on 5.5.20server (works on previous versions also). I wanted to try it on the new 6.X series and all the web service related classes fire a not serializable error and shuts down the server. I checked the new implemented specs but didn't find anything that could be related. Any help/idea? Thanks in advance!
Tomcat thread dump: unable to open the event mutex
Hello, I have installed the latest Tomcat (6.0.13) right out of the box (using the Windows Installer) on a Windows 2003 server. I deploy a web app and everything works perfectly fine. I have done essentially no configuration other than deploying the web app. However, when I right click on the Tomcat service system tray icon and select menu Thread Dump I get a windows message box saying: The system can not find the file specified. Unable to open the Event Mutex. My question is: what configuration needs to be done to get the Thread Dump feature working in a Tomcat installed with Windows Installer? Best regards, Henrik Nyberg H M Hennes Mauritz AB, Publikt Bolag (Publ), Org.nr: 556042-7220, Registered Office Stockholm, Sweden The information contained in this e-mail message may be privileged, confidential, and protected from disclosure. Any unauthorized use, printing, copying, disclosure or dissemination of this communication may be subject to legal restriction or sanction. If you think that you have received this e-mail message in error, please reply to the sender and delete this message from your computer.
Re: DBCP
Are you aware of the new placing of files in 6.x? There's a new lib folder. Put the file there and try again. On 5/25/07, Mohammed Zabin [EMAIL PROTECTED] wrote: Hello Geeks Following is my problem, I am trying to configure my Tomcat 6 to connect to my localhost Oracle 10g Database, following is my server.xml file : Resource name=jdbc/myoracle auth=Container type=javax.sql.DataSource driverClassName= oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@127.0.0.1:1521:orcldb username=hr password=hr maxActive=20 maxIdle=10 maxWait=-1/ and i put the following in web.xml: resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref and the following is code is the JSP code: %@ page import=javax.naming.Context,javax.naming.InitialContext, javax.naming.NamingException,javax.sql.DataSource, java.sql.* % % Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/myoracle); Connection conn = ds.getConnection(); out.println( Connection Established ); % After running the jsp page, i got the following error: org.apache.jasper.JasperException: javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.jasper.servlet.JspServletWrapper.handleJspException( JspServletWrapper.java:532) org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:408) org.apache.jasper.servlet.JspServlet.serviceJspFile( JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) i have downloaded JDBC driver from otn.oracle classes12.zip and i changed it to classes12.jar, and put it in CLASSPATH. I am working on this problem almost from 2 weeks, i didn't know what the problem is, any help plzz
Re: DBCP
I did, in Tomcat 6 documentation, it's mentioned that classes12.jar must be placed in CATALINA_HOME/lib, and i put the jar file there, but still, it's don't work On 5/25/07, Caldarale, Charles R [EMAIL PROTECTED] wrote: From: Mohammed Zabin [mailto:[EMAIL PROTECTED] Subject: Re: DBCP i have downloaded JDBC driver from otn.oracle classes12.zip and i changed it to classes12.jar, and put it in CLASSPATH. The CLASSPATH environment variable should not be used for Tomcat (or for any other Java application, for that matter); the standard Tomcat startup mechanisms rightly ignore it. The JDBC driver jar must be placed in the Tomcat 6 lib directory in order to use connection pooling. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DBCP
Mohammed Zabin wrote: Hello Geeks I'm not sure what the appropriate response is but I'll try to sneak something passed my language filter: Hello X, Following is my problem, I am trying to configure my Tomcat 6 to connect to my localhost Oracle 10g Database, following is my server.xml file : Resource name=jdbc/myoracle auth=Container type=javax.sql.DataSource driverClassName= oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@127.0.0.1:1521:orcldb username=hr password=hr maxActive=20 maxIdle=10 maxWait=-1/ Yeah, where exactly in the server.xml did you put this? Tomcat is now telling you that it can't even find the name of the driver, which I think you told us in your previous thread it could, but couldn't find the class. All you had to do was add the oracle driver to CATALINA_HOME/lib or your WEB-INF/lib and you should have been done... p and i put the following in web.xml: resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref and the following is code is the JSP code: %@ page import=javax.naming.Context,javax.naming.InitialContext, javax.naming.NamingException,javax.sql.DataSource, java.sql.* % % Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/myoracle); Connection conn = ds.getConnection(); out.println( Connection Established ); % After running the jsp page, i got the following error: org.apache.jasper.JasperException: javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:532) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:408) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) i have downloaded JDBC driver from otn.oracle classes12.zip and i changed it to classes12.jar, and put it in CLASSPATH. I am working on this problem almost from 2 weeks, i didn't know what the problem is, any help plzz smime.p7s Description: S/MIME Cryptographic Signature
RE: DBCP
From: Mohammed Zabin [mailto:[EMAIL PROTECTED] Subject: Re: DBCP i have downloaded JDBC driver from otn.oracle classes12.zip and i changed it to classes12.jar, and put it in CLASSPATH. The CLASSPATH environment variable should not be used for Tomcat (or for any other Java application, for that matter); the standard Tomcat startup mechanisms rightly ignore it. The JDBC driver jar must be placed in the Tomcat 6 lib directory in order to use connection pooling. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DBCP
anyways, i put the jar file in my classpath, and this will override the lib folder i think, isn't it? On 5/25/07, Javier Ortiz [EMAIL PROTECTED] wrote: Yes but not in the same path as in previous versions. On 5/25/07, Mohammed Zabin [EMAIL PROTECTED] wrote: Thank you Lib folder in CATALINA_HOME, as mentioned in Tomact 6, isn't it? On 5/25/07, Javier Ortiz [EMAIL PROTECTED] wrote: Are you aware of the new placing of files in 6.x? There's a new lib folder. Put the file there and try again. On 5/25/07, Mohammed Zabin [EMAIL PROTECTED] wrote: Hello Geeks Following is my problem, I am trying to configure my Tomcat 6 to connect to my localhost Oracle 10g Database, following is my server.xml file : Resource name=jdbc/myoracle auth=Container type=javax.sql.DataSource driverClassName= oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@127.0.0.1:1521:orcldb username=hr password=hr maxActive=20 maxIdle=10 maxWait=-1/ and i put the following in web.xml: resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref and the following is code is the JSP code: %@ page import=javax.naming.Context,javax.naming.InitialContext, javax.naming.NamingException,javax.sql.DataSource, java.sql.* % % Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/myoracle); Connection conn = ds.getConnection(); out.println( Connection Established ); % After running the jsp page, i got the following error: org.apache.jasper.JasperException: javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.jasper.servlet.JspServletWrapper.handleJspException ( JspServletWrapper.java:532) org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:408) org.apache.jasper.servlet.JspServlet.serviceJspFile( JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java :266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) i have downloaded JDBC driver from otn.oracle classes12.zip and i changed it to classes12.jar, and put it in CLASSPATH. I am working on this problem almost from 2 weeks, i didn't know what the problem is, any help plzz
Re: DBCP
Yes but not in the same path as in previous versions. On 5/25/07, Mohammed Zabin [EMAIL PROTECTED] wrote: Thank you Lib folder in CATALINA_HOME, as mentioned in Tomact 6, isn't it? On 5/25/07, Javier Ortiz [EMAIL PROTECTED] wrote: Are you aware of the new placing of files in 6.x? There's a new lib folder. Put the file there and try again. On 5/25/07, Mohammed Zabin [EMAIL PROTECTED] wrote: Hello Geeks Following is my problem, I am trying to configure my Tomcat 6 to connect to my localhost Oracle 10g Database, following is my server.xml file : Resource name=jdbc/myoracle auth=Container type=javax.sql.DataSource driverClassName= oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@127.0.0.1:1521:orcldb username=hr password=hr maxActive=20 maxIdle=10 maxWait=-1/ and i put the following in web.xml: resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref and the following is code is the JSP code: %@ page import=javax.naming.Context,javax.naming.InitialContext, javax.naming.NamingException,javax.sql.DataSource, java.sql.* % % Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/myoracle); Connection conn = ds.getConnection(); out.println( Connection Established ); % After running the jsp page, i got the following error: org.apache.jasper.JasperException: javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.jasper.servlet.JspServletWrapper.handleJspException ( JspServletWrapper.java:532) org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:408) org.apache.jasper.servlet.JspServlet.serviceJspFile( JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java :266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) i have downloaded JDBC driver from otn.oracle classes12.zip and i changed it to classes12.jar, and put it in CLASSPATH. I am working on this problem almost from 2 weeks, i didn't know what the problem is, any help plzz
DBCP
Hello Geeks Following is my problem, I am trying to configure my Tomcat 6 to connect to my localhost Oracle 10g Database, following is my server.xml file : Resource name=jdbc/myoracle auth=Container type=javax.sql.DataSource driverClassName= oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@127.0.0.1:1521:orcldb username=hr password=hr maxActive=20 maxIdle=10 maxWait=-1/ and i put the following in web.xml: resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref and the following is code is the JSP code: %@ page import=javax.naming.Context,javax.naming.InitialContext, javax.naming.NamingException,javax.sql.DataSource, java.sql.* % % Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/myoracle); Connection conn = ds.getConnection(); out.println( Connection Established ); % After running the jsp page, i got the following error: org.apache.jasper.JasperException: javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:532) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:408) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) i have downloaded JDBC driver from otn.oracle classes12.zip and i changed it to classes12.jar, and put it in CLASSPATH. I am working on this problem almost from 2 weeks, i didn't know what the problem is, any help plzz
Re: DBCP
Thank you Pid Yeah, where exactly in the server.xml did you put this? I put it in GlobalNamingResources tag in server.xml On 5/25/07, Pid [EMAIL PROTECTED] wrote: Mohammed Zabin wrote: Hello Geeks I'm not sure what the appropriate response is but I'll try to sneak something passed my language filter: Hello X, Following is my problem, I am trying to configure my Tomcat 6 to connect to my localhost Oracle 10g Database, following is my server.xml file : Resource name=jdbc/myoracle auth=Container type=javax.sql.DataSource driverClassName= oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@127.0.0.1:1521:orcldb username=hr password=hr maxActive=20 maxIdle=10 maxWait=-1/ Yeah, where exactly in the server.xml did you put this? Tomcat is now telling you that it can't even find the name of the driver, which I think you told us in your previous thread it could, but couldn't find the class. All you had to do was add the oracle driver to CATALINA_HOME/lib or your WEB-INF/lib and you should have been done... p and i put the following in web.xml: resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref and the following is code is the JSP code: %@ page import=javax.naming.Context,javax.naming.InitialContext, javax.naming.NamingException,javax.sql.DataSource, java.sql.* % % Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/myoracle); Connection conn = ds.getConnection(); out.println( Connection Established ); % After running the jsp page, i got the following error: org.apache.jasper.JasperException: javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.jasper.servlet.JspServletWrapper.handleJspException( JspServletWrapper.java:532) org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:408) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java :320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) i have downloaded JDBC driver from otn.oracle classes12.zip and i changed it to classes12.jar, and put it in CLASSPATH. I am working on this problem almost from 2 weeks, i didn't know what the problem is, any help plzz
Re: DBCP
Thank you Lib folder in CATALINA_HOME, as mentioned in Tomact 6, isn't it? On 5/25/07, Javier Ortiz [EMAIL PROTECTED] wrote: Are you aware of the new placing of files in 6.x? There's a new lib folder. Put the file there and try again. On 5/25/07, Mohammed Zabin [EMAIL PROTECTED] wrote: Hello Geeks Following is my problem, I am trying to configure my Tomcat 6 to connect to my localhost Oracle 10g Database, following is my server.xml file : Resource name=jdbc/myoracle auth=Container type=javax.sql.DataSource driverClassName= oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@127.0.0.1:1521:orcldb username=hr password=hr maxActive=20 maxIdle=10 maxWait=-1/ and i put the following in web.xml: resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref and the following is code is the JSP code: %@ page import=javax.naming.Context,javax.naming.InitialContext, javax.naming.NamingException,javax.sql.DataSource, java.sql.* % % Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/myoracle); Connection conn = ds.getConnection(); out.println( Connection Established ); % After running the jsp page, i got the following error: org.apache.jasper.JasperException: javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.jasper.servlet.JspServletWrapper.handleJspException( JspServletWrapper.java:532) org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:408) org.apache.jasper.servlet.JspServlet.serviceJspFile( JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java :266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) i have downloaded JDBC driver from otn.oracle classes12.zip and i changed it to classes12.jar, and put it in CLASSPATH. I am working on this problem almost from 2 weeks, i didn't know what the problem is, any help plzz
Re: DBCP
I put the jar file in my WEB-INF/lib and CATALINA_HOME/lib and CLASSPATH, but nothing changed, I got the same error On 5/25/07, Mohammed Zabin [EMAIL PROTECTED] wrote: Thank you Pid Yeah, where exactly in the server.xml did you put this? I put it in GlobalNamingResources tag in server.xml On 5/25/07, Pid [EMAIL PROTECTED] wrote: Mohammed Zabin wrote: Hello Geeks I'm not sure what the appropriate response is but I'll try to sneak something passed my language filter: Hello X, Following is my problem, I am trying to configure my Tomcat 6 to connect to my localhost Oracle 10g Database, following is my server.xml file : Resource name=jdbc/myoracle auth=Container type=javax.sql.DataSource driverClassName= oracle.jdbc.OracleDriver url= jdbc:oracle:thin:@127.0.0.1:1521:orcldb username=hr password=hr maxActive=20 maxIdle=10 maxWait=-1/ Yeah, where exactly in the server.xml did you put this? Tomcat is now telling you that it can't even find the name of the driver, which I think you told us in your previous thread it could, but couldn't find the class. All you had to do was add the oracle driver to CATALINA_HOME/lib or your WEB-INF/lib and you should have been done... p and i put the following in web.xml: resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref and the following is code is the JSP code: %@ page import=javax.naming.Context,javax.naming.InitialContext, javax.naming.NamingException,javax.sql.DataSource , java.sql.* % % Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/myoracle); Connection conn = ds.getConnection(); out.println( Connection Established ); % After running the jsp page, i got the following error: org.apache.jasper.JasperException : javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.jasper.servlet.JspServletWrapper.handleJspException ( JspServletWrapper.java:532) org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:408) org.apache.jasper.servlet.JspServlet.serviceJspFile( JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) i have downloaded JDBC driver from otn.oracle classes12.zip and i changed it to classes12.jar, and put it in CLASSPATH. I am working on this problem almost from 2 weeks, i didn't know what the problem is, any help plzz
RE: DBCP
actually, Oracle stated on their site that oracle.jdbc.driver.OracleDriver is deprecated and from versions 9i and on it's preferred to use oracle.jdbc.OracleDriver instead, but if Mohammed's truly relying on his localhost (127.0.0.1) for the Oracle connection, unless that's where his Oracle installation resides, I'd be a little suspect of that. In fact, I thought he provided the other day in an email a different URL and SID for Oracle. And does he need the jar in three different places? I was thinking just in the CATALINA_HOME/lib, although I can't say for sure, I'm on the 4x series of TC, not 6.0. -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Friday, May 25, 2007 10:10 AM To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: DBCP -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohammed, Mohammed Zabin wrote: I put the jar file in my WEB-INF/lib and CATALINA_HOME/lib and CLASSPATH, but nothing changed, I got the same error No, you are getting a different error. The first one was ClassNotFoundException. Now, you are getting: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' Those are not the same. Search the archives for Cannot create JDBC driver of class '' and I'm sure you'll find this question answered hundreds of times over. It usually turns out to be an incorrect JDBC URL or an incorrect driver class name. Please check these over /carefully/: driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@127.0.0.1:1521:orcldb For instance, I usually see oracle.jdbc.driver.OracleDriver instead of what you have above. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGVvxA9CaO5/Lv0PARArmAAJsEdBWX6X0TcjTLZ30hFYNjACEAZQCgr9+d 7ag9qjj7Q+Uxg23E0P21XyU= =EAkm -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache2.2.4 with tomcat 6.0 and module_jk2.2.4.so error
I've configure the Tomcat 6 and Apache 2.2.4 with module_jk2.2.4 how must I, but I've a error: Thu May 24 23:27:13 2007] [notice] Apache/2.2.4 (Win32) mod_jk/1.2.23 PHP/5.2.2 configured -- resuming normal operations [Thu May 24 23:27:13 2007] [notice] Server built: Jan 9 2007 23:17:20 [Thu May 24 23:27:13 2007] [notice] Parent: Created child process 5620 [Thu May 24 23:27:13 2007] [warn] Useless use of AllowOverride in line 31. [Thu May 24 23:27:13 2007] [warn] Useless use of AllowOverride in line 36. [Thu May 24 23:27:13 2007] [warn] Useless use of AllowOverride in line 80. [Thu May 24 23:27:13 2007] [warn] Useless use of AllowOverride in line 85. [Thu May 24 23:27:13 2007] [warn] Useless use of AllowOverride in line 124. [Thu May 24 23:27:13 2007] [warn] Useless use of AllowOverride in line 129. [Thu May 24 23:27:13 2007] [warn] Useless use of AllowOverride in line 162. [Thu May 24 23:27:13 2007] [warn] Useless use of AllowOverride in line 167. [Thu May 24 23:27:13 2007] [warn] Useless use of AllowOverride in line 31. [Thu May 24 23:27:13 2007] [warn] Useless use of AllowOverride in line 36. [Thu May 24 23:27:13 2007] [warn] Useless use of AllowOverride in line 80. [Thu May 24 23:27:13 2007] [warn] Useless use of AllowOverride in line 85. [Thu May 24 23:27:13 2007] [warn] Useless use of AllowOverride in line 124. [Thu May 24 23:27:13 2007] [warn] Useless use of AllowOverride in line 129. [Thu May 24 23:27:13 2007] [warn] Useless use of AllowOverride in line 162. [Thu May 24 23:27:13 2007] [warn] Useless use of AllowOverride in line 167. [Thu May 24 23:27:13 2007] [notice] Child 5620: Child process is running [Thu May 24 23:27:13 2007] [notice] Child 5620: Acquired the start mutex. [Thu May 24 23:27:13 2007] [notice] Child 5620: Starting 250 worker threads. [Thu May 24 23:27:13 2007] [notice] Child 5620: Starting thread to listen on port 80. The Apache would have to give Start Ok, instead it gives this error. Why? Fabbris Pierluigi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DBCP
From: Propes, Barry L [mailto:[EMAIL PROTECTED] Subject: RE: DBCP And does he need the jar in three different places? Definitely not - doing so can only cause weird wonderful classloader problems. I was thinking just in the CATALINA_HOME/lib That's the correct spot. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DBCP
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mohammed, Mohammed Zabin wrote: I put the jar file in my WEB-INF/lib and CATALINA_HOME/lib and CLASSPATH, but nothing changed, I got the same error No, you are getting a different error. The first one was ClassNotFoundException. Now, you are getting: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' Those are not the same. Search the archives for Cannot create JDBC driver of class '' and I'm sure you'll find this question answered hundreds of times over. It usually turns out to be an incorrect JDBC URL or an incorrect driver class name. Please check these over /carefully/: driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@127.0.0.1:1521:orcldb For instance, I usually see oracle.jdbc.driver.OracleDriver instead of what you have above. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGVvxA9CaO5/Lv0PARArmAAJsEdBWX6X0TcjTLZ30hFYNjACEAZQCgr9+d 7ag9qjj7Q+Uxg23E0P21XyU= =EAkm -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Upgrading to Tomcat 6 problems
Hello, I just upgraded to Tomcat 6.0.13 from 5.5.9 (no particular reason for the upgrade, just keeping up to date). I am running Java 1.6. However, instantly I'm having trouble that I cannot resolve regardless of endless hours of searching for and trying to apply answers to previous similar problems. After starting Tomcat, I get the following errors within the log file for every web application: = Start = INFO: Exception initializing TldLocationsCache: XML parsing error on file /WEB-INF/web.xml: (line 19, col -1): Element type web-app is not declared = End = The (line 19, col-1) is different per web app, but this particular line is interesting in that it is an error from the manager app web.xml file itself. Generally, to resolve problems with tomcat, I refer to the manager app, etc. figuring this one, if any, will be correct. I tried adding the DOCTYPE entry to the web.xml with no success. I updated the web-app tag to the version 2.5 as in manager/WEB-INF/web.xml for all my apps. It is simply an INFO problem, but none of my web apps work. I am wondering if it has something to do with the change from using common and shared. I heavily relied on shared, but decided to go ahead and change to using lib. Should I change catalina.properties to go back to using shared? However, the problem I have when trying to access a web app is universally: = Start = org.apache.jasper.JasperException: This absolute uri (http://java.sun.com/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application = End = This undoubtedly comes from hitting the app's index.jsp which references the jstl core libs the same way as I have been doing it since I can't remember when. Here is the line in my index.jsp file. = Start = %@ taglib uri=http://java.sun.com/jstl/core; prefix=c% = End = I did hit one email suggesting it should be http://java.sun.com/jsp/jstl/core, but that didn't fix it either. Same error, except it said the uri (http://java.sun.com/jsp/jstl/core) cannot be resolved I have no idea if these two are related, but suddenly tomcat can't seem to find the JSTL stuff, even though JSTL.JAR and STANDARD.JAR are in the lib directory. Some posts suggest to put JSTL.JAR and STANDARD.JAR into every web app's WEB-INF/lib directory, but I don't agree. The truth is, the lib directory ( or shared ) is supposed to be used for this exact thing... that is, libraries, etc. used by ALL applications.. This is, then, the location where I put my java framework jar, my common web apps jar, and the common TLD files, etc. I also modify the conf/web.xml to reference common servlets, tag libs and everything else. Here is the entry from within the conf/web.xml referencing the core jstl taglibs: = Start = taglib taglib-urihttp://java.sun.com/jstl/core/taglib-uri taglib-locationlib/tld/c.tld/taglib-location /taglib = End = Please note... I'm not terribly sure right now that lib/tld/c.tld is the correct path ( now that I've changed to using lib instead of shared ). The structure of my web apps is the default: = Start = webapps/app = End = My initial thinking was that maybe I needed the entry to be: = Start = taglib taglib-urihttp://java.sun.com/jstl/core/taglib-uri taglib-location../../lib/tld/c.tld/taglib-location /taglib = End = However, this did not work either, nor any meaningful combination of it. So, what am I missing? Joseph Morgan [EMAIL PROTECTED]
Re: DBCP
Hi Mohammed 1. There should only be one copy of the driver jar file and it's only home should be CATALINA_HOME/lib if you are implementing the tomcat managed database pool (and you are). 2. If you define your datasource in GlobalNamingResources in the server.xml, you'll need to put a ResourceLink element in your context.xml file. See the docs at http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html in the section titled Configuring JNDI Resources. My preference would be to drop the def in GlobalNamingResources and just have the Resource element in the webapp's context.xml file. --David Mohammed Zabin wrote: I put the jar file in my WEB-INF/lib and CATALINA_HOME/lib and CLASSPATH, but nothing changed, I got the same error On 5/25/07, Mohammed Zabin [EMAIL PROTECTED] wrote: Thank you Pid Yeah, where exactly in the server.xml did you put this? I put it in GlobalNamingResources tag in server.xml On 5/25/07, Pid [EMAIL PROTECTED] wrote: Mohammed Zabin wrote: Hello Geeks I'm not sure what the appropriate response is but I'll try to sneak something passed my language filter: Hello X, Following is my problem, I am trying to configure my Tomcat 6 to connect to my localhost Oracle 10g Database, following is my server.xml file : Resource name=jdbc/myoracle auth=Container type=javax.sql.DataSource driverClassName= oracle.jdbc.OracleDriver url= jdbc:oracle:thin:@127.0.0.1:1521:orcldb username=hr password=hr maxActive=20 maxIdle=10 maxWait=-1/ Yeah, where exactly in the server.xml did you put this? Tomcat is now telling you that it can't even find the name of the driver, which I think you told us in your previous thread it could, but couldn't find the class. All you had to do was add the oracle driver to CATALINA_HOME/lib or your WEB-INF/lib and you should have been done... p and i put the following in web.xml: resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref and the following is code is the JSP code: %@ page import=javax.naming.Context,javax.naming.InitialContext, javax.naming.NamingException,javax.sql.DataSource , java.sql.* % % Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/myoracle); Connection conn = ds.getConnection(); out.println( Connection Established ); % After running the jsp page, i got the following error: org.apache.jasper.JasperException : javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.jasper.servlet.JspServletWrapper.handleJspException ( JspServletWrapper.java:532) org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:408) org.apache.jasper.servlet.JspServlet.serviceJspFile( JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) i have downloaded JDBC driver from otn.oracle classes12.zip and i changed it to classes12.jar, and put it in CLASSPATH. I am working on this problem almost from 2 weeks, i didn't know what the problem is, any help plzz - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DBCP
Mohammed Zabin wrote: Thank you Pid Yeah, where exactly in the server.xml did you put this? I put it in GlobalNamingResources tag in server.xml Then, assuming that you've taken all of the other excellent advice you've been offered, you may wish to consider adding the following to your application Context definition: ResourceLink global=jdbc/myoracle name=jdbc/myoracle type=javax.sql.DataSource/ p On 5/25/07, Pid [EMAIL PROTECTED] wrote: Mohammed Zabin wrote: Hello Geeks I'm not sure what the appropriate response is but I'll try to sneak something passed my language filter: Hello X, (didn't get past the filter I guess) Following is my problem, I am trying to configure my Tomcat 6 to connect to my localhost Oracle 10g Database, following is my server.xml file : Resource name=jdbc/myoracle auth=Container type=javax.sql.DataSource driverClassName= oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@127.0.0.1:1521:orcldb username=hr password=hr maxActive=20 maxIdle=10 maxWait=-1/ Yeah, where exactly in the server.xml did you put this? Tomcat is now telling you that it can't even find the name of the driver, which I think you told us in your previous thread it could, but couldn't find the class. All you had to do was add the oracle driver to CATALINA_HOME/lib or your WEB-INF/lib and you should have been done... p and i put the following in web.xml: resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/myoracle/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref and the following is code is the JSP code: %@ page import=javax.naming.Context,javax.naming.InitialContext, javax.naming.NamingException,javax.sql.DataSource, java.sql.* % % Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/myoracle); Connection conn = ds.getConnection(); out.println( Connection Established ); % After running the jsp page, i got the following error: org.apache.jasper.JasperException: javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.jasper.servlet.JspServletWrapper.handleJspException( JspServletWrapper.java:532) org.apache.jasper.servlet.JspServletWrapper.service( JspServletWrapper.java:408) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java :320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) i have downloaded JDBC driver from otn.oracle classes12.zip and i changed it to classes12.jar, and put it in CLASSPATH. I am working on this problem almost from 2 weeks, i didn't know what the problem is, any help plzz smime.p7s Description: S/MIME Cryptographic Signature
Re: How can I limit the number of thread that tomcat spawn for my servlet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Herman, Herman Schultz wrote: My understanding is tomcat will spawn a thread for each request to my servlet. I think you might be misinterpreting this part of the spec. It just says that each request will be handled by a separate thread. That doesn't mean that a thread will be created for each request. Most app servers will use thread pools and re-use threads since they are relatively heavy to just create and discard all the time. How can I limit the number of thread that tomcat spawn for my servlet simultaneously? Tomcat's connector specifies the number of threads that will be created for request handling. Check out the documentation for the Tomcat connectors: HTTP: http://tomcat.apache.org/tomcat-5.5-doc/config/http.html AJP: http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html (Note that these are for TC 5.5, so if you are using a different version, you should use the documentation appropriate for that version). Specifically, look for settings including the word thread, as well as the backlog setting. Actually, it's worth reading the whole thing. And let say if I limit the simulaneous thread for my servlet to 10, what happens to the 11th request? Will it get dropped? Or Will it get queued? That depends on other settings (such as backlog). The links above should explain everything. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGVzhm9CaO5/Lv0PARAg1IAKC/WUCTjImVABuLokG2NISNypudYQCgl595 ahSYbdx7XAHe27TCPtGaqo4= =iBTq -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Excluding JSP compiler from Tomcat
In your production environment have you disabled or excluded the actual Tomcat piece that does the JSP compilation, to decrease the size and memory usage (no matter how small) of the production Tomcat install? The part of the JSP spec that I referred to in my original post seemed to indicate that it might be possible depending on your container. As Tomcat is the RI, I'm wondering whether this capability is available. Lakshmi Venkataraman wrote: In our development environment we compile JSPs on the fly. In our production environment we have precompiled JSP classes. In the PRODUCTION environment, webapps/WEB-INF/web.xml have servlet and servlet-mapping defined for every JSP page. For example: servlet servlet-nameMyAppJsp1/servlet-name servlet-classjsp.myAppJsp1/servlet-class /servlet servlet-mapping servlet-nameMyAppJsp1/servlet-name url-pattern/jsp/MyAppJsp1.jsp/url-pattern /servlet-mapping The precompiled JSP classes are placed inside WEB-INF/classes/jsp. I guess you can also probably archive these files in a WAR file. --Lakshmi -Original Message- From: lightbulb432 [mailto:[EMAIL PROTECTED] Sent: Friday, May 25, 2007 10:31 AM To: users@tomcat.apache.org Subject: Excluding JSP compiler from Tomcat The JSP spec says that if you precompile JSPs you can reduce the JSP container footprint by excluding the JSP compiler. How can this be done in Tomcat? Thanks. -- View this message in context: http://www.nabble.com/Excluding-JSP-compiler-from-Tomcat-tf3817429.html# a10807251 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Excluding-JSP-compiler-from-Tomcat-tf3817429.html#a10809085 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Excluding JSP compiler from Tomcat
I am a Tomcat newbie. We use Tomcat 5.5.23, *Nix and Windows. My recent experience was that in my development environment, if I had the application web.xml (as opposed to global web.xml under conf directory) with the mappings as specified below, then Tomcat refused to compile and was looking for precompiled classes. Then, I removed the mappings from the application web.xml, put ant.jar and tools.jar in $Catalina_HOME/commmon/lib and removed jasper-compiler-jdt.jar from the same place for Tomcat to compile the JSP files on the fly. In the production environment, with the web.xml as defined below, and with precompiled classes placed in the proper location, Tomcat does not try to compile at all, as desired. So in summary, I did not do anything special to disable compilation but rather I had to do the steps outlined above to enable compilation. --Lakshmi -Original Message- From: lightbulb432 [mailto:[EMAIL PROTECTED] Sent: Friday, May 25, 2007 12:32 PM To: users@tomcat.apache.org Subject: RE: Excluding JSP compiler from Tomcat In your production environment have you disabled or excluded the actual Tomcat piece that does the JSP compilation, to decrease the size and memory usage (no matter how small) of the production Tomcat install? The part of the JSP spec that I referred to in my original post seemed to indicate that it might be possible depending on your container. As Tomcat is the RI, I'm wondering whether this capability is available. Lakshmi Venkataraman wrote: In our development environment we compile JSPs on the fly. In our production environment we have precompiled JSP classes. In the PRODUCTION environment, webapps/WEB-INF/web.xml have servlet and servlet-mapping defined for every JSP page. For example: servlet servlet-nameMyAppJsp1/servlet-name servlet-classjsp.myAppJsp1/servlet-class /servlet servlet-mapping servlet-nameMyAppJsp1/servlet-name url-pattern/jsp/MyAppJsp1.jsp/url-pattern /servlet-mapping The precompiled JSP classes are placed inside WEB-INF/classes/jsp. I guess you can also probably archive these files in a WAR file. --Lakshmi -Original Message- From: lightbulb432 [mailto:[EMAIL PROTECTED] Sent: Friday, May 25, 2007 10:31 AM To: users@tomcat.apache.org Subject: Excluding JSP compiler from Tomcat The JSP spec says that if you precompile JSPs you can reduce the JSP container footprint by excluding the JSP compiler. How can this be done in Tomcat? Thanks. -- View this message in context: http://www.nabble.com/Excluding-JSP-compiler-from-Tomcat-tf3817429.htm l# a10807251 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Excluding-JSP-compiler-from-Tomcat-tf3817429.html# a10809085 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Accessing a class file under WEB-INF/classes from JSP
| From: Rajiv M [mailto:[EMAIL PROTECTED] | Sent: Wednesday, 23 May, 2007 13:41 | | Of course, adding package solves all the problems. But what can be | done to modify 3rd party classes already in WEB-INF/classes prior to | this Sun restriction... This is probably too simple, but can you simply create a directory (say WEB-INF/classes/no/package/specified) and put all those third-party classes there and then refer to them within your code as 'no.package.specified.foo'? I don't know if the package name is part of the compiled class, and whether the classload checks it. - The information contained in this message is confidential proprietary property of Nelnet, Inc. and its affiliated companies (Nelnet) and is intended for the recipient only. Any reproduction, forwarding, or copying without the express permission of Nelnet is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to this e-mail. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Accessing a class file under WEB-INF/classes from JSP
From: Nelson, Tracy M. [mailto:[EMAIL PROTECTED] Subject: RE: Accessing a class file under WEB-INF/classes from JSP I don't know if the package name is part of the compiled class, and whether the classload checks it. It is, and it does. The fully qualified class name is typically also present in several entries in the constant pool, making it difficult to simply patch the .class file. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Erratic HTTP response behavior
I’m experiencing some very erratic behavior in my local development installation of Tomcat. Here is my setup: Windows XP SP2 Tomcat 6.0.13 (had been using Tomcat 5.5.20 and was experiencing the same behavior) Struts Web Application (I’ve had similar issues with the manager app, so I’m convinced the problem is in Tomcat) Firefox + Firebug for testing (I seem to experience it less often in IE7, but that could just be my imagination) 1. Sometimes when I request a page I will get a dialog box saying “You have chosen to open page.do which is a DO file”. It seems like the content type is being screwed up. When I save the file to see the response, there is seemingly random data interspersed in the file, but it is consistent after I do it again. It always starts with the first line saying “b1” and the last saying “0”. At different points in the file there are groupings of characters like “d3d” and “3df”. One time I had a similar problem loading the manager app. It displayed with a content type of “text/plain”. Here is some of what displayed: 2000 html head style ... td class=row-left bgcolor=#C3F31329C3 ... /body/html0 HTTP/1.1 200 OKServer: Apache-Coyote/1.1Transfer-Encoding: chunkedDate: Fri, 18 May 2007 22:35:13 GMT 2. Sometimes everything in the page will load except for my stylesheet. When I check the response in Firebug I notice that the response header has a Trasfer-Encoding of chunked and the response just says “Loading …”. When it is successful there is no Transfer-Encoding value in the header. 3. Sometimes it will take a really long time to load certain files in the page, always about 20.5 seconds. One thing I noticed was that for these requests there were no response headers, but the file always ends up loading fine. I’m completely baffled by this behavior. If anyone has even a hint of what could be wrong, I would be very grateful. - Matt Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Erratic HTTP response behavior
From: Matt Cosentino [mailto:[EMAIL PROTECTED] Subject: Erratic HTTP response behavior If anyone has even a hint of what could be wrong, I would be very grateful. Sounds a lot like a flaky network component. If you're running the browser on the same machine as the server, it could also be a memory problem, but I would expect occasional blue screens of death in that case. Do you have an alternate system on which you could try to duplicate the problem? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Erratic HTTP response behavior
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matt, You're right, this /is/ erratic behavior. I think something is going wrong with your headers or something: Matt Cosentino wrote: /body/html0 HTTP/1.1 200 OKServer: Apache-Coyote/1.1Transfer-Encoding: chunkedDate: Fri, 18 May 2007 22:35:13 GMT Your response headers appear to be after the body of the response. Either that or the headers I see there are supposed to be the headers from the next chunk and/or request in a keepalive request. Are you intending to use chunked responses? 'Cause it looks like they are being used. There was some in-depth discussion of chunked responses somewhat recently on the list. Perhaps you could take a look at that for some reference points (but I'm not saying that it will solve your problem). I think the problem might be that you are getting chunked encoding for some reason, but you don't really want it. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGV08C9CaO5/Lv0PARArfQAJoD+kMZLUVWthGyRuv0NWKIKSuXcACfYh+I sJuvF8+a8MgIcIu3gd1hGak= =u9oS -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
invalid reference to login form
Hi, I'm having some users get this error reaching a portion of the secured section of my app. They oddly enough can access certain pages within the directory of this application, by logging in appropriately through the form. However, another file in the same directory gives them this error - Invalid Direct reference to Form Login page. Does anyone know what could be at work here causing this? I tested on my browser with this person's credentials and got in! I tested on both IE and Netscape and got in. One user got this and we rectified it by clearing the browser cache. Not so with another user! I'm wide open to suggestions if anyone has any! Thanks! Barry
RE: invalid reference to login form
on that note, it's also showing The request sent by the client was syntactically incorrect. My web.xml is correct and I haven't changed it recently. I'm almost thinking that the Tomcat server could use a restart, but hopefully that's all there is to it. -Original Message- From: Propes, Barry L [mailto:[EMAIL PROTECTED] Sent: Friday, May 25, 2007 4:04 PM To: Tomcat Users List Subject: invalid reference to login form Hi, I'm having some users get this error reaching a portion of the secured section of my app. They oddly enough can access certain pages within the directory of this application, by logging in appropriately through the form. However, another file in the same directory gives them this error - Invalid Direct reference to Form Login page. Does anyone know what could be at work here causing this? I tested on my browser with this person's credentials and got in! I tested on both IE and Netscape and got in. One user got this and we rectified it by clearing the browser cache. Not so with another user! I'm wide open to suggestions if anyone has any! Thanks! Barry - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Erratic HTTP response behavior
No I am on intending on using chunked responses. Is there a way to disable it? - Original Message From: Christopher Schultz [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Friday, May 25, 2007 4:02:58 PM Subject: Re: Erratic HTTP response behavior -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matt, You're right, this /is/ erratic behavior. I think something is going wrong with your headers or something: Matt Cosentino wrote: /body/html0 HTTP/1.1 200 OKServer: Apache-Coyote/1.1Transfer-Encoding: chunkedDate: Fri, 18 May 2007 22:35:13 GMT Your response headers appear to be after the body of the response. Either that or the headers I see there are supposed to be the headers from the next chunk and/or request in a keepalive request. Are you intending to use chunked responses? 'Cause it looks like they are being used. There was some in-depth discussion of chunked responses somewhat recently on the list. Perhaps you could take a look at that for some reference points (but I'm not saying that it will solve your problem). I think the problem might be that you are getting chunked encoding for some reason, but you don't really want it. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGV08C9CaO5/Lv0PARArfQAJoD+kMZLUVWthGyRuv0NWKIKSuXcACfYh+I sJuvF8+a8MgIcIu3gd1hGak= =u9oS -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=listsid=396545469 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: invalid reference to login form
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Barry, Propes, Barry L wrote: They oddly enough can access certain pages within the directory of this application, by logging in appropriately through the form. However, another file in the same directory gives them this error - Invalid Direct reference to Form Login page. That usually means that Tomcat thinks the user has tried to send a j_username and j_password to /j_security_check without having previously been challenged by a login page. My understanding is that Tomcat implements container-managed authentication somewhat like this: 1. Request for protected resource comes in (assume no creds, yet) 2. Tomcat creates a session, associates it with a wants login request, stores the original request, and displays the login page 3. Request to /j_security_check comes in, auth is performed, original request is then sent to the application This works relatively well in most situations. However, if enough time goes by between #2 and #3, the session times out and TC loses the wants login notation (whatever that means), as well as the original request. If you then try to login, TC basically says I never asked this guy to login, so this must be an invalid login, and you get this message. :( on that note, it's also showing The request sent by the client was syntactically incorrect. I think that's a red herring, actually. TC is probably liberally using an HTTP status code that could mean lots of different things. I'm having some users get this error reaching a portion of the secured section of my app. Is it always the same users? Is it always the same place? Does anyone know what could be at work here causing this? I think you might get this error if you don't run the your form action (j_security_check) through HttpServletResponse.encodeURL and the user is not using cookies. I think this will basically prevent logins for cookieless people (but I could be remembering wrong). If you run out of patience (as I did) with Tomcat's authentication, you can look at securityfilter (http://securityfilter.sourceforge.net) which emulates container-managed authentication and authorization and allows things like logging-in directly without first being challenged by the container. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGV1PI9CaO5/Lv0PARAuEdAJ9bbkTyC90czPNA4TlmXIo+Y6jeeACfVBw8 j14uRe5M/bXGM4cYHb86Vko= =wCtR -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: invalid reference to login form
we'll see how this goes. It's been relatively stable to this point. And further, this user can log on to certain sections, but not a certain path of the URL. In other words, I have certain files that are protected. Then I have a completely separate directory that's protected. This person can access one of the specified files, but nothing in the admin directory! Which incidentally is called admin, FWIW. Is it always the same users? Is it always the same place? It's not always the same users, bot so far, it is the same place it seems. this path -- url-pattern/chngctrl/admin/*/url-pattern is causing a problem, so it seems, not the case with the below files. url-pattern/chngctrl/change_ctrl_admin4.jsp/url-pattern url-pattern/chngctrl/change_ctrl_admin5.jsp/url-pattern url-pattern/chngctrl/change_ctrl_admin5b.jsp/url-pattern I might give the sourceforge thing a go if this keeps up!
Can't seem to get logging to work in Tomcat 5.5.9
Hi, I was originally planning to move to Tomcat 6 but backed off for a number of reasons. Now I have Tomcat 5.5.9 installed an working, except for logging (and one other problem that I might be able to resolve on my own if only I could get logging to work). I have never configured Tomcat to log using log4j (Tomcat 4.x's built-in was sufficient). Following the instructions on the website (http://tomcat.apache.org/tomcat-5.5-doc/logging.html), I creating a log4j.properties file and placed it in common/classes -- the only change I made on the example on the webpage was to replace a variable with an absolute path: log4j.rootLogger=DEBUG, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=/var/apache/jakarta-tomcat-5.5.9/logs/tomcat.log log4j.appender.R.MaxFileSize=10MB log4j.appender.R.MaxBackupIndex=10 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n I then put log4j-1.2.7.jar and commons-logging-1.1.jar jarfiles in common/lib and started Tomcat. The instructions don't say anything about doing anything else and I've not done very much with log4j other than use it to enable syslog logging in various applications, but it's not working. Any ideas? Thanks, Rob -- Rob Tanner UNIX Services Manager Linfield College, McMinnville OR smime.p7s Description: S/MIME Cryptographic Signature
RE: Can't seem to get logging to work in Tomcat 5.5.9
Your configuration file is valid. Does the user Tomcat runs as have write permission along the output path? You could try using /tmp as a test. If it is not permissions, then it could be a classpath issue, but your notes lead me to believe that not to be the case (i.e., you put them where they should be. You may (I'm fuzzy on this) have to rename the tomcat-juli.jar file, or otherwise change the startup script(s) so that it doesn't use the juli logger. HTH, Tim -Original Message- From: Rob Tanner [mailto:[EMAIL PROTECTED] Sent: Friday, May 25, 2007 6:36 PM To: Tomcat Users List Subject: Can't seem to get logging to work in Tomcat 5.5.9 Hi, I was originally planning to move to Tomcat 6 but backed off for a number of reasons. Now I have Tomcat 5.5.9 installed an working, except for logging (and one other problem that I might be able to resolve on my own if only I could get logging to work). I have never configured Tomcat to log using log4j (Tomcat 4.x's built-in was sufficient). Following the instructions on the website (http://tomcat.apache.org/tomcat-5.5-doc/logging.html), I creating a log4j.properties file and placed it in common/classes -- the only change I made on the example on the webpage was to replace a variable with an absolute path: log4j.rootLogger=DEBUG, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=/var/apache/jakarta-tomcat-5.5.9/logs/tomcat.log log4j.appender.R.MaxFileSize=10MB log4j.appender.R.MaxBackupIndex=10 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n I then put log4j-1.2.7.jar and commons-logging-1.1.jar jarfiles in common/lib and started Tomcat. The instructions don't say anything about doing anything else and I've not done very much with log4j other than use it to enable syslog logging in various applications, but it's not working. Any ideas? Thanks, Rob -- Rob Tanner UNIX Services Manager Linfield College, McMinnville OR - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't seem to get logging to work in Tomcat 5.5.9
Tim, Right now I'm running Tomcat as root so that it can grab ports 80 and 443 (I understand there is a work around for that, but I'm not there yet) and so permissions is not an issue. I also wondered whether the file had to already exist before it could log to it. So I touched the file and that made no difference. Also, I tried removing the tomcat-juli.jar file from $CATALINA_HOME/bin and that made no difference. Just looking at the startup script, I don't think JULI conflicts with log4j -- i.e., it doesn't look like if you use one you can't use the other. -- Rob Tim Lucia said the following on 05/25/2007 03:59 PM: Your configuration file is valid. Does the user Tomcat runs as have write permission along the output path? You could try using /tmp as a test. If it is not permissions, then it could be a classpath issue, but your notes lead me to believe that not to be the case (i.e., you put them where they should be. You may (I'm fuzzy on this) have to rename the tomcat-juli.jar file, or otherwise change the startup script(s) so that it doesn't use the juli logger. HTH, Tim -Original Message- From: Rob Tanner [mailto:[EMAIL PROTECTED] Sent: Friday, May 25, 2007 6:36 PM To: Tomcat Users List Subject: Can't seem to get logging to work in Tomcat 5.5.9 Hi, I was originally planning to move to Tomcat 6 but backed off for a number of reasons. Now I have Tomcat 5.5.9 installed an working, except for logging (and one other problem that I might be able to resolve on my own if only I could get logging to work). I have never configured Tomcat to log using log4j (Tomcat 4.x's built-in was sufficient). Following the instructions on the website (http://tomcat.apache.org/tomcat-5.5-doc/logging.html), I creating a log4j.properties file and placed it in common/classes -- the only change I made on the example on the webpage was to replace a variable with an absolute path: log4j.rootLogger=DEBUG, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=/var/apache/jakarta-tomcat-5.5.9/logs/tomcat.log log4j.appender.R.MaxFileSize=10MB log4j.appender.R.MaxBackupIndex=10 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n I then put log4j-1.2.7.jar and commons-logging-1.1.jar jarfiles in common/lib and started Tomcat. The instructions don't say anything about doing anything else and I've not done very much with log4j other than use it to enable syslog logging in various applications, but it's not working. Any ideas? Thanks, Rob -- Rob Tanner UNIX Services Manager Linfield College, McMinnville OR - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Re: How-to make default Running status = false
On 5/25/07, Mark H. Wood [EMAIL PROTECTED] wrote: Say your apps are named app1, app2, app3 etc and if you access them as http://localhost:8080/app1 http://localhost:8080/app2 http://localhost:8080/app3 , then you would define the Context for each app under Tomcat's /conf/Catalina/localhost/ as app1.xml , app2.xml and app3.xml Now if you want Tomcat to only load app1 , you just disable the other XML files by renaming them as in app2.xml_disable app3.xml_something In that case, you have to either ensure that your webapp.s do not contain META-INF/context.xml or that the Host has deployXML='false'. Otherwise the webapp itself will supply a Context. Tomcat will generate a Context on its own in some circumstances which I've not yet completely worked out from the documentation. How did you disable this? In the development environment settings, I don't usually add a context.xml file under META-INF. I normally create a ContextName.xml file under each Host Name folder. So with the above setting, I can visibly see in Tomcat's start-up console that it has loaded only those webapps that have a .xml file, and doesn't load those that don't. I also keep my projects ~outside~ Tomcat's webapps folder and I only specify the project's root folder in the docBase attribute of Context. The appBase attribute is something like webapps/ContextName , and path is empty. This way, upgrading Tomcat becomes easier and simpler. I haven't really experienced Tomcat generating a Context (either in server.xml or a Context xml file under Host Name ) May be it generates one under META-INF/context.xml , but may be empty as in Context path= /Context -- Mark H. Wood, Lead System Programmer [EMAIL PROTECTED] Typically when a software vendor says that a product is intuitive he means the exact opposite. Regards Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Excluding JSP compiler from Tomcat
On 5/25/07, lightbulb432 [EMAIL PROTECTED] wrote: The JSP spec says that if you precompile JSPs you can reduce the JSP container footprint by excluding the JSP compiler. How can this be done in Tomcat? I know of 2 ways to pre-compile JSPs 1) http://tomcat.apache.org/tomcat-4.1-doc/jasper-howto.html If you're using Ant , than you can add the above jasper task to your build process. The process first converts all JSPs to .java files, and then all .java files are compiled to .class files , during this process the web.xml is also auto-modified and there's an entry for every JSP page in your app. Pre-compiling with jasper is very slow (expected behavior) , so it is recommended that the pre-compile should be done just before deploying the app to production , there's no need to pre-compile while developing/ testing JSPs. 2) Use JSP Unit testing tools like HttpUnit or Apache Cactus, as the tools test each JSP page they acces the JSP pages for the ~first time~ , this essentially compiles all JSP pages , then move the war file to production. Many recommend the 2nd option as it makes your pre-compiled code portable aross containers. Thanks. Regards Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can I limit the number of thread that tomcat spawn for my servlet
Herman Schultz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, My understanding is tomcat will spawn a thread for each request to my servlet. How can I limit the number of thread that tomcat spawn for my servlet simultaneously? And let say if I limit the simulateous thread for my servlet to 10, what happens to the 11th request? Will it get dropped? Or Will it get queued? TC 6 has the SemaphoreValve (http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/valves/SemaphoreValve.html) that you could sub-class to do mostly what you want (or for TC 5 under Java 5, grab the source and modify it). It doesn't prevent the number of theads that Tomcat spawns, but it limits the number that are executing through it at any given time (out-of-the-box, it would be the number of threads accessing the Context, but you can sub-class it and override the controlConcurrency method to make it finer grained). You could also look at the code, and do the same thing in a Filter. In this case, the 11th request will get queued, at least until the browser gets tired of waiting for it :). As Chris has already said, you can only limit the number of threads spawned at the Connector level. Thank you. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Erratic HTTP response behavior
Christopher Schultz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matt, You're right, this /is/ erratic behavior. I think something is going wrong with your headers or something: Matt Cosentino wrote: /body/html0 HTTP/1.1 200 OKServer: Apache-Coyote/1.1Transfer-Encoding: chunkedDate: Fri, 18 May 2007 22:35:13 GMT Your response headers appear to be after the body of the response. Either that or the headers I see there are supposed to be the headers from the next chunk and/or request in a keepalive request. Indeed :). This is the start of the next response in the pipeline, and should look like: /body/html 0 HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Transfer-Encoding: chunked Date: Fri, 18 May 2007 22:35:13 GMT It looks like some 'friendly' intermediate is compressing out the \r\n codes that are needed to interpret 'chunked'. To not use 'chunked', you have to set the Content-Length yourself (or have only very small pages and don't call flush). If your pages aren't too huge, and you don't have too high of concurrency, it is pretty easy to write a Filter that wraps the response to hold the output in memory until it is all there, and then set the Content-Length before passing it back to the browser. Are you intending to use chunked responses? 'Cause it looks like they are being used. There was some in-depth discussion of chunked responses somewhat recently on the list. Perhaps you could take a look at that for some reference points (but I'm not saying that it will solve your problem). I think the problem might be that you are getting chunked encoding for some reason, but you don't really want it. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGV08C9CaO5/Lv0PARArfQAJoD+kMZLUVWthGyRuv0NWKIKSuXcACfYh+I sJuvF8+a8MgIcIu3gd1hGak= =u9oS -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't seem to get logging to work in Tomcat 5.5.9
I used your config file verbatim and it worked. I can tell you it is not your config file. Is there any hint at all in the tomcat/logs directory? Tim From: Rob Tanner [mailto:[EMAIL PROTECTED] Sent: Friday, May 25, 2007 7:40 PM To: Tomcat Users List Subject: Re: Can't seem to get logging to work in Tomcat 5.5.9 Tim, Right now I'm running Tomcat as root so that it can grab ports 80 and 443 (I understand there is a work around for that, but I'm not there yet) and so permissions is not an issue. I also wondered whether the file had to already exist before it could log to it. So I touched the file and that made no difference. Also, I tried removing the tomcat-juli.jar file from $CATALINA_HOME/bin and that made no difference. Just looking at the startup script, I don't think JULI conflicts with log4j -- i.e., it doesn't look like if you use one you can't use the other. -- Rob Tim Lucia said the following on 05/25/2007 03:59 PM: Your configuration file is valid. Does the user Tomcat runs as have write permission along the output path? You could try using /tmp as a test. If it is not permissions, then it could be a classpath issue, but your notes lead me to believe that not to be the case (i.e., you put them where they should be. You may (I'm fuzzy on this) have to rename the tomcat-juli.jar file, or otherwise change the startup script(s) so that it doesn't use the juli logger. HTH, Tim -Original Message- From: Rob Tanner [mailto:[EMAIL PROTECTED] Sent: Friday, May 25, 2007 6:36 PM To: Tomcat Users List Subject: Can't seem to get logging to work in Tomcat 5.5.9 Hi, I was originally planning to move to Tomcat 6 but backed off for a number of reasons. Now I have Tomcat 5.5.9 installed an working, except for logging (and one other problem that I might be able to resolve on my own if only I could get logging to work). I have never configured Tomcat to log using log4j (Tomcat 4.x's built-in was sufficient). Following the instructions on the website (http://tomcat.apache.org/tomcat-5.5-doc/logging.html), I creating a log4j.properties file and placed it in common/classes -- the only change I made on the example on the webpage was to replace a variable with an absolute path: log4j.rootLogger=DEBUG, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=/var/apache/jakarta-tomcat-5.5.9/logs/tomcat.log log4j.appender.R.MaxFileSize=10MB log4j.appender.R.MaxBackupIndex=10 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n I then put log4j-1.2.7.jar and commons-logging-1.1.jar jarfiles in common/lib and started Tomcat. The instructions don't say anything about doing anything else and I've not done very much with log4j other than use it to enable syslog logging in various applications, but it's not working. Any ideas? Thanks, Rob -- Rob Tanner UNIX Services Manager Linfield College, McMinnville OR - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JSP pages mixing for concurrent users
Hi. I have a group of developers that are experiencing an intermitent problem with some of the their JSP pages when concurrent users are using the application. They have had a hard time reproducing the issue in the development environement so the details are still sketchy. I wanted to post this anyway hoping someone would recognize this as a know issue. The scenario: User A is requesting JSP page X and User B is requesting JSP page Y. The symptoms: User A: instead of seeing Page X, user X sees the header of page X and then Page Y with the date from user B's session. User B: sees a blank page. Additional clues: -The user session are unaffected by the event described above. A simple refresh allows the user to recover. -A stream has already been closed exception is thrown by the code for Page X when an attempt is made to write to it. -All JSP pages extend a common class which writes the header and footer using the JspWriter. -No static or instance variables are used. -Using Tomcat 5.5.17 -Using 1.4 on Solaris 10. I appologize for the sketchy problem description, I hope this might sound familiar to someone. In advance thank you for any pointers. Florian - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Erratic HTTP response behavior
Actually, it did look like that, the \r\n codes were removed for some reason when I sent the email. - Original Message From: Bill Barker [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Friday, May 25, 2007 8:12:04 PM Subject: Re: Erratic HTTP response behavior Christopher Schultz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matt, You're right, this /is/ erratic behavior. I think something is going wrong with your headers or something: Matt Cosentino wrote: /body/html0 HTTP/1.1 200 OKServer: Apache-Coyote/1.1Transfer-Encoding: chunkedDate: Fri, 18 May 2007 22:35:13 GMT Your response headers appear to be after the body of the response. Either that or the headers I see there are supposed to be the headers from the next chunk and/or request in a keepalive request. Indeed :). This is the start of the next response in the pipeline, and should look like: /body/html 0 HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Transfer-Encoding: chunked Date: Fri, 18 May 2007 22:35:13 GMT It looks like some 'friendly' intermediate is compressing out the \r\n codes that are needed to interpret 'chunked'. To not use 'chunked', you have to set the Content-Length yourself (or have only very small pages and don't call flush). If your pages aren't too huge, and you don't have too high of concurrency, it is pretty easy to write a Filter that wraps the response to hold the output in memory until it is all there, and then set the Content-Length before passing it back to the browser. Are you intending to use chunked responses? 'Cause it looks like they are being used. There was some in-depth discussion of chunked responses somewhat recently on the list. Perhaps you could take a look at that for some reference points (but I'm not saying that it will solve your problem). I think the problem might be that you are getting chunked encoding for some reason, but you don't really want it. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGV08C9CaO5/Lv0PARArfQAJoD+kMZLUVWthGyRuv0NWKIKSuXcACfYh+I sJuvF8+a8MgIcIu3gd1hGak= =u9oS -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]