Re: (newb) Tomcat servlet mapping problem
Have u checked ur web.xml configuration? The error sounds like Tomcat facing problem finding ur servlet class file... - Original Message - From: Darren Hall [EMAIL PROTECTED] To: 'Tomcat Users List' users@tomcat.apache.org; [EMAIL PROTECTED] Sent: Monday, January 23, 2006 9:43 AM Subject: RE: (newb) Tomcat servlet mapping problem Have you tried accessing the servlet directly via tomcat yet? If going through tomcat itself gives an error then work on fixing that error first before worrying about mod_jk. -Steve O. I had not, but that was an excellent idea (kinda upset I didn't think of that one myself =P). I get the same error when trying to execute the servlet directly through Tomcat. The same information is repeated in the log files. Unfortunately, I don't have great logging (I may have it configured wrong - everything goes to localhost.log and catalina.log, nothing goes to stdout.log or stderr.log at all) so it makes fixing this problem that much more fun/challenging! -Original Message- From: Steve Ochani [mailto:[EMAIL PROTECTED] Sent: Sunday, January 22, 2006 8:37 PM To: Darren Hall; 'Tomcat Users List' Subject: RE: (newb) Tomcat servlet mapping problem Date sent: Sun, 22 Jan 2006 19:55:36 -0500 From: Darren Hall [EMAIL PROTECTED] Subject:RE: (newb) Tomcat servlet mapping problem To: 'Tomcat Users List' users@tomcat.apache.org Send reply to: Tomcat Users List users@tomcat.apache.org So, I've made some progress (I think), but now I'm getting a new error - 2006-01-22 19:21:01 StandardWrapperValve[FLCUpEvDisplayServlet]: Allocate exception for servlet FLCUpEvDisplayServlet javax.servlet.ServletException: Wrapper cannot find servlet class FLCUpEvDisplayServlet or a class it depends on So did I hit my servlet, or did the classloader fail to locate it?? Have you tried accessing the servlet directly via tomcat yet? If going through tomcat itself gives an error then work on fixing that error first before worrying about mod_jk. -Steve O. - 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: Tomcat hangs, what to do to diagnose the problem?
Hi, Sorry if i'd hijacked this thread, just wonder is the JMX package bundled together with Tomcat 4.1 as well? or it's only available to Tomcat 5.0 onwards? Thanx FooShyn Caldarale, Charles R wrote: From: Wm.A.Stafford [mailto:[EMAIL PROTECTED] Subject: Tomcat hangs, what to do to diagnose the problem? Can anyone suggest diagnostics to tell what is going on? Try the usual: 1) enable JMX monitoring (-Dcom.sun.management.jmxremote) and look at the JVM with JConsole, especially at the heap and PermGen usage 2) get a thread dump (kill -3) and see where everybody is stuck - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re-map Axis2 URL in Tomcat - Possible?
Hi All, I have tried to install and run Axis2 on Tomcat 5.0 and it was working fine. However, i notice that for me to engage my service in tomcat the URL would be something like http://IP+port/axis2/services/myService Is it possible for me to change that or uses Tomcat filter to map it (i'm thinking of a URL mapping in web.xml) to become something like this? http://IP+port/axis2/myService Any ideas or comments are welcomed. Thanx FooShyn - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re-map Axis 2 URL in Tomcat 5.0 - Possible?
Hi All, Sent this out yesterday but no feed back yet. Perhaps the timing not right, so send again. Sorry for the duplication. I have tried to install and run Axis2 on Tomcat 5.0 and it was working fine. However, i notice that for me to engage my service in tomcat the URL would be something like http://IP+port/axis2/services/myService Is it possible for me to change that or uses Tomcat filter to map it (i'm thinking of a URL mapping in web.xml) to become something like this? http://IP+port/axis2/myService Any ideas or comments are welcomed. Thanx FooShyn - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat supported platforms?
http://tomcat.apache.org/faq/ Hitesh Raghav wrote: Hi, Which platforms are supported by Tomcat? Could you please direct me right URL. Thanks, -Hitesh - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using JNDI. java:comp .... not defined?
Hmm which Tomcat version you are using? For Tomcat 4.1 AFAIK you have to put a link in your application's web.xml to the global resources in order for your application to access it. HTH FooShyn Mark Thomas wrote: Andrei Tchijov wrote: when I am trying to do ... initCtx.list( java:comp/env ); Do I need to do anything to enable JNDI? Does it make any difference that I am trying to use JNDI from Valve? Probably. I haven't looked at the code but I would not expect this to work. Test it in a JSP to see if it works there. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 5.0.28 - Randomly gets 404 error
Hi, I am using Tomcat 5.0.28 on Windows 2003. The problem I face is that, for the same servlet, it work fine most of the time, but it randomly give error of 404 - The requested resource (/bgmProv/provServlet) is not available. Below is the error message in browser: == HTTP Status 404 - /myapp/myServlet type: Status report message: /myapp/myServlet description: The requested resource (/myapp/myServlet) is not available. Apache Tomcat/5.0.28 Connection closed by foreign host. == I had disabled context reload but problem still occurs. Anyone know others possible reason for this problem? and any solution? Thank you. FooShyn - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat servlet load handling
Hi, I face problems when Tomcat is facing heavy load for a particular servlet. I got a servlet which serves a large amount of data to users. When a particular number of users is accessing this servlet, others failed to reach it (receive nothing until the connection timed out). If they access other servlets on the same Tomcat there won't be any problem. My Questions are: Is it that the Tomcat have any settings to allow how many users to be able to access a servlets at the same time? or is it that my Servlets need to follow certain coding pattern? What would prevent the users from accessing the Tomcat's servlet when other's running it as well? I'm running on Tomcat 4.1 with J2SDK 1.4.2 Any opinions and feedbacks are welcomed. Thanx Regards, FooShyn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache and Tomcat
Hi, I'd tried connecting Apache 2.0 with Tomcat 4.1 for a few times and no problem occur so far. I'm using jk2 package though. Steps involve: 1) Copy the apache mod_jk module into the modules folder. 2) Change the httpd.conf file and add in the module in 'LoadModule' section 3) Paste the workers2.properties file into the Apache conf folder 4) Ammend the properties file with the webapps that i need to access from Apache 5) Stop Tomcat, restart Apache and start Tomcat Hope this helps FooShyn - Original Message - From: Gaël Lams [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, March 01, 2006 3:26 PM Subject: Re: Apache and Tomcat Hi, I'm trying to make Apache 2.0.55 connect to Tomcat 5, using mod_jk. I'm getting cannot find worker, and my config files seems to be ok. Is there other way to make Apache and Tomcat talk? I read that it's recommended to use mod_proxy_ajp, but it's only available on Apache 2.2, and there is no stable build of Apache 2.2 for Windows (my server is windows 2003). I've no experience of using Tomcat Apache on windows but mod_jk is for sure the way to go. i.e the connector to be used. Are you sure there is no error in your configuration files, maybe a misspelling in the workers.properties? Could you post your configuration files? Regards, Gaël - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat 5.X dies after some time
Hi, It seems that there're other application that are using 8005 as port on ur server as well. fooshyn - Original Message - From: Devireddy, Nagendra Reddy (STSD) [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Friday, March 03, 2006 5:40 PM Subject: Tomcat 5.X dies after some time Hi, Tomcat 5.X is dieing after some time throwing the following error .. Can some one please help me .. INFO: Server startup in 22840 ms StandardServer.await: create[8005]: java.net.BindException: Address already in use java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331) at java.net.ServerSocket.bind(ServerSocket.java:318) at java.net.ServerSocket.init(ServerSocket.java:185) at org.apache.catalina.core.StandardServer.await(StandardServer.java:496) at org.apache.catalina.startup.Catalina.await(Catalina.java:619) at org.apache.catalina.startup.Catalina.start(Catalina.java:579) 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:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) Mar 3, 2006 3:01:20 PM org.apache.coyote.http11.Http11Protocol pause INFO: Pausing Coyote HTTP/1.1 on http-7510 Thanks and Regards, Nagendra Reddy. D Hewlett Packard ISO (STSD) Bangalore. Ph : 080-22052254 +hp = Everything is Possible - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Creating context and datasources using Tomcat Manager and Administrator
Hi guys, Lately i'd been trying to deploy my apps remotely using the Tomcat Manager and Administrator. I found that if : 1) i upload my war file first, then go to the Administrator to create my datasource, the Administrator would give me an error page when i select my context. The error thrown is the 'driverClassName' not found error. 2) i create my context and datasource first using Administrator, then i upload my war file using Manager, i won't be able to start my application. It seems that the server.xml is not updated or read correctly when i try to install the war file. Is it a bug or is there something wrong with my installation process? I'm using Tomcat 4.1 with JDK1.4.2 Any ideas and opinions or bullets are welcome :p Thanx FooShyn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: error in tomcat
Maybe u could try the this DOCTYPE tag instead !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; hope this helps F.S. - Original Message - From: David Delbecq [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, March 13, 2006 4:48 PM Subject: Re: error in tomcat line 43 contains /servlet It corresponds to the following section: *servlet* *servlet-name*default*/servlet-name* *servlet-class* org.apache.catalina.servlets.DefaultServlet */servlet-class* *init-param* *param-name*debug*/param-name* *param-value*0*/param-value* */init-param* *init-param* *param-name*listings*/param-name* *param-value*true*/param-value* */init-param* *load-on-startup*1*/load-on-startup* */servlet* There is no other default section in the web.xml. The whole web.xml is as follow: *web-app* xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4** *display-name*Welcome to Tomcat*/display-name* *description* Welcome to Tomcat */description* /!-- JSPC servlet mappings start --/ *servlet* *servlet-name*default*/servlet-name* *servlet-class* org.apache.catalina.servlets.DefaultServlet */servlet-class* *init-param* *param-name*debug*/param-name* *param-value*0*/param-value* */init-param* *init-param* *param-name*listings*/param-name* *param-value*true*/param-value* */init-param* *load-on-startup*1*/load-on-startup* */servlet* *servlet* *servlet-name*org.apache.jsp.index_jsp*/servlet-name* *servlet-class*org.apache.jsp.index_jsp*/servlet-class* */servlet* *servlet-mapping* *servlet-name*default*/servlet-name* *url-pattern*/*/url-pattern* */servlet-mapping* *servlet-mapping* *servlet-name*org.apache.jsp.index_jsp*/servlet-name* *url-pattern*/index.jsp*/url-pattern* */servlet-mapping* /!-- JSPC servlet mappings end --/ */web-app* Any idea why this webapp fail? Regards? Alan Chaney a écrit : One place to start might be in your web.xml file. About half way down you have a message saying Mar 10, 2006 2:03:42 PM org.apache.catalina.startup.ContextConfig applicationWebConfig SEVERE: Parse error in application web.xml java.lang.IllegalArgumentException: addChild: Child name 'default' is not unique at o And at the end you have at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) Mar 10, 2006 2:03:42 PM org.apache.catalina.startup.ContextConfig applicationWebConfig SEVERE: Occurred at line 43 column 15 Mar 10, 2006 2:03:42 PM org.apache.catalina.startup.ContextConfig start SEVERE: Marking this application unavailable due to previous error(s) Does 'line 43 column 15' refer to something relevant in web.xml? Regards Alan - 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]
Reposting: Creating context and datasources using Tomcat Manager and Administrator
Hi, Reposting my question in case i missed out the crowded session(sent it out on friday night and get no response :p).. Thanx Hi guys, Lately i'd been trying to deploy my apps remotely using the Tomcat Manager and Administrator. I found that if : 1) i upload my war file first, then go to the Administrator to create my datasource, the Administrator would give me an error page when i select my context. The error thrown is the 'driverClassName' not found error. 2) i create my context and datasource first using Administrator, then i upload my war file using Manager, i won't be able to start my application. It seems that the server.xml is not updated or read correctly when i try to install the war file. Is it a bug or is there something wrong with my installation process? I'm using Tomcat 4.1 with JDK1.4.2 Any ideas and opinions or critics are welcome :p Thanx FooShyn - 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: How to configure in Tomcat?
It shouldn't be a problem for application to get system propertiestried that before and it worked fine for me... Is ur path a full path ? i mean is it something like C:\.. or is it just started with a slash like \..? If it's started with a \... u need to put the specific file and the folder(s) that contains it in the Tomcat folder, otherwise it should be working fine... my 2 cents, and hope it helps. FooShyn - Original Message - From: Xi Chen [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Thursday, March 16, 2006 10:51 AM Subject: How to configure in Tomcat? Hi, there. I have a question in my deployment under Tomcat 5.5. In one of the java classes I wrote, I have a line of code like the following: String propertiesFilePath = System.getEnv(MY_CONFIG_FILE_PATH); // Then I start load the contents of the file into java Properties. I set up the environment variable (MY_CONFIG_FILE_PATH) correctly on the machine, and the class function all right if I test it via a command line. However, if I test the class under Tomcat (after deploy the class to the appropriate path under Tomact) on the same machine, it complains that it cannot find the path. Given that result, I speculate that Tomcat has no way to know the environment variables. Am I wrong? Is there anyway to configure Tomact (e.g. setting a config variable like MY_CONFIG_FILE_PATH under Tomcat), so that all the deployed knows the value of the MY_CONFIG_FILE_PATH. All I want to achieve is that: Put all the needed SQL queries in a properties file and let java classes retrieve the queries from the properties file (in stead of using hard-coded queries in the source code). It seems to me to deploy the properties file under the Tomcat is a bit challenging. Any guidance will be highly appreciated! -- Don Chen - 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: Session Monitoring tool?
Hmm correct me if i'm wrong, but isn't there's a 'Session' Column in the manager list page where the active session of each web application would be displayed? Thanx. Regards, FooShyn - Original Message - From: Kristian Rink [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, January 17, 2007 4:27 PM Subject: Session Monitoring tool? Folks; does anyone know of any tomcat tool to watch HTTP sessions which are active in any deployed web application (and, best case, data assigned to them, aside the session ID itself)? I thought /manager or /admin to provide functionality like this but so far I failed to find it... Thanks in advance and bye, Kristian -- Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/ jab: [EMAIL PROTECTED] * icq: 48874445 * fon: ++49 176 2447 2771 One dreaming alone, it will be only a dream; many dreaming together is the beginning of a new reality. (Hundertwasser) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Connection Pool configuration
Hi, I'm not sure bout Tomcat 4.0, but i think in 4.1 u could do it through the admin page. Just create a Datasource under ur apps context should do the trick. Thanx. Regards, FooShyn - Original Message - From: Propes, Barry L [GCG-NAOT] [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Friday, February 09, 2007 12:01 AM Subject: Connection Pool configuration Hello, I'm dealing with Tomcat 4.0.1 and -4.1.3. I badly need to get connection pooling configured, but am not quite sure how to do it. Here's a block from my server.xml file. Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=oracle.jdbc.OracleDriver connectionURL=jdbc:oracle:thin:@169.xxx.xx.xxx:1521:SID connectionName=user_name connectionPassword=user_pwd userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name / This goes to the users table created for password sessions. Do I configure anything here for Connection Pooling? Do I add maxActive 8 minIdle 0 , etc.? How would I alter or configure this? Any advice is welcomed. Thanks, Barry No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.17.30/674 - Release Date: 2/7/2007 3:33 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple JAVA_HOME variables
Hi All, I'm facing a situation here whereby a JRE 1.5 is pre-installed on a server, and a JAVA_HOME variables is thus created and pointed to the JRE. However i'll need to have it point to my JDK in order for me to use Tomcat. Any tricks or settings that i can use to make this possible? I can't change the JAVA_HOME value though :( My settings: OS: Windows Server 2003 Tomcat: 4.1.31 JDK: 1.4.2_12 Thanx. Regards, FooShyn
Re: Multiple JAVA_HOME variables
Hi, I did just that but my Tomcat doesn't start completely. When i try to access the jsp page there'll be error thrown out... Thanx. Regards, FooShyn - Original Message - From: Peter Crowther [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, February 12, 2007 6:41 PM Subject: RE: Multiple JAVA_HOME variables From: Foo Shyn [mailto:[EMAIL PROTECTED] I'm facing a situation here whereby a JRE 1.5 is pre-installed on a server, and a JAVA_HOME variables is thus created and pointed to the JRE. However i'll need to have it point to my JDK in order for me to use Tomcat. Any tricks or settings that i can use to make this possible? I can't change the JAVA_HOME value though :( My settings: OS: Windows Server 2003 Tomcat: 4.1.31 JDK: 1.4.2_12 A cheap solution: Use the zip distribution of Java - i.e. don't run it as a service. Tweak the startup.bat script to use your preferred JAVA_HOME. If you need the service to start as the machine restarts, use SRVANY to register the .bat as a service. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.441 / Virus Database: 268.17.31/676 - Release Date: 2/8/2007 3:04 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple JAVA_HOME variables
Hi , After re-installed my Tomcat with everything (no custom settings) and using the suggestion by Peter it seems fine now. Hopefully there won't be any problem with it Thanx man. Regards, FooShyn - Original Message - From: Foo Shyn [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, February 12, 2007 6:45 PM Subject: Re: Multiple JAVA_HOME variables Hi, I did just that but my Tomcat doesn't start completely. When i try to access the jsp page there'll be error thrown out... Thanx. Regards, FooShyn - Original Message - From: Peter Crowther [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Monday, February 12, 2007 6:41 PM Subject: RE: Multiple JAVA_HOME variables From: Foo Shyn [mailto:[EMAIL PROTECTED] I'm facing a situation here whereby a JRE 1.5 is pre-installed on a server, and a JAVA_HOME variables is thus created and pointed to the JRE. However i'll need to have it point to my JDK in order for me to use Tomcat. Any tricks or settings that i can use to make this possible? I can't change the JAVA_HOME value though :( My settings: OS: Windows Server 2003 Tomcat: 4.1.31 JDK: 1.4.2_12 A cheap solution: Use the zip distribution of Java - i.e. don't run it as a service. Tweak the startup.bat script to use your preferred JAVA_HOME. If you need the service to start as the machine restarts, use SRVANY to register the .bat as a service. - Peter - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.441 / Virus Database: 268.17.31/676 - Release Date: 2/8/2007 3:04 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.441 / Virus Database: 268.17.31/676 - Release Date: 2/8/2007 3:04 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Share context classes: Possible?
Hi guys, This may sound dumb. Just wanna double check whether Tomcat provide sharing function where an application under a context could use a class that sit inside another context. I understand that for classes that need to be use by all application i'll need to jar it and put inside common\lib, but i'm wondering whether i could share out the classes in one of the context as a general application. Thanx. Regards, FooShyn
404 Error when trying to connect Tomcat Manager
Hi guys, Was facing a problem when trying to connect to Tomcat Manager. I manage to access to the index.jsp page but when i click on the Manager link it gives me a 404 error. I'd check the manager web.xml and application and they look fine to me. Is there any cause that will make this happen?? I'm using Tomcat 4.1 Thanx. Regards, FooShyn
Re: 404 Error when trying to connect Tomcat Manager
Hi, i was using web at port 8080. But anyway, i found out the root cause. Some guy at the live server side there deleted the manager folder under the server folder. After replacing the folder and the xml file in it. everything runs smooth again. Thanx for the ideas and replies! Regards, FooShyn - Original Message - From: Propes, Barry L [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Friday, July 21, 2006 6:20 AM Subject: RE: 404 Error when trying to connect Tomcat Manager through the web at port 8080 you're accessing this? Or just in your directory on a desktop or server? -Original Message- From: Foo Shyn [mailto:[EMAIL PROTECTED] Sent: Thursday, July 20, 2006 2:06 AM To: Tomcat Users List Subject: 404 Error when trying to connect Tomcat Manager Hi guys, Was facing a problem when trying to connect to Tomcat Manager. I manage to access to the index.jsp page but when i click on the Manager link it gives me a 404 error. I'd check the manager web.xml and application and they look fine to me. Is there any cause that will make this happen?? I'm using Tomcat 4.1 Thanx. Regards, FooShyn - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat 4.1 Admin Context Error.
Hi guys, I'm using Tomcat 4.1 currently. I'm facing problem to create a datasource for a context that is created by uploading a .war file. It prints out the following error: javax.servlet.ServletException: Exception retrieving attribute 'driverClassName'I think this should be fixed in Tomcat 5, but unfortunately upgrading Tomcat is not an option for me now. Any workarounds that i can use?Many ThanxThanx. Regards, FooShyn
Re: Log4j problems in Tomcat 5.x
Are ur tomcat started manually or by services? if it's started manually then ur path is correct, otherwise u'll need to put the properties file into the system folder. HTH Thanx. Regards, FooShyn - Original Message - From: sputnik [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Wednesday, March 21, 2007 5:27 PM Subject: Re: Log4j problems in Tomcat 5.x Gaurav Kushwaha wrote: I am trying to use log4j with Tomcat. I created a log4j.properties file and dumped it in WEB-INF/classes. I believe its still not being picked up by Tomcat. Any ideas ? Regards, Gaurav Singh Kushwahahttp://www.chakpak.com/MovieDetailAction-Dhoom-2-.do?movieId=18183 Ph: +91-9880110695 Bangalore, India. won\'t it help to put the properties file into tomcat_home/conf path, as long as you\'re owning the server? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.15/728 - Release Date: 3/20/2007 8:07 AM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache and Tomcat bridging - Servlet enabled?
Hi, This question suddenly struck me when i'm trying to solve my server problem. Here goes: Server settings: Apache 2 as front, Tomcat 4.1 as back, J2SDK 1.4.2 Let say that i'd configure that Apache so that whenever a request for www.abc.com will be redirected to the Tomcat's A context which contain a servlet TestServlet. The web.xml is there. When i access the www.abc.com/TestServlet , the Apache throws me a 404 error (not Tomcat), which means that the Apache failed to redirect the request to A folder. But when i configure my servlet path as /TestServlet.jsp, and i use the path www.abc.com/TestServlet.jsp (not a jsp page!) to access the servlet, i manage to do so. Is this some settings problem on Apache? or my Tomcat problem? Thanx. Regards, FooShyn
Re: Is it possible to have more than one submit button in a JSP file?
Thanx. Regards, FooShyn - Original Message - From: Teh Noranis Mohd Aris [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, March 29, 2007 12:21 PM Subject: Re: Is it possible to have more than one submit button in a JSP file? Dear All, Maybe my question is not that clear. What I mean, is that there are 2 buttons that read data from the server and write data to the server using one textarea. You could try using javascript to control your onClick function of your buttons. Pass in different params to your servlet to differentiate the action (i.e. pass in a param =read when you read from the file and a param write when you wanna write to the file) so that your servlet could perform the relevant action. If anyone have the code or come across the code, please e-mail it to me. Thank you. Sorry, can only show you the door, you're the one that gotta walk through it :) TEH Hassan Schroeder [EMAIL PROTECTED] wrote: On 3/28/07, Teh Noranis Mohd Aris wrote: I would like my system to have several submit buttons This is a basic HTML question, nothing to do with JSP. Yes, a form in an HTML document can have multiple submit buttons; reading the appropriate recommendation is, uh, recommended :-) HTH, -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.20/737 - Release Date: 3/28/2007 4:23 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DB2 DataSource.
Hi, I'd been using connection pooling setting in Tomcat for MySQL, MSSQL and Derby(or Cloudscape) so i guess DB2 could be setup just as same. Make sure your driver jar file includes the Driver which is packaged as you had declared in the XML. And place it in the Tomcat common lib folder (In Tomcat 4.1's case, Tomcat 4.1\common\lib). Thanx. Regards, FooShyn - Original Message - From: Pulkit Singhal [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Cc: Martin Gainty [EMAIL PROTECTED] Sent: Friday, April 13, 2007 1:05 PM Subject: Re: DB2 DataSource. The following is copy/pasted from http://jtds.sourceforge.net/faq.html#noSuitableDriver Why do I get a java.sql.SQLException: No suitable driver when trying to get a connection? The No suitable driver exception is thrown by the DriverManager when none of the registered Driver implementations recognizes the supplied URL. This means that you either did not register jTDS with the DriverManager first (by calling Class.forName(net.sourceforge.jtds.jdbc.Driver)) or you mistyped the URL (e.g. jbdc:jtds:... instead of jdbc:jtds:...). A common mistake is to append a semicolon (;) to the end of the URL (e.g. jdbc:jtds:sqlserver://server/db;TDS=7.0; is wrong!). For more information about URL format and the properties that may be passed to jTDS have a look at the jTDS URL formathttp://jtds.sourceforge.net/faq.html#urlFormat . On 4/12/07, Fargusson.Alan [EMAIL PROTECTED] wrote: Thanks. Unfortunately I did try this example before. It doesn't work. I get an exception, and along with the stack dump I display I get Caused by: java.sql.SQLException: No suitable driver. I am hoping that someone has a working example that they actually tested. -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, April 12, 2007 3:19 PM To: Tomcat Users List Subject: Re: DB2 DataSource. Alan- http://www.itjungle.com/fhg/fhg051204-story01.html Viel Gluck/Buena Suerte Martin-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Fargusson.Alan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, April 12, 2007 6:01 PM Subject: DB2 DataSource. Can someone point me to documentation on setting up a DataSource to DB2? I tried to use the examples for Oracle and MySql, but I have not been able to get it to work. I am able to access DB2 using the DriverManager. - To start a new topic, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 269.3.0/758 - Release Date: 4/12/2007 11:52 AM - To start a new topic, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JDBC
Not both of them. It's context.xml if u're using Tomcat 5.0 or above, or server.xml if u're using Tomcat 4.1 or below, which is located in the conf folder in Tomcat root path. check this link out : http://forums.oracle.com/forums/thread.jspa?messageID=1489914 Hope that helps. FooShyn Mohammed Zabin wrote: Thank you buddy, I have another confusing question for me, I have two web.xml files, one in conf/web.xml and one in my application under WEB-INF, When configuring connection pool, which one shall i use? or shall i put the configuration parameters in both of them?? Thank you On 5/22/07, ben short [EMAIL PROTECTED] wrote: Have a look here.. http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html On 5/22/07, Mohammed Zabin [EMAIL PROTECTED] wrote: Hi All Am new on this, i want to know how to configure Database Connection Pooling to use Oracle Database?? anyhelp will be appreciated. Jotnarta - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.7.6/814 - Release Date: 5/21/2007 2:01 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JDBC
The jsp doesn't import the class for Context and Initial Context. Put them in as how u inport the Datasource would do. HTH FooShyn Mohammed Zabin wrote: Thank you Foo, I but the following in the context.xml: *Resource name=Name auth=Container type=oracle.jdbc.pool.OracleDataSource factory=oracle.jdbc.pool.OracleDataSourceFactory user=hr password=hr driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@localhost:1521:orcldb maxActive=20 maxIdle=10 maxwait=-1/* ** and I have this jsp code: *%@ page import=javax.sql.DataSource %* *% Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/myoracledb); Connection conn = ds.getConnection(); out.println( Got the connection ); %* but, i got the following error: *org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 4 in the jsp file: /jsp/testDBCP.jsp Context cannot be resolved to a type 1: %@ page import=javax.sql.DataSource % 2: 3: % 4: Context initContext = new InitialContext(); 5: Context envContext = (Context)initContext.lookup(java:/comp/env); 6: DataSource ds = (DataSource)envContext.lookup(jdbc/myoracledb); 7: Connection conn = ds.getConnection(); An error occurred at line: 4 in the jsp file: /jsp/testDBCP.jsp InitialContext cannot be resolved to a type 1: %@ page import=javax.sql.DataSource % * On 5/22/07, Foo Shyn [EMAIL PROTECTED] wrote: Not both of them. It's context.xml if u're using Tomcat 5.0 or above, or server.xml if u're using Tomcat 4.1 or below, which is located in the conf folder in Tomcat root path. check this link out : http://forums.oracle.com/forums/thread.jspa?messageID=1489914 Hope that helps. FooShyn Mohammed Zabin wrote: Thank you buddy, I have another confusing question for me, I have two web.xml files, one in conf/web.xml and one in my application under WEB-INF, When configuring connection pool, which one shall i use? or shall i put the configuration parameters in both of them?? Thank you On 5/22/07, ben short [EMAIL PROTECTED] wrote: Have a look here.. http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html On 5/22/07, Mohammed Zabin [EMAIL PROTECTED] wrote: Hi All Am new on this, i want to know how to configure Database Connection Pooling to use Oracle Database?? anyhelp will be appreciated. Jotnarta - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.7.6/814 - Release Date: 5/21/2007 2:01 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.7.6/814 - Release Date: 5/21/2007 2:01 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JDBC
Check out ur resource name, it is different from the one u use to get ur connection pooling. The resource name must be the same as your lookup name. HTH FooShyn Mohammed Zabin wrote: Thank you Foo for your patience with me, I did imported all the needed classes, but i got the following exception: *exception * *org.apache.jasper.JasperException: An exception occurred processing JSP page /jsp/testDBCP.jsp at line 7 4: Context initContext = new InitialContext(); 5: Context envContext = (Context)initContext.lookup(java:/comp/env); 6: DataSource ds = (DataSource)envContext.lookup(jdbc/myoracledb); 7: Connection conn = ds.getConnection(); 8: 9: out.println( The Connection Gotted Fine ); 10: % Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:515) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:408) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803)* ** *root cause * *javax.servlet.ServletException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:855) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:784) org.apache.jsp.jsp.testDBCP_jsp._jspService(testDBCP_jsp.java:73) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803)* ** *root cause* org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780) org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) org.apache.jsp.jsp.testDBCP_jsp._jspService(testDBCP_jsp.java:62) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) *root cause* java.lang.NullPointerException sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507) sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476) sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307) java.sql.DriverManager.getDriver(DriverManager.java:253) org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773) org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) org.apache.jsp.jsp.testDBCP_jsp._jspService(testDBCP_jsp.java:62) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) On 5/22/07, Foo Shyn [EMAIL PROTECTED] wrote: The jsp doesn't import the class for Context and Initial Context. Put them in as how u inport the Datasource would do. HTH FooShyn Mohammed Zabin wrote: Thank you Foo, I but the following in the context.xml: *Resource name=Name auth=Container type=oracle.jdbc.pool.OracleDataSource factory=oracle.jdbc.pool.OracleDataSourceFactory user=hr password=hr driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc:oracle:thin:@localhost:1521:orcldb maxActive=20 maxIdle=10 maxwait=-1/* ** and I have this jsp code: *%@ page import=javax.sql.DataSource %* *% Context initContext = new InitialContext(); Context envContext = (Context)initContext.lookup(java:/comp/env); DataSource ds = (DataSource)envContext.lookup(jdbc/myoracledb); Connection conn = ds.getConnection(); out.println( Got the connection ); %* but, i got the following error: *org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 4 in the jsp file: /jsp/testDBCP.jsp Context cannot be resolved to a type 1: %@ page import
Re: Tomcat Native library on java.library.path ?
Hmm i haven't start using Tomcat 6, but i guess that the java.library.path might actually refers to your JDK? Which version of JDK are you using? troy giunipero wrote: Hello, I recently installed Apache Tomcat 6.0.10 and have been getting the following message upon startup: INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: On Windows XP, I have the following paths added to the PATH environment variable: C:\apache-tomcat-6.0.10\bin;C:\apache-tomcat-6.0.10\lib;%PATH%; I'm a bit stumped: Surely the Native library is the apache-tomcat-6.0.10\lib folder, and surely the java.library.path refers to PATH. So what library needs to be added where? I posted a more in depth question regarding this on jGuru here: http://www.jguru.com/forums/view.jsp?EID=1337110 I've also noticed several other beginners out there with the same or a similar question. Please somebody help. If there's any information I haven't provided that might clarify an explanation, please let me know and I will respond asap. Kind regards, troy - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using servlet and mysql
Hi, would be ur database port, xxx will be ur database name HTH FooShyn Teh Noranis Mohd Aris wrote: Hi, I would like to access mysql database from a servlet but I'm not sure what to initialize for the String connectionURL marked as jdbc:mysql://localhost:/xxx in the program below. I got this program from the internet which I would like to run in my computer. Can anyone please explain to me what the parameters and xxx should be? Yours Sincerely, TEH Following is part of the program: ... public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ response.setContentType(text/html); PrintWriter pw = response.getWriter(); String connectionURL = jdbc:mysql://localhost:/xxx; Connection connection=null; try{ String username = request.getParameter(username); String password = request.getParameter(password); pw.println(username); pw.println(password); Class.forName(com.mysql.jdbc.Driver).newInstance(); connection = DriverManager.getConnection(connectionURL, root, root); PreparedStatement pst = connection.prepareStatement (insert into login_table values(?,?)); ... - Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 5/27/2007 3:05 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using servlet and mysql
Hi, Is your login name and password correct? It shows 'root' and the password is 'root' in the code you posted there. - I put the database name, teh in directory catalina_home\webapps\ROOT\ hmm i can't really get what you meant here. Thanx. FooShyn Teh Noranis Mohd Aris wrote: Dear All, I already put mysql database driver (jar file) in directory catalina_home\common\lib and changed 8080 to 3306 but I got the error java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused: connect. What should be the matter? I put the database name, teh in directory catalina_home\webapps\ROOT\. Is this correct? In which directory should I actually put the database name? Please help. I'm running out of time! Thank you so much. Yours Sincerely, TEH Foo Shyn [EMAIL PROTECTED] wrote: Hi, You'll need to get the MySQL database driver and put them in the {catalina_home}\common\lib folder. The driver can be easily obtained through MySQL site. BTW, as far as i know, the default port for MySQL database is 3306, so you might wanna change that. 8080 is for Tomcat, not the database. Seems like not many new users of connection pooling went through Apache's documents. Please don't waste their effort, take a look at it before you start to attempt anything. HTH, FooShyn Teh Noranis Mohd Aris wrote: Thank you so much for the reply. I've put jdbc:mysql://localhost:8080/teh but I got the error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver. I'm very new to using mysql database and servlet. Can you please explain to me how to create the database name and its fields? Should I install any driver? How can it be done? Please help. Thank you. Yours Sincerely, TEH Foo Shyn wrote: Hi, would be ur database port, xxx will be ur database name HTH FooShyn Teh Noranis Mohd Aris wrote: Hi, I would like to access mysql database from a servlet but I'm not sure what to initialize for the String connectionURL marked as jdbc:mysql://localhost:/xxx in the program below. I got this program from the internet which I would like to run in my computer. Can anyone please explain to me what the parameters and xxx should be? Yours Sincerely, TEH Following is part of the program: ... public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ response.setContentType(text/html); PrintWriter pw = response.getWriter(); String connectionURL = jdbc:mysql://localhost:/xxx; Connection connection=null; try{ String username = request.getParameter(username); String password = request.getParameter(password); pw.println(username); pw.println(password); Class.forName(com.mysql.jdbc.Driver).newInstance(); connection = DriverManager.getConnection(connectionURL, root, root); PreparedStatement pst = connection.prepareStatement (insert into login_table values(?,?)); ... - Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 5/27/2007 3:05 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Shape Yahoo! in your own image. Join our Network Research Panel today! No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 5/27/2007 3:05 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos more. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 5/27/2007 3:05 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using servlet and mysql
Hi, This is getting more confusing, you mentioned earlier that you're using MySQL but now it is a Microsoft Works Database. Hmmm perhaps i'm missing something? Anyway, if the database you're using is something like an Access database, you'll just need to use the correct driver and point the URL to your database file. Can't help you here coz i never tried that before (Access is like from another world to me). Perhaps you should try other mailing list, and not Tomcat's. HTH FooShyn Teh Noranis Mohd Aris wrote: Yes, the login name and password are correct. I created the database name, teh, with field username and password, using Microsoft Works Database and saved it in directory catalina_home\webapps\ROOT\. I'm not sure whether it is the correct directory to put the database. However, in the program there was a statement .(insert into login_table values(?,?)); I do not understand the usage of login_table. Does it mean that I should create login_table in database teh? Really need to get this working today. Please help. Thank you. TEH Foo Shyn [EMAIL PROTECTED] wrote: Hi, Is your login name and password correct? It shows 'root' and the password is 'root' in the code you posted there. - I put the database name, teh in directory catalina_home\webapps\ROOT\ hmm i can't really get what you meant here. Thanx. FooShyn Teh Noranis Mohd Aris wrote: Dear All, I already put mysql database driver (jar file) in directory catalina_home\common\lib and changed 8080 to 3306 but I got the error java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused: connect. What should be the matter? I put the database name, teh in directory catalina_home\webapps\ROOT\. Is this correct? In which directory should I actually put the database name? Please help. I'm running out of time! Thank you so much. Yours Sincerely, TEH Foo Shyn wrote: Hi, You'll need to get the MySQL database driver and put them in the {catalina_home}\common\lib folder. The driver can be easily obtained through MySQL site. BTW, as far as i know, the default port for MySQL database is 3306, so you might wanna change that. 8080 is for Tomcat, not the database. Seems like not many new users of connection pooling went through Apache's documents. Please don't waste their effort, take a look at it before you start to attempt anything. HTH, FooShyn Teh Noranis Mohd Aris wrote: Thank you so much for the reply. I've put jdbc:mysql://localhost:8080/teh but I got the error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver. I'm very new to using mysql database and servlet. Can you please explain to me how to create the database name and its fields? Should I install any driver? How can it be done? Please help. Thank you. Yours Sincerely, TEH Foo Shyn wrote: Hi, would be ur database port, xxx will be ur database name HTH FooShyn Teh Noranis Mohd Aris wrote: Hi, I would like to access mysql database from a servlet but I'm not sure what to initialize for the String connectionURL marked as jdbc:mysql://localhost:/xxx in the program below. I got this program from the internet which I would like to run in my computer. Can anyone please explain to me what the parameters and xxx should be? Yours Sincerely, TEH Following is part of the program: ... public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ response.setContentType(text/html); PrintWriter pw = response.getWriter(); String connectionURL = jdbc:mysql://localhost:/xxx; Connection connection=null; try{ String username = request.getParameter(username); String password = request.getParameter(password); pw.println(username); pw.println(password); Class.forName(com.mysql.jdbc.Driver).newInstance(); connection = DriverManager.getConnection(connectionURL, root, root); PreparedStatement pst = connection.prepareStatement (insert into login_table values(?,?)); ... - Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 5/27/2007 3:05 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Shape Yahoo! in your own image. Join our Network Research Panel today! No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.472 / Virus Database: 269.8.0/821 - Release Date: 5/27/2007 3:05 PM
Re: Using servlet and mysql
Hi, In short, to get a MySQL server up, try the following: 1) Install an instance of MySQL 2) Install the client software (you can get them from the MySQL web site too, like MySQL Administrator etc or you can try the MySQL Front for older version of MySQL) 3) Create a database using the client software. 4) Put the MySQL drivers in the common\lib folder(if you want it to be global) or in your WEB-INF\lib folder (if you want it to be local) 5) Run the Tomcat, try your code Not sure whether this is good enough, perhaps someone with better explanation skill can explain it better than me. Remember google is always your best friend. :) HTH, FooShyn Teh Noranis Mohd Aris wrote: I'm very new to this. This is the first time I'm using mysql and servlet. I might be doing a lot of mistakes. I realized that I should not use Microsoft Works Database. How can I actually create the database name, table and its field using mysql? In which directory should I put the database? Please explain. Hoping for a reply. I really hope this simple program can run today. Thank you. TEH Foo Shyn [EMAIL PROTECTED] wrote: Hi, This is getting more confusing, you mentioned earlier that you're using MySQL but now it is a Microsoft Works Database. Hmmm perhaps i'm missing something? Anyway, if the database you're using is something like an Access database, you'll just need to use the correct driver and point the URL to your database file. Can't help you here coz i never tried that before (Access is like from another world to me). Perhaps you should try other mailing list, and not Tomcat's. HTH FooShyn Teh Noranis Mohd Aris wrote: Yes, the login name and password are correct. I created the database name, teh, with field username and password, using Microsoft Works Database and saved it in directory catalina_home\webapps\ROOT\. I'm not sure whether it is the correct directory to put the database. However, in the program there was a statement .(insert into login_table values(?,?)); I do not understand the usage of login_table. Does it mean that I should create login_table in database teh? Really need to get this working today. Please help. Thank you. TEH Foo Shyn wrote: Hi, Is your login name and password correct? It shows 'root' and the password is 'root' in the code you posted there. - I put the database name, teh in directory catalina_home\webapps\ROOT\ hmm i can't really get what you meant here. Thanx. FooShyn Teh Noranis Mohd Aris wrote: Dear All, I already put mysql database driver (jar file) in directory catalina_home\common\lib and changed 8080 to 3306 but I got the error java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection refused: connect. What should be the matter? I put the database name, teh in directory catalina_home\webapps\ROOT\. Is this correct? In which directory should I actually put the database name? Please help. I'm running out of time! Thank you so much. Yours Sincerely, TEH Foo Shyn wrote: Hi, You'll need to get the MySQL database driver and put them in the {catalina_home}\common\lib folder. The driver can be easily obtained through MySQL site. BTW, as far as i know, the default port for MySQL database is 3306, so you might wanna change that. 8080 is for Tomcat, not the database. Seems like not many new users of connection pooling went through Apache's documents. Please don't waste their effort, take a look at it before you start to attempt anything. HTH, FooShyn Teh Noranis Mohd Aris wrote: Thank you so much for the reply. I've put jdbc:mysql://localhost:8080/teh but I got the error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver. I'm very new to using mysql database and servlet. Can you please explain to me how to create the database name and its fields? Should I install any driver? How can it be done? Please help. Thank you. Yours Sincerely, TEH Foo Shyn wrote: Hi, would be ur database port, xxx will be ur database name HTH FooShyn Teh Noranis Mohd Aris wrote: Hi, I would like to access mysql database from a servlet but I'm not sure what to initialize for the String connectionURL marked as jdbc:mysql://localhost:/xxx in the program below. I got this program from the internet which I would like to run in my computer. Can anyone please explain to me what the parameters and xxx should be? Yours Sincerely, TEH Following is part of the program: ... public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ response.setContentType(text/html); PrintWriter pw = response.getWriter(); String connectionURL = jdbc:mysql://localhost:/xxx; Connection connection=null; try{ String username = request.getParameter(username); String password = request.getParameter(password); pw.println(username); pw.println(password); Class.forName(com.mysql.jdbc.Driver).newInstance
Re: Track down which app has memory leak.
Hmm i'm not sure whether it can track memory leak or not, since i'm not a frequent user of it, but you can try JMeter from Apache: http://jakarta.apache.org/jmeter/ Its testing and monitoring module helps me a lot though... HTH FooShyn Jacob Rhoden wrote: David Delbecq wrote: Java comes with a profiling tools available that dump information on a text file upon exist. Look at sun web site for docs about profiling. You jun then have to set the appropriate parameters to your CATALINA_OPTS Hi, Thanks for your reply however I cant find anything useful on the Sun site. Only a few things that reveal you have to type a kill -QUITE tomcat_proc, however that doesnt seem to do anything (maybe it is putting a heap file somewhere I dont know about). Best Regards, Jacob - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Track down which app has memory leak.
IC, Thanx for clearing that out :) FooShyn David Delbecq wrote: It tracks performances under workload, not memory leaks. To track and locate memory leak, you need profiling tools or be able to load/unload several time all modules separately. En l'instant précis du 04/06/07 11:49, Foo Shyn s'exprimait en ces termes: Hmm i'm not sure whether it can track memory leak or not, since i'm not a frequent user of it, but you can try JMeter from Apache: http://jakarta.apache.org/jmeter/ Its testing and monitoring module helps me a lot though... HTH FooShyn Jacob Rhoden wrote: David Delbecq wrote: Java comes with a profiling tools available that dump information on a text file upon exist. Look at sun web site for docs about profiling. You jun then have to set the appropriate parameters to your CATALINA_OPTS Hi, Thanks for your reply however I cant find anything useful on the Sun site. Only a few things that reveal you have to type a kill -QUITE tomcat_proc, however that doesnt seem to do anything (maybe it is putting a heap file somewhere I dont know about). Best Regards, Jacob - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot create JDBC driver of class '' for connect URL 'null'
Hi, Did you add in the ResourceLink to your application? You'll need that if you configure your connection pooling under the GlobalNamingResources tag. Check out the configuration doc from Tomcat below: http://tomcat.apache.org/tomcat-5.0-doc/config/globalresources.html Additionally, you can configure the connection pooling under your application context too. HTH, FooShyn Pranav wrote: Hi Martin, Referring to the link you asked me to check, I checked the same and updated the server.xml under *GlobalNamingResources*, hope i guess that is correct.With all this done, I am getting the same error: Jun 6, 2007 9:36:31 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet Faces Servlet threw exception com.sun.rave.web.ui.appbase.ApplicationException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:559) at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:276) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:198) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: javax.faces.FacesException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at com.sun.rave.faces.data.CachedRowSetDataModel.executeIfNecessary(CachedRowSetDataModel.java:374) at com.sun.rave.faces.data.CachedRowSetDataModel.isRowAvailable(CachedRowSetDataModel.java:133) at com.sun.rave.faces.data.CachedRowSetDataModel.setRowIndex(CachedRowSetDataModel.java:286) at com.sun.rave.faces.data.CachedRowSetDataModel.setWrappedData(CachedRowSetDataModel.java:323) at com.sun.rave.faces.data.CachedRowSetDataModel.setCachedRowSet(CachedRowSetDataModel.java:348) at acctapps.AdminAcct._init(AdminAcct.java:50) at acctapps.AdminAcct.init(AdminAcct.java:464) at com.sun.rave.web.ui.appbase.servlet.LifecycleListener.fireInit(LifecycleListener.java:555) at com.sun.rave.web.ui.appbase.servlet.LifecycleListener.attributeAdded(LifecycleListener.java:405) at org.apache.catalina.connector.Request.setAttribute(Request.java:1398) at org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:500) at javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:283) at javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:283) at com.sun.faces.context.RequestMap.put(ExternalContextImpl.java:622) at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:279) at