Re: SSLServerSocketFactory not found in 4.1.27
You should use the Coyote Connector instead of the deprecated HttpConnector. David Smithson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi. On Fedora C2, Tomcat 4.1.27, tomcat fails to start due to a missing class file it seems. Here's the error from tomcat.out. [ERROR] Digester - -Begin event threw exception java.lang.ClassNotFoundException: org.apache.catalina.net.SSLServerSocketFactory Catalina.start: java.lang.ClassNotFoundException: org.apache.catalina.net.SSLServerSocketFactory java.lang.ClassNotFoundException: org.apache.catalina.net.SSLServerSocketFactory I simply want to implement SSL and client authentication to share an internal jspwiki to external support peeps. unzip -l catalina.jar | grep SSL shows only org/apache/catalina/authenticator/SSLAuthenticator.class. What am I missing? Do I need to trash the FC2 rpm and install from source? Thanks for your response. -- David Smithson [EMAIL PROTECTED] Custom Film Effects www.customfilmeffects.com 818-840-6833 x126 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re:
attachment: yorkzdbsyg.bmp- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE:
Hi Craig, I didnt understand what does this bmp means ? Regards, Pradeep -Original Message- From: Craigmcc [mailto:[EMAIL PROTECTED] Sent: 27.07.2004 12:16 To: Tomcat-user Subject: Re: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SSL Certificate Errors
I do not know what caused this problem..but you can solve this by explicitely trusting all the certificates. And this will work if client side certs are not used. You can find information on how to do this in the following URL. http://javaalmanac.com/egs/javax.net.ssl/TrustAll.html Thanks, George --- Craig, William S. [EMAIL PROTECTED] wrote: Hi, I'm experiencing the following errors while running Tomcat 4.1.27 on Win2K. I have a U.S. Government certificate in X.509 format trusted on Tomcat. I'm trying to communicate on SSL, but it appears that my certificate isn't trusted. I followed the instructions - any ideas on why my certificate isn't being trusted (if that's my problem) Thanks!! cacerts file: pa-ng-app, Jun 16, 2004 trustedCertEntry, Certificate fingerprint (MD5): DD:3D:8F.etc Errors: Exception Message: java.security.cert.CertificateException: Could not find trusted certificate javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Could not find trusted certificate at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275) at sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA6275) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA 6275) at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(DashoA6275) at com.plumtree.content.client.http.diagnostic.DiagnosticTestsUtil.connectAndCh eckResponseCode(DiagnosticTestsUtil.java:127) at com.plumtree.content.client.http.diagnostic.DiagnosticTests.testConnectionWi thPortal(DiagnosticTests.java:644) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.plumtree.content.client.http.diagnostic.DiagnosticTests.executeTestMetho d(DiagnosticTests.java:202) at com.plumtree.content.client.http.diagnostic.DiagnosticTests.executeDiagnosti cTests(DiagnosticTests.java:178) at com.plumtree.content.client.http.diagnostic.DiagnosticTests.getDiagnosticTes tResults(DiagnosticTests.java:150) at org.apache.jsp.index_0002dinclude_0002ddiagnostics_jsp._jspService(index_000 2dinclude_0002ddiagnostics_jsp.java:53) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at ...etcetc. ___ALL-NEW Yahoo! Messenger - all new features - even more fun! http://www.allnewmessenger.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JK2 AJP13 and Content-Length
In AJPv13 doc, there is a note: *Note: *The *content-length* header is extremely important. If it is present and non-zero, the container assumes that the request has a body (a POST request, for example), and immediately reads a separate packet off the input stream to get that body. Does it mean the request header has to have Content-Length specified in order to get the request body? In my program, I have to send requests which contains Transfer-Encoding: chunked in the header (the request is forwarded from IIS5 to Tomcat4.1.30 by mod_jk2-2.0.4). This means my request header does not have Content-Length. How can I get the request body using AJP13?
RE: Tomcat Datasource
In case it helps, have a look a this parameter: ResourceParams name=jdbc/vivoenDS parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter Pedro -Mensaje original- De: Bussie, Andre D [mailto:[EMAIL PROTECTED] Enviado el: lunes, 26 de julio de 2004 20:57 Para: [EMAIL PROTECTED] Asunto: Tomcat Datasource I'm using Tomcat 5.0.19. I configured a datasource via the Tomcat Admin tool to configure a datatsource listed below is the server.xml file settings for the datasource GlobalNamingResources Resource name=jdbc/phone auth=Container type=javax.sql.DataSource description=Database for the phone application / ResourceParams name=jdbc/phone parameter namemaxWait/name value5000/value /parameter parameter namemaxActive/name value4/value /parameter parameter namepassword/name value/value /parameter parameter nameurl/name valuejdbc:hsqldb.hsql://localhost/value /parameter parameter namedriverClassName/name valueorg.hsqldb.jdbcDriver/value /parameter parameter namemaxIdle/name value2/value /parameter parameter nameusername/name valuesa/value /parameter /ResourceParams /GlobalNamingResources However when I try to access the datasource from a jsp file I get the following error 2004-07-26 10:42:19 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception javax.naming.NameNotFoundException: Name jdbc/phone is not bound in this Context Code snippet listed below % InitialContext ctx = new InitialContext(); DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/phone); Connection conn = ds.getConnection(); try{ Any suggestions on what can be causing this error. Why isn't in the context and how do I bind it to the context? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Java Class is not compiling
Sir I am new to Tomcat. I am now making my first Servlet and trying to creat a class (sayeed). It give me errors as under : C:\Apache\Tomcat\webapps\ch03\myfirstwebappjavac sayeed.java sayeed.java:5: package javax.servlet.http does not exist import javax.servlet.http.HttpServlet; ^ sayeed.java:6: package javax.servlet.http does not exist import javax.servlet.http.HttpServletRequest; --- Also another thing what is the PACKAGE which have to write in first line of my servlet(sayeed): package com.wrox.projsp.ch03.myfirstwebapp; Can anyone please help me in detail. I have however downloaded Javax directory from sun.java.com- where this directory i have to put? i am using j2sdk1.4.2. Thanx in advance. Saeed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Class is not compiling
It seams you are new to Java too. The error messages say that the compiler could not find the jar file javax.jar, or servlet.jar depends on your java version. The package statement at the first line is necessary to group java classes in domains that have the same functionality or fit tematiclly together. Like com.company.database // all database relevant classes com.company.gui // all gui relevant classes. Furthermore i would recommend that you read a javabook or take the java trial at java.sun.com, it imparts the basics of java and some higher approaches. mfg Michael Nitschke -Original Message- From: Sayeed [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 9:19 AM To: Tomcat Users List Subject: Java Class is not compiling Sir I am new to Tomcat. I am now making my first Servlet and trying to creat a class (sayeed). It give me errors as under : C:\Apache\Tomcat\webapps\ch03\myfirstwebappjavac sayeed.java sayeed.java:5: package javax.servlet.http does not exist import javax.servlet.http.HttpServlet; ^ sayeed.java:6: package javax.servlet.http does not exist import javax.servlet.http.HttpServletRequest; --- Also another thing what is the PACKAGE which have to write in first line of my servlet(sayeed): package com.wrox.projsp.ch03.myfirstwebapp; Can anyone please help me in detail. I have however downloaded Javax directory from sun.java.com- where this directory i have to put? i am using j2sdk1.4.2. Thanx in advance. Saeed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Class is not compiling
You should download j2sdkee version or the enterprise version of java.. =) -Original Message- From: Nitschke Michael [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 3:30 PM To: Tomcat Users List Subject: RE: Java Class is not compiling It seams you are new to Java too. The error messages say that the compiler could not find the jar file javax.jar, or servlet.jar depends on your java version. The package statement at the first line is necessary to group java classes in domains that have the same functionality or fit tematiclly together. Like com.company.database // all database relevant classes com.company.gui // all gui relevant classes. Furthermore i would recommend that you read a javabook or take the java trial at java.sun.com, it imparts the basics of java and some higher approaches. mfg Michael Nitschke -Original Message- From: Sayeed [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 9:19 AM To: Tomcat Users List Subject: Java Class is not compiling Sir I am new to Tomcat. I am now making my first Servlet and trying to creat a class (sayeed). It give me errors as under : C:\Apache\Tomcat\webapps\ch03\myfirstwebappjavac sayeed.java sayeed.java:5: package javax.servlet.http does not exist import javax.servlet.http.HttpServlet; ^ sayeed.java:6: package javax.servlet.http does not exist import javax.servlet.http.HttpServletRequest; --- Also another thing what is the PACKAGE which have to write in first line of my servlet(sayeed): package com.wrox.projsp.ch03.myfirstwebapp; Can anyone please help me in detail. I have however downloaded Javax directory from sun.java.com- where this directory i have to put? i am using j2sdk1.4.2. Thanx in advance. Saeed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: JK2 AJP13 and Content-Length
Hello Hannah, The header has a content - lengh, but don't ask me what size :-( I'm facing nearly the same problem. And I stuck on the doc as well.. :-( You need to set the content lengh, but you need to set this lengh. I didn't set the lengh and I had trouble while post command (file upload). (You'll not get this problem without ajpv13) As soon as I vahe more information about that, I 'll post it. Regards, gunnar -Ursprüngliche Nachricht- Von: Hannah Li [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 27. Juli 2004 09:07 An: [EMAIL PROTECTED] Betreff: JK2 AJP13 and Content-Length In AJPv13 doc, there is a note: *Note: *The *content-length* header is extremely important. If it is present and non-zero, the container assumes that the request has a body (a POST request, for example), and immediately reads a separate packet off the input stream to get that body. Does it mean the request header has to have Content-Length specified in order to get the request body? In my program, I have to send requests which contains Transfer-Encoding: chunked in the header (the request is forwarded from IIS5 to Tomcat4.1.30 by mod_jk2-2.0.4). This means my request header does not have Content-Length. How can I get the request body using AJP13? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JK 1.2.6 released
The Tomcat team is pleased to announce the release of version 1.2.6 of the Apache Tomcat mod_jk web server connector. Tomcat is the reference implementation of a web application server which implements the Java Servlet and JavaServer Pages specifications. mod_jk is a connector which allows a web server such as Apache HTTPD or IIS to act as a front end to the Tomcat web application server. This version fixes error recovery in Load-Balancing, use new AJP protocol features CPING/CPONG to avoid problems with a hang/stopped Tomcat, make use of no-jk env var in Apache 2.0 version to exclude some URIs to be handled by JK. See the file CHANGES.txt in the source distribution for a complete list of changes. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK 1.2.6 released
I can't compile mod_jk with my debian (sarge) Here is the log make[2]: entrant dans le répertoire « /var/data1/neo/apache/TMP/libapache2-mod-jk/src/jk/native/common » /bin/sh /usr/share/apache2/build/libtool --silent --mode=compile gcc -I/usr/include/apache2 -g -O2 -DHAVE_JNI -I/usr/include/apr-0 -pipe -I/usr/include/xmltok -I/usr/include/openssl -O2 -pipe -I/usr/include/xmltok -I/usr/include/openssl -O2 -pthread -DHAVE_APR -I/home/thom/packages/apache2-2.0.49/build-tree/apache2-build/worker/srclib/apr/include /home/thom/packages/apache2-2.0.49/build-tree/apache2/srclib/apr/include -g -O2 -DHAVE_JNI -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -I /usr/lib/j2se/1.4/include -I /usr/lib/j2se/1.4/include/linux -c jk_ajp12_worker.c gcc: cannot specify -o with -c or -S and multiple compilations make[2]: *** [jk_ajp12_worker.lo] Erreur 1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Keep session when going to a secure server
WADI (wadi.codehaus.org) is able to transparently migrate the sessions of a distributable webapp to the node on which a relevant request lands, so would be of use to you here. If you are using cookies, then you may find that your browser refuses to send the same cookie to both servers if it thinks that they are in different cookie domains. If you are using url rewriting, this should not be a problem What you are doing on the secure server that might affect the session and whether the result will be transferrable back to the rest of the cluster is up to you. The doc currently available with WADI is not pitched at this sort of usage, and assumes quite a deep understanding of issues surrounding httpsessions and state management, so if you need more help please join the user list and ask lots of questions. Finally, before you invest time in finding a solution to this problem, you should revisit your original architecture and ask yourself whether you really need to move sessions around like this - it sounds like you are making life difficult for yourself. Jules Olivier wrote: Hi I have a project in java servlets/jsp which uses 2 servers 1 is secured and the other is not secured But both server uses the same apache with mod_jk and tomcat But the problem is that the server names are different, so, the session is lost when I arrive on the secure server ! How can I keep the session ?? I am using the standard Httpsession I've seen that it's possible to get the session id, and to send it as a get parameter (?sessionid=.) to the secure server, but how can I retrieve a session from a session id ? I would really appreciate some help Thanks -- /** * Jules Gosnell * Partner * Core Developers Network (Europe) * *www.coredevelopers.net * * Open Source Training Support. **/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK 1.2.6 released
On Tue, Jul 27, 2004 at 11:25:03AM +0200, Sébastien GALLET wrote: I can't compile mod_jk with my debian (sarge) Here is the log make[2]: entrant dans le répertoire « /var/data1/neo/apache/TMP/libapache2-mod-jk/src/jk/native/common » /bin/sh /usr/share/apache2/build/libtool --silent --mode=compile gcc -I/usr/include/apache2 -g -O2 -DHAVE_JNI -I/usr/include/apr-0 -pipe -I/usr/include/xmltok -I/usr/include/openssl -O2 -pipe -I/usr/include/xmltok -I/usr/include/openssl -O2 -pthread -DHAVE_APR -I/home/thom/packages/apache2-2.0.49/build-tree/apache2-build/worker/srclib/apr/include /home/thom/packages/apache2-2.0.49/build-tree/apache2/srclib/apr/include -g -O2 -DHAVE_JNI -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -I /usr/lib/j2se/1.4/include -I /usr/lib/j2se/1.4/include/linux -c jk_ajp12_worker.c gcc: cannot specify -o with -c or -S and multiple compilations make[2]: *** [jk_ajp12_worker.lo] Erreur 1 First of all, sorry for my english. On debian sarge you need the apache2-dev package. This is not installable - at this time. mod_jk needs the APR source for compile. I be solved this problem: 1. Removed the debian apache2 packages and the dependencies 2. Installed the apache-2.0.x by hand (configure/make/make install) 3. Installed the Tomcat-4.x/5.x 4. Installed the mod_jk It works fine. I use Apache-2.0.50/Tomcat-5.0.27/ jakarta-tomcat-connectors-jk2-2.0.4, but the problem you've write is on other versions the same. greetings Mario -- Grau ist alle Theorie, und schwierig die Praxis! (Goethe, Faust I) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Migrating from TC3.3.1 to TC4.1.30 What's changed?
I have to migrate out TC3.3.1 to TC4.1.30 to support a third party application. Apparently, the conf/server.xml has changed considerably. I can't find any change logs or FAQs to do that sort of migration. One problem: I launched the webapps with files like conf/apps-APPNAME.xml. How do I do that with TC4.1.x? Thanks, Michael
Problems with Tomcat install on Redhat
I have installed jakarta-tomcat-4.1.30 on Redhat 9. However, when I try to load the tomcat index page on SSL (https://machine ip:8443), I am getting a connection refused error. I have jdk installed on the box and have executed: $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA . Am I missing something? Can someone give me the exact guide on how to install tomcat with SSL support. Thanks in advance. I have also included a few lines from my catalina.out file below. Regards /Bravismore Catalina.start: LifecycleException: Protocol handler initialization failed: java.lang.ClassNotFoundException: Can't find any SSL implementation LifecycleException: Protocol handler initialization failed: java.lang.ClassNotFoundException: Can't find any SSL implementation at org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1231) at org.apache.catalina.core.StandardService.initialize(StandardService.java:579) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2246) at org.apache.catalina.startup.Catalina.start(Catalina.java:511) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Catalina.stop: LifecycleException: This server has not yet been started LifecycleException: This server has not yet been started at org.apache.catalina.core.StandardServer.stop(StandardServer.java:2213) at org.apache.catalina.startup.Catalina.start(Catalina.java:543) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with Tomcat install on Redhat
You need to edit your server.xml file which can be found in $CATALINA_HOME/conf by uncommenting the following code and add two lines on keypass and keystore as follows: !-- Define a SSL Coyote HTTP/1.1 Connector on port 8443-- Connector port=8443 max thread=... ... keypass=enter_your_key_password_here keystore=enter_your_keytore_absolute_path_here clientAuth=false sslProtocol=TLS Hope this help. Karen On Tue, 27 Jul 2004, Mumanyi Bravismore wrote: I have installed jakarta-tomcat-4.1.30 on Redhat 9. However, when I try to load the tomcat index page on SSL (https://machine ip:8443), I am getting a connection refused error. I have jdk installed on the box and have executed: $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA . Am I missing something? Can someone give me the exact guide on how to install tomcat with SSL support. Thanks in advance. I have also included a few lines from my catalina.out file below. Regards /Bravismore Catalina.start: LifecycleException: Protocol handler initialization failed: java.lang.ClassNotFoundException: Can't find any SSL implementation LifecycleException: Protocol handler initialization failed: java.lang.ClassNotFoundException: Can't find any SSL implementation at org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1231) at org.apache.catalina.core.StandardService.initialize(StandardService.java:579) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2246) at org.apache.catalina.startup.Catalina.start(Catalina.java:511) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Catalina.stop: LifecycleException: This server has not yet been started LifecycleException: This server has not yet been started at org.apache.catalina.core.StandardServer.stop(StandardServer.java:2213) at org.apache.catalina.startup.Catalina.start(Catalina.java:543) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Karen Ng OMII (Open Middleware Infrastructure Institute) Faraday / 6005, University of Southampton, Southampton, SO17 1BJ, United Kingdom. Tel: +44 (0)23 8059 8788 Fax: +44 (0)23 8059 3045 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java Class is not compiling
Download J2EE from the following URL: http://java.sun.com/j2ee/1.4/download.html#sdk Aris Javier wrote: You should download j2sdkee version or the enterprise version of java.. =) -Original Message- From: Nitschke Michael [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 3:30 PM To: Tomcat Users List Subject: RE: Java Class is not compiling It seams you are new to Java too. The error messages say that the compiler could not find the jar file javax.jar, or servlet.jar depends on your java version. The package statement at the first line is necessary to group java classes in domains that have the same functionality or fit tematiclly together. Like com.company.database // all database relevant classes com.company.gui // all gui relevant classes. Furthermore i would recommend that you read a javabook or take the java trial at java.sun.com, it imparts the basics of java and some higher approaches. mfg Michael Nitschke -Original Message- From: Sayeed [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 9:19 AM To: Tomcat Users List Subject: Java Class is not compiling Sir I am new to Tomcat. I am now making my first Servlet and trying to creat a class (sayeed). It give me errors as under : C:\Apache\Tomcat\webapps\ch03\myfirstwebappjavac sayeed.java sayeed.java:5: package javax.servlet.http does not exist import javax.servlet.http.HttpServlet; ^ sayeed.java:6: package javax.servlet.http does not exist import javax.servlet.http.HttpServletRequest; --- Also another thing what is the PACKAGE which have to write in first line of my servlet(sayeed): package com.wrox.projsp.ch03.myfirstwebapp; Can anyone please help me in detail. I have however downloaded Javax directory from sun.java.com- where this directory i have to put? i am using j2sdk1.4.2. Thanx in advance. Saeed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.co.za This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK 1.2.6 released
Mario Guenterberg a écrit : On Tue, Jul 27, 2004 at 11:25:03AM +0200, Sébastien GALLET wrote: I can't compile mod_jk with my debian (sarge) Here is the log make[2]: entrant dans le répertoire « /var/data1/neo/apache/TMP/libapache2-mod-jk/src/jk/native/common » /bin/sh /usr/share/apache2/build/libtool --silent --mode=compile gcc -I/usr/include/apache2 -g -O2 -DHAVE_JNI -I/usr/include/apr-0 -pipe -I/usr/include/xmltok -I/usr/include/openssl -O2 -pipe -I/usr/include/xmltok -I/usr/include/openssl -O2 -pthread -DHAVE_APR -I/home/thom/packages/apache2-2.0.49/build-tree/apache2-build/worker/srclib/apr/include /home/thom/packages/apache2-2.0.49/build-tree/apache2/srclib/apr/include -g -O2 -DHAVE_JNI -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -I /usr/lib/j2se/1.4/include -I /usr/lib/j2se/1.4/include/linux -c jk_ajp12_worker.c gcc: cannot specify -o with -c or -S and multiple compilations make[2]: *** [jk_ajp12_worker.lo] Erreur 1 First of all, sorry for my english. Mine is not better than yours ;) On debian sarge you need the apache2-dev package. package apache2-threaded-dev is installed on my sarge. I've made a package for the 1.2.5 release, and when i try to update to 1.2.6 ... that doesn't work This is not installable - at this time. mod_jk needs the APR source for compile. I be solved this problem: 1. Removed the debian apache2 packages and the dependencies I can't do that. I use many apache2 modules (mod_ldap_userdir, ..) installed as package. And i need to recompile all of them 2. Installed the apache-2.0.x by hand (configure/make/make install) 3. Installed the Tomcat-4.x/5.x 4. Installed the mod_jk It works fine. I use Apache-2.0.50/Tomcat-5.0.27/ jakarta-tomcat-connectors-jk2-2.0.4, but the problem you've write is on other versions the same. greetings Mario greetings Sébastien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache1.3 SSL with client authentication jk2 tomcat 5
Hi, I'm looking to do the same thing as Radu Radutiu (archive here : http://www.junlu.com/msg/94462.html) but when i use int the httpd.conf directives like JkSet2 workerEnv sslEnable 1 nothing work and apache don't start. Do you know how to use JkSet under apache 1.3 on Windows ? how to passe from apache to tomcat som environement variable like SSL client certificat ? Thanks a lot ++ - Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Créez votre Yahoo! Mail Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis.Téléchargez GRATUITEMENT ici !
Re: HttpUrlConnection.getInputStream() returns empty
hi, you could maybe try somthing like the following : try { String str_url = https://www.domain.com;; URL urlid = new URL(str_url); HttpsURLConnection conn = (HttpsURLConnection)urlid.openConnection(); conn.setRequestMethod(GET); conn.setDoOutput(false); out.write(RESPONSECODE = + conn.getResponseCode()+\nbr); BufferedReader in1 = new BufferedReader(new InputStreamReader(conn.getInputStream())); String line; while ((line = in1.readLine()) != null) out.write(line +\n); } catch (Exception e) { e.printStackTrace(System.out); } hope it helps -reynir Honey George wrote: Hi All, I am facing a problem with HttpUrlConnection in Tomcat. I wanted to extract the contents of an https enabled URL, actually from the same site where my application is running(Will not try to access external URLs). My program will look like this. == import java.net.*; import java.util.*; import java.io.*; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLSession; import javax.net.ssl.*; .. System.getProperty(java.protocol.handler.pkgs,javax.net.ssl); java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); .. HostnameVerifier hv = new HostnameVerifier() { public boolean verify(String urlHostName, SSLSession session) { System.out.println(Warning: URL Host: +urlHostName+ vs. +session.getPeerHost()); return true; } }; HttpsURLConnection.setDefaultHostnameVerifier(hv); // Create a trust manager that does not validate certificate chains TrustManager[] trustAllCerts = new TrustManager[]{ new X509TrustManager() { public java.security.cert.X509Certificate[] getAcceptedIssuers() { return null; } public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType) { } public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType) { } } }; // Install the all-trusting trust manager try { SSLContext sc = SSLContext.getInstance(SSL); sc.init(null, trustAllCerts, new java.security.SecureRandom()); HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); } catch (Exception e) { } HttpURLConnection httpCon = (HttpURLConnection) new java.net.URL(https://www.abc.com/test.txt;).openConnection(); httpCon.setRequestProperty(USER_AGENT_HEADER_FIELD, ); httpCon.setRequestProperty(ACCEPT_HEADER_FIELD, text/plain); return httpCon; InputStream is = httpCon.getInputStream(); == Here the problem is that the InputStream does not return any contents when executed from inside Tomcat. But I am able to extract the contents of the URL when I execute outside tomcat in a command line program. The Connection object returned by new java.net.URL(https://www.abc.com/test.txt;) is sun.net.www.protocol.https.HttpsURLConnectionImpl. Can I get some help on this one? Thanks Regards, George ___ALL-NEW Yahoo! Messenger - all new features - even more fun! http://www.allnewmessenger.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK 1.2.6 released
Hi, libapache2-mod-jk2 (2.0.4-1) is available for testing. You can download it or updating your sources.list. Sorry for my incorrect previous message...;-) greetings Mario -- Grau ist alle Theorie, und schwierig die Praxis! (Goethe, Faust I) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JK 1.2.6 released
Mario Guenterberg a écrit : Hi, libapache2-mod-jk2 (2.0.4-1) is available for testing. thanks, but I use mod-jk not mod-jk2 Maybe I will update my sites to mod-jk2 but I can't do it now You can download it or updating your sources.list. Sorry for my incorrect previous message...;-) greetings Mario Greetings Sébastien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with Tomcat install on Redhat
I have tried adding the two lines with no successs. Karen M Y Ng wrote: You need to edit your server.xml file which can be found in $CATALINA_HOME/conf by uncommenting the following code and add two lines on keypass and keystore as follows: !-- Define a SSL Coyote HTTP/1.1 Connector on port 8443-- Connector port=8443 max thread=... ... keypass=enter_your_key_password_here keystore=enter_your_keytore_absolute_path_here clientAuth=false sslProtocol=TLS Hope this help. Karen On Tue, 27 Jul 2004, Mumanyi Bravismore wrote: I have installed jakarta-tomcat-4.1.30 on Redhat 9. However, when I try to load the tomcat index page on SSL (https://machine ip:8443), I am getting a connection refused error. I have jdk installed on the box and have executed: $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA . Am I missing something? Can someone give me the exact guide on how to install tomcat with SSL support. Thanks in advance. I have also included a few lines from my catalina.out file below. Regards /Bravismore Catalina.start: LifecycleException: Protocol handler initialization failed: java.lang.ClassNotFoundException: Can't find any SSL implementation LifecycleException: Protocol handler initialization failed: java.lang.ClassNotFoundException: Can't find any SSL implementation at org.apache.coyote.tomcat4.CoyoteConnector.initialize(CoyoteConnector.java:1231) at org.apache.catalina.core.StandardService.initialize(StandardService.java:579) at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:2246) at org.apache.catalina.startup.Catalina.start(Catalina.java:511) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Catalina.stop: LifecycleException: This server has not yet been started LifecycleException: This server has not yet been started at org.apache.catalina.core.StandardServer.stop(StandardServer.java:2213) at org.apache.catalina.startup.Catalina.start(Catalina.java:543) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Karen Ng OMII (Open Middleware Infrastructure Institute) Faraday / 6005, University of Southampton, Southampton, SO17 1BJ, United Kingdom. Tel: +44 (0)23 8059 8788 Fax: +44 (0)23 8059 3045 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
max connection pool,max threads
Hi, I have a specific questions: How much maximum database connection pool bared by tomcat5.0.19? How much maximum thread can be bear by tomcat5.0.19? -Jignesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HttpUrlConnection.getInputStream() returns empty
Hi reynir, I have made the changes as per you suggestion and I am getting the response code as 200. But still the inputstream returns empty, is.available() returns 0 bytes. thanks, - george --- Reynir_Þór_Hübner [EMAIL PROTECTED] wrote: hi, you could maybe try somthing like the following : try { String str_url = https://www.domain.com;; URL urlid = new URL(str_url); HttpsURLConnection conn = (HttpsURLConnection)urlid.openConnection(); conn.setRequestMethod(GET); conn.setDoOutput(false); out.write(RESPONSECODE = + conn.getResponseCode()+\nbr); BufferedReader in1 = new BufferedReader(new InputStreamReader(conn.getInputStream())); String line; while ((line = in1.readLine()) != null) out.write(line +\n); } catch (Exception e) { e.printStackTrace(System.out); } hope it helps -reynir ___ALL-NEW Yahoo! Messenger - all new features - even more fun! http://www.allnewmessenger.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: max connection pool,max threads
Hi , In general ppl had done Load testing more then 1000 users also. Even i had done the Load test on Tomcat with 200 Concurent user. and it worked properly. Performence of any server is directly proportional to Hardware configuration. Depending on ur application and hardware you can judge the No of user supported by ur tomcat server. With Regards, Pradeep Chauhan -Original Message- From: Jignesh Patel [mailto:[EMAIL PROTECTED] Sent: 28.07.2004 03:31 To: [EMAIL PROTECTED] Subject: max connection pool,max threads Hi, I have a specific questions: How much maximum database connection pool bared by tomcat5.0.19? How much maximum thread can be bear by tomcat5.0.19? -Jignesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HttpUrlConnection.getInputStream() returns empty
I am hitting what looks like exactly the same problem. I have a JSP application which uses the io tags to submit XMl requests to a servlet running on the same machine. The XML servlet carries on running quite happily even once the errors start from the webUI which is the JSP bit. Once the errors start first that user just locks up and can not continue until Tomcat is restarted, then it spreads to all the other webUI users (but not the direct XML users who are coming from outside Tomcat). Moving from Tomcat4.1 to Tomcat5 made the problem a bit better, but did not cure it. With Tomcat4.1 the problem was never recoverable, but with Tomcat5 it does sometimes recover by itself. Every now and then I get several responses back as one response, along with a corresponding number of null responses. The XML servlet logs all its transactions and always reports that it worked correctly by the way. It occured to me that it might be because this is an https transaction, and the logic that determines whether this is the same session might be getting confused and multiple requests might be going though the same session at once. So I changes the servlet to accept an HTTP request if it came from localhost, hoping that the session would not be shared and that this would cure the problem and I changed the JSP code to use http rather than https. But it does not help, the problem still happens. The next thing I am going to try is updating, to the latest 1.4.2 version, the Sun SDK that I am using (I am currently using 1.4.1). Lets hope that between us we can get to the bottom of this. This one is driving me nuts. David On Monday 26 July 2004 19:15, Honey George wrote: Hi All, I am facing a problem with HttpUrlConnection in Tomcat. I wanted to extract the contents of an https enabled URL, actually from the same site where my application is running(Will not try to access external URLs). My program will look like this. === === import java.net.*; import java.util.*; import java.io.*; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLSession; import javax.net.ssl.*; . System.getProperty(java.protocol.handler.pkgs,javax.net.ssl); java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); . HostnameVerifier hv = new HostnameVerifier() { public boolean verify(String urlHostName, SSLSession session) { System.out.println(Warning: URL Host: +urlHostName+ vs. +session.getPeerHost()); return true; } }; HttpsURLConnection.setDefaultHostnameVerifier(hv); // Create a trust manager that does not validate certificate chains TrustManager[] trustAllCerts = new TrustManager[]{ new X509TrustManager() { public java.security.cert.X509Certificate[] getAcceptedIssuers() { return null; } public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType) { } public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType) { } } }; // Install the all-trusting trust manager try { SSLContext sc = SSLContext.getInstance(SSL); sc.init(null, trustAllCerts, new java.security.SecureRandom()); HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); } catch (Exception e) { } HttpURLConnection httpCon = (HttpURLConnection) new java.net.URL(https://www.abc.com/test.txt;).openConnection(); httpCon.setRequestProperty(USER_AGENT_HEADER_FIELD, ); httpCon.setRequestProperty(ACCEPT_HEADER_FIELD, text/plain); return httpCon; InputStream is = httpCon.getInputStream(); === === Here the problem is that the InputStream does not return any contents when executed from inside Tomcat. But I am able to extract the contents of the URL when I execute outside tomcat in a command line program. The Connection object returned by new java.net.URL(https://www.abc.com/test.txt;) is sun.net.www.protocol.https.HttpsURLConnectionImpl. Can I get some help on this one? Thanks Regards, George ___ALL-NEW Yahoo! Messenger - all new features - even more fun! http://www.allnewmessenger.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Migrating from TC3.3.1 to TC4.1.30 What's changed?
Hi, Many things changed, including fairly dramatic changes in the configuration. It's at least a 2-major-release jump after all. Tomcat 5 supports more configuration of applications via their own xml context configuration files than tomcat 4 does. You may want to migrate to Tomcat 5 instead of 4 at this point. There's not one central changelog for tomcat 3 and 4 that I'm aware of, but all releases of both branches contain release notes that detail the changes. For Tomcat 5 we've been keeping a more, umm, user-friendly changelog at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/changelog.html. I suggest reading at least the key Tomcat configuration documentation pages to give you an idea of how things work, rather than focusing on the change logs. For Tomcat 4, see http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/index.html and the Context and Host pages linked from it especially. Yoav Shapira Millennium Research Informatics -Original Message- From: Lemke, Michael IZ/HZA-IOR [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 6:15 AM To: '[EMAIL PROTECTED]' Subject: Migrating from TC3.3.1 to TC4.1.30 What's changed? I have to migrate out TC3.3.1 to TC4.1.30 to support a third party application. Apparently, the conf/server.xml has changed considerably. I can't find any change logs or FAQs to do that sort of migration. One problem: I launched the webapps with files like conf/apps-APPNAME.xml. How do I do that with TC4.1.x? Thanks, Michael This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlets and jsp with Tomcat 5.0
Hi, I didn't see any question or error in your message. What's wrong (besides several sub-optimal coding practices) ? Yoav Shapira Millennium Research Informatics -Original Message- From: Bill Reynolds [mailto:[EMAIL PROTECTED] Sent: Monday, July 26, 2004 7:22 PM To: [EMAIL PROTECTED] Subject: servlets and jsp with Tomcat 5.0 I am trying to get an older demo that was written 2-3 years ago (by someone else of course) working with Tomcat 5.0. My current problem is when my service routine is called in the servlet for a new user, after doing the appropriate initialization of attaining a database connection from my connection pool, it calls returnToForm. My context is called Household. Here is the code snipet: /*returnToForm(HttpServletResponse res, String page) *Encodes and redirects the program to the specified page. */ private void returnToForm(HttpServletResponse res, String page) { try { String sURL = res.encodeRedirectURL(page); res.sendRedirect(sURL); }catch(Exception e) { writeToLog(returnToForm error: + e); } /*service(HttpServletRequest req, HttpServletResponse res) *This method is called for each client request. This method controls the flow *of the program. */ public void service(HttpServletRequest req, HttpServletResponse res) throws IOException { //Each client request has its own HttpSession object. HttpSession session = req.getSession(true); //The command parameter is an html input form object that informs the servlet //what the client is requesting. Each command object has a value that is passed //with the request. String command = req.getParameter(command); //If the command parameter value is null then this is a new client. if(command==null){ newClient(req, res); returnToForm(res,/Household.jsp); //If the command parameter value is Query, then the client is //requesting that the query be run using the selected criteria. }else if(command.equals(Query)){ writeToLog(Getting counts); boolean samelist = processForm(req); samelist = false; runQueries(req, samelist); writeToLog(finished running queries. selecting qualified); writeToLog(Selecting qualified); selectQualified(req); returnToForm(res,/Household.jsp); //If the command parameter value is Next, then the client is //requesting to view the next set of qualified records (next page). The records //are displayed 10 rows at a time. }else if(command.equals(Next)){ writeToLog(Getting next 10 rows); getNext(req); returnToForm(res,/Household.jsp); //If the command parameter value is Previous, then the client is //requesting to view the previous page. }else if(command.equals(Previous)){ writeToLog(Getting previous 10 rows); getPrevious(req); returnToForm(res,/Household.jsp); //If the command parameter value is Reset, then the client is //requesting that everything be reset so they can begin again. }else if(command.equals(Reset)){ writeToLog(Resetting form.); clearAll(req); returnToForm(res,/Household.jsp); //Any other value for the command parameter is invalid. }else{ writeToLog(Something went wrong: + command); } } Thanks in advance for any help... Bill Reynolds [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validating Users
Hi, Yup, you should be able to get to the admin app using the richard user. The file is case-sensitive, and you have to restart the server after you edit it (with the default configuration). Yoav Shapira Millennium Research Informatics -Original Message- From: Richard Crawford [mailto:[EMAIL PROTECTED] Sent: Monday, July 26, 2004 5:41 PM To: [EMAIL PROTECTED] Subject: Validating Users I have just installed Tomcat 5.0.27 on a Solaris 9 computer. I've got it pointed at the right installation of Java, and when I go to http://localhost:8080 I see the Tomcat startup page come up, so I assume Tomcat is up and running properly. However, when I try to access the Tomcat Administration or Tomcat Manager pages, I get an invalid user error. However, when I examine conf/tomcat-users.xml, I find that I am listed as an admin user: tomcat-users role rolename=standard/ role rolename=manager/ role rolename=admin/ user username=richard password=password roles=admin,standard,manager/ /tomcat-users So, I *should* be able to get to the administration and management pages, right? I feel that I am missing something VERY basic... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Class is not compiling
From: Schalk Neethling [mailto:[EMAIL PROTECTED] Subject: Re: Java Class is not compiling Download J2EE from the following URL: http://java.sun.com/j2ee/1.4/download.html#sdk Aris Javier wrote: You should download j2sdkee version or the enterprise version of java.. Actually, that's not a good idea. That puts multiple copies of the necessary jars on your system, along with a second copy of Tomcat, plus the Sun app server. This can easily cause class loader conflicts when you're trying to run the desired Tomcat, and can cause runtime problems if the downloaded J2EE SDK is not the same level as that provided with the Tomcat release. All the necessary jars are in the Tomcat download you already have. All you need to do is set the -classpath parameter on your javac statement to include them. The javax classes should be in: C:\Apache\Tomcat\common\lib\servlet-api.jar judging from how you were trying to compile your program. You definitely need to become more familiar with Java in general before trying to tackle servlets. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Class is not compiling
Hi, Yeah, I second Mr. Caldarale's advice. Don't get j2ee.jar on your classpath. Yoav Shapira Millennium Research Informatics -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 9:44 AM To: Tomcat Users List Subject: RE: Java Class is not compiling From: Schalk Neethling [mailto:[EMAIL PROTECTED] Subject: Re: Java Class is not compiling Download J2EE from the following URL: http://java.sun.com/j2ee/1.4/download.html#sdk Aris Javier wrote: You should download j2sdkee version or the enterprise version of java.. Actually, that's not a good idea. That puts multiple copies of the necessary jars on your system, along with a second copy of Tomcat, plus the Sun app server. This can easily cause class loader conflicts when you're trying to run the desired Tomcat, and can cause runtime problems if the downloaded J2EE SDK is not the same level as that provided with the Tomcat release. All the necessary jars are in the Tomcat download you already have. All you need to do is set the -classpath parameter on your javac statement to include them. The javax classes should be in: C:\Apache\Tomcat\common\lib\servlet-api.jar judging from how you were trying to compile your program. You definitely need to become more familiar with Java in general before trying to tackle servlets. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SocketException while writing to Outputstream
Hi all, I am running Tomcat 4.1.27 on JDK 1.4.2, Win2k. I am getting a SocketException (Software caused connection abort) while writing to Outputstream. Searched the net but couldn't find an useful answer. What could be the issue? Any hint would be greatly appreciated Given below is the stack trace. java.net.SocketException: Software caused connection abort: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWri te(InternalOutputBuffer.java:668) at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFi lter.java:166) at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.j ava:523) at org.apache.coyote.Response.doWrite(Response.java:524) at org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:384) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439) at org.apache.coyote.tomcat4.OutputBuffer.flush(OutputBuffer.java:345) at org.apache.coyote.tomcat4.CoyoteResponse.flushBuffer(CoyoteResponse.java:555 ) at org.apache.coyote.tomcat4.CoyoteResponseFacade.flushBuffer(CoyoteResponseFac ade.java:227) at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper.java :189) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatch er.java:446) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher .java:356) at com.onmobile.sc.servlets.OnmServiceInvoker.forwardToService(OnmServiceInvoke r.java:242) at com.onmobile.sc.servlets.OnmServiceInvoker.doGet(OnmServiceInvoker.java:155) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at com.onmobile.sc.accesslayer.OnmAccessBroker.handleInvokerRequest(OnmAccessBr oker.java:277) at com.onmobile.sc.accesslayer.OnmAccessBroker.doFilter(OnmAccessBroker.java:12 1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:392) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565) at
org.apache.jasper.JasperException: Name prototypedb is not bound in this Context
I am not able to set up datasource for connection pooling , i am using tomcat 4.1.3, and connection to mysql database.. following is the code to retrieve the datasource... === Context ctx = new InitialContext(); Context env = (Context)ctx.lookup(java:comp/env); DataSource ds = (DataSource) env.lookup(jdbc/prototypedb); conn = ds.getConnection(); entry in server .xml !-- JNDI datasource setup to connect to MYSQL database-- Context path=/PrototypeDBTest docBase=PrototypeDBTest debug=5 reloadable=true crossContext=true useNaming=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_PrototypeDBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/prototypedb auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/prototypedb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. -- parameter namemaxActive/name value100/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. -- parameter namemaxIdle/name value30/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- MySQL dB username and password for dB connections -- parameter nameusername/name valueantonio/value /parameter parameter namepassword/name valueplay/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter !-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default closes idle connections after 8 hours. -- parameter nameurl/name valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=true/value /parameter /ResourceParams /Context !-- End of JNDI datasource setup -- === below is my web.xml.. ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app descriptionPrototypeDB Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/prototypedb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app Please help: i have added the entry in server.xml between context for example... an d host variable. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 9:06 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: Validating Users Hi, Yup, you should be able to get to the admin app using the richard user. The file is case-sensitive, and you have to restart the server after you edit it (with the default configuration). Yoav Shapira Millennium Research Informatics -Original Message- From: Richard Crawford [mailto:[EMAIL PROTECTED] Sent: Monday, July 26, 2004 5:41 PM To: [EMAIL PROTECTED] Subject: Validating Users I have just installed Tomcat 5.0.27 on a Solaris 9 computer. I've got it pointed at the right installation of Java, and when I go to http://localhost:8080 I see the Tomcat startup page come up, so I assume Tomcat is up and running properly. However, when I try to access the Tomcat Administration or Tomcat Manager pages, I get an invalid user error. However, when I examine conf/tomcat-users.xml, I find that I am listed as an admin user: tomcat-users role rolename=standard/ role rolename=manager/ role rolename=admin/ user username=richard password=password roles=admin,standard,manager/ /tomcat-users So, I *should* be able to get to the administration and management pages, right? I feel that I am missing something VERY basic... - To unsubscribe,
RE: Win2kSP4, Apache-2.0.49 + Tomcat-5.0.27 + mod_jk2-2.0.43 - Memory Reference Error
OK, it seems to have reduced the number of errors drastically but not eliminated them, so I most likely just need to allocate still more memory. I'll post again hopefully with a post-mortem tomorrow. - Noah Previous Message: Thank you, I tried increasing the memory before but was using the wrong method (trying to increase it as if I were using command line, but it is a service). I can't restart the server until after 5, so I will post a followup late today or tomorrow. Thanks, Noah Previous Message: Hi, I faced the same issue when concurent user are more. In this case we need to Increase the JDK heap size. On windows we can install the Tomcat in 2 ways 1. As a NT service 2. Command prompt In 1 Case u need to add 2 additional parameters in registry. JVM Option Count=5 JVM Option Number 3=-xms512m JVM Option Number 4=-xmx512m The Minimum and Maximum size of HDK heap size should be 1/3rd of Total RAM, as these OS need big memory for their own purpose. In 2nd Case Increase the JDk size with editing JAVA_OPTS variable in Catilina file. I hope your problem will get solved. With regards, Pradeep Chauhan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: JK2 AJP13 and Content-Length
This has been bother me for quite some time and I have searched and googled everywhere but can not find an answer. I just want to make sure whether AJPv13 reads request body sent in chunks (no Content-Length in header). If AJPv13 does handle it, I may need to find some other causes like I may not have IIS configured right, etc. Gunnar Pörschke wrote: Hello Hannah, The header has a content - lengh, but don't ask me what size :-( I'm facing nearly the same problem. And I stuck on the doc as well.. :-( You need to set the content lengh, but you need to set this lengh. I didn't set the lengh and I had trouble while post command (file upload). (You'll not get this problem without ajpv13) As soon as I vahe more information about that, I 'll post it. Regards, gunnar -Ursprüngliche Nachricht- Von: Hannah Li [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 27. Juli 2004 09:07 An: [EMAIL PROTECTED] Betreff: JK2 AJP13 and Content-Length In AJPv13 doc, there is a note: *Note: *The *content-length* header is extremely important. If it is present and non-zero, the container assumes that the request has a body (a POST request, for example), and immediately reads a separate packet off the input stream to get that body. Does it mean the request header has to have Content-Length specified in order to get the request body? In my program, I have to send requests which contains Transfer-Encoding: chunked in the header (the request is forwarded from IIS5 to Tomcat4.1.30 by mod_jk2-2.0.4). This means my request header does not have Content-Length. How can I get the request body using AJP13? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SocketException while writing to Outputstream
Hi, The user closed the browser while you were generating your page. Get a later version of tomcat where this has been fixed. Yoav Shapira Millennium Research Informatics -Original Message- From: Sreejith [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 8:38 AM To: [EMAIL PROTECTED] Subject: SocketException while writing to Outputstream Hi all, I am running Tomcat 4.1.27 on JDK 1.4.2, Win2k. I am getting a SocketException (Software caused connection abort) while writing to Outputstream. Searched the net but couldn't find an useful answer. What could be the issue? Any hint would be greatly appreciated Given below is the stack trace. java.net.SocketException: Software caused connection abort: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer. doWr i te(InternalOutputBuffer.java:668) at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOut putF i lter.java:166) at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuf fer. j ava:523) at org.apache.coyote.Response.doWrite(Response.java:524) at org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java :384 ) at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439) at org.apache.coyote.tomcat4.OutputBuffer.flush(OutputBuffer.java:345) at org.apache.coyote.tomcat4.CoyoteResponse.flushBuffer(CoyoteResponse.jav a:55 5 ) at org.apache.coyote.tomcat4.CoyoteResponseFacade.flushBuffer(CoyoteRespon seFa c ade.java:227) at javax.servlet.ServletResponseWrapper.flushBuffer(ServletResponseWrapper .jav a :189) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDis patc h er.java:446) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispa tche r .java:356) at com.onmobile.sc.servlets.OnmServiceInvoker.forwardToService(OnmServiceI nvok e r.java:242) at com.onmobile.sc.servlets.OnmServiceInvoker.doGet(OnmServiceInvoker.java :155 ) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic atio n FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terC h ain.java:193) at com.onmobile.sc.accesslayer.OnmAccessBroker.handleInvokerRequest(OnmAcc essB r oker.java:277) at com.onmobile.sc.accesslayer.OnmAccessBroker.doFilter(OnmAccessBroker.ja va:1 2 1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic atio n FilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil terC h ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal ve.j a va:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo k eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal ve.j a va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo k eNext(StandardPipeline.java:643) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.j ava: 2 46) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo k eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:24 16) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a:18 0 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo k eNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV alve . java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo k eNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a:17 2 ) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo k eNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve .jav a :174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext. invo k eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 480) at
Re: Tomcat Datasource
In addition to defining the DataSource in Tomcat's admin tool, you'll need to define the Resource in you web.xml - something like this: resource-ref !-- optional -- description Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. /description !-- local JNDI name to use in JSPs, servlets, etc. -- res-ref-name jdbc/phone /res-ref-name res-type javax.sql.DataSource /res-type res-auth Container /res-auth /resource-ref You'll also need to define a ResourceLink in your Context, that links what you want to call your DataSource locally (used in web.xml, see above) to what you called your DataSource in the admin tool (globally ... these can be the same, but don't have to be). Something like this: ResourceLink global=jdbc/phone name=jdbc/phone type=javax.sql.DataSource/ The 'global' attribute provides the name of the global JNDI resource (what was defined in the admin tool); 'name' provides the name of the local JNDI resource (what will be referenced in web.xml). That's it! You shouldn't have any problems once you've done this. Respectfully, Brice Ruth Bussie, Andre D wrote: I'm using Tomcat 5.0.19. I configured a datasource via the Tomcat Admin tool to configure a datatsource listed below is the server.xml file settings for the datasource GlobalNamingResources Resource name=jdbc/phone auth=Container type=javax.sql.DataSource description=Database for the phone application / ResourceParams name=jdbc/phone parameter namemaxWait/name value5000/value /parameter parameter namemaxActive/name value4/value /parameter parameter namepassword/name value/value /parameter parameter nameurl/name valuejdbc:hsqldb.hsql://localhost/value /parameter parameter namedriverClassName/name valueorg.hsqldb.jdbcDriver/value /parameter parameter namemaxIdle/name value2/value /parameter parameter nameusername/name valuesa/value /parameter /ResourceParams /GlobalNamingResources However when I try to access the datasource from a jsp file I get the following error 2004-07-26 10:42:19 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception javax.naming.NameNotFoundException: Name jdbc/phone is not bound in this Context Code snippet listed below % InitialContext ctx = new InitialContext(); DataSource ds = (DataSource)ctx.lookup(java:comp/env/jdbc/phone); Connection conn = ds.getConnection(); try{ Any suggestions on what can be causing this error. Why isn't in the context and how do I bind it to the context? -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Win2kSP4, Apache-2.0.49 + Tomcat-5.0.27 + mod_jk2-2.0.43 - Memory Reference Error
Hi Noah, Great news!! Regards, Pradeep -Original Message- From: Noah [mailto:[EMAIL PROTECTED] Sent: 27.07.2004 19:29 To: [EMAIL PROTECTED] Subject: RE: Win2kSP4, Apache-2.0.49 + Tomcat-5.0.27 + mod_jk2-2.0.43 - Memory Reference Error OK, it seems to have reduced the number of errors drastically but not eliminated them, so I most likely just need to allocate still more memory. I'll post again hopefully with a post-mortem tomorrow. - Noah Previous Message: Thank you, I tried increasing the memory before but was using the wrong method (trying to increase it as if I were using command line, but it is a service). I can't restart the server until after 5, so I will post a followup late today or tomorrow. Thanks, Noah Previous Message: Hi, I faced the same issue when concurent user are more. In this case we need to Increase the JDK heap size. On windows we can install the Tomcat in 2 ways 1. As a NT service 2. Command prompt In 1 Case u need to add 2 additional parameters in registry. JVM Option Count=5 JVM Option Number 3=-xms512m JVM Option Number 4=-xmx512m The Minimum and Maximum size of HDK heap size should be 1/3rd of Total RAM, as these OS need big memory for their own purpose. In 2nd Case Increase the JDk size with editing JAVA_OPTS variable in Catilina file. I hope your problem will get solved. With regards, Pradeep Chauhan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Datasource
Hi, You'll also need to define a ResourceLink in your Context, that links You only need a ResourceLink if your Resource is defined in GlobalNamingResources. This person's Resource is defined in his/her Context, so a ResourceLink is not needed. Another good idea would be to use a more recent Tomcat version thant 4.1.3. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Beyond bassic form authentication?
That wont work. Try navigating to the login page of the security sample on Tomcat. and try loging in! It will throw an exception of the sort that it canot authenticate against itself Yiannis Mavroukakis wrote: Why not make the welcome page part of the secured app , let the users authenticate and then use getUserPrincipal() to determine whether you need to redirect them to the secured pages. -Original Message- From: Anastasios Angelidis [mailto:[EMAIL PROTECTED] Sent: 27 July 2004 14:34 To: Yiannis Mavroukakis Subject: Re: Beyond bassic form authentication? Yeah it will but what will it do with it? ;) I guess I have to explain this step by step lol 1- Create a directory /MyNewApp in /webapps and attach a context to it. 2- Create all standard webapp directories like /WEB-INF etc... 3- Create a new directory /secured in in the inside your new webpass directory. Bassically /webapps/MyNewApp/secured 4- Put the security sample jsp pages that come with Tomcat within the secured folder. 5- Create your user realm 6- Configure security constraints. Set constraint on the /secured folder. Point authentication to the login.jsp... etc... So now we are all happy? Now open your browser and go to http://localhost:8080/MyNewApp/secured. Tomcat notices thatthis is aprotected URL and shoot back to you the login page You login and voila evryone is happy again! Now create index.jsp page in your webapps root /MyNewApp and add it to the list of welcome pages in your web.xml Which by default index.jsp is configured as default page Back in your browser go to: http://localhost:8080/MyNewApp/ and you should see the new index.jsp page you just created... Now we are all happy again! ;) On this new index.jsp page create a login form. Now from this login form I want to be authenticated to access /MyNewApp/secured. So here we have to problems... 1- You canot put as the action point /secured. Even though you pass a j_username and j_password fields with correct credential through the POST, because you are not authenticated, it will shoot back at you the login page that was configured in web.xml And then you can do proper login. 2- The action point canot be j_security_check because Tomcat will not know what to do with it! Bassically your are posting a form with action j_security_check from an unsecure resource. Even if Tomcat understood and actually authneticated it you, where would it redirect you? It wouldn't know. When you access a secure resource directly Tomcat attaches the secured resource URL in some way to the login page. So when you authenticate it knows where to redirect you. Thanks Yiannis Mavroukakis wrote: Not sure I get this a 100% percent, but with regards to your last statement, Of course I canot just put a form on the welcome page with action=%=request.encodeURL(j_security_check)% The browser wouldn't know where to post to. The browser will post to the application server anyway! It is no different than saying that the form will post to either POST=http://foo.org/bar or to POST=bar (assume foo.org is the domain of your application server). -Original Message- From: Anastasios Angelidis [mailto:[EMAIL PROTECTED] Sent: 26 July 2004 15:12 To: Tomcat Users List Subject: Re: Beyond bassic form authentication? Ok then I think the problem is not understood ;) My form authentication does work. In fact I scabbed the whole security sample :P Like I noted... When I type the protected resources URL in the browser address bar. Tomcats authentication kicks in and redirects me to the login page I specified in my web.xml I type the username and password that is stored in mysql and I login. This works fine. What I want to do is access the protected resource from an unprotected resource. For intsance on the welcome page of my web app which everyone can see. I want to add a login form which will login the user and give him access to the protect resource. One solution is to just put a Sign-In link which will in turn try to access the protected resource, but since the visitor is not logged in, he will be redirected to the login page. The other solution which I want is to offer a login page directly on the welcome page. Of course I canot just put a form on the welcome page with action=%=request.encodeURL(j_security_check)% The browser wouldn't know where to post to. Yiannis Mavroukakis wrote: english Anastasie I think what Robert means is you should steal some code from the existing examples in Tomcat. /english greek Yparxoune epishs kai alloi tropoi pou boreis na to kaneis ayto..boreis kalista na exeis authentication mesw tou Apache kai enos module pou koitaei gia valid accounts sthn mySQL sou. /greek Happy coding, Yiannis -Original Message- From: Anastasios Angelidis [mailto:[EMAIL PROTECTED] Sent: 26 July 2004 14:13 To: Tomcat Users List Subject: Re: Beyond bassic form authentication? Does any one have any ideas on this? What
Re: Tomcat Datasource
Shapira, Yoav wrote: Hi, You'll also need to define a ResourceLink in your Context, that links You only need a ResourceLink if your Resource is defined in GlobalNamingResources. This person's Resource is defined in his/her Context, so a ResourceLink is not needed. Another good idea would be to use a more recent Tomcat version thant 4.1.3. Yoav Shapira Yoav, No offense, but I believe you're wrong. Here's a snippet from the original email: GlobalNamingResources Resource name=jdbc/phone auth=Container type=javax.sql.DataSource description=Database for the phone application / ResourceParams name=jdbc/phone In this case, a ResourceLink is needed, in my experience. -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Datasource
Hi, I wasn't wrong, just unable to read, it appears ;) I thought it was inside a Context declaration. Yoav Shapira Millennium Research Informatics -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 10:15 AM To: Tomcat Users List Subject: Re: Tomcat Datasource Shapira, Yoav wrote: Hi, You'll also need to define a ResourceLink in your Context, that links You only need a ResourceLink if your Resource is defined in GlobalNamingResources. This person's Resource is defined in his/her Context, so a ResourceLink is not needed. Another good idea would be to use a more recent Tomcat version thant 4.1.3. Yoav Shapira Yoav, No offense, but I believe you're wrong. Here's a snippet from the original email: GlobalNamingResources Resource name=jdbc/phone auth=Container type=javax.sql.DataSource description=Database for the phone application / ResourceParams name=jdbc/phone In this case, a ResourceLink is needed, in my experience. -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Datasource
Very true, I stand corrected :) Shapira, Yoav wrote: Hi, I wasn't wrong, just unable to read, it appears ;) I thought it was inside a Context declaration. Yoav Shapira Millennium Research Informatics -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 10:15 AM To: Tomcat Users List Subject: Re: Tomcat Datasource Shapira, Yoav wrote: Hi, You'll also need to define a ResourceLink in your Context, that links You only need a ResourceLink if your Resource is defined in GlobalNamingResources. This person's Resource is defined in his/her Context, so a ResourceLink is not needed. Another good idea would be to use a more recent Tomcat version thant 4.1.3. Yoav Shapira Yoav, No offense, but I believe you're wrong. Here's a snippet from the original email: GlobalNamingResources Resource name=jdbc/phone auth=Container type=javax.sql.DataSource description=Database for the phone application / ResourceParams name=jdbc/phone In this case, a ResourceLink is needed, in my experience. -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice Ruth, Sr. IT Analyst Fiskars Brands Inc http://www.fiskarsbrands.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Point Apache at Tomcat Contexts
Hi, I'm a developer for a small hosting company. We currently host Java-enabled sites on a windows server. We use IIS, jk2, and Tomcat to serve Java. The problem we have is that every time the Tomcat server.xml is touched (new site, new context, etc), we have to restart Tomcat, and that affects every site we host. We are now trying to replace IIS with Apache (mod_jk2), in the hopes that there might be a way to point Apache Virtual Hosts at Tomcat Contexts, instead of Tomcat Virtual Hosts - although I'm not sure how this could even be done. The Tomcat Admin tool is hardly production-grade, I think we can all agree, but the Tomcat Manager Tool allows addition and removal of contexts without restarting Tomcat. We'd like to hang our hopes on that :-) Any help in this regard, (or suggestions for a different servlet container . . .) would be greatly appreciated.
OT: Eclipse users list/mail group
Hi First, my apologies for being off-topic. I've been searching eclipse.org for list/forum/group/whatever, for simple users of Eclipse, not developers, without success. Anybody know such a source? TIA Cornell - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OT: Eclipse users list/mail group
When you find it please tell the rest of us! It's unclear to me which of the lists is a general-user list... they seem to be very specific. Thanks, dwh Sternbergh, Cornell wrote: Hi First, my apologies for being off-topic. I've been searching eclipse.org for list/forum/group/whatever, for simple users of Eclipse, not developers, without success. Anybody know such a source? TIA Cornell - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Beyond bassic form authentication?
Ok..:) puts D hat and sits in the corner Let me see if I got this right..if you put a form on the unprotected resource that posts to j_security_check, in theory and according to the servlet spec, you should be redirected to the same url (or the requested url and be authenticated). If that is correct, you could then use getUserPrincipal() to forward the user to the protected part. But as I say, IF I am correct..otherwise I'll put the second D hat on. -Original Message- From: Anastasios Angelidis [mailto:[EMAIL PROTECTED] Sent: 27 July 2004 15:10 To: Tomcat Users List Subject: Re: Beyond bassic form authentication? That wont work. Try navigating to the login page of the security sample on Tomcat. and try loging in! It will throw an exception of the sort that it canot authenticate against itself Yiannis Mavroukakis wrote: Why not make the welcome page part of the secured app , let the users authenticate and then use getUserPrincipal() to determine whether you need to redirect them to the secured pages. -Original Message- From: Anastasios Angelidis [mailto:[EMAIL PROTECTED] Sent: 27 July 2004 14:34 To: Yiannis Mavroukakis Subject: Re: Beyond bassic form authentication? Yeah it will but what will it do with it? ;) I guess I have to explain this step by step lol 1- Create a directory /MyNewApp in /webapps and attach a context to it. 2- Create all standard webapp directories like /WEB-INF etc... 3- Create a new directory /secured in in the inside your new webpass directory. Bassically /webapps/MyNewApp/secured 4- Put the security sample jsp pages that come with Tomcat within the secured folder. 5- Create your user realm 6- Configure security constraints. Set constraint on the /secured folder. Point authentication to the login.jsp... etc... So now we are all happy? Now open your browser and go to http://localhost:8080/MyNewApp/secured. Tomcat notices thatthis is aprotected URL and shoot back to you the login page You login and voila evryone is happy again! Now create index.jsp page in your webapps root /MyNewApp and add it to the list of welcome pages in your web.xml Which by default index.jsp is configured as default page Back in your browser go to: http://localhost:8080/MyNewApp/ and you should see the new index.jsp page you just created... Now we are all happy again! ;) On this new index.jsp page create a login form. Now from this login form I want to be authenticated to access /MyNewApp/secured. So here we have to problems... 1- You canot put as the action point /secured. Even though you pass a j_username and j_password fields with correct credential through the POST, because you are not authenticated, it will shoot back at you the login page that was configured in web.xml And then you can do proper login. 2- The action point canot be j_security_check because Tomcat will not know what to do with it! Bassically your are posting a form with action j_security_check from an unsecure resource. Even if Tomcat understood and actually authneticated it you, where would it redirect you? It wouldn't know. When you access a secure resource directly Tomcat attaches the secured resource URL in some way to the login page. So when you authenticate it knows where to redirect you. Thanks Yiannis Mavroukakis wrote: Not sure I get this a 100% percent, but with regards to your last statement, Of course I canot just put a form on the welcome page with action=%=request.encodeURL(j_security_check)% The browser wouldn't know where to post to. The browser will post to the application server anyway! It is no different than saying that the form will post to either POST=http://foo.org/bar or to POST=bar (assume foo.org is the domain of your application server). -Original Message- From: Anastasios Angelidis [mailto:[EMAIL PROTECTED] Sent: 26 July 2004 15:12 To: Tomcat Users List Subject: Re: Beyond bassic form authentication? Ok then I think the problem is not understood ;) My form authentication does work. In fact I scabbed the whole security sample :P Like I noted... When I type the protected resources URL in the browser address bar. Tomcats authentication kicks in and redirects me to the login page I specified in my web.xml I type the username and password that is stored in mysql and I login. This works fine. What I want to do is access the protected resource from an unprotected resource. For intsance on the welcome page of my web app which everyone can see. I want to add a login form which will login the user and give him access to the protect resource. One solution is to just put a Sign-In link which will in turn try to access the protected resource, but since the visitor is not logged in, he will be redirected to the login page. The other solution which I want is to offer a login page directly on the welcome page. Of course I canot just put a form on the welcome page with action=%=request.encodeURL(j_security_check)% The
RE: Tomcat Datasource -- please help..
I have defined the resource in web.xml as below... and also defined the datasouce resources under context in server.xml... even then it does not help.. I get the same error org.apache.jasper.JasperException: Name prototypedb is not bound in this Context Web.xml web-app descriptionPrototypeDB Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/prototypedb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app === server.xml == !-- JNDI datasource setup to connect to MYSQL database-- Context path=/PrototypeDBTest docBase=PrototypeDBTest debug=5 reloadable=true crossContext=true useNaming=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_PrototypeDBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/prototypedb auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/prototypedb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. -- parameter namemaxActive/name value100/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. -- parameter namemaxIdle/name value30/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- MySQL dB username and password for dB connections -- parameter nameusername/name valueantonio/value /parameter parameter namepassword/name valueplay/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter !-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default closes idle connections after 8 hours. -- parameter nameurl/name valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=true/value /parameter /ResourceParams /Context = -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 10:04 AM To: Tomcat Users List Subject: Re: Tomcat Datasource In addition to defining the DataSource in Tomcat's admin tool, you'll need to define the Resource in you web.xml - something like this: resource-ref !-- optional -- description Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. /description !-- local JNDI name to use in JSPs, servlets, etc. -- res-ref-name jdbc/phone /res-ref-name res-type javax.sql.DataSource /res-type res-auth Container /res-auth /resource-ref You'll also need to define a ResourceLink in your Context, that links what you want to call your DataSource locally (used in web.xml, see above) to what you called your DataSource in the admin tool (globally ... these can be the same, but don't have to be). Something like this: ResourceLink global=jdbc/phone name=jdbc/phone type=javax.sql.DataSource/ The 'global' attribute provides the name of the global JNDI resource (what was defined in the admin tool); 'name' provides the name of the local JNDI resource (what will be referenced in web.xml). That's it! You shouldn't have any problems once you've done this. Respectfully, Brice Ruth Bussie, Andre D wrote: I'm using Tomcat 5.0.19. I configured a datasource via the Tomcat Admin tool to configure a datatsource listed below is the server.xml file settings for the datasource GlobalNamingResources Resource name=jdbc/phone auth=Container type=javax.sql.DataSource description=Database for the phone application / ResourceParams name=jdbc/phone parameter namemaxWait/name
RE: Point Apache at Tomcat Contexts
Hi, The Tomcat Admin tool is hardly production-grade, I think we can all agree, but the Tomcat Manager Tool allows addition and removal of contexts without restarting Tomcat. We'd like to hang our hopes on that :-) Patches and any other contributions are always welcome ;) I think you can point configure Apache/mod_jk to point at specific Tomcat contexts using the jkMount directive. There are examples at http://jakarta.apache.org/tomcat/connectors-doc/jk2/jk/aphowto.html#mod_ jk%20Directives. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OT: Eclipse users list/mail group
platform seems to be where the most general questions get asked. David On Tuesday 27 July 2004 15:34, Denis Haskin wrote: When you find it please tell the rest of us! It's unclear to me which of the lists is a general-user list... they seem to be very specific. Thanks, dwh Sternbergh, Cornell wrote: Hi First, my apologies for being off-topic. I've been searching eclipse.org for list/forum/group/whatever, for simple users of Eclipse, not developers, without success. Anybody know such a source? TIA Cornell - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse users list/mail group
Have you tried www.eclipse.org? They have several newsgroups there. - Original Message - From: Sternbergh, Cornell [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 09:31 AM Subject: OT: Eclipse users list/mail group Hi First, my apologies for being off-topic. I've been searching eclipse.org for list/forum/group/whatever, for simple users of Eclipse, not developers, without success. Anybody know such a source? TIA Cornell - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Datasource -- please help..
I believe if you're defining your DataSource in the Context directly, not in the Global Naming Resources, then you do not need the resource-ref in web.xml, nor the ResourceLink mentioned below. What code are you using to get to your connection? The JNDI lookup should be to java:comp/env/jdbc/prototypedb, in your particular case. Respectfully, Brice Ruth Shilpa Nalgonda wrote: I have defined the resource in web.xml as below... and also defined the datasouce resources under context in server.xml... even then it does not help.. I get the same error org.apache.jasper.JasperException: Name prototypedb is not bound in this Context Web.xml web-app descriptionPrototypeDB Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/prototypedb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app === server.xml == !-- JNDI datasource setup to connect to MYSQL database-- Context path=/PrototypeDBTest docBase=PrototypeDBTest debug=5 reloadable=true crossContext=true useNaming=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_PrototypeDBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/prototypedb auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/prototypedb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. -- parameter namemaxActive/name value100/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. -- parameter namemaxIdle/name value30/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- MySQL dB username and password for dB connections -- parameter nameusername/name valueantonio/value /parameter parameter namepassword/name valueplay/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter !-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default closes idle connections after 8 hours. -- parameter nameurl/name valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=true/value /parameter /ResourceParams /Context = -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 10:04 AM To: Tomcat Users List Subject: Re: Tomcat Datasource In addition to defining the DataSource in Tomcat's admin tool, you'll need to define the Resource in you web.xml - something like this: resource-ref !-- optional -- description Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. /description !-- local JNDI name to use in JSPs, servlets, etc. -- res-ref-name jdbc/phone /res-ref-name res-type javax.sql.DataSource /res-type res-auth Container /res-auth /resource-ref You'll also need to define a ResourceLink in your Context, that links what you want to call your DataSource locally (used in web.xml, see above) to what you called your DataSource in the admin tool (globally ... these can be the same, but don't have to be). Something like this: ResourceLink global=jdbc/phone name=jdbc/phone type=javax.sql.DataSource/ The 'global' attribute provides the name of the global JNDI resource (what was defined in the admin tool); 'name' provides the name of the local JNDI resource (what will be referenced in web.xml). That's it! You shouldn't have any problems once you've done this. Respectfully, Brice Ruth Bussie, Andre D wrote: I'm using Tomcat 5.0.19. I configured a datasource via the Tomcat Admin tool to configure a
RE: Tomcat Datasource -- please help..
Below is the code i am using to get the connection, and datasource... Context ctx = new InitialContext(); Context env = (Context)ctx.lookup(java:comp/env); DataSource ds = (DataSource) env.lookup(jdbc/prototypedb); conn = ds.getConnection(); -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 11:07 AM To: Tomcat Users List Subject: Re: Tomcat Datasource -- please help.. I believe if you're defining your DataSource in the Context directly, not in the Global Naming Resources, then you do not need the resource-ref in web.xml, nor the ResourceLink mentioned below. What code are you using to get to your connection? The JNDI lookup should be to java:comp/env/jdbc/prototypedb, in your particular case. Respectfully, Brice Ruth Shilpa Nalgonda wrote: I have defined the resource in web.xml as below... and also defined the datasouce resources under context in server.xml... even then it does not help.. I get the same error org.apache.jasper.JasperException: Name prototypedb is not bound in this Context Web.xml web-app descriptionPrototypeDB Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/prototypedb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app === server.xml == !-- JNDI datasource setup to connect to MYSQL database-- Context path=/PrototypeDBTest docBase=PrototypeDBTest debug=5 reloadable=true crossContext=true useNaming=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_PrototypeDBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/prototypedb auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/prototypedb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. -- parameter namemaxActive/name value100/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. -- parameter namemaxIdle/name value30/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- MySQL dB username and password for dB connections -- parameter nameusername/name valueantonio/value /parameter parameter namepassword/name valueplay/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter !-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default closes idle connections after 8 hours. -- parameter nameurl/name valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=true/value /parameter /ResourceParams /Context = -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 10:04 AM To: Tomcat Users List Subject: Re: Tomcat Datasource In addition to defining the DataSource in Tomcat's admin tool, you'll need to define the Resource in you web.xml - something like this: resource-ref !-- optional -- description Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. /description !-- local JNDI name to use in JSPs, servlets, etc. -- res-ref-name jdbc/phone /res-ref-name res-type javax.sql.DataSource /res-type res-auth Container /res-auth /resource-ref You'll also need to define a ResourceLink in your Context, that links what you want to call your DataSource locally (used in web.xml, see above) to what you called your DataSource in the
RE: Migrating from TC3.3.1 to TC4.1.30 What's changed?
From: Shapira, Yoav Sent: Tuesday, July 27, 2004 3:01 PM To: Tomcat Users List Subject: RE: Migrating from TC3.3.1 to TC4.1.30 What's changed? Tomcat 5 supports more configuration of applications via their own xml context configuration files than tomcat 4 does. Eek, another change to come. You may want to migrate to Tomcat 5 instead of 4 at this point. I'd like to but manufacturer of said application requires TC4. There's not one central changelog for tomcat 3 and 4 that I'm aware of, but all releases of both branches contain release notes that detail the changes. For Tomcat 5 we've been keeping a more, umm, user-friendly changelog at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/changelog.html. That's good. I suggest reading at least the key Tomcat configuration documentation pages to give you an idea of how things work, rather than focusing on the change logs. For Tomcat 4, see http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/index.html and the Context and Host pages linked from it especially. I've been doing this for quite some time. But still no solution to this: One problem: I launched the webapps with files like conf/apps-APPNAME.xml. How do I do that with TC4.1.x? Is there a simple solution? Thanks, Michael Yoav Shapira Millennium Research Informatics -Original Message- From: Lemke, Michael IZ/HZA-IOR Sent: Tuesday, July 27, 2004 6:15 AM To: '[EMAIL PROTECTED]' Subject: Migrating from TC3.3.1 to TC4.1.30 What's changed? I have to migrate out TC3.3.1 to TC4.1.30 to support a third party application. Apparently, the conf/server.xml has changed considerably. I can't find any change logs or FAQs to do that sort of migration. One problem: I launched the webapps with files like conf/apps-APPNAME.xml. How do I do that with TC4.1.x? Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Datasource -- please help..
I believe that should work. I'm out of ideas ... it seems strange that the Exception you're getting is complaining about prototypedb not being bound, instead of jdbc not being bound ... usually that comes first. That's the only thing that sticks out to me, but I don't really know what to make of it! Shilpa Nalgonda wrote: Below is the code i am using to get the connection, and datasource... Context ctx = new InitialContext(); Context env = (Context)ctx.lookup(java:comp/env); DataSource ds = (DataSource) env.lookup(jdbc/prototypedb); conn = ds.getConnection(); -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 11:07 AM To: Tomcat Users List Subject: Re: Tomcat Datasource -- please help.. I believe if you're defining your DataSource in the Context directly, not in the Global Naming Resources, then you do not need the resource-ref in web.xml, nor the ResourceLink mentioned below. What code are you using to get to your connection? The JNDI lookup should be to java:comp/env/jdbc/prototypedb, in your particular case. Respectfully, Brice Ruth Shilpa Nalgonda wrote: I have defined the resource in web.xml as below... and also defined the datasouce resources under context in server.xml... even then it does not help.. I get the same error org.apache.jasper.JasperException: Name prototypedb is not bound in this Context Web.xml web-app descriptionPrototypeDB Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/prototypedb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app === server.xml == !-- JNDI datasource setup to connect to MYSQL database-- Context path=/PrototypeDBTest docBase=PrototypeDBTest debug=5 reloadable=true crossContext=true useNaming=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_PrototypeDBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/prototypedb auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/prototypedb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. -- parameter namemaxActive/name value100/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. -- parameter namemaxIdle/name value30/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- MySQL dB username and password for dB connections -- parameter nameusername/name valueantonio/value /parameter parameter namepassword/name valueplay/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter !-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default closes idle connections after 8 hours. -- parameter nameurl/name valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=true/value /parameter /ResourceParams /Context = -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 10:04 AM To: Tomcat Users List Subject: Re: Tomcat Datasource In addition to defining the DataSource in Tomcat's admin tool, you'll need to define the Resource in you web.xml - something like this: resource-ref !-- optional -- description Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. /description !-- local JNDI name to use in JSPs, servlets, etc. -- res-ref-name jdbc/phone /res-ref-name res-type javax.sql.DataSource /res-type res-auth Container
RE: Migrating from TC3.3.1 to TC4.1.30 What's changed?
Hi, One problem: I launched the webapps with files like conf/apps-APPNAME.xml. How do I do that with TC4.1.x? Is there a simple solution? Yes: use Context tags inside conf/server.xml to define your applications. Set autoDeploy=false for the Host so that only your explicit Context tags are deployed. See the Context configuration reference page to figure out which attributes you need set (or unset) on the Context. In Tomcat 5, you can have each app in its own appname.xml file. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Datasource -- please help..
As you have said i am getting jdbc not bound exception only. But at one point i changed the env lookup to point to prototypedb instead of jdbc/prototypedb.. so thats when i get prototypedb not bound error... Anyway do you think that i have put the context to the jndi resource in the wrong place in server.xml.. where exactly should i add this in server.xml. if i add datasource using admin tool the jndi parameter gets added in GlobalNamingResouce. which is correct way... -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 11:29 AM To: Tomcat Users List Subject: Re: Tomcat Datasource -- please help.. I believe that should work. I'm out of ideas ... it seems strange that the Exception you're getting is complaining about prototypedb not being bound, instead of jdbc not being bound ... usually that comes first. That's the only thing that sticks out to me, but I don't really know what to make of it! Shilpa Nalgonda wrote: Below is the code i am using to get the connection, and datasource... Context ctx = new InitialContext(); Context env = (Context)ctx.lookup(java:comp/env); DataSource ds = (DataSource) env.lookup(jdbc/prototypedb); conn = ds.getConnection(); -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 11:07 AM To: Tomcat Users List Subject: Re: Tomcat Datasource -- please help.. I believe if you're defining your DataSource in the Context directly, not in the Global Naming Resources, then you do not need the resource-ref in web.xml, nor the ResourceLink mentioned below. What code are you using to get to your connection? The JNDI lookup should be to java:comp/env/jdbc/prototypedb, in your particular case. Respectfully, Brice Ruth Shilpa Nalgonda wrote: I have defined the resource in web.xml as below... and also defined the datasouce resources under context in server.xml... even then it does not help.. I get the same error org.apache.jasper.JasperException: Name prototypedb is not bound in this Context Web.xml web-app descriptionPrototypeDB Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/prototypedb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app === server.xml == !-- JNDI datasource setup to connect to MYSQL database-- Context path=/PrototypeDBTest docBase=PrototypeDBTest debug=5 reloadable=true crossContext=true useNaming=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_PrototypeDBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/prototypedb auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/prototypedb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. -- parameter namemaxActive/name value100/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. -- parameter namemaxIdle/name value30/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- MySQL dB username and password for dB connections -- parameter nameusername/name valueantonio/value /parameter parameter namepassword/name valueplay/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter !-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default closes idle connections after 8 hours. -- parameter nameurl/name valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=true/value /parameter /ResourceParams /Context = -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 10:04 AM To: Tomcat Users List
RE: Tomcat Datasource -- please help..
Hola, Can you use Context#listBindings, iterate through that enumeration, and print out what bindings you do have in your naming context? Yoav Shapira Millennium Research Informatics -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 11:36 AM To: Tomcat Users List Subject: RE: Tomcat Datasource -- please help.. As you have said i am getting jdbc not bound exception only. But at one point i changed the env lookup to point to prototypedb instead of jdbc/prototypedb.. so thats when i get prototypedb not bound error... Anyway do you think that i have put the context to the jndi resource in the wrong place in server.xml.. where exactly should i add this in server.xml. if i add datasource using admin tool the jndi parameter gets added in GlobalNamingResouce. which is correct way... -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 11:29 AM To: Tomcat Users List Subject: Re: Tomcat Datasource -- please help.. I believe that should work. I'm out of ideas ... it seems strange that the Exception you're getting is complaining about prototypedb not being bound, instead of jdbc not being bound ... usually that comes first. That's the only thing that sticks out to me, but I don't really know what to make of it! Shilpa Nalgonda wrote: Below is the code i am using to get the connection, and datasource... Context ctx = new InitialContext(); Context env = (Context)ctx.lookup(java:comp/env); DataSource ds = (DataSource) env.lookup(jdbc/prototypedb); conn = ds.getConnection(); -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 11:07 AM To: Tomcat Users List Subject: Re: Tomcat Datasource -- please help.. I believe if you're defining your DataSource in the Context directly, not in the Global Naming Resources, then you do not need the resource-ref in web.xml, nor the ResourceLink mentioned below. What code are you using to get to your connection? The JNDI lookup should be to java:comp/env/jdbc/prototypedb, in your particular case. Respectfully, Brice Ruth Shilpa Nalgonda wrote: I have defined the resource in web.xml as below... and also defined the datasouce resources under context in server.xml... even then it does not help.. I get the same error org.apache.jasper.JasperException: Name prototypedb is not bound in this Context Web.xml web-app descriptionPrototypeDB Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/prototypedb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app === server.xml == !-- JNDI datasource setup to connect to MYSQL database-- Context path=/PrototypeDBTest docBase=PrototypeDBTest debug=5 reloadable=true crossContext=true useNaming=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_PrototypeDBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/prototypedb auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/prototypedb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. -- parameter namemaxActive/name value100/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. -- parameter namemaxIdle/name value30/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- MySQL dB username and password for dB connections -- parameter nameusername/name valueantonio/value /parameter parameter namepassword/name valueplay/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter !-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default closes idle connections after 8 hours. -- parameter
Re: Tomcat Datasource -- please help..
Well, the way I do it is adding the data source using the admin tool, then adding a resource-ref to web.xml and a ResourceLink to the Context. This keeps things a bit cleaner in my opinion. What you're doing should work .. but I can't really give you much more than that. Try defining it through the admin tool and following the instructions for adding a resource-ref to web.xml and a ResourceLink to your Context. Shilpa Nalgonda wrote: As you have said i am getting jdbc not bound exception only. But at one point i changed the env lookup to point to prototypedb instead of jdbc/prototypedb.. so thats when i get prototypedb not bound error... Anyway do you think that i have put the context to the jndi resource in the wrong place in server.xml.. where exactly should i add this in server.xml. if i add datasource using admin tool the jndi parameter gets added in GlobalNamingResouce. which is correct way... -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 11:29 AM To: Tomcat Users List Subject: Re: Tomcat Datasource -- please help.. I believe that should work. I'm out of ideas ... it seems strange that the Exception you're getting is complaining about prototypedb not being bound, instead of jdbc not being bound ... usually that comes first. That's the only thing that sticks out to me, but I don't really know what to make of it! Shilpa Nalgonda wrote: Below is the code i am using to get the connection, and datasource... Context ctx = new InitialContext(); Context env = (Context)ctx.lookup(java:comp/env); DataSource ds = (DataSource) env.lookup(jdbc/prototypedb); conn = ds.getConnection(); -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 11:07 AM To: Tomcat Users List Subject: Re: Tomcat Datasource -- please help.. I believe if you're defining your DataSource in the Context directly, not in the Global Naming Resources, then you do not need the resource-ref in web.xml, nor the ResourceLink mentioned below. What code are you using to get to your connection? The JNDI lookup should be to java:comp/env/jdbc/prototypedb, in your particular case. Respectfully, Brice Ruth Shilpa Nalgonda wrote: I have defined the resource in web.xml as below... and also defined the datasouce resources under context in server.xml... even then it does not help.. I get the same error org.apache.jasper.JasperException: Name prototypedb is not bound in this Context Web.xml web-app descriptionPrototypeDB Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/prototypedb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app === server.xml == !-- JNDI datasource setup to connect to MYSQL database-- Context path=/PrototypeDBTest docBase=PrototypeDBTest debug=5 reloadable=true crossContext=true useNaming=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_PrototypeDBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/prototypedb auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/prototypedb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. -- parameter namemaxActive/name value100/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. -- parameter namemaxIdle/name value30/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- MySQL dB username and password for dB connections -- parameter nameusername/name valueantonio/value /parameter parameter namepassword/name valueplay/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter !-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default
RE: Tomcat too slow in Windows 2000 server
Hi everyone, I found out where's the root of the problem, I still don't know exactly what it is though: The machine I am using as a server has 2 NICs, one to connect to the telephony network and another one to connect to the companys LAN and the Internet, I disabled the connection to the LAN and everything was back to normal. It just seems strange that I had no problems with IIS, just Tomcat. The thing is, I need that other connection for some of my applications that need to get data from the LAN. Regards. --Juan Escalante -- Mensaje Original -- Reply-To: Tomcat Users List [EMAIL PROTECTED] Date: Fri, 23 Jul 2004 21:11:59 -0500 From: [EMAIL PROTECTED] Subject: Tomcat too slow in Windows 2000 server To: [EMAIL PROTECTED] Hi, I was using Tomcat 5.0 under Windows XP Pro and it was working just fine but I had to switch to Windows 2000 Server and now Tomcat has become extremely slow. I don't think it's a tuning issue because I was using default settings before (with in XP), besides, I'm just using it for testing a web application, it's not in production. I tried setting JAVA_OPTS to -server but nothing changed, like I said before, I don't think it's a tuning issue, something is wrong. Could this have something o do with the OS? Thanks. --Juan Escalante - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] e.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Win2K3 / Tomcat 4.1 and 5.0 issues
Here is the environment: DELL 6650 running a fresh Win2k3 Advanced Server installation Tomcat 5.0 JDK 1.4.2 The machine is connected to our intranet at 100Mbit. Here is the problem: I got Tomcat 5.0 and my web app to install and run fine. The problem begins when I try to upload a 48MB file from DuPont, Washington to Portland, Oregon. It takes ~20 min to upload the file. I originally had the web app running on a Linux Mandrake box using Tomcat 5.0 and doing the same operation took less than ~2 min. I had our IT department upgrade the network drop to the machine to 1Gbit instead of the 100Mbit and the file still takes ~20 min to upload. Well, being a cynic I thought, well it has to be a windows issue. I got two more 6650s and did some more testing. Here is a quick table showing the results of my tests. - | Test | O/S, Tomcat Ver. | Time| - | 1| Linux, 5.0 | ~2 min | | 2| Win2k3, 5.0 | ~20 min | | 3| Win2k3, 4.1 | ~20 min | | 4| Win2k, 4.1 | ~2 min | | 5| Win2k, 5.0 | ~2 min | - Test Machine 1 Environment: DELL 6650 running a fresh Win2k3 Advanced Server installation Tomcat 4.1 and 5.0 JDK 1.4.2 The machine is connected to our intranet at 100Mbit. I deployed the web app and got the same results as before. I then uninstalled Tomcat 5.0 and installed Tomcat 4.0, deployed the web app and got the same results again. Test Machine 2 Environment: DELL 6650 running a fresh Win2k Advanced Server installation Tomcat 4.1 and 5.0 JDK 1.4.2 The machine is connected to our intranet at 100Mbit. I deployed the web app and got the same results as my Linux server, the file took ~2 min to upload to the machine. So what gives? Is there a known conflict between Tomcat 4.1/5.0 and Win2k3 Advanced Server? Any ideas? Thanks in advance, David Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Webapp in Tomcat 5 SUPER SLOW!
The same app on TC 4.1.27 loads pages almost instantly. I converted the webapps using Netbeans 3.6 and loaded it to first a 5.0.25 then a 5.0.27 tomcat server and all pages take forever to load. I have another app on the same server and it loads its pages at normal speed. App 1 does use the no-cache directive. Any ideas?
configuration of server.xml
hi whenever i create a folder under webapp suppose myApp the servlet and jsp don't work in browser. i am using stand alone server and win2000. what should change in server.xml. please help. chandrashekhar
RE: Webapp in Tomcat 5 SUPER SLOW!
Hi, I'd question the conversion mechanism and the server configuration. The same code should run at the same speed if not faster on tomcat 5 when compared to tomcat 4. Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 12:46 PM To: [EMAIL PROTECTED] Subject: Webapp in Tomcat 5 SUPER SLOW! The same app on TC 4.1.27 loads pages almost instantly. I converted the webapps using Netbeans 3.6 and loaded it to first a 5.0.25 then a 5.0.27 tomcat server and all pages take forever to load. I have another app on the same server and it loads its pages at normal speed. App 1 does use the no-cache directive. Any ideas? This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: configuration of server.xml
Hi, Create the folder, populate it according to the App Developer's guide (see the First Webapp link in the Tomcat docs), and restart the server. Yoav Shapira Millennium Research Informatics -Original Message- From: chandrashekhar sf cs [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 12:52 PM To: [EMAIL PROTECTED] Subject: configuration of server.xml hi whenever i create a folder under webapp suppose myApp the servlet and jsp don't work in browser. i am using stand alone server and win2000. what should change in server.xml. please help. chandrashekhar This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem with servlets and tomcat
Hi, I am getting the HTTP 404 message - but my settings have been done - atleast, seems so to me. I access my servlet using http://local:8080/servlet/SimpleServlet and my class file is in webapps/ROOT/WEB-INF/classes. I am trying to set up Tomcat with Servlets before I can migrate my actual application to it. My Web.xml is ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameWelcome to Tomcat/display-name description Welcome to Tomcat /description servlet servlet-nameorg.apache.jsp.index_jsp/servlet-name servlet-classorg.apache.jsp.index_jsp/servlet-class /servlet servlet servlet-nameSimpleServlet/servlet-name servlet-classSimpleServlet/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jsp.index_jsp/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameSimpleServlet/servlet-name url-pattern/SimpleServlet/url-pattern /servlet-mapping /web-app My Server.xml Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ Service name=Catalina Connector port=8080 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / Engine name=Catalina defaultHost=localhost debug=0 Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=0 resourceName=UserDatabase/ Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ /Host /Engine /Service /Server DefaultContext reloadable=true / P.S - I am following settings from http://javaboutique.internet.com/tutorials/Tomcat/configure.html#Servlet-Reloading Any help would be greatly appreciated. Thanks a lot, Sowmya. = The faster you go, the shorter you are. - Einstein __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SSLServerSocketFactory not found in 4.1.27
I'm new to Tomcat, Coyote, Catalina, etc. It seemed to me that the Coyote connector would not work in 4.1.27. What would a coyote connector look like? I think the RPMs distributed with FC2 are mysteriously broken anyway. I may just trash them and install a 5.x from scratch. On Mon, 2004-07-26 at 23:43, Bill Barker wrote: You should use the Coyote Connector instead of the deprecated HttpConnector. David Smithson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi. On Fedora C2, Tomcat 4.1.27, tomcat fails to start due to a missing class file it seems. Here's the error from tomcat.out. [ERROR] Digester - -Begin event threw exception java.lang.ClassNotFoundException: org.apache.catalina.net.SSLServerSocketFactory Catalina.start: java.lang.ClassNotFoundException: org.apache.catalina.net.SSLServerSocketFactory java.lang.ClassNotFoundException: org.apache.catalina.net.SSLServerSocketFactory I simply want to implement SSL and client authentication to share an internal jspwiki to external support peeps. unzip -l catalina.jar | grep SSL shows only org/apache/catalina/authenticator/SSLAuthenticator.class. What am I missing? Do I need to trash the FC2 rpm and install from source? Thanks for your response. -- David Smithson [EMAIL PROTECTED] Custom Film Effects www.customfilmeffects.com 818-840-6833 x126 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Smithson [EMAIL PROTECTED] Custom Film Effects www.customfilmeffects.com 818-840-6833 x126 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Website Planning
OK, I'm going to ask my previous question(s) in a different way Basically, I want to build a website that has dynamic news and a dynamic navbar on the index page. This website also needs to have a forums app, and a photo gallery app. Everyplace on the site should contain the same dynamic nav as the index page, and the same footer. Also, the forums and gallery will require the user to be logged in, and should display the same login page regerdless of which app you hit if you're not logged in. Can someone please tell me the best practices for setting up a site like this? (i.e. a single web app or multiple web apps, how to include the nav if it's multiple web apps, etc) Thanks. - Jonathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: problem with servlets and tomcat
Hi, Since your servlet is mapped to /SimpleServlet, access it as /SimpleServlet, not /servlet/SimpleServlet. Yoav Shapira Millennium Research Informatics -Original Message- From: sowmya [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 1:08 PM To: [EMAIL PROTECTED] Subject: problem with servlets and tomcat Hi, I am getting the HTTP 404 message - but my settings have been done - atleast, seems so to me. I access my servlet using http://local:8080/servlet/SimpleServlet and my class file is in webapps/ROOT/WEB-INF/classes. I am trying to set up Tomcat with Servlets before I can migrate my actual application to it. My Web.xml is ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-nameWelcome to Tomcat/display-name description Welcome to Tomcat /description servlet servlet-nameorg.apache.jsp.index_jsp/servlet-name servlet-classorg.apache.jsp.index_jsp/servlet-class /servlet servlet servlet-nameSimpleServlet/servlet-name servlet-classSimpleServlet/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jsp.index_jsp/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameSimpleServlet/servlet-name url-pattern/SimpleServlet/url-pattern /servlet-mapping /web-app My Server.xml Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ Service name=Catalina Connector port=8080 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / Engine name=Catalina defaultHost=localhost debug=0 Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=0 resourceName=UserDatabase/ Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ /Host /Engine /Service /Server DefaultContext reloadable=true / P.S - I am following settings from http://javaboutique.internet.com/tutorials/Tomcat/configure.html#Servle t- Reloading Any help would be greatly appreciated. Thanks a lot, Sowmya. = The faster you go, the shorter you are. - Einstein __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Beyond bassic form authentication?
So if I understand you... On my index page which is not protected put a form with form ... action=j_security_check And somewhere at the top of page have something like if(getUserPrincipal()) redirect I guess we can both try it lol... Yiannis Mavroukakis wrote: Ok..:) puts D hat and sits in the corner Let me see if I got this right..if you put a form on the unprotected resource that posts to j_security_check, in theory and according to the servlet spec, you should be redirected to the same url (or the requested url and be authenticated). If that is correct, you could then use getUserPrincipal() to forward the user to the protected part. But as I say, IF I am correct..otherwise I'll put the second D hat on. -Original Message- From: Anastasios Angelidis [mailto:[EMAIL PROTECTED] Sent: 27 July 2004 15:10 To: Tomcat Users List Subject: Re: Beyond bassic form authentication? That wont work. Try navigating to the login page of the security sample on Tomcat. and try loging in! It will throw an exception of the sort that it canot authenticate against itself Yiannis Mavroukakis wrote: Why not make the welcome page part of the secured app , let the users authenticate and then use getUserPrincipal() to determine whether you need to redirect them to the secured pages. -Original Message- From: Anastasios Angelidis [mailto:[EMAIL PROTECTED] Sent: 27 July 2004 14:34 To: Yiannis Mavroukakis Subject: Re: Beyond bassic form authentication? Yeah it will but what will it do with it? ;) I guess I have to explain this step by step lol 1- Create a directory /MyNewApp in /webapps and attach a context to it. 2- Create all standard webapp directories like /WEB-INF etc... 3- Create a new directory /secured in in the inside your new webpass directory. Bassically /webapps/MyNewApp/secured 4- Put the security sample jsp pages that come with Tomcat within the secured folder. 5- Create your user realm 6- Configure security constraints. Set constraint on the /secured folder. Point authentication to the login.jsp... etc... So now we are all happy? Now open your browser and go to http://localhost:8080/MyNewApp/secured. Tomcat notices thatthis is aprotected URL and shoot back to you the login page You login and voila evryone is happy again! Now create index.jsp page in your webapps root /MyNewApp and add it to the list of welcome pages in your web.xml Which by default index.jsp is configured as default page Back in your browser go to: http://localhost:8080/MyNewApp/ and you should see the new index.jsp page you just created... Now we are all happy again! ;) On this new index.jsp page create a login form. Now from this login form I want to be authenticated to access /MyNewApp/secured. So here we have to problems... 1- You canot put as the action point /secured. Even though you pass a j_username and j_password fields with correct credential through the POST, because you are not authenticated, it will shoot back at you the login page that was configured in web.xml And then you can do proper login. 2- The action point canot be j_security_check because Tomcat will not know what to do with it! Bassically your are posting a form with action j_security_check from an unsecure resource. Even if Tomcat understood and actually authneticated it you, where would it redirect you? It wouldn't know. When you access a secure resource directly Tomcat attaches the secured resource URL in some way to the login page. So when you authenticate it knows where to redirect you. Thanks Yiannis Mavroukakis wrote: Not sure I get this a 100% percent, but with regards to your last statement, Of course I canot just put a form on the welcome page with action=%=request.encodeURL(j_security_check)% The browser wouldn't know where to post to. The browser will post to the application server anyway! It is no different than saying that the form will post to either POST=http://foo.org/bar or to POST=bar (assume foo.org is the domain of your application server). -Original Message- From: Anastasios Angelidis [mailto:[EMAIL PROTECTED] Sent: 26 July 2004 15:12 To: Tomcat Users List Subject: Re: Beyond bassic form authentication? Ok then I think the problem is not understood ;) My form authentication does work. In fact I scabbed the whole security sample :P Like I noted... When I type the protected resources URL in the browser address bar. Tomcats authentication kicks in and redirects me to the login page I specified in my web.xml I type the username and password that is stored in mysql and I login. This works fine. What I want to do is access the protected resource from an unprotected resource. For intsance on the welcome page of my web app which everyone can see. I want to add a login form which will login the user and give him access to the protect resource. One solution is to just put a Sign-In link which will in turn try to access the protected resource, but since the visitor is
RE: Webapp in Tomcat 5 SUPER SLOW!
I failed to mention that I am using the SSL http connector not the standard. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 11:50 AM To: Tomcat Users List Subject: RE: Webapp in Tomcat 5 SUPER SLOW! Hi, I'd question the conversion mechanism and the server configuration. The same code should run at the same speed if not faster on tomcat 5 when compared to tomcat 4. Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 12:46 PM To: [EMAIL PROTECTED] Subject: Webapp in Tomcat 5 SUPER SLOW! The same app on TC 4.1.27 loads pages almost instantly. I converted the webapps using Netbeans 3.6 and loaded it to first a 5.0.25 then a 5.0.27 tomcat server and all pages take forever to load. I have another app on the same server and it loads its pages at normal speed. App 1 does use the no-cache directive. Any ideas? This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
sendRedirect not working same after upgrade to 5...26
Hi, I recently upgraded from Tomcat 3.2.1 to 5.xxx and noticed that sendRedirect() did not work the same between the two versions. In Tomcat 5 when I tried to redirect to a servlet whose output contenttype was text/plain or application/pdf I would get a blank page and be forced to refresh from the browser to see the results. I can get it to work with forward(req,res), but forward() doesn't register in the browser. Any help would be appreciated. If this is a problem that has been discussed to death - sorry - the company I work for blocks me accessing the Tomcat-user Archives. Thanks, Bret - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: sendRedirect not working same after upgrade to 5...26
Hi, It's not a problem that's been discussed to death, that's for sure. Enable the AccessLogValve (it's commented out by default in server.xml) and observe the URL requested and server response code for your redirect request. As for archives, try the ones at AIMS (marc.theaimsgroup.com or something like that), as they are just a normal site and not likely to be blocked. Yoav Shapira Millennium Research Informatics -Original Message- From: Williams, Bret M. [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 2:04 PM To: [EMAIL PROTECTED] Subject: sendRedirect not working same after upgrade to 5...26 Hi, I recently upgraded from Tomcat 3.2.1 to 5.xxx and noticed that sendRedirect() did not work the same between the two versions. In Tomcat 5 when I tried to redirect to a servlet whose output contenttype was text/plain or application/pdf I would get a blank page and be forced to refresh from the browser to see the results. I can get it to work with forward(req,res), but forward() doesn't register in the browser. Any help would be appreciated. If this is a problem that has been discussed to death - sorry - the company I work for blocks me accessing the Tomcat-user Archives. Thanks, Bret - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Beyond bassic form authentication?
On 7/27/2004 10:34 AM, Anastasios Angelidis wrote: So if I understand you... On my index page which is not protected put a form with form ... action=j_security_check And somewhere at the top of page have something like if(getUserPrincipal()) redirect I guess we can both try it lol... No, that won't work. The login page cannot be explicitly referred to. You can only get to the login page when accessing a protected resource ... unless you modify the FormAuthenticator class. -- Dennis Dai [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Failed to start application. But why?
Hi, I just tried to deploy a new Struts application on Tomcat. But I could not get it to start. Below is the error received. SEVERE: Exception during cleanup after start failed LifecycleException: Container StandardContext[/SSBilling] has not been started at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4402) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4300 ) at org.apache.catalina.core.StandardHostDeployer.start(StandardHostDeployer .java:767) at org.apache.catalina.core.StandardHost.start(StandardHost.java:1000) at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:132 7) at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet. java:578) at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet. java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tionFilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erChain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.java:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon textValve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:151) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator Base.java:587) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :195) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :164) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java:156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 64) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:82 8) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58 4) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:683) at java.lang.Thread.run(Thread.java:536) Any help is greatly appreciated. Thanks Amar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Beyond bassic form authentication?
That what Iwas saying previously. So how can I put a login page on my home page to allow access to the protected. Resources. theserverside.com has it and all kinds of web sites. Dennis Dai wrote: On 7/27/2004 10:34 AM, Anastasios Angelidis wrote: So if I understand you... On my index page which is not protected put a form with form ... action=j_security_check And somewhere at the top of page have something like if(getUserPrincipal()) redirect I guess we can both try it lol... No, that won't work. The login page cannot be explicitly referred to. You can only get to the login page when accessing a protected resource ... unless you modify the FormAuthenticator class. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ANN: Install Tomcat on your IBM mainframe in an hour or less
JZOS - Java for z/OS® is a set of free tools designed to make Java easier to use on the mainframe. *** JZOS Java Batch Launcher and Toolkit *** Run Java applications on z/OS or OS/390 as normal MVS batch jobs (without BPXBATCH) - * Simple yet flexible way to configure and invoke Java from a batch job step. * Access to datasets via JCL DD statements. * Output can be sent directly to JES SYSOUT datasets. * Condition code passing between Java and non-Java job steps. * Powerful new interface to traditional MVS datasets and system console. *** Tomcat on the Mainframe in an hour or less! *** Using the JZOS Batch Launcher, running the Apache Tomcat servlet / JSP container is a snap. You can install and configure Tomcat on your mainframe in under an hour. The JZOS toolkit is available free of charge and licensed under the Apache license. For more information, see http://jzos.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Beyond bassic form authentication?
I want to do exactly like the serverside.com You have alogin form on each unprotected page thata llows you to login So you can hit the news page, the discussion page, patterns etc... without having to login, but each section offer the login form... Dennis Dai wrote: On 7/27/2004 10:34 AM, Anastasios Angelidis wrote: So if I understand you... On my index page which is not protected put a form with form ... action=j_security_check And somewhere at the top of page have something like if(getUserPrincipal()) redirect I guess we can both try it lol... No, that won't work. The login page cannot be explicitly referred to. You can only get to the login page when accessing a protected resource ... unless you modify the FormAuthenticator class. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Failed to start application. But why?
Hi, Is there anything else in your logs? What tomcat version are you using? Yoav Shapira Millennium Research Informatics -Original Message- From: LINGALA, AMARESHWAR G (SBCSI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 2:19 PM To: Tomcat Users List Subject: Failed to start application. But why? Hi, I just tried to deploy a new Struts application on Tomcat. But I could not get it to start. Below is the error received. SEVERE: Exception during cleanup after start failed LifecycleException: Container StandardContext[/SSBilling] has not been started at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4402 ) at org.apache.catalina.core.StandardContext.start(StandardContext.java:430 0 ) at org.apache.catalina.core.StandardHostDeployer.start(StandardHostDeploye r .java:767) at org.apache.catalina.core.StandardHost.start(StandardHost.java:1000) at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:13 2 7) at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet . java:578) at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet . java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic a tionFilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil t erChain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal v e.java:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC o ntext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 5 64) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo n textValve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal v e.java:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC o ntext.java:151) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticato r Base.java:587) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC o ntext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 5 64) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a :195) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC o ntext.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a :164) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC o ntext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 5 64) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve . java:156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC o ntext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 5 64) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:8 2 8) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process C onnection(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5 8 4) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo l .java:683) at java.lang.Thread.run(Thread.java:536) Any help is greatly appreciated. Thanks Amar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Failed to start application. But why?
Well that's all I can find in the logs. I am using version 5.0.18 -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 1:26 PM To: Tomcat Users List Subject: RE: Failed to start application. But why? Hi, Is there anything else in your logs? What tomcat version are you using? Yoav Shapira Millennium Research Informatics -Original Message- From: LINGALA, AMARESHWAR G (SBCSI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 2:19 PM To: Tomcat Users List Subject: Failed to start application. But why? Hi, I just tried to deploy a new Struts application on Tomcat. But I could not get it to start. Below is the error received. SEVERE: Exception during cleanup after start failed LifecycleException: Container StandardContext[/SSBilling] has not been started at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4402 ) at org.apache.catalina.core.StandardContext.start(StandardContext.java:430 0 ) at org.apache.catalina.core.StandardHostDeployer.start(StandardHostDeploye r .java:767) at org.apache.catalina.core.StandardHost.start(StandardHost.java:1000) at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:13 2 7) at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet . java:578) at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet . java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic a tionFilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil t erChain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal v e.java:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC o ntext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 5 64) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo n textValve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal v e.java:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC o ntext.java:151) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticato r Base.java:587) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC o ntext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 5 64) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav a :195) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC o ntext.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav a :164) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC o ntext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 5 64) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve . java:156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC o ntext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 5 64) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:8 2 8) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process C onnection(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5 8 4) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo l .java:683) at java.lang.Thread.run(Thread.java:536) Any help is greatly appreciated. Thanks Amar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe,
RE: Failed to start application. But why?
Hi, This error comes from StandardContext#start and in most cases it would be preceded by another warning or error in the log. Can you start it normally, not with the Manager app? Yoav Shapira Millennium Research Informatics -Original Message- From: LINGALA, AMARESHWAR G (SBCSI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 2:30 PM To: Tomcat Users List Subject: RE: Failed to start application. But why? Well that's all I can find in the logs. I am using version 5.0.18 -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 1:26 PM To: Tomcat Users List Subject: RE: Failed to start application. But why? Hi, Is there anything else in your logs? What tomcat version are you using? Yoav Shapira Millennium Research Informatics -Original Message- From: LINGALA, AMARESHWAR G (SBCSI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 2:19 PM To: Tomcat Users List Subject: Failed to start application. But why? Hi, I just tried to deploy a new Struts application on Tomcat. But I could not get it to start. Below is the error received. SEVERE: Exception during cleanup after start failed LifecycleException: Container StandardContext[/SSBilling] has not been started at org.apache.catalina.core.StandardContext.stop(StandardContext.java:440 2 ) at org.apache.catalina.core.StandardContext.start(StandardContext.java:43 0 0 ) at org.apache.catalina.core.StandardHostDeployer.start(StandardHostDeploy e r .java:767) at org.apache.catalina.core.StandardHost.start(StandardHost.java:1000) at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1 3 2 7) at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServle t . java:578) at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServle t . java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli c a tionFilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi l t erChain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa l v e.java:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValve C o ntext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java : 5 64) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardC o n textValve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa l v e.java:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValve C o ntext.java:151) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticat o r Base.java:587) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValve C o ntext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java : 5 64) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja v a :195) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValve C o ntext.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja v a :164) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValve C o ntext.java:149) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java : 5 64) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv e . java:156) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValve C o ntext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java : 5 64) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206 ) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java: 8 2 8) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proces s C onnection(Http11Protocol.java:700) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java: 5 8 4) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPo o l .java:683) at java.lang.Thread.run(Thread.java:536) Any help is greatly appreciated. Thanks Amar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may
Re: Win2K3 / Tomcat 4.1 and 5.0 issues
On Tue, Jul 27, 2004 at 08:53:45AM -0700, Martin, David S wrote: : - : | Test | O/S, Tomcat Ver. | Time| : - : | 1| Linux, 5.0 | ~2 min | : | 2| Win2k3, 5.0 | ~20 min | : | 3| Win2k3, 4.1 | ~20 min | : | 4| Win2k, 4.1 | ~2 min | : | 5| Win2k, 5.0 | ~2 min | : - : : So what gives? Is there a known conflict between Tomcat 4.1/5.0 and : Win2k3 Advanced Server? What about general I/O under 2k3, or Java I/O? What sort of services are running under a default 2k3 install that aren't running under Win2k? Does 2k3 add any extra security checks or containment that 2k does not have? You could also check for interactions between the JDK you used and the OS. The JDKs are all native code deep-down. If 2k3 is running the code inside some special win2k emulation mode or protected area, that may be the culprit. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Failed to start application. But why?
Well it says it cant read the file Jul 27, 2004 1:45:49 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /SSBilling from URL file:/appl/aaa/tomcat/webapps/SSBilling Jul 27, 2004 1:45:49 PM org.apache.catalina.core.StandardContext resourcesStart SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /appl/aaa/tomcat/webapps/SSBilling does not exist or is not a readable direc tory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.jav a:185) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext. java:3858) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4085 ) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja va:866) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeploy er.java:320) at org.apache.catalina.core.StandardHost.install(StandardHost.java:875) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:657) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:476) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:39 4) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu pport.java:166) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133) at org.apache.catalina.core.StandardHost.start(StandardHost.java:832) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2345) at org.apache.catalina.startup.Catalina.start(Catalina.java:598) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398) Jul 27, 2004 1:45:49 PM org.apache.catalina.core.StandardContext start SEVERE: Error in resourceStart() Jul 27, 2004 1:45:49 PM org.apache.catalina.core.StandardContext start But I did change the file permisions to CHMOD 777. Below are the file and war file details -rwxrwxrwx 1 aaaaaa 0 Jul 27 10:54 SSBilling -rwxrwxrwx 1 aaaaaa3217335 Jul 27 13:08 SSBilling.war Let me know if you need any more information Amar -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 1:32 PM To: Tomcat Users List Subject: RE: Failed to start application. But why? Hi, This error comes from StandardContext#start and in most cases it would be preceded by another warning or error in the log. Can you start it normally, not with the Manager app? Yoav Shapira Millennium Research Informatics -Original Message- From: LINGALA, AMARESHWAR G (SBCSI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 2:30 PM To: Tomcat Users List Subject: RE: Failed to start application. But why? Well that's all I can find in the logs. I am using version 5.0.18 -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 1:26 PM To: Tomcat Users List Subject: RE: Failed to start application. But why? Hi, Is there anything else in your logs? What tomcat version are you using? Yoav Shapira Millennium Research Informatics -Original Message- From: LINGALA, AMARESHWAR G (SBCSI) [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 2:19 PM To: Tomcat Users List Subject: Failed to start application. But why? Hi, I just tried to deploy a new Struts application on Tomcat. But I could not get it to start. Below is the error received. SEVERE: Exception during cleanup after start failed LifecycleException: Container StandardContext[/SSBilling] has not been started at org.apache.catalina.core.StandardContext.stop(StandardContext.java:440 2 ) at org.apache.catalina.core.StandardContext.start(StandardContext.java:43 0 0 ) at org.apache.catalina.core.StandardHostDeployer.start(StandardHostDeploy e r .java:767) at org.apache.catalina.core.StandardHost.start(StandardHost.java:1000) at
Re: Tomcat Datasource -- please help..
Hi. I see a couple of things different from my working setup in your setup below. First: You need a tag as below just before the ResourceParams.../ResourceParams block: Resource name=jdbc/prototypedb auth=container type=javax.sql.DataSource/ Second, and this might not be a show stopper, change the driverClassName parameter in your ResourceParams/ResourceParams block to com.mysql.jdbc.Driver unless you really are using a version 2 mysql jar file. MySQL/J versions 3.0.x and up switched to com.mysql.jdbc.Driver as the primary JDBC driver. Third, and this isn't in your email, where is your mysql jar file? Ideally, it should be in common/lib with the dbcp jar file. If you've changed the location of the mysql jar file, you'll have to restart Tomcat. Otherwise reloading the app will probably be sufficient to make the changes live. --David Shilpa Nalgonda wrote: I have defined the resource in web.xml as below... and also defined the datasouce resources under context in server.xml... even then it does not help.. I get the same error org.apache.jasper.JasperException: Name prototypedb is not bound in this Context Web.xml web-app descriptionPrototypeDB Test App/description resource-ref descriptionDB Connection/description res-ref-namejdbc/prototypedb/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app === server.xml == !-- JNDI datasource setup to connect to MYSQL database-- Context path=/PrototypeDBTest docBase=PrototypeDBTest debug=5 reloadable=true crossContext=true useNaming=true Logger className=org.apache.catalina.logger.FileLogger prefix=localhost_PrototypeDBTest_log. suffix=.txt timestamp=true/ Resource name=jdbc/prototypedb auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/prototypedb parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter !-- Maximum number of dB connections in pool. Make sure you configure your mysqld max_connections large enough to handle all of your db connections. Set to 0 for no limit. -- parameter namemaxActive/name value100/value /parameter !-- Maximum number of idle dB connections to retain in pool. Set to 0 for no limit. -- parameter namemaxIdle/name value30/value /parameter !-- Maximum time to wait for a dB connection to become available in ms, in this example 10 seconds. An Exception is thrown if this timeout is exceeded. Set to -1 to wait indefinitely. -- parameter namemaxWait/name value1/value /parameter !-- MySQL dB username and password for dB connections -- parameter nameusername/name valueantonio/value /parameter parameter namepassword/name valueplay/value /parameter !-- Class name for mm.mysql JDBC driver -- parameter namedriverClassName/name valueorg.gjt.mm.mysql.Driver/value /parameter !-- The JDBC connection url for connecting to your MySQL dB. The autoReconnect=true argument to the url makes sure that the mm.mysql JDBC Driver will automatically reconnect if mysqld closed the connection. mysqld by default closes idle connections after 8 hours. -- parameter nameurl/name valuejdbc:mysql://localhost:3306/prototypedb?autoReconnect=true/value /parameter /ResourceParams /Context = -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 10:04 AM To: Tomcat Users List Subject: Re: Tomcat Datasource In addition to defining the DataSource in Tomcat's admin tool, you'll need to define the Resource in you web.xml - something like this: resource-ref !-- optional -- description Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file. /description !-- local JNDI name to use in JSPs, servlets, etc. -- res-ref-name jdbc/phone /res-ref-name res-type javax.sql.DataSource /res-type res-auth Container /res-auth /resource-ref You'll also need to define a ResourceLink in your Context, that links what you want to call your DataSource locally (used in web.xml, see above) to what you called your DataSource in the admin tool (globally ... these can be the same, but don't have to be).
RE: Win2K3 / Tomcat 4.1 and 5.0 issues
QM, As it turns out it might not be a Tomcat issue after all. I had our IT guys install IIS on the machine with the issue, created a test HTML page that has an upload field and IIS is showing the same type of problem ... weird. David Martin -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 11:44 AM To: Tomcat Users List Subject: Re: Win2K3 / Tomcat 4.1 and 5.0 issues On Tue, Jul 27, 2004 at 08:53:45AM -0700, Martin, David S wrote: : - : | Test | O/S, Tomcat Ver. | Time| : - : | 1| Linux, 5.0 | ~2 min | : | 2| Win2k3, 5.0 | ~20 min | : | 3| Win2k3, 4.1 | ~20 min | : | 4| Win2k, 4.1 | ~2 min | : | 5| Win2k, 5.0 | ~2 min | : - : : So what gives? Is there a known conflict between Tomcat 4.1/5.0 and : Win2k3 Advanced Server? What about general I/O under 2k3, or Java I/O? What sort of services are running under a default 2k3 install that aren't running under Win2k? Does 2k3 add any extra security checks or containment that 2k does not have? You could also check for interactions between the JDK you used and the OS. The JDKs are all native code deep-down. If 2k3 is running the code inside some special win2k emulation mode or protected area, that may be the culprit. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Win2K3 / Tomcat 4.1 and 5.0 issues
On Tue, Jul 27, 2004 at 12:05:00PM -0700, Martin, David S wrote: : our IT guys install IIS on the machine with the issue, created a test : HTML page that has an upload field and IIS is showing the same type of : problem ... weird. Hmm... That takes Java I/O out of the picture. Same type of FS under 2k vs 2k3? -or what about a NIC problem? I've been bitten by a few autonegotiating cards that didn't. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Win2K3 / Tomcat 4.1 and 5.0 issues
I know this isn't an answer to your problem, but I've run Tomcat 5.0.19 on my Win2k3 system and it responded as fast as any of my Linux boxes. That's saying a lot considering I was running Cocoon 2 on it -- an XML publishing app that seems to eat CPU for breakfast. I didn't remove any services or disable anything to make it work either. Do any other services on this system experience any slowness? I would suspect some network latency due to DNS lookups or something. --David QM wrote: On Tue, Jul 27, 2004 at 08:53:45AM -0700, Martin, David S wrote: : - : | Test | O/S, Tomcat Ver. | Time| : - : | 1| Linux, 5.0 | ~2 min | : | 2| Win2k3, 5.0 | ~20 min | : | 3| Win2k3, 4.1 | ~20 min | : | 4| Win2k, 4.1 | ~2 min | : | 5| Win2k, 5.0 | ~2 min | : - : : So what gives? Is there a known conflict between Tomcat 4.1/5.0 and : Win2k3 Advanced Server? What about general I/O under 2k3, or Java I/O? What sort of services are running under a default 2k3 install that aren't running under Win2k? Does 2k3 add any extra security checks or containment that 2k does not have? You could also check for interactions between the JDK you used and the OS. The JDKs are all native code deep-down. If 2k3 is running the code inside some special win2k emulation mode or protected area, that may be the culprit. -QM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
what is the preferred way to instantiate MBeans at startup
Hi, I am looking at this J2EE application, deployed on JBoss 3.x, which could be ported easily to a pure servlet/jsp application if some of its dependencies with JBoss were cut down. One of these is the possibility to start services in JBoss using a jboss.jcml file, and to register MBean instances in that file. JBoss takes care of the instanciation and then allow one to control these services at runtime. I was wondering what would be the best to replace that functionality. One simple way would be to register all my the MBean instances manually from a Servlet that would be ran at startup (load-on-startup), maybe adding a List of the couple (class name, MBean registration name) for which an instance would need to be created and registered. I should then probably have a look at the commons-modeler package which I think Tomcat 5 uses to handle its JMX objects. Any comment on that solution or any alternatives? Cheers, Jerome - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Win2K3 / Tomcat 4.1 and 5.0 issues
Return Receipt Your RE: Win2K3 / Tomcat 4.1 and 5.0 issues document: wasCary Conover/Lawson received by: at:07/27/2004 03:11:58 PM EDT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Win2K3 / Tomcat 4.1 and 5.0 issues
There is additional security in IIS v6 that causes many of these issues. It is the third tab in the IIS configuration section in the Management Console on W2K3. I would experiment with identifying the specific java servlet redirector for each of the tomcats bases that are in use on the system to see if there is a better response time. Cary D. Conover Lawson Software Advisory Consultant Technology Services - East Region Voice 972-934-0408 ext 2429 Cellphone 214-417-8669 SMS [EMAIL PROTECTED] Fax 509-355-0356 Use http://www.Teleflip.com to contact any cellphone number via SMS. 160 Character Messages there in a flash. QM [EMAIL PROTECTED] 07/27/2004 02:43 PM Please respond to Tomcat Users List [EMAIL PROTECTED] To Tomcat Users List [EMAIL PROTECTED] cc Subject Re: Win2K3 / Tomcat 4.1 and 5.0 issues On Tue, Jul 27, 2004 at 08:53:45AM -0700, Martin, David S wrote: : - : | Test | O/S, Tomcat Ver. | Time| : - : | 1| Linux, 5.0 | ~2 min | : | 2| Win2k3, 5.0 | ~20 min | : | 3| Win2k3, 4.1 | ~20 min | : | 4| Win2k, 4.1 | ~2 min | : | 5| Win2k, 5.0 | ~2 min | : - : : So what gives? Is there a known conflict between Tomcat 4.1/5.0 and : Win2k3 Advanced Server? What about general I/O under 2k3, or Java I/O? What sort of services are running under a default 2k3 install that aren't running under Win2k? Does 2k3 add any extra security checks or containment that 2k does not have? You could also check for interactions between the JDK you used and the OS. The JDKs are all native code deep-down. If 2k3 is running the code inside some special win2k emulation mode or protected area, that may be the culprit. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Win2K3 / Tomcat 4.1 and 5.0 issues
QM, Yes, they both have the same FS in the Win2K and Win2K3 machines. Well I know it's not the NIC card on the machine because I can log onto the server that is having the issue, go to the machine where the 48MB file lives and drag and drop it onto the desktop and the file transfers in ~2 min. David Martin -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 12:08 PM To: Tomcat Users List Subject: Re: Win2K3 / Tomcat 4.1 and 5.0 issues On Tue, Jul 27, 2004 at 12:05:00PM -0700, Martin, David S wrote: : our IT guys install IIS on the machine with the issue, created a test : HTML page that has an upload field and IIS is showing the same type of : problem ... weird. Hmm... That takes Java I/O out of the picture. Same type of FS under 2k vs 2k3? -or what about a NIC problem? I've been bitten by a few autonegotiating cards that didn't. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Win2K3 / Tomcat 4.1 and 5.0 issues
Cary, I am not doing any IIS redirection to Tomcat. I was asked to get IIS on that same machine to see if IIS would have the same slowness when someone tried to upload a file to it. David Martin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 12:16 PM To: Tomcat Users List Subject: Re: Win2K3 / Tomcat 4.1 and 5.0 issues There is additional security in IIS v6 that causes many of these issues. It is the third tab in the IIS configuration section in the Management Console on W2K3. I would experiment with identifying the specific java servlet redirector for each of the tomcats bases that are in use on the system to see if there is a better response time. Cary D. Conover Lawson Software Advisory Consultant Technology Services - East Region Voice 972-934-0408 ext 2429 Cellphone 214-417-8669 SMS [EMAIL PROTECTED] Fax 509-355-0356 Use http://www.Teleflip.com to contact any cellphone number via SMS. 160 Character Messages there in a flash. QM [EMAIL PROTECTED] 07/27/2004 02:43 PM Please respond to Tomcat Users List [EMAIL PROTECTED] To Tomcat Users List [EMAIL PROTECTED] cc Subject Re: Win2K3 / Tomcat 4.1 and 5.0 issues On Tue, Jul 27, 2004 at 08:53:45AM -0700, Martin, David S wrote: : - : | Test | O/S, Tomcat Ver. | Time| : - : | 1| Linux, 5.0 | ~2 min | : | 2| Win2k3, 5.0 | ~20 min | : | 3| Win2k3, 4.1 | ~20 min | : | 4| Win2k, 4.1 | ~2 min | : | 5| Win2k, 5.0 | ~2 min | : - : : So what gives? Is there a known conflict between Tomcat 4.1/5.0 and : Win2k3 Advanced Server? What about general I/O under 2k3, or Java I/O? What sort of services are running under a default 2k3 install that aren't running under Win2k? Does 2k3 add any extra security checks or containment that 2k does not have? You could also check for interactions between the JDK you used and the OS. The JDKs are all native code deep-down. If 2k3 is running the code inside some special win2k emulation mode or protected area, that may be the culprit. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Win2K3 / Tomcat 4.1 and 5.0 issues
Return Receipt Your Win2K3 / Tomcat 4.1 and 5.0 issues document: wasCary Conover/Lawson received by: at:07/27/2004 03:21:46 PM EDT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Win2K3 / Tomcat 4.1 and 5.0 issues
Return Receipt Your RE: Win2K3 / Tomcat 4.1 and 5.0 issues document: wasCary Conover/Lawson received by: at:07/27/2004 03:22:47 PM EDT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Win2K3 / Tomcat 4.1 and 5.0 issues
Return Receipt Your RE: Win2K3 / Tomcat 4.1 and 5.0 issues document: wasCary Conover/Lawson received by: at:07/27/2004 03:22:58 PM EDT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.0.27 / JavaServer Faces
I cannot run a war file into the server the war file has jsf files, the message is the resource is not available I also tried to run sample dirs directly copying the entire dir, but I got always the same error Betto McRose G,
DBCP in Tomcat 5.0: must deploy some artifacts in /common/lib (classes) ?!
Hi, I am deploying a J2EE app in Tomcat 5.0.27. The application uses commons-dbcp. I've found out that if I don't put the jocl file AND the DB drivers in the $CATALINA_HOME/common/lib/ (classes) directory, the DBCP would fail. Either the config file is not found Caused by: java.sql.SQLException: Configuration file not found at org.apache.commons.dbcp.PoolingDriver.getConnectionPool (PoolingDriver.java:132) at org.apache.commons.dbcp.PoolingDriver.connect (PoolingDriver.java:170) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:193) of the drivers are not found (even if registered manually) or . Caused by: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getConnection(DriverManager.java:532) at java.sql.DriverManager.getConnection(DriverManager.java:171) at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection (DriverManagerConnectionFactory.java:48) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject (PoolableConnectionFactory.java:290) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject (GenericObjectPool.java:771) at org.apache.commons.dbcp.PoolingDriver.connect (PoolingDriver.java:175) I've tried to put those in the WEB-INF/lib/ (classes) and the shared/lib/ (classes) but none solution worked. That sounds like a ClassLoader issue to me, but according to the Tomcat 5.0 doc, I am doing the right thing. Putting them in common/lib is a workaround I can accept now, but not for long! I am at a loss then. Is that problem specific to DBCP? Any idea? Cheers, Jerome - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DBCP in Tomcat 5.0: must deploy some artifacts in /common/lib(classes) ?!
Hi, That's because Tomcat bundles DBCP. If you want to separate them completely, put your copy in WEB-INF/lib, and the bundled copy in server/lib, and nothing for DBCP in the common or shared classloader repositories. Yoav Shapira Millennium Research Informatics -Original Message- From: Jerome Lacoste [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 27, 2004 3:33 PM To: Tomcat User Subject: DBCP in Tomcat 5.0: must deploy some artifacts in /common/lib(classes) ?! Hi, I am deploying a J2EE app in Tomcat 5.0.27. The application uses commons-dbcp. I've found out that if I don't put the jocl file AND the DB drivers in the $CATALINA_HOME/common/lib/ (classes) directory, the DBCP would fail. Either the config file is not found Caused by: java.sql.SQLException: Configuration file not found at org.apache.commons.dbcp.PoolingDriver.getConnectionPool (PoolingDriver.java:132) at org.apache.commons.dbcp.PoolingDriver.connect (PoolingDriver.java:170) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:193) of the drivers are not found (even if registered manually) or . Caused by: java.sql.SQLException: No suitable driver at java.sql.DriverManager.getConnection(DriverManager.java:532) at java.sql.DriverManager.getConnection(DriverManager.java:171) at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection (DriverManagerConnectionFactory.java:48) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject (PoolableConnectionFactory.java:290) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject (GenericObjectPool.java:771) at org.apache.commons.dbcp.PoolingDriver.connect (PoolingDriver.java:175) I've tried to put those in the WEB-INF/lib/ (classes) and the shared/lib/ (classes) but none solution worked. That sounds like a ClassLoader issue to me, but according to the Tomcat 5.0 doc, I am doing the right thing. Putting them in common/lib is a workaround I can accept now, but not for long! I am at a loss then. Is that problem specific to DBCP? Any idea? Cheers, Jerome - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]