How to trace email received.
Hello, In my application, I need a component, which checks emails. If an email is the one in responsing my application action, I will process it (write some record in database). If you have example for it, please forward me instruction. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Which connector to use, and how to build
Please help Computer: UNIX Sparc 2.9 Apache 2.0.54 Tomcat 5.0.28 Please tell me what connector to use. I see the jk2 is in history. The last version it supports is 2.0.43. I downloaded the jakarta-tomcat-connectors-1.2.10-src.tar, it is difficult to find a clear instruction for the build process. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What version of Tomcat, Apache to Install
Hi, I need to install Apache, tomcat, and all related software on a UNIX computer: MACHTYPE=sparc-sun-solaris2.9 What version of Tomcat, and Apache is the best match? I try to install Apache 2.0.53. When I compile it, there is only one .so file in the modules filder. It may be the wrong version. There is no c compiler found. Should I download gcc-2.8.1 or gcc-3.3.2 for the compiler? Thanks. Daxin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Application Data sharing -- store large object?
I means if it is good to put a large Object in the ServletContext. This Object contains a lot of complicated data structure, the data is dymanically used. In all the text books, when they tell the usage of ServletContext object, always use simple string, int, or simple bean. I heard before that it is not good to put too much data in ServletContext. If it is true, how it will hurt the system or the data stored in ServletContext if put tool much data in it. So I can decide how to do according to my reality. I donnot consern the amount of memory. Please forward instruction. Thanks -Original Message- From: Jerome Jar [mailto:[EMAIL PROTECTED] Sent: Sunday, April 10, 2005 8:28 PM To: Tomcat Users List Subject: Re: Application Data sharing -- store large object? Cofused about your question. A Singleton object??? On Apr 11, 2005 1:22 AM, Daxin Zuo [EMAIL PROTECTED] wrote: In my program, an object that contains a large amount of data (complicated data strustures) is used in many pages. When I start doing it, I heard that it is better to not store large object in Application. So I let the program create a new one when ever this object is needed. Now I like to question if it is good to put this object in Application. Thanks. - 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: Application Data sharing -- store large object?
Stefan, Thank you for your reply. It is very helpful. I may use a CACHE as you mentioned. I like to ask another question. 1) The object I am going to cache is large, and dynamically changed according to users actions. 2) Currently our program runs with Tomcat/Apache, it has to support other java application servers -- Weblogic, ..., and different platforms -- Unix, Linux, Windows. Do you have instruction for the selection among the various CACHE plug-in? Thanks again. -Original Message- From: Stefan Frank [mailto:[EMAIL PROTECTED] Sent: Monday, April 11, 2005 12:04 AM To: 'Tomcat Users List' Subject: RE: Application Data sharing -- store large object? You should maybe take a look into the various caching-libraries available (ehcache, swarmcache, jboss-treecache etc.) - these libraries deal with cacheing, which is a little different from what the application/session-objects offer, as application and session have to be absolutely reliable. If you store something in it, you can safely expect to find it again. Therefore, this objects cannot deal with things like running out of memory - they cannot simply throw out objects, when things get too crowded. On the other hand, Cacheing-Systems always have policies to deal with such situations(eg. Swarm-cache dynamically adapts to your usage-patterns) and can throw out old or un-needed objects, whenever it gets too crowded - therefore, you cannot always expect an object that you put into the cache to be still present after a while - so you have to deal with refetching it, when you have nop cache-hit. You may want to look into O\R-Mapping Frameworks like hibernate: they already have these caches built in and take care of re-fetching objects, when they have expired from the cache. From a pure memory point of view, there is no difference. If you absolutely need your complex object 100% of the time, it makes no difference, if you keep it in the application or if you put it in an in-memory cache. Hope this helps stf -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Sonntag, 10. April 2005 19:23 To: Tomcat Users List Subject: Application Data sharing -- store large object? In my program, an object that contains a large amount of data (complicated data strustures) is used in many pages. When I start doing it, I heard that it is better to not store large object in Application. So I let the program create a new one when ever this object is needed. Now I like to question if it is good to put this object in Application. Thanks. - 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]
Application Data sharing -- store large object?
In my program, an object that contains a large amount of data (complicated data strustures) is used in many pages. When I start doing it, I heard that it is better to not store large object in Application. So I let the program create a new one when ever this object is needed. Now I like to question if it is good to put this object in Application. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat ask me for User/password?
Usually I use Tomcat5.0.19 via Apache 2. Today , I try to use tomcat only: http://localhost:8080 to do a test, it asks me user name and password. I did not know the user name and password. Both Apache and Tomcat are on my computer and inslled by myself. I like to know which configuration causes it. OP is windows 2000. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat ask me for User/password?
Thnaks for the reply, I tried all the user/password. I still unable to login. In the Prompt window, it asks for (daxin is my computer's name) Enter username and password for XDB at http://daxin:8080 Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 09, 2005 2:55 PM To: tomcat-user@jakarta.apache.org Subject: RE: Tomcat ask me for User/password? In your $CATALINA_HOME/conf there is a file called tomcat-users.xml. Edit the file and create an admin role and user. For example: ?xml version='1.0' encoding='utf-8'? tomcat-users role rolename=tomcat/ role rolename=role1/ role rolename=standard/ role rolename=manager/ role rolename=admin/ user username=tomcat password=tomcat roles=tomcat/ user username=both password=tomcat roles=tomcat,role1/ user username=role1 password=tomcat roles=role1/ user username=admin password=tomcat roles=standard,manager,admin/ /tomcat-users Restart tomcat and login. Kevin Griesmar -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 09, 2005 4:07 PM To: Tomcat Users List Subject: Tomcat ask me for User/password? Usually I use Tomcat5.0.19 via Apache 2. Today , I try to use tomcat only: http://localhost:8080 to do a test, it asks me user name and password. I did not know the user name and password. Both Apache and Tomcat are on my computer and inslled by myself. I like to know which configuration causes it. OP is windows 2000. Thanks. - 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]
Connection reset by peer: socket write error
Hi, When a page is loading -- it is a page with large ammount of data from database, I clicked a button. I see the exception on the monitor window: Connection reset by peer: socket write error. The detal error is attached. This message might be harmless. I think it is because the response has not finished the task. Is there a way to know the response is finished and the socket is idle? Anybody has some suggestion? Any setting in tomcat? Thanks. Mar 2, 2005 5:09:11 PM org.apache.jk.server.JkCoyoteHandler action SEVERE: Error in action code java.net.SocketException: Connection reset by peer: 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.jk.common.ChannelSocket.send(ChannelSocket.java:489) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:697) at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:487) at org.apache.coyote.Response.action(Response.java:226) at org.apache.coyote.Response.finish(Response.java:348) at org.apache.coyote.tomcat5.OutputBuffer.close(OutputBuffer.java:328) at org.apache.coyote.tomcat5.CoyoteResponse.finishResponse(CoyoteResponse.java: 497) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:339) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:415) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:716) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:650) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:829) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:688) at java.lang.Thread.run(Thread.java:534) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can we know when the Response is finished? or other solution.
Thanks for reply. I do not use custom tag. In my code, I disabled the button actions at the beginning of the page. At the very end of the page, I enable the button actions. But the Exception still occurs. My error occur only when the source code recompiled for hand test. Thanks. -Original Message- From: Chris Hyzer [mailto:[EMAIL PROTECTED] Sent: Thursday, March 03, 2005 9:45 AM To: tomcat-user@jakarta.apache.org Subject: Re: Can we know when the Response is finished? or other solution. If you use custom tags, then when the custom tag that generates /html is done, then you are done. We use this approach, and also return SKIP_PAGE from the tag so you know it is done. Maybe there is an easier way though. :) Can we know when the Response is finished? or other solution. 122561 by: Daxin Zuo - 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]
Can we know when the Response is finished? or other solution.
Hi, In one of my page, when the page is loading -- it is a page with large ammount of data from database, I clicked a button. I see the exception on the monitor window: Connection reset by peer: socket write error. The detal error is attached. This message might be harmless. I think it is because the response has not finished the task. Is there a way to know the response is finished and the socket is idle? Anybody has some suggestion? Any setting in tomcat? Thanks. Mar 2, 2005 5:09:11 PM org.apache.jk.server.JkCoyoteHandler action SEVERE: Error in action code java.net.SocketException: Connection reset by peer: 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.jk.common.ChannelSocket.send(ChannelSocket.java:489) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:697) at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:487) at org.apache.coyote.Response.action(Response.java:226) at org.apache.coyote.Response.finish(Response.java:348) at org.apache.coyote.tomcat5.OutputBuffer.close(OutputBuffer.java:328) at org.apache.coyote.tomcat5.CoyoteResponse.finishResponse(CoyoteResponse.java: 497) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:339) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:415) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:716) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:650) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:829) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:688) at java.lang.Thread.run(Thread.java:534) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to print to web page instead of catalina.out
response.setContentType(text/html); PrintWriter out = response.getWriter(); out.println(to web); -Original Message- From: Jin Wu [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 23, 2005 10:39 AM To: Tomcat Users List; Antony Paul Subject: Re: how to print to web page instead of catalina.out I tried out.print(). The complation failed. The error is: cannot resolve symbol symbol : variable out Thanks Jin Antony Paul [EMAIL PROTECTED] wrote: Why not use out.print() or you are trying to do something else ?. rgds Antony Paul On Tue, 22 Feb 2005 20:26:41 -0800 (PST), Jin Wu wrote: Hi, It seems that System.out.printlin(...) prints to catalina.out. Is there a way I can print to web page? Thanks, James __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sending email with zip file attach problem
Hi, Please help. Any sugestion is welcome. In my web page, users send email with attachment, so upload is related. I can provide the file in either a byte[] array, or in an inputstream. I try to send the attachement with JavaMail(I know there is email api in Tomcat-Common. But I have no a good example). --- my code in a function in a servlet --- DiskFileUpload upload = new DiskFileUpload(); List items = upload.parseRequest(request); Iterator itr = items.iterator(); item = (FileItem) itr.next(); . //- now it is a attachement. InputStream istrm= item.getInputStream(); ... MimeBodyPart messageBodyPart = new MimeBodyPart(); messageBodyPart.setDisposition(Part.INLINE); messageBodyPart.setContent(strBodyText, text/plain); MimeMultipart multipart = new MimeMultipart(); multipart.addBodyPart(messageBodyPart); messageBodyPart = new MimeBodyPart(istrm); messageBodyPart.setDisposition(messageBodyPart.ATTACHMENT); messageBodyPart.addHeader(Content-Type,strMime); //strMime is correct messageBodyPart.setFileName(fileName); multipart.addBodyPart(messageBodyPart); NO metter what file it is, the attachement received is ATT00211.txt. I the file is a text file, the contents are correct. if the file is a small zip file, it adds the lines as following in attached file: Content-Type: application/zip; name=idmeta.zip Content-Disposition: attachment; filename=idmeta.zip Content-Transfer-Encoding: 7bit What's wrong? Please forward instruction. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sending email with zip file attach problem
Thanks for the reply. So I have to output the file. If, in jave, there is no way to upload the file and attach the file directly, it seems strange. -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Monday, January 24, 2005 11:10 AM To: Tomcat Users List Subject: Re: Sending email with zip file attach problem It is an example of sending bulk mails with attachment. You have to write the uploaded file into a temporary directory. See the attachments. I hope the example could be useful. -Caroline --- Daxin Zuo [EMAIL PROTECTED] wrote: Hi, Please help. Any sugestion is welcome. In my web page, users send email with attachment, so upload is related. I can provide the file in either a byte[] array, or in an inputstream. I try to send the attachement with JavaMail(I know there is email api in Tomcat-Common. But I have no a good example). --- my code in a function in a servlet --- DiskFileUpload upload = new DiskFileUpload(); List items = upload.parseRequest(request); Iterator itr = items.iterator(); item = (FileItem) itr.next(); . //- now it is a attachement. InputStream istrm= item.getInputStream(); ... MimeBodyPart messageBodyPart = new MimeBodyPart(); messageBodyPart.setDisposition(Part.INLINE); messageBodyPart.setContent(strBodyText, text/plain); MimeMultipart multipart = new MimeMultipart(); multipart.addBodyPart(messageBodyPart); messageBodyPart = new MimeBodyPart(istrm); messageBodyPart.setDisposition(messageBodyPart.ATTACHMENT); messageBodyPart.addHeader(Content-Type,strMime); //strMime is correct messageBodyPart.setFileName(fileName); multipart.addBodyPart(messageBodyPart); NO metter what file it is, the attachement received is ATT00211.txt. I the file is a text file, the contents are correct. if the file is a small zip file, it adds the lines as following in attached file: Content-Type: application/zip; name=idmeta.zip Content-Disposition: attachment; filename=idmeta.zip Content-Transfer-Encoding: 7bit What's wrong? Please forward instruction. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Authentication problem in Sending email from servlet. (tomcate 5)
Sorry, no problem. The account password is wrong. -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Thursday, January 13, 2005 3:44 PM To: Tomcat Users List Subject: Authentication problem in Sending email from servlet. (tomcate 5) Hi, In my web page, user sends email with attachment, so upload is related. I load the file in a byte array, and try to send with JavaMail(I know there is Mail api in Tomcat-Common. But I have no a good example). The related code is copied at the end. The email serve needs no user-name and password, because the C++ program sends email without authentication. if I set prop.put(mail.smtp.auth, false); Exception: SendEmail Error: javax.mail.AuthenticationFailedException If I set to Password and username to , or set the user name to the From-Email address: SendEmail Error: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Authentication required Please tell me what's wrong. Thanks. import javax.mail.*; import javax.mail.internet.*; import javax.activation.*; import org.apache.commons.net.smtp.*; import org.apache.commons.net.io.Util; Properties prop = System.getProperties(); prop.put(mail.smtp.host, szServer); prop.put(mail.smtp.from, strFrom); prop.put(mail.transport.protocol, SMTP); final String user = tool.isnull2(szAccount)==? strFrom:// From email Address tool.isnull2(szAccount);// Account of the user. final String pwd = tool.isnull2(szPassword); Authenticator auth = null; prop.put(mail.smtp.auth, true); auth = new Authenticator (){ public PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(user, pwd); } }; Session ses1=Session.getInstance(prop,auth); MimeMessage msg = new MimeMessage(ses1); msg.setFrom(new InternetAddress(strFrom)); String[] Recipts = strRecipts.split(,); for( int k=0; k Recipts.length; k++) msg.addRecipient(Message.RecipientType.TO, new InternetAddress(Recipts[k])); if (!tool.isnull(strCcRecipts)){ Recipts = strCcRecipts.split(,); for (int k = 0; k Recipts.length; k++) msg.addRecipient(Message.RecipientType.CC, new InternetAddress(Recipts[k])); } msg.setSubject(strSubject); msg.setHeader(X-Mailer, Java Mail); MimeBodyPart messageBodyPart = new MimeBodyPart(); messageBodyPart.setDisposition(Part.INLINE); messageBodyPart.setContent(strBodyText, text/plain); MimeMultipart multipart = new MimeMultipart(); multipart.addBodyPart(messageBodyPart); if (AttacheFileSize 0) { // one attache file only. messageBodyPart = new MimeBodyPart(); messageBodyPart.setDataHandler(new DataHandler( ByteArrayOfFile, // byte[] it holds the file contents myFileMimeType));//String, mime type of the file messageBodyPart.setFileName(astrAttach); multipart.addBodyPart(messageBodyPart); } msg.setContent(multipart); msg.setSentDate(new Date()); Transport.send(msg); - 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]
Authentication problem in Sending email from servlet. (tomcate 5)
Hi, In my web page, user sends email with attachment, so upload is related. I load the file in a byte array, and try to send with JavaMail(I know there is Mail api in Tomcat-Common. But I have no a good example). The related code is copied at the end. The email serve needs no user-name and password, because the C++ program sends email without authentication. if I set prop.put(mail.smtp.auth, false); Exception: SendEmail Error: javax.mail.AuthenticationFailedException If I set to Password and username to , or set the user name to the From-Email address: SendEmail Error: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Authentication required Please tell me what's wrong. Thanks. import javax.mail.*; import javax.mail.internet.*; import javax.activation.*; import org.apache.commons.net.smtp.*; import org.apache.commons.net.io.Util; Properties prop = System.getProperties(); prop.put(mail.smtp.host, szServer); prop.put(mail.smtp.from, strFrom); prop.put(mail.transport.protocol, SMTP); final String user = tool.isnull2(szAccount)==? strFrom:// From email Address tool.isnull2(szAccount);// Account of the user. final String pwd = tool.isnull2(szPassword); Authenticator auth = null; prop.put(mail.smtp.auth, true); auth = new Authenticator (){ public PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(user, pwd); } }; Session ses1=Session.getInstance(prop,auth); MimeMessage msg = new MimeMessage(ses1); msg.setFrom(new InternetAddress(strFrom)); String[] Recipts = strRecipts.split(,); for( int k=0; k Recipts.length; k++) msg.addRecipient(Message.RecipientType.TO, new InternetAddress(Recipts[k])); if (!tool.isnull(strCcRecipts)){ Recipts = strCcRecipts.split(,); for (int k = 0; k Recipts.length; k++) msg.addRecipient(Message.RecipientType.CC, new InternetAddress(Recipts[k])); } msg.setSubject(strSubject); msg.setHeader(X-Mailer, Java Mail); MimeBodyPart messageBodyPart = new MimeBodyPart(); messageBodyPart.setDisposition(Part.INLINE); messageBodyPart.setContent(strBodyText, text/plain); MimeMultipart multipart = new MimeMultipart(); multipart.addBodyPart(messageBodyPart); if (AttacheFileSize 0) { // one attache file only. messageBodyPart = new MimeBodyPart(); messageBodyPart.setDataHandler(new DataHandler( ByteArrayOfFile, // byte[] it holds the file contents myFileMimeType));//String, mime type of the file messageBodyPart.setFileName(astrAttach); multipart.addBodyPart(messageBodyPart); } msg.setContent(multipart); msg.setSentDate(new Date()); Transport.send(msg); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat and apache in Oracle9.2.0.1
After install Oracle9.2.0.1, Apache and Tomcat are installed. What are the versions of the TOMCAT and the apache in this version of Oracle? Do you know the location of the document where oracle describe its http server? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat and apache in Oracle9.2.0.1
Can anybody forward more specific information? This Oracle site definitely has the information. But the doc sea is too wide. Thanks -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 16, 2004 4:14 PM To: Tomcat Users List Subject: Re: Tomcat and apache in Oracle9.2.0.1 How about http://www.oracle.com/support/index.html ? -Tim Daxin Zuo wrote: After install Oracle9.2.0.1, Apache and Tomcat are installed. What are the versions of the TOMCAT and the apache in this version of Oracle? Do you know the location of the document where oracle describe its http server? - 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]
Ask for the best way to handle an exception
In a JSP page, there are buttons. clicking one will launch an action which may read/write socket. In my program, all actions work well. But exception caused in the circumstance: I clicked a button. Before that action finished (in the middle of read/write socket), immediately, I clicked another button. I get an error, attached at the end of my email. Please forward your instruction. Thanks. Nov 10, 2004 11:47:47 AM org.apache.jk.server.JkCoyoteHandler action SEVERE: Error in action code java.net.SocketException: Connection reset by peer: 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.jk.common.ChannelSocket.send(ChannelSocket.java:489) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:697) at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:487) at org.apache.coyote.Response.action(Response.java:226) at org.apache.coyote.Response.finish(Response.java:348) at org.apache.coyote.tomcat5.OutputBuffer.close(OutputBuffer.java:328) at org.apache.coyote.tomcat5.CoyoteResponse.finishResponse(CoyoteResponse.java: 497) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:209) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:339) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:415) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:716) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:650) at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:829) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:688) at java.lang.Thread.run(Thread.java:534) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
question on Creating war file
I am going to pack the application into a war file. I like to use ant. I like to ask: 1) a good document giving instruction. In Tomcat/wabapps/mybase, my app has: /WEB-INF/classes, WEB-INF/lib and I have image folder in Apache/htdocs/images. May I need to move the images to /WEB-INF? 2) Where to put the war file. I read a page, telling that user need to unzip the war file in to webapps. really? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: question on Creating war file
Sorry, it is much easier than I thought. I did it. -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Monday, November 08, 2004 2:52 PM To: Tomcat Users List Subject: question on Creating war file I am going to pack the application into a war file. I like to use ant. I like to ask: 1) a good document giving instruction. In Tomcat/wabapps/mybase, my app has: /WEB-INF/classes, WEB-INF/lib and I have image folder in Apache/htdocs/images. May I need to move the images to /WEB-INF? 2) Where to put the war file. I read a page, telling that user need to unzip the war file in to webapps. really? Thanks. - 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 Display a byte array (contents of a MS DOC fie, Excel, ..) in web browser
Thank for you reply. My problem is solved. One of the reasons is that the server who sends the file with damaged format. thank you again. -Original Message- From: Benson Margulies [mailto:[EMAIL PROTECTED] Sent: Thursday, October 28, 2004 6:16 PM To: Tomcat Users List Subject: RE: How to Display a byte array (contents of a MS DOC fie, Excel, ..) in web browser What do you want to see? Hex digits? -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Thursday, October 28, 2004 9:12 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: How to Display a byte array (contents of a MS DOC fie, Excel, ..) in web browser I receive a byte array from a remote server, and the servlet will display it on the browser. The byte array contains a MS DOC file. If I simply convert it to a String, the contents will be meaningless. Please forward instruction. - 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: Upload MS DOC or Image file errors.
I changed to store the file into a byte array to instead a string. it seems to me that convert a byte array of the contents of a MS DOC file to a string cause error. The byte array is passed to another server via socket. the file is stored at the destination correctly. I use FileOutputStream to see if the buffer stores a file correctly. it is not a necessary part of my application. Thanks. -Original Message- From: Steffen Heil [mailto:[EMAIL PROTECTED] Sent: Thursday, October 28, 2004 2:47 PM To: 'Tomcat Users List' Subject: AW: Upload MS DOC or Image file errors. Thanks. It works. Fine. But what? Switching to FileOutputStream or just using item.write? (They should both work, though the second seems to make more sence. Just asking for interest.) Regards, Steffen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Upload MS DOC or Image file errors.
Hi, I am use the File Upload. I need to read the whole file contents in a String buffer. If the file is text, it works. But if the file is in other format, such as MS Doc, I can load the file, and the file size is the same comparing the original file, but the format is changed, and I cannot open it. The related code in a servlet is as following: . int nSize=0; // now !item.isFormField() java.io.InputStream fstrm = item.getInputStream(); int rnum=0; buf = new byte[262144]; // the doc file size I am testing is 13 buyes. while (rnum=0){ // I have to read all the contents rnum = fstrm.read(buf, (int)nSize, 100); if (rnum 0) nSize += rnum; } fstrm.close(); if ( nSize0) { pBuffer = new String(buf, 0, (int)nSize); // I like to test if it read correctly: FileWriter fileOut = new FileWriter(C:/DocAttachment/strFileName.doc); fileOut.write(pBuffer); fileOut.flush(); fileOut.close(); .. } I use Apache2 and Tomcat5. Please forward instruction. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Upload MS DOC or Image file errors.
Thanks. It works. -Original Message- From: Steffen Heil [mailto:[EMAIL PROTECTED] Sent: Thursday, October 28, 2004 10:49 AM To: 'Tomcat Users List' Subject: AW: Upload MS DOC or Image file errors. Hi Hi, I am use the File Upload. I need to read the whole file contents in a String buffer. Why into a String buffer? This is propably a charset encoding problem. Do NOT read it into a stringbuffer. See FileWriter documentation: FileWriter is meant for writing streams of characters. For writing streams of raw bytes, consider using a FileOutputStream. So change your method: . int nSize=0; // now !item.isFormField() java.io.InputStream fstrm = item.getInputStream(); int rnum=0; buf = new byte[262144]; // the doc file size I am testing is 13 buyes. while (rnum=0){ // I have to read all the contents rnum = fstrm.read(buf, (int)nSize, 100); if (rnum 0) nSize += rnum; } fstrm.close(); if ( nSize0) { // I like to test if it read correctly: FileOutputStream fileOut = new FileOutputStream(C:/DocAttachment/strFileName.doc); fileOut.write(buf, 0, nSize); fileOut.flush(); fileOut.close(); .. } Beside that: You know that you could simply do: item.write( new File( C:/DocAttachment/strFileName.doc ) ); Regards, Steffen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to Display a byte array (contents of a MS DOC fie, Excel, ..) in web browser
I receive a byte array from a remote server, and the servlet will display it on the browser. The byte array contains a MS DOC file. If I simply convert it to a String, the contents will be meaningless. Please forward instruction. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: IO error: request.getReader(); readLine(); on Netscape
Thank all of you: Yoav, Ben, and Larry. I am using the Commons Fileupload. Thank you again. -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: Monday, October 18, 2004 1:19 PM To: [EMAIL PROTECTED] Subject: RE: IO error: request.getReader(); readLine(); on Netscape http://tinyurl.com/6llx2 [EMAIL PROTECTED] 10/18/04 2:12 PM Yes, it is on the server. Our application by default is Tomcat. But if the customer insists in different application server, we need to support customer's server. So I like to ask if the Jakarta Commons Fileupload is a standard component? If not, does other application server has similar component? Like database connection pool, all application servers have it. So I may be able to wrap it. Thanks -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, October 18, 2004 12:33 PM To: Tomcat Users List Subject: RE: IO error: request.getReader(); readLine(); on Netscape Hi, This code is on the server, I'd image. My advice: don't re-invent the wheel, use Jakarta Commons Fileupload. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Monday, October 18, 2004 3:23 PM To: Tomcat Users List Subject: Re: IO error: request.getReader(); readLine(); on Netscape Where is this code? On the client? the server? On Mon, 2004-10-18 at 15:11, Daxin Zuo wrote: Hi, I have code like: BufferedReader breader = request.getReader(); String rdata = breader.readLine(); while (rdata != null) { .. } It run's well with IE. On Netscape7.1, I get java.io.IOException My purpose is to upload a file. Could you please give me instruction? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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]
IO error: request.getReader(); readLine(); on Netscape
Hi, I have code like: BufferedReader breader = request.getReader(); String rdata = breader.readLine(); while (rdata != null) { .. } It run's well with IE. On Netscape7.1, I get java.io.IOException My purpose is to upload a file. Could you please give me instruction? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: IO error: request.getReader(); readLine(); on Netscape
Yes, it is on the server. Our application by default is Tomcat. But if the customer insists in different application server, we need to support customer's server. So I like to ask if the Jakarta Commons Fileupload is a standard component? If not, does other application server has similar component? Like database connection pool, all application servers have it. So I may be able to wrap it. Thanks -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Monday, October 18, 2004 12:33 PM To: Tomcat Users List Subject: RE: IO error: request.getReader(); readLine(); on Netscape Hi, This code is on the server, I'd image. My advice: don't re-invent the wheel, use Jakarta Commons Fileupload. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: Monday, October 18, 2004 3:23 PM To: Tomcat Users List Subject: Re: IO error: request.getReader(); readLine(); on Netscape Where is this code? On the client? the server? On Mon, 2004-10-18 at 15:11, Daxin Zuo wrote: Hi, I have code like: BufferedReader breader = request.getReader(); String rdata = breader.readLine(); while (rdata != null) { .. } It run's well with IE. On Netscape7.1, I get java.io.IOException My purpose is to upload a file. Could you please give me instruction? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JK2 configuration
Hi, MY system is UNIX (Sparc) tomcat 5.0.28, Apache2.0.43. when I start the apache, I get the error in the apache error_log file. [Sun Oct 10 15:12:24 2004] [error] jk2_init() Can't find child 6351 in scoreboard [Sun Oct 10 15:12:24 2004] [error] mod_jk child init 1 -2 [Sun Oct 10 15:12:24 2004] [error] jk2_init() Can't find child 6352 in scoreboard [Sun Oct 10 15:12:24 2004] [error] mod_jk child init 1 -2 [Sun Oct 10 15:12:24 2004] [error] jk2_init() Can't find child 6353 in scoreboard [Sun Oct 10 15:12:24 2004] [error] mod_jk child init 1 -2 [Sun Oct 10 15:12:24 2004] [error] jk2_init() Can't find child 6359 in scoreboard [Sun Oct 10 15:12:24 2004] [error] mod_jk child init 1 -2 [Sun Oct 10 15:12:24 2004] [error] jk2_init() Can't find child 6354 in scoreboard [Sun Oct 10 15:12:24 2004] [error] mod_jk child init 1 -2 my jk2.properties is empty, all are commented. in my worker2.properties, I have: [shm] info=Scoreboard. Requried for reconfiguration and status with multiprocess servers. file=/usr/local/apache2/tomcat5028/logs/jk2.shm # Defines a load balancer named lb. Use even if you only have one machine. [lb:lb] # Example socket channel, override port and host. [channel.socket:63.200.135.253:8009] port=8009 host=63.200.135.253 # define the worker [ajp13:63.200.135.253:8009] channel=channel.socket:63.200.135.253:8009 group=lb In my system, the JSP and Servelt run well, besides the similar error in error_log. Please help. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
PrintWriter is different on Tomcat and Apache?
I have servlets using code like: StringBuffer sb= new StringBuffer(); AJavaClass.aMethod(sb); PrintWriter out = response.getWriter(); out.println(bf.toString()) When the servlet is run from Tomcat, it is fine, but if I run it on Apache, the whole source code is written on the browser, instead display the web page with qui. What is wrong? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: PrintWriter is different on Tomcat and Apache?
I Solved it. Just response.setContentType(text/html); -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Friday, October 08, 2004 3:01 PM To: Tomcat Users List Subject: PrintWriter is different on Tomcat and Apache? I have servlets using code like: StringBuffer sb= new StringBuffer(); AJavaClass.aMethod(sb); PrintWriter out = response.getWriter(); out.println(bf.toString()) When the servlet is run from Tomcat, it is fine, but if I run it on Apache, the whole source code is written on the browser, instead display the web page with qui. What is wrong? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to make Apache direct Servlet to Tomcat
Thank you very much. Your instruction solved my problem. Thank you again. -Original Message- From: Lee, Paul NYC [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 05, 2004 7:22 AM To: 'Tomcat Users List' Subject: RE: How to make Apache direct Servlet to Tomcat In your configuration, apache has no way of knowing that /ServletTest needs to be forwarded to Tomcat. Try adding something like: [uri:/ServletTest] group=lb And see if that works. If it does, you can then figure out a more efficient way for apache to redirect servlets. So you don't have to map every single servlet. -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Monday, October 04, 2004 3:32 PM To: Tomcat Users List Subject: RE: How to make Apache direct Servlet to Tomcat Bellow is my Apache2/conf/wrokers2.property. I also wonder if I need to add an listner like Listener className=org.apache.ajp.tomcat5.config.ApacheConfig / in the httpd.conf file wrokers2.property: [shm] info=Scoreboard. Requried for reconfiguration and status with multiprocess servers. file=anon # Defines a load balancer named lb. Use even if you only have one machine. [lb:lb] Bellow is the # Example socket channel, override port and host. [channel.socket:MyComputerIP:8009] port=8009 host=MyComputerIP # define the worker [ajp13:MyComputerIP:8009] channel=channel.socket:MyComputerIP:8009 group=lb # Map the Tomcat examples webapp to the Web server uri space [uri:/examples/*] group=lb [uri:/www/*] group=lb [uri:/jdbcRowset/*] group=lb [status:] info=Status worker, displays runtime information [uri:/jkstatus/*] info=The Tomcat /jkstatus handler group=status: Thank you. -Original Message- From: Lee, Paul NYC [mailto:[EMAIL PROTECTED] Sent: Friday, October 01, 2004 6:22 PM To: 'Tomcat Users List' Subject: RE: How to make Apache direct Servlet to Tomcat I can't see your attachments. Just paste the relevant parts in the body of the email. -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Friday, October 01, 2004 5:15 PM To: Tomcat Users List Subject: RE: How to make Apache direct Servlet to Tomcat Thank you for your attention. The Apache2/conf/wrokers2.property is attached. The Tomcat/conf/jk2.property is empty, all lines are commented. in the httpd.conf I added: LoadModule jk2_module modules/mod_jk2-2.0.43.so the .so files are in apache2/modules Thanks -Original Message- From: Lee, Paul NYC [mailto:[EMAIL PROTECTED] Sent: Friday, October 01, 2004 1:23 PM To: 'Tomcat Users List' Subject: RE: How to make Apache direct Servlet to Tomcat Hi, It should be done the same way you redirected jsp requests to tomcat. It needs to be mapped in your jk (or jk2) properties file. Post the relevant parts of your properties file if you're not sure why it doesn't work. -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Friday, October 01, 2004 1:38 PM To: Tomcat Users List Subject: How to make Apache direct Servlet to Tomcat On my Apache 2.0.43 + Tomcat5.0.28 on UNIX sparc, I can run the same JSP files from both Apache and Tomcat, and run servlets on Tomcat, but I cannot run Servlet from Apache. I register the servlet in tomcat/webapps/www/WEB-INF/web.xml: servlet servlet-nameServletTest/servlet-name servlet-classServletTest/servlet-class /servlet servlet-mapping servlet-nameServletTest/servlet-name url-pattern/ServletTest/url-pattern /servlet-mapping /www is the DocBase. The error message on the screen is: /ServletTest was not found on this server. From the Apache error log, I see Apache looked for the file in Apache htdocs folder, instead pass the request to Tomcat. When I start Tomcat I get some errors. The are probably not related to the problem above. the errors are: 1) in catalina.out INFO: Installing web application at context path /balancer from URL file:/usr/local/apache2/jakarta-tomcat-5.0.28/webapps/balancer Oct 1, 2004 10:14:50 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Oct 1, 2004 10:14:50 AM org.apache.catalina.core.StandardContext start SEVERE: Context startup failed due to previous errors . 2) in localhost_log.2004-10-01.txt 2004-10-01 10:14:50 StandardContext[/balancer]Exception starting filter BalancerFilter java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester at org.apache.webapp.balancer.RulesParser.createDigester(RulesParser.java:65) ... Please help me with the servlet problem. - 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
RE: How to make Apache direct Servlet to Tomcat
Bellow is my Apache2/conf/wrokers2.property. I also wonder if I need to add an listner like Listener className=org.apache.ajp.tomcat5.config.ApacheConfig / in the httpd.conf file wrokers2.property: [shm] info=Scoreboard. Requried for reconfiguration and status with multiprocess servers. file=anon # Defines a load balancer named lb. Use even if you only have one machine. [lb:lb] Bellow is the # Example socket channel, override port and host. [channel.socket:MyComputerIP:8009] port=8009 host=MyComputerIP # define the worker [ajp13:MyComputerIP:8009] channel=channel.socket:MyComputerIP:8009 group=lb # Map the Tomcat examples webapp to the Web server uri space [uri:/examples/*] group=lb [uri:/www/*] group=lb [uri:/jdbcRowset/*] group=lb [status:] info=Status worker, displays runtime information [uri:/jkstatus/*] info=The Tomcat /jkstatus handler group=status: Thank you. -Original Message- From: Lee, Paul NYC [mailto:[EMAIL PROTECTED] Sent: Friday, October 01, 2004 6:22 PM To: 'Tomcat Users List' Subject: RE: How to make Apache direct Servlet to Tomcat I can't see your attachments. Just paste the relevant parts in the body of the email. -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Friday, October 01, 2004 5:15 PM To: Tomcat Users List Subject: RE: How to make Apache direct Servlet to Tomcat Thank you for your attention. The Apache2/conf/wrokers2.property is attached. The Tomcat/conf/jk2.property is empty, all lines are commented. in the httpd.conf I added: LoadModule jk2_module modules/mod_jk2-2.0.43.so the .so files are in apache2/modules Thanks -Original Message- From: Lee, Paul NYC [mailto:[EMAIL PROTECTED] Sent: Friday, October 01, 2004 1:23 PM To: 'Tomcat Users List' Subject: RE: How to make Apache direct Servlet to Tomcat Hi, It should be done the same way you redirected jsp requests to tomcat. It needs to be mapped in your jk (or jk2) properties file. Post the relevant parts of your properties file if you're not sure why it doesn't work. -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Friday, October 01, 2004 1:38 PM To: Tomcat Users List Subject: How to make Apache direct Servlet to Tomcat On my Apache 2.0.43 + Tomcat5.0.28 on UNIX sparc, I can run the same JSP files from both Apache and Tomcat, and run servlets on Tomcat, but I cannot run Servlet from Apache. I register the servlet in tomcat/webapps/www/WEB-INF/web.xml: servlet servlet-nameServletTest/servlet-name servlet-classServletTest/servlet-class /servlet servlet-mapping servlet-nameServletTest/servlet-name url-pattern/ServletTest/url-pattern /servlet-mapping /www is the DocBase. The error message on the screen is: /ServletTest was not found on this server. From the Apache error log, I see Apache looked for the file in Apache htdocs folder, instead pass the request to Tomcat. When I start Tomcat I get some errors. The are probably not related to the problem above. the errors are: 1) in catalina.out INFO: Installing web application at context path /balancer from URL file:/usr/local/apache2/jakarta-tomcat-5.0.28/webapps/balancer Oct 1, 2004 10:14:50 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Oct 1, 2004 10:14:50 AM org.apache.catalina.core.StandardContext start SEVERE: Context startup failed due to previous errors . 2) in localhost_log.2004-10-01.txt 2004-10-01 10:14:50 StandardContext[/balancer]Exception starting filter BalancerFilter java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester at org.apache.webapp.balancer.RulesParser.createDigester(RulesParser.java:65) ... Please help me with the servlet problem. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to make Apache direct Servlet to Tomcat
On my Apache 2.0.43 + Tomcat5.0.28 on UNIX sparc, I can run the same JSP files from both Apache and Tomcat, and run servlets on Tomcat, but I cannot run Servlet from Apache. I register the servlet in tomcat/webapps/www/WEB-INF/web.xml: servlet servlet-nameServletTest/servlet-name servlet-classServletTest/servlet-class /servlet servlet-mapping servlet-nameServletTest/servlet-name url-pattern/ServletTest/url-pattern /servlet-mapping /www is the DocBase. The error message on the screen is: /ServletTest was not found on this server. From the Apache error log, I see Apache looked for the file in Apache htdocs folder, instead pass the request to Tomcat. When I start Tomcat I get some errors. The are probably not related to the problem above. the errors are: 1) in catalina.out INFO: Installing web application at context path /balancer from URL file:/usr/local/apache2/jakarta-tomcat-5.0.28/webapps/balancer Oct 1, 2004 10:14:50 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Oct 1, 2004 10:14:50 AM org.apache.catalina.core.StandardContext start SEVERE: Context startup failed due to previous errors . 2) in localhost_log.2004-10-01.txt 2004-10-01 10:14:50 StandardContext[/balancer]Exception starting filter BalancerFilter java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester at org.apache.webapp.balancer.RulesParser.createDigester(RulesParser.java:65) ... Please help me with the servlet problem. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to make Apache direct Servlet to Tomcat
Thank you for your attention. The Apache2/conf/wrokers2.property is attached. The Tomcat/conf/jk2.property is empty, all lines are commented. in the httpd.conf I added: LoadModule jk2_module modules/mod_jk2-2.0.43.so the .so files are in apache2/modules Thanks -Original Message- From: Lee, Paul NYC [mailto:[EMAIL PROTECTED] Sent: Friday, October 01, 2004 1:23 PM To: 'Tomcat Users List' Subject: RE: How to make Apache direct Servlet to Tomcat Hi, It should be done the same way you redirected jsp requests to tomcat. It needs to be mapped in your jk (or jk2) properties file. Post the relevant parts of your properties file if you're not sure why it doesn't work. -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Friday, October 01, 2004 1:38 PM To: Tomcat Users List Subject: How to make Apache direct Servlet to Tomcat On my Apache 2.0.43 + Tomcat5.0.28 on UNIX sparc, I can run the same JSP files from both Apache and Tomcat, and run servlets on Tomcat, but I cannot run Servlet from Apache. I register the servlet in tomcat/webapps/www/WEB-INF/web.xml: servlet servlet-nameServletTest/servlet-name servlet-classServletTest/servlet-class /servlet servlet-mapping servlet-nameServletTest/servlet-name url-pattern/ServletTest/url-pattern /servlet-mapping /www is the DocBase. The error message on the screen is: /ServletTest was not found on this server. From the Apache error log, I see Apache looked for the file in Apache htdocs folder, instead pass the request to Tomcat. When I start Tomcat I get some errors. The are probably not related to the problem above. the errors are: 1) in catalina.out INFO: Installing web application at context path /balancer from URL file:/usr/local/apache2/jakarta-tomcat-5.0.28/webapps/balancer Oct 1, 2004 10:14:50 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Oct 1, 2004 10:14:50 AM org.apache.catalina.core.StandardContext start SEVERE: Context startup failed due to previous errors . 2) in localhost_log.2004-10-01.txt 2004-10-01 10:14:50 StandardContext[/balancer]Exception starting filter BalancerFilter java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester at org.apache.webapp.balancer.RulesParser.createDigester(RulesParser.java:65) ... Please help me with the servlet problem. - 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]
TOMCAT, run Servlet on UNIX
My computer is UNIX, Sparc. I use Tomcat version 5.0.28, path= docBase=www, Apache 2.0.43. I can run the same JSP files from both TOMCAT and Apache with DB connection pool for Oracle. But I have difficult in Servlet. I cannot run servlet from Tomcat. In webapps/www/WEB-INF/web.xml, I registered the Servlet: servlet servlet-nameServletTest/servlet-name servlet-classServletTest/servlet-class /servlet servlet-mapping servlet-nameServletTest/servlet-name url-pattern/ServletTest/url-pattern /servlet-mapping the class is in www/WEB-INF/classes, no package, compiled on UNIX with JDK1.4.2. the class file mode is 777 in tomcat/conf/web.xml, I have: servlet servlet-nameinvoker/servlet-name with http://myComputer:8080/ServletTest, I get error: The request resource (/ServletTest) is not available. I found the contents bellow in the tomcat/conf/web.xml: servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping I configureed a Tomcat the same why on windows 2000, it runs Servlet well, but the docBase=ROOT. Please forward instruction. Thanks a lot. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TOMCAT, run Servlet on UNIX
Thank you for your help. On the browser, I see not other error, but when I start the Tomcat, I find error in the logs/catalina.out, please check the last 4 lines: Sep 30, 2004 11:46:58 AM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Sep 30, 2004 11:46:59 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 9872 ms Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.28 Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:/usr/local/apache2/jakarta-tomcat-5.0.28/conf/Catalina/myComputerIP/www .xml Sep 30, 2004 11:47:02 AM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /balancer from URL file:/usr/local/apache2/jakarta-tomcat-5.0.28/webapps/balancer Sep 30, 2004 11:47:03 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Sep 30, 2004 11:47:03 AM org.apache.catalina.core.StandardContext start SEVERE: Context startup failed due to previous errors In the localhost_log.2004-09-30.txt: 2004-09-30 12:03:06 StandardContext[/balancer]Exception starting filter BalancerFilter java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester at org.apache.webapp.balancer.RulesParser.createDigester(RulesParser.java:65) at org.apache.webapp.balancer.RulesParser.init(RulesParser.java:43) at org.apache.webapp.balancer.BalancerFilter.init(BalancerFilter.java:79) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter Config.java:225) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFil terConfig.java:308) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterCon fig.java:79) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:36 98) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4349) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8 23) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j ava:277) at org.apache.catalina.core.StandardHost.install(StandardHost.java:832) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701 ) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091) at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478) at org.apache.catalina.core.StandardService.start(StandardService.java:480) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) 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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, September 30, 2004 11:35 AM To: Tomcat Users List Subject: RE: TOMCAT, run Servlet on UNIX Hi, I can run the same JSP files from both TOMCAT and Apache with DB connection pool for Oracle. But I have difficult in Servlet. I cannot run servlet from Tomcat. You realize the JSPs are servlets, right? ;) In webapps/www/WEB-INF/web.xml, I registered the Servlet: servlet servlet-nameServletTest/servlet-name servlet-classServletTest/servlet-class /servlet servlet-mapping servlet-nameServletTest/servlet-name
RE: TOMCAT, run Servlet on UNIX
Yoav, Thank you. Please forward more instruction. On the browser, I see no other errors, but when I start the Tomcat, I find error messages in 1) the logs/catalina.out: Sep 30, 2004 11:46:58 AM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Sep 30, 2004 11:46:59 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 9872 ms Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.28 Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:/usr/local/apache2/jakarta-tomcat-5.0.28/conf/Catalina/myComputerIP/www .xml Sep 30, 2004 11:47:02 AM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /balancer from URL file:/usr/local/apache2/jakarta-tomcat-5.0.28/webapps/balancer Sep 30, 2004 11:47:03 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Sep 30, 2004 11:47:03 AM org.apache.catalina.core.StandardContext start SEVERE: Context startup failed due to previous errors 2) In the localhost_log.2004-09-30.txt: 2004-09-30 12:03:06 StandardContext[/balancer]Exception starting filter BalancerFilter java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester at org.apache.webapp.balancer.RulesParser.createDigester(RulesParser.java:65) at org.apache.webapp.balancer.RulesParser.init(RulesParser.java:43) at org.apache.webapp.balancer.BalancerFilter.init(BalancerFilter.java:79) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter Config.java:225) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFil terConfig.java:308) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterCon fig.java:79) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:36 98) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4349) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8 23) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j ava:277) at org.apache.catalina.core.StandardHost.install(StandardHost.java:832) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701 ) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091) at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478) at org.apache.catalina.core.StandardService.start(StandardService.java:480) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) 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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425) After I run http://myComputer:8080/ServletTest, There are no any new error mesage added into these two files. Thank you. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, September 30, 2004 11:35 AM To: Tomcat Users List Subject: RE: TOMCAT, run Servlet on UNIX Hi, I can run the same JSP files from both TOMCAT and Apache with DB connection pool for Oracle. But I have difficult in Servlet. I cannot run servlet from Tomcat. You realize the JSPs are servlets, right? ;) In webapps/www/WEB-INF/web.xml, I registered the Servlet: servlet servlet-nameServletTest/servlet-name
RE: TOMCAT, run Servlet on UNIX
Hi, After check some configuration, I can run Servlet on Tomcat. But I still get the errors when I start the Tomcat. In addition, when I run the same servlet from Apache: http://myComputerIP:8008/ServletTest, I get the error message on the screen: The requested URL /ServletTest was not found on this server. in the error_log: File does not exist:/usr/local/apache2/htdocs/ServletTest Apache looks for the Servlet in its doc home folder. Please teach me how to let Apache direct the request in Servlet to Tomcat. Thanks -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Thursday, September 30, 2004 2:20 PM To: Tomcat Users List Subject: RE: TOMCAT, run Servlet on UNIX Yoav, Thank you. Please forward more instruction. On the browser, I see no other errors, but when I start the Tomcat, I find error messages in 1) the logs/catalina.out: Sep 30, 2004 11:46:58 AM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Sep 30, 2004 11:46:59 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 9872 ms Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.28 Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) Sep 30, 2004 11:47:00 AM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:/usr/local/apache2/jakarta-tomcat-5.0.28/conf/Catalina/myComputerIP/www .xml Sep 30, 2004 11:47:02 AM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /balancer from URL file:/usr/local/apache2/jakarta-tomcat-5.0.28/webapps/balancer Sep 30, 2004 11:47:03 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Sep 30, 2004 11:47:03 AM org.apache.catalina.core.StandardContext start SEVERE: Context startup failed due to previous errors 2) In the localhost_log.2004-09-30.txt: 2004-09-30 12:03:06 StandardContext[/balancer]Exception starting filter BalancerFilter java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester at org.apache.webapp.balancer.RulesParser.createDigester(RulesParser.java:65) at org.apache.webapp.balancer.RulesParser.init(RulesParser.java:43) at org.apache.webapp.balancer.BalancerFilter.init(BalancerFilter.java:79) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter Config.java:225) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFil terConfig.java:308) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterCon fig.java:79) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:36 98) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4349) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8 23) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595) at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j ava:277) at org.apache.catalina.core.StandardHost.install(StandardHost.java:832) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701 ) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091) at org.apache.catalina.core.StandardHost.start(StandardHost.java:789) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478) at org.apache.catalina.core.StandardService.start(StandardService.java:480) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313) at org.apache.catalina.startup.Catalina.start(Catalina.java:556) 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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287
Which version of Tomcat and Apache for my UNIX sparc Computer?
My computer: #uname -a SunOS sunbox 5.8 Generic_108528-17 sun4u sparc SUNW, Sun-Blade-100 I see the latest Apache for my computer is httpd-2.0.43-sparc-sun-solaries2.8.tat.gz What Tomcat and Tomcat-connector should I use with this version of Apache? Please help. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AbandonedObjectPool means Abandoned Object Pool?
In my database connection pool, I used org.apache.commons.dbcp.BasicDataSourceFactory for MS SQL and Oracle. I see the message on the Tomcat monitor window: AbandonedObjectPool is used ([EMAIL PROTECTED]) Does it means the Object pool is Abandoned, or Deprecated? If it is true, what is the updated object pool? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Please help: Apache direct Servlet to Tomcat
My Apache 2.0.49 Tomcat 5.0.19, windows 2000. I have a difficult in running servlet from Apache. For example I have a servlet TestServlet.class (package: myServlet) in C:\Program Files\Apache Group\Apache2\tomcat\webapps\ROOT\WEB-INF\classes\myServlet\ I register this servlet in \tomcat\webapps\ROOT\WEB-INF\web.xml: servlet servlet-nameTestServlet/servlet-name servlet-classTestServlet/servlet-class /servlet servlet-mapping servlet-nameTestServlet/servlet-name url-pattern/TestServlet/url-pattern /servlet-mapping Tomcat port is 8008 When I run http://localhost:8008/TestServlet, it runs correctly. Apache port is 82 I cannot start it with http://localhost:82/TestServlet. -- The page cannot be found My Aache and Tomcat is connected correctly. All JSP files can run on both. For example, I have a jsp file C:\Program Files\Apache Group\Apache2\tomcat\webapps\ROOT\testJSP\testDBPool.jsp. I can run http://localhost:82/testJSP/testDBPool.jsp or http://localhost:8008/testJSP/testDBPool.jsp in workers2.properties, I have: [uri:/myServlet/*] group=lb [uri:/WEB-INF/*] group=lb [uri:/WEB-INF/classes/*] group=lb Please forward your instruction. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to create/run a Java Service on UNIX
First I thank very much for the replies. Please continue forward instruction. this service, written in Java, will serves two applications: one is online with Tomcat, and another one is an offline application. these two applications will sometimes update the same data tables. This service will provide unique keys, and do something else for these two applications. This service will not depend on if Tomcat is running or not. I want this service on UNIX runs automatically when the computer is started, and keep running. Thanks. -Original Message- From: John Najarian [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 8:35 PM To: 'Tomcat Users List' Subject: RE: How to create/run a Java Service on UNIX It's very easy to launch a Java daemon in Linux/Unix. It used to be difficult require some JNI programming. On the GNU site I found a slick way someone wronte in Java and it is simple. What I wanted to know from the person asking the question is what they're trying to do with the 'Service'. 'Service' this is Unix not winblows. Get with the correct lingo! - LOL! -Original Message- From: John Gentilin [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 7:08 PM To: Tomcat Users List Subject: Re: How to create/run a Java Service on UNIX Sorry, missed the beginning of this thread but.. I have this book http://half.ebay.com/cat/buy/prod.cgi?cpid=282172meta_id=1 and I use it often. It has a very good section on how to create a single or multi threaded server. It does not go into how to launch this process as a daemon thread under Unix. I think all you really need to do is launch the process as a background task by appending the to the end of the command line. Look at the tomcat Catalina.sh as an example of a startup script to run the service in the background. HTH -John G Daxin Zuo wrote: The program is written as Java class. Does it requires special functions? How to make it a service, keep running and ready to provid data? Thanks. -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 3:30 PM To: 'Tomcat Users List' Subject: RE: How to create/run a Java Service on UNIX So you've already written this java program, and it has a public static void main() method, and it all interfaces properly with what you need it to, and you just want to know how to make it start when your UNIX box starts? Or you haven't written the program yet at all, and you want to know how to go about doing so? -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 5:19 PM To: Tomcat Users List Subject: RE: How to create/run a Java Service on UNIX Yes. It keep running and sometimes it replies and provides some data for other applications. -Original Message- From: John Najarian [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 2:59 PM To: 'Tomcat Users List' Subject: RE: How to create/run a Java Service on UNIX Do you want to run this as a daemon? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to create/run a Java Service on UNIX
Thank John, Mike, and Tom, and all other repliers. I hope Tome's instruction will work. I left UNIX for a long time. What Tom told is familiar to me. I will test it after next week. It is still a (rare) case that the Sever is not up when one of the applications talks to it. In this rare case, I can try else way. Thanks again. -Original Message- From: Tom Simons [mailto:[EMAIL PROTECTED] Sent: Friday, September 10, 2004 1:31 PM To: Tomcat Users List Subject: Re: How to create/run a Java Service on UNIX Are you just looking for Unix to start a daemon every time it boots? That's typically done via a shell script, which accepts start stop arguments (sometimes start_msg stop_msg, too). These scripts are in /etc/init.d (/sbin/init.d for HPUX), and there are corresponding links in /etc/rc.* directories. Your flavor of Unix will execute these scripts at boot time (with startup as the arg). You just need to make that script execute your application program or script. Check out the scripts you already have - for example, the lp daemon on my system has the usual shell script and 2 links: find /sbin -name '*lp*' | xargs ls -l # change /sbin to /etc, if not HPUX -r-xr-xr-x 1 bin bin 1604 Oct 27 1997 /sbin/init.d/lp lrwxr-xr-x 1 root sys15 Nov 16 2001 /sbin/rc1.d/K280lp - /sbin/init.d/lp lrwxr-xr-x 1 root sys15 Nov 16 2001 /sbin/rc2.d/S720lp - /sbin/init.d/lp On Fri, 10 Sep 2004 12:02:36 -0700, Daxin Zuo [EMAIL PROTECTED] wrote: First I thank very much for the replies. Please continue forward instruction. this service, written in Java, will serves two applications: one is online with Tomcat, and another one is an offline application. these two applications will sometimes update the same data tables. This service will provide unique keys, and do something else for these two applications. This service will not depend on if Tomcat is running or not. I want this service on UNIX runs automatically when the computer is started, and keep running. Thanks. -Original Message- From: John Najarian [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 8:35 PM To: 'Tomcat Users List' Subject: RE: How to create/run a Java Service on UNIX It's very easy to launch a Java daemon in Linux/Unix. It used to be difficult require some JNI programming. On the GNU site I found a slick way someone wronte in Java and it is simple. What I wanted to know from the person asking the question is what they're trying to do with the 'Service'. 'Service' this is Unix not winblows. Get with the correct lingo! - LOL! -Original Message- From: John Gentilin [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 7:08 PM To: Tomcat Users List Subject: Re: How to create/run a Java Service on UNIX Sorry, missed the beginning of this thread but.. I have this book http://half.ebay.com/cat/buy/prod.cgi?cpid=282172meta_id=1 and I use it often. It has a very good section on how to create a single or multi threaded server. It does not go into how to launch this process as a daemon thread under Unix. I think all you really need to do is launch the process as a background task by appending the to the end of the command line. Look at the tomcat Catalina.sh as an example of a startup script to run the service in the background. HTH -John G Daxin Zuo wrote: The program is written as Java class. Does it requires special functions? How to make it a service, keep running and ready to provid data? Thanks. -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 3:30 PM To: 'Tomcat Users List' Subject: RE: How to create/run a Java Service on UNIX So you've already written this java program, and it has a public static void main() method, and it all interfaces properly with what you need it to, and you just want to know how to make it start when your UNIX box starts? Or you haven't written the program yet at all, and you want to know how to go about doing so? -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 5:19 PM To: Tomcat Users List Subject: RE: How to create/run a Java Service on UNIX Yes. It keep running and sometimes it replies and provides some data for other applications. -Original Message- From: John Najarian [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 2:59 PM To: 'Tomcat Users List' Subject: RE: How to create/run a Java Service on UNIX Do you want to run this as a daemon? - 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
How to make Apache direct Servlet to Tomcat
My Apache 2.0.49 Tomcat 5.0.19, windows 2000. (Soon I will move them to UNIX) I have a difficult in running servlet from Apache. For example I have a servlet TestServlet.class (package: myServlet) in C:\Program Files\Apache Group\Apache2\tomcat\webapps\ROOT\WEB-INF\classes\myServlet\ I register this servlet in \tomcat\webapps\ROOT\WEB-INF\web.xml: servlet servlet-nameTestServlet/servlet-name servlet-classTestServlet/servlet-class /servlet servlet-mapping servlet-nameTestServlet/servlet-name url-pattern/TestServlet/url-pattern /servlet-mapping Tomcat port is 8008 When I run http://localhost:8008/TestServlet, it runs correctly. Apache port is 82 I cannot start it with http://localhost:82/TestServlet. -- The page cannot be found My Aache and Tomcat is connected correctly. All JSP files can run on both. For example, I have a jsp file C:\Program Files\Apache Group\Apache2\tomcat\webapps\ROOT\testJSP\testDBPool.jsp. I can run http://localhost:82/testJSP/testDBPool.jsp or http://localhost:8008/testJSP/testDBPool.jsp in workers2.properties, I have: [uri:/myServlet/*] group=lb [uri:/WEB-INF/*] group=lb [uri:/WEB-INF/classes/*] group=lb Please forward your instruction. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to create/run a Java Service on UNIX
I neeed to create a service on UNIX.( The program is in Java. this service will serves an offline application and an online application running with Tomcat.) Could you please tell me how to do. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to create/run a Java Service on UNIX
Could you please give more details? or example of using Phoenix and James? -Original Message- From: John Villar [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 2:30 PM To: Tomcat Users List Subject: Re: How to create/run a Java Service on UNIX Use the Apache Phoenix framework Apache James uses it Daxin Zuo escribió: I neeed to create a service on UNIX.( The program is in Java. this service will serves an offline application and an online application running with Tomcat.) Could you please tell me how to do. Thanks. John Villar Gerente de Proyectos Computadores Flor Hard Soft 2058 C.A. www.florhard.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to create/run a Java Service on UNIX
Yes. It keep running and sometimes it replies and provides some data for other applications. -Original Message- From: John Najarian [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 2:59 PM To: 'Tomcat Users List' Subject: RE: How to create/run a Java Service on UNIX Do you want to run this as a daemon? -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 2:11 PM To: Tomcat Users List Subject: How to create/run a Java Service on UNIX I neeed to create a service on UNIX.( The program is in Java. this service will serves an offline application and an online application running with Tomcat.) Could you please tell me how to do. Thanks. - 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: How to create/run a Java Service on UNIX
The program is written as Java class. Does it requires special functions? How to make it a service, keep running and ready to provid data? Thanks. -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 3:30 PM To: 'Tomcat Users List' Subject: RE: How to create/run a Java Service on UNIX So you've already written this java program, and it has a public static void main() method, and it all interfaces properly with what you need it to, and you just want to know how to make it start when your UNIX box starts? Or you haven't written the program yet at all, and you want to know how to go about doing so? -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 5:19 PM To: Tomcat Users List Subject: RE: How to create/run a Java Service on UNIX Yes. It keep running and sometimes it replies and provides some data for other applications. -Original Message- From: John Najarian [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 2:59 PM To: 'Tomcat Users List' Subject: RE: How to create/run a Java Service on UNIX Do you want to run this as a daemon? - 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 create/run a Java Service on UNIX
The program is written as Java class. It has Socket read/write features. Does it requires special functions? How to make it as a service, keep running and ready to provid data when the Unix box startup? Thanks. -Original Message- From: John Najarian [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 3:39 PM To: 'Tomcat Users List' Subject: RE: How to create/run a Java Service on UNIX That's why I asked if it can be run as a daemon. -Original Message- From: Mike Curwen [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 3:30 PM To: 'Tomcat Users List' Subject: RE: How to create/run a Java Service on UNIX So you've already written this java program, and it has a public static void main() method, and it all interfaces properly with what you need it to, and you just want to know how to make it start when your UNIX box starts? Or you haven't written the program yet at all, and you want to know how to go about doing so? -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 5:19 PM To: Tomcat Users List Subject: RE: How to create/run a Java Service on UNIX Yes. It keep running and sometimes it replies and provides some data for other applications. -Original Message- From: John Najarian [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 2:59 PM To: 'Tomcat Users List' Subject: RE: How to create/run a Java Service on UNIX Do you want to run this as a daemon? - 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: Is there a way to set the size of ResultSet from MS SQL Serve
I use net.sourceforge.jtds.jdbc.Driver. Does it surport FetchSize? Thank you. -Original Message- From: John Villar [mailto:[EMAIL PROTECTED] Sent: Thursday, August 19, 2004 5:26 AM To: Tomcat Users List Subject: Re: Is there a way to set the size of ResultSet from MS SQL Serve r However, that would work only if the driver you're using uses the FetchSize as a hint for caching records. In JDBC caching is primarily the responsability of the Driver. Brad McEvoy escribió: something like this should do the trick ... PreparedStatement pstmt = con.prepareStatement(sql,ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_READ_ O NLY); pstmt.setFetchSize(100); ResultSet rs = pstmt.executeQuery(); ... -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Thursday, 19 August 2004 2:04 PM To: Tomcat Users List Subject: Re: Is there a way to set the size of ResultSet from MS SQL Server On Wed, Aug 18, 2004 at 04:50:32PM -0700, Daxin Zuo wrote: : I use JDBC in JSP/Java with MS SQL Server. : Is there a way to set the Fetch Size (set to 10, 100,..) of ResultSet (as : ADO CacheSize in ASP)? This sounds like a configuration specific to your database, either with a custom SQL statement (a la HSQLDB) or with a JDBC URL param... Unless you mean you want to limit the results using the clause LIMIT x in your SQL. -QM - 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: Is there a way to set the size of ResultSet from MS SQL Server
Brad , thank you. It seems the trick I am looking for. -Original Message- From: Brad McEvoy [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 9:24 PM To: 'Tomcat Users List' Subject: RE: Is there a way to set the size of ResultSet from MS SQL Server something like this should do the trick ... PreparedStatement pstmt = con.prepareStatement(sql,ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_READ_O NLY); pstmt.setFetchSize(100); ResultSet rs = pstmt.executeQuery(); ... -Original Message- From: QM [mailto:[EMAIL PROTECTED] Sent: Thursday, 19 August 2004 2:04 PM To: Tomcat Users List Subject: Re: Is there a way to set the size of ResultSet from MS SQL Server On Wed, Aug 18, 2004 at 04:50:32PM -0700, Daxin Zuo wrote: : I use JDBC in JSP/Java with MS SQL Server. : Is there a way to set the Fetch Size (set to 10, 100,..) of ResultSet (as : ADO CacheSize in ASP)? This sounds like a configuration specific to your database, either with a custom SQL statement (a la HSQLDB) or with a JDBC URL param... Unless you mean you want to limit the results using the clause LIMIT x in your SQL. -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]
Is there a way to set the size of ResultSet from MS SQL Server
I use JDBC in JSP/Java with MS SQL Server. Is there a way to set the Fetch Size (set to 10, 100,..) of ResultSet (as ADO CacheSize in ASP)? With Oracle, we can set it in program. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
relogin question
I have a relogin problem. 1) I am on the page P, 2) I click on the Home button of the browser, 3) and then I click back button on the browser. The page P is displayed again. But at 3) we intend that the application asks for relogin. So after 2), the session should be expired. Does Tomcat have a nice way to do it? Any body has done it? Please help. Thank a lot. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RE: Please introduce a good Tomcat debug tool
Deepak, and All, I have JBuilder 9 developer edition. But the version of the embeded Tomcat is 4.1. We want to use Tomcat 5.1.9. Do you have some detail instruction for adding Tomcat 5 to the server configuration in Jbuilder 9 (I am preparing doing it)? Thanks a lot. Also thanks for all the other replies. -Original Message- From: deepak shripat mane [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 15, 2004 9:26 PM To: Tomcat Users List Subject: Re: RE: Please introduce a good Tomcat debug tool Hii.. You can use Eclipse or JBuilder with tomcat server for debugging and Tracing servlet and JSP Page or u can use third party tool for program Deepak On Wed, 16 Jun 2004 Michael Cardon wrote : I use eclipse with the 'myeclipse' plug-in. see www.eclipse.org and www.myeclipseide.com -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 15, 2004 12:13 PM To: Tomcat Users List Subject: Please introduce a good Tomcat debug tool I currently run Tomcat 4.1.9 (without apache) to run JSP and ervlet. How to debug JSP and Servelt in TOMCAT? Thanks. - 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]
Please introduce a good Tomcat debug tool
I currently run Tomcat 4.1.9 (without apache) to run JSP and ervlet. How to debug JSP and Servelt in TOMCAT? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
A Servlet question
I use Apache 2.4.9, Tomcat 4.1.9. In a JSP, there there are three frames in a frameset. the script of each frame is JSP. Can a JSP in one frame submit to a Servlet? I did a test and failed. Please confirm or teach me how to do. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: A Servlet question
You are right, after I send my last email to this list, I tested it with full URL of the servlet. It worked well. So I need to tell Tomcat that it is a servlet. The previous problem is that Tomcat add the relative path before the servlet name. Could you please give the example for the servlet name mapping? Thanks. -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 3:19 PM To: Tomcat Users List Subject: Re: A Servlet question AFAIK, submiting from a frame is the same as a single page. What was the error msg you've got? Probably, it has some problem in the servlet mapping... did you try to load the jsp alone in the browser and submit it? if it doens't work, it doens't has to do with the frames at all. Emerson Daxin Zuo wrote: I use Apache 2.4.9, Tomcat 4.1.9. In a JSP, there there are three frames in a frameset. the script of each frame is JSP. Can a JSP in one frame submit to a Servlet? I did a test and failed. Please confirm or teach me how to do. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Emerson Cargnin Analista de Sistemas Setor de Desenvolvimento de Sistemas - TRE-SC tel : (048) - 251-3700 - Ramal 3181 - 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: A Servlet question
I thought this map may not work either. in my web.xml I mapped the servlet as following: servlet servlet-nametestJSP/servlet-name servlet-classtexcel.testJSP.spiderClass/servlet-class /servlet servlet-mapping servlet-nametestJSP/servlet-name url-pattern/testJSP/url-pattern /servlet-mapping All me jsp of frames are in ROOT/texcel/testjsp/ when frame2.jsp makes the frame1.jsp submit to testJSP. the error is: The requested resource (/texcel/testjsp/testJSP) is not available. if frame2.jsp makes the frame1.jsp submit to http://localhost:8008/testJSP;, it works. Look for further instruction. Thanks. -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 3:49 PM To: Tomcat Users List Subject: Re: A Servlet question servlet servlet-namepartServlet/servlet-name servlet-classgov.tresc.sgip.PartServlet/servlet-class /servlet servlet-mapping servlet-namepartServlet/servlet-name url-pattern/servlet/partServlet/*/url-pattern /servlet-mapping In this example, to access the servlet you could use http://localhost:8080/sgip/servlet/partServlet Daxin Zuo wrote: You are right, after I send my last email to this list, I tested it with full URL of the servlet. It worked well. So I need to tell Tomcat that it is a servlet. The previous problem is that Tomcat add the relative path before the servlet name. Could you please give the example for the servlet name mapping? Thanks. -Original Message- From: Emerson Cargnin [mailto:[EMAIL PROTECTED] Sent: Friday, June 11, 2004 3:19 PM To: Tomcat Users List Subject: Re: A Servlet question AFAIK, submiting from a frame is the same as a single page. What was the error msg you've got? Probably, it has some problem in the servlet mapping... did you try to load the jsp alone in the browser and submit it? if it doens't work, it doens't has to do with the frames at all. Emerson Daxin Zuo wrote: I use Apache 2.4.9, Tomcat 4.1.9. In a JSP, there there are three frames in a frameset. the script of each frame is JSP. Can a JSP in one frame submit to a Servlet? I did a test and failed. Please confirm or teach me how to do. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Emerson Cargnin Analista de Sistemas Setor de Desenvolvimento de Sistemas - TRE-SC tel : (048) - 251-3700 - Ramal 3181 - 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] -- Emerson Cargnin Analista de Sistemas Setor de Desenvolvimento de Sistemas - TRE-SC tel : (048) - 251-3700 - Ramal 3181 - 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]
How to make Apache direct Servlet to Tomcat
My Apache 2.0.49 can direct JSP to Tomcat 5.0.19, but it cannot direct Servlet to Tomcat. I can run it on Tomcat: http://localhost:8008/servlet/myapp/testServlet But I cannot run it on Apache (port number is 82) like: http://localhost:82/servlet/myapp/testServlet. The error log says: File does not exist: C:/Program Files/Apache Group/Apache2/htdocs/servlet. I guess I may need to put servlet in some configuration file in Apache/conf. Please tell me 1) How to make Apache direct servlet to Tomcat? 2) Suppose my application base folder is myApp, is there a way to run the servlet on Apache and with the url like: http://localhost:82/myapp/testServlet (without /Servlet)? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to make Apache direct Servlet to Tomcat
Thank for your reply. Yes, I did it. in the tomcat\webapps\ROOT\web.xml or tomcat\webapps\ROOT\WEB-INF (not both): servlet servlet-nametest1/test1/servlet-name servlet-classtest1/test1/servlet-class /servlet servlet-mapping servlet-nametest1/test1/servlet-name url-pattern/test1/test1/url-pattern /servlet-mapping in Apache/conf/workers2.properties [uri:/ROOT/*] group=lb The servlet classes test1.class is compiled to tomcat\webapps\ROOT\WEB-INF\classes, in package test1. only URL http://localhost:8008/servlet/test1.test1 works.(Tomcat port 8008) I would run it with URL http://localhost:82/test1/test1 (Apach port 82) Thanks. -Original Message- From: Dale, Matt [mailto:[EMAIL PROTECTED] Sent: Thursday, May 27, 2004 8:55 AM To: Tomcat Users List Subject: RE: How to make Apache direct Servlet to Tomcat Hi, 1) You need to set up a URI mapping in your workers2.properties in your apache conf directory for the servlets to work, its enough to just put yourapp/*, from the sounds of it you must have yourapp/*.jsp or something like that. 2) You need to set up URL mappings in the applications web.xml file and then you can have the URL as anything you want to each servlet. Ta Matt -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: 27 May 2004 16:14 To: Tomcat Users List Subject: How to make Apache direct Servlet to Tomcat My Apache 2.0.49 can direct JSP to Tomcat 5.0.19, but it cannot direct Servlet to Tomcat. I can run it on Tomcat: http://localhost:8008/servlet/myapp/testServlet But I cannot run it on Apache (port number is 82) like: http://localhost:82/servlet/myapp/testServlet. The error log says: File does not exist: C:/Program Files/Apache Group/Apache2/htdocs/servlet. I guess I may need to put servlet in some configuration file in Apache/conf. Please tell me 1) How to make Apache direct servlet to Tomcat? 2) Suppose my application base folder is myApp, is there a way to run the servlet on Apache and with the url like: http://localhost:82/myapp/testServlet (without /Servlet)? Thanks. - 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]
verify database connection pool
I created a DB Connection Pool with net.sourceforge.jtds.jdbc.Driver, org.apache.commons.dbcp.BasicDataSourceFactory In java code, I use the connection as: .. Connection con = null; try { Context ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup( java:comp/env/jdbc/DirectSQL); con = ds.getConnection(); con.close(); jdbc/DirectSQL is found, and The databse get connected. I thought after I close the connection, Tomcat handles the con in the pool. Somebody says that I have not used a DB connection pool. It is only a connection I get. Connection from pool should use pool or pool. So I start to doubter. Please confirm or teach me how to use Connection pool. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DB connection pool problem
Have you tried to put the configuration text in GlobalNamingResources instead of context block? To me, the message tells that the web.xml and java code is fine. The server.xml is not edited correctly. in you server.xml, you put ResourceParams name=jdbc/conversion, but where is the resource jdbc/conversion? -Original Message- From: Arora, Avinash [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 05, 2004 4:07 PM To: Daxin Zuo; Tomcat Users List Subject: RE: DB connection pool problem Hi, Sorry I was messing up my code by making several changes. If I add that statement, I get the following SQL exception is generated Cannot create JDBC driver of class '' for connect URL 'null'. Any idea about what corrections I need to make. Avinash Arora -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 04, 2004 4:29 PM To: Tomcat Users List Subject: RE: DB connection pool problem You have to add con = dataSource.getConnection(); after dataSource = (DataSource)ctx.lookup(jdbc/conversion); -Original Message- From: Arora, Avinash [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 04, 2004 3:54 PM To: David Smith; Tomcat Users List Subject: RE: DB connection pool problem Sorry for creating the confusion. Actually I was seeing the connection object to be null for long time. But at last moment I made those silly changes to present it in a better way. Sorry about it. But now I printing the connection object and finding it to be null. I cannot understand, the reason for connection object to be null, even when datasource object is not null. Is it because that I am not able to connect to database? If yes what could be the reason. If I specify the attributes, using Direct JDBC by using Class.forName() and DriverManager.getConnection(), I can connect to data base and read all the values. But the problem comes when I use Connection pooling. Where shuld I look for correction?? -- Part of my code and JSP o/p - public LinkedList selectCP(){ LinkedList ll = new LinkedList(); Connection con = null; Statement stmt = null; ResultSet rs = null; DataSource dataSource = null; try{ Context init = new InitialContext(); Context ctx = (Context) init.lookup(java:comp/env); dataSource = (DataSource)ctx.lookup(jdbc/conversion); ll.add(dataSource object is); ll.add(dataSource); } catch(NamingException e){ System.out.println(Exception thrown is+e.getMessage()); ll.add(Naming Exception thrown); } finally{ if(dataSource == null){ ll.add(DataSource object is null); return ll; } else{ ll.add(Data source object is not null); } } try{ ll.add(Inside try.); ll.add(con is); ll.add(con); if(con == null){ ll.add(Inside try. Connection object found to be null); ll.add(con); return ll; } else{ ll.add(Connection object inside else is); ll.add(con);} } } catch(SQLException e) { System.err.println(SQL EXCEPTION+e.getMessage()); ll.add(SQL Exception ); ll.add(e.getMessage()); } catch(Exception e) { System.err.println( class not found exception+e.getMessage()); ll.add(Exception generated:); ll.add(e.getMessage()); } finally{ if(con == null) ll.add(Connection object is null); } try{ stmt.close(); } catch(Exception e){} try{ rs.close(); } catch(Exception e){} try{ con.close(); } catch(Exception e){} return ll; } ---O/P-- --- I am pasting the ll obtained on browser-- [dataSource object is, [EMAIL PROTECTED], Data source object is not null, Inside try., con is, null, Inside try. Connection object found to be null, null, Connection object is null] -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 04, 2004 1:35 PM To: Tomcat Users List Subject: Re: DB connection pool problem Sorry about the last post. It's been a looonnng day and I didn't read it very well :-(. From what I see, you're comparing conn to null before even attempting to get a connection. Try comparing dataSource to null instead of conn in the second catch block. Then do dataSource.getConnection() if dataSource != null. --David David Smith wrote: I'm a bit
how to make Java Class use db pool
I have a db connection pool. If I put java code in JSP, the java code can use the pool. But when I write a seperate java class in tomcat/webapps/ROOT/web-inf/class/devTrack, jsp uses this class: devTrack.useDB.useDB dbWorker = new devTrack.useDB.useDB(); retdata = dbWorker.getRow(select * from myTable where id=2, 3, true); the getRow should return a row. But it gets null. No any exception in Tomcat monitor, log, and browser. the JSP file is in tomcat/webapps/ROOT/zuo. My system windows 2000, Apache 2.0.49, Tomcat 5.0.19 Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DB connection pool problem
for it?? Here is how I use it in my code-- public LinkedList testFunction(){ LinkedList ll = null;Connection con = null; Statement stmt = null; ResultSet rs = null; DataSource dataSource = null; try{ Context init = new InitialContext(); Context ctx = (Context) init.lookup(java:comp/env); dataSource = (DataSource)ctx.lookup(jdbc/conversion); ll.add(dataSource object is); ll.add(dataSource); } catch(NamingException e){ System.out.println(Exception thrown is+e.getMessage()); ll.add(Naming Exception thrown); }finally{ if(dataSource == null){ ll.add(DataSource object is null); return ll; } else{ ll.add(Data source object is not null); // return ll; } } try{ // load the driver class file //Class.forName(com.mysql.jdbc.Driver).newInstance(); //establishing the connection if(con == null){ ll.add(Inside 1st try. Connection object found to be null); } else{ ll.add(Inside 1st try. Connection object is not nul); con = dataSource.getConnection(); stmt = con.createStatement(); } finally{ if(con == null){ ll.add(Connection object is null); // return ll; } --Here is the output that I can see on my jsp page, where I try to print out the linklist obtained from the function above. elements of link list read from database are -[dataSource object is, [EMAIL PROTECTED], Data source object is not null, Inside 1st try. Connection object found to be null, Connection object is null] Thanks. Avinash Arora -Original Message- From: Daxin Zuo [mailto:[EMAIL PROTECTED] Sent: Monday, May 03, 2004 3:34 PM To: Tomcat Users List Subject: RE: DB connection pool problem I have just created a pool -- I hope it is really a pool. I used jtds jdbc driver to MS SQL Server on Windows. You may find some thing similar. Holp it helps. 1) bellow is the text in tomcat\conf\server.xml GlobalNamingResources Resource name=jdbc/DirectSQL auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/DirectSQL parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value255/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameusername/name valueuser1/value /parameter parameter namepassword/name valuepasswd1/value /parameter parameter namedriverClassName/name valuenet.sourceforge.jtds.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:jtds:sqlserver://serverName:1433/value /parameter /ResourceParams ... 2) bellow is the text in tomcat\conf\Catalina\localhost\ROOT.XML --I create this file by myself Context path= docBase=ROOT debug=0 privileged=true !-- Link to the user database using dbc:jtds:sqlserver -- ResourceLink name=jdbc/DirectSQL global=jdbc/DirectSQL type=javax.sql.DataSource/ /Context This name is used in Java code. global is the name in xml file. they can be different. 3) my test jsp file is in \tomcat\webapps\ROOT\zuo\ Context ctx = new InitialContext(); if (ctx == null) { throw new Exception(Boom - No Context); } DataSource ds = (DataSource) ctx.lookup(java:comp/env/jdbc/DirectSQL); if (ds != null) con = ds.getConnection(); if (con != null){ str = select * from myTable; pStateSearch = con.prepareStatement(str, ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY ); rs = pStateSearch.executeQuery(); That's all. -Original Message- From: Arora, Avinash [mailto:[EMAIL PROTECTED] Sent: Monday, May 03, 2004 3:10 PM To: Tomcat Users List Subject: DB connection pool problem Hi, I am also having the problem with the connection pools. Since I am writing an application first time by using connection pools, I created a test application DBTest. I edited my server.xml and web.xml (of my application in following way-- #added to server.xml Context path=/DBTest docBase=DBTest debug=0 reloadable=true ResourceParams name=jdbc/conversion parameter nameusername/name valueROOT/value /parameter
RE: DB connection pool problem
I have just created a pool -- I hope it is really a pool. I used jtds jdbc driver to MS SQL Server on Windows. You may find some thing similar. Holp it helps. 1) bellow is the text in tomcat\conf\server.xml GlobalNamingResources Resource name=jdbc/DirectSQL auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/DirectSQL parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value255/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameusername/name valueuser1/value /parameter parameter namepassword/name valuepasswd1/value /parameter parameter namedriverClassName/name valuenet.sourceforge.jtds.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:jtds:sqlserver://serverName:1433/value /parameter /ResourceParams ... 2) bellow is the text in tomcat\conf\Catalina\localhost\ROOT.XML --I create this file by myself Context path= docBase=ROOT debug=0 privileged=true !-- Link to the user database using dbc:jtds:sqlserver -- ResourceLink name=jdbc/DirectSQL global=jdbc/DirectSQL type=javax.sql.DataSource/ /Context This name is used in Java code. global is the name in xml file. they can be different. 3) my test jsp file is in \tomcat\webapps\ROOT\zuo\ Context ctx = new InitialContext(); if (ctx == null) { throw new Exception(Boom - No Context); } DataSource ds = (DataSource) ctx.lookup(java:comp/env/jdbc/DirectSQL); if (ds != null) con = ds.getConnection(); if (con != null){ str = select * from myTable; pStateSearch = con.prepareStatement(str, ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY ); rs = pStateSearch.executeQuery(); That's all. -Original Message- From: Arora, Avinash [mailto:[EMAIL PROTECTED] Sent: Monday, May 03, 2004 3:10 PM To: Tomcat Users List Subject: DB connection pool problem Hi, I am also having the problem with the connection pools. Since I am writing an application first time by using connection pools, I created a test application DBTest. I edited my server.xml and web.xml (of my application in following way-- #added to server.xml Context path=/DBTest docBase=DBTest debug=0 reloadable=true ResourceParams name=jdbc/conversion parameter nameusername/name valueROOT/value /parameter parameter namepassword/name valuePASSWORD/value /parameter parameter namedriverClassName/name valuecom.mysql.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:mysql://localhost/DB/value /parameter /ResourceParams /Context #web.xml web-app descriptionMySQL Test App/description resource-ref res-ref-namejdbc/conversion/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app And I added the following statements to my Java class, (which works fine, when I use the connection objects by hardcoding the username and db).-- Context init = new InitialContext(); Context ctx = (Context) init.lookup(java:comp/env); DataSource dataSource = (DataSource)ctx.lookup(jdbc/conversion); But even after, making these changes, I cannot read any thing from database. I was wondering what more changes I need to made. I also tried to run my JAVA class (DAO) from command line, but I get the following exception-- Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial I tried to print outs the place where exception occurs in my code and found that exception occurs at dataSource = (DataSource)ctx.lookup(jdbc/conversion); Can any body please comment on whats going on wrong? When I run from command line, is tomcat used, I don't think so? So where is the problem? Any ideas?? Avinash Arora - 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]
Is there removeAbandonedTimeout in jtds?
Is there a similar property like removeAbandonedTimeout in JTDS to be written in ResourceParams. I like to make the DB pool recycling a connection if it is idle for a while. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Please help on my DB pool problem --- I followed the struction on the web
I misunderstood that MS JDBC Driver should be the best for its MS SQL Server. Sorry. Your instruction is very helpful. Now I decide to not use the MS driver for MS SQL Server. I have successfully created the Pool with net.sourceforge.jtds.jdbc.Driver. Thank you. -Original Message- From: Eric Noel [mailto:[EMAIL PROTECTED] Sent: Sunday, May 02, 2004 6:43 PM To: Tomcat Users List Subject: Re: Please help on my DB pool problem --- I followed the struction on the web On 5/3/2004 9:31 AM, Daxin Zuo wrote: I thought Microsoft was the best. if thats what you think, i guess you should stick with dotNet since with that you will have an all microsoft retrofitted program (e.g drivers, components, etc) :-) My jsp file is in tomcat\webapps\ROOT\zuo. In my tomcat\webapps\ROOT\WEB-INF\web.xml, there is no context block, should I create one or use resource-ref? If I need ot create a context block, Is the code bellow correct: context path=/zuo docBase=ROOT debug=0 privileged=true /context Context part is in server.xml or Catalina/hostname/APPNAME.xml. - 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: Please help on my DB pool problem --- I followed the struction on the web
Should I put it in tomcat\webapps\ROOT\WEB-INF\web.xml? (my jsp file using Database connection is in ROOT/zuo), but in this web.xml, I already have: resource-ref descriptionSQL Server DataSource/description res-ref-namejdbc/dbName/res-ref-name res-typecom.microsoft.jdbcx.sqlserver.SQLServerDataSource/res-type res-authContainer/res-auth /resource-ref Following the examples on the web, I wrote the java code in JSP: envCtx = (Context) initCtx.lookup(java:comp/env); ds = (ConnectionPoolDataSource ) envCtx.lookup(jdbc/dbName); // --- error occurs here if (ds != null){ if(ds instanceof com.microsoft.jdbcx.sqlserver.SQLServerDataSource){ SQLServerDataSource temp = (com.microsoft.jdbcx.sqlserver.SQLServerDataSource)ds; con = temp.getPooledConnection(user,pswd).getConnection(); now the error occurs at envCtx.lookup. the error is: Cannot create resource instance Thanks. -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Friday, April 30, 2004 4:42 PM To: Tomcat Users List Subject: Re: Please help on my DB pool problem --- I followed the struction on the web Daxin, When you put the dbcp in the GlobalResource did you put a link to the resource in the context? Place this in the context for each app that will use the database connection pool. ResourceLink name=jdbc/dbName global=jdbc/dbName type=com.microsoft.jdbcx.sqlserver.SQLServerDataSource/ In the last email that I sent in addition to the link, was a complete working set of configurations. Each piece of the configuration was labeled as to where to add it. Remove all your old attempts and start from the beginning. If you made a backup of your original files use them. Then put in each piece and modify with your information. Let us know. Doug - Original Message - From: Daxin Zuo [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, April 30, 2004 2:05 PM Subject: RE: Please help on my DB pool problem --- I followed the struction on the web 1)I added it and still get the same error. the error occurred at con = ds.getConnection(); error:Cannot create JDBC driver of class '' for connect URL 'null' 2) I also followed the way in the link that forwarded by Persons Technical Services. In that configuration, it used com.microsoft.jdbcx.sqlserver. If I still use javax.sql.DataSource in my JSP file, I got the same error. If I use com.microsoft.jdbcx.sqlserver in my JSP file, the error occurred at lookup the source. But I did not use context. I moved the DB pool context into GlobalNamingResources. The block is for JNDI global name. 3) I also add the database name as Eric indicated. It does not effect. 4) if I remove the db pool configuration in server.xml( web.xml still has the configuration), I got the same error. 5) if I remove the db pool configuration in tomcat\webapps\ROOT\WEB-INF\web.xml, the error is Name jdbc is not bound in this Context. My jsp file is in tomcat\webapps\ROOT\zuo, and in tomcat\webapps\ROOT, same error. It seems the configuration in tomcat/conf/server.xml is incorrect. Should I write some thing in different file? If I should write the text in context (right now no this block in server.xml), how to set the path and docBase if my file is in tomcat\webapps\ROOT\zuo\. But I think put the configuration text in GlobalNamingResources is the right place. I am using Apache 2.0.49+Tomcat 5.0.19+windows 2000/Unix/Linux+MS SQL server 2000 + sp4, is there another better jdbc driver with the configuration tricks? Please help. Thanks. -Original Message- From: STOCKHOLM, Raymond [mailto:[EMAIL PROTECTED] Sent: Friday, April 30, 2004 12:22 AM To: Tomcat Users List Subject: RE: Please help on my DB pool problem --- I followed the struction on the web I didn't see your factory in your server.xml ResourceParams name=jdbc/DBName Try adding : parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter -Message d'origine- De : Daxin Zuo [mailto:[EMAIL PROTECTED] Envoyé : vendredi 30 avril 2004 00:55 À : Tomcat Users List Objet : Please help on my DB pool problem --- I followed the struction on the web I have problem in using connection pool. I use Apache 2.0.49, Tomcat 5.0.19, windows 2000 server, MS SQL server 2000 + sp4 On the browser I see the error: Cannot create JDBC driver of class '' for connect URL 'null' on Tomcat monitor, I see the message: Apr 29, 2004 3:36:25 PM org.apache.jk.common.HandlerRequest decodeRequest WARNING: Error registering request The url and driver class is not find. bellow is my configuration. Please forward instruction. Thanks a lot. 1) I copy the three jar files to \common\lib in %catalina_home% from C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC 2) MY webapps/ROOT/web-inf/web.xml is: ... resource
RE: Please help on my DB pool problem --- I followed the struction on the web
Thank you very much for your reply on Sunday. The error is Name jdbc is not bound in this Context at ctx.lookup. In both server.xml and web.xml, the type is com.microsoft.jdbcx.sqlserver.SQLServerDataSource. Even I use the code: envCtx = (Context) initCtx.lookup(java:comp/env); ds = (ConnectionPoolDataSource ) envCtx.lookup(jdbc/daxin); if (ds != null){ if(ds instanceof com.microsoft.jdbcx.sqlserver.SQLServerDataSource){ SQLServerDataSource temp = (com.microsoft.jdbcx.sqlserver.SQLServerDataSource)ds; con = temp.getPooledConnection(dzuo,dzuo).getConnection(); I got the same error. Besides jdbc, is there another name to use? I am using jdbc driver, why com.microsoft.jdbc.sqlserver.SQLServerDriver.class in the mssqlserver.jar is not indicated in the configuration? Why the driverClassName and the type are the same? Does it related to MS sql server installation? I installed the MS SQL JDBCdriver's servise pack 1 and 2. Does it have effect? My current configuration is based on the link you sent me in the first email: Server.xml: ... ... GlobalNamingResources ... ... Resource name=jdbc/dbName auth=container type=com.microsoft.jdbcx.sqlserver.SQLServerDataSource / ResourceParams name=jdbc/dbName parameter namefactory/name valuecom.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory/value /parameter parameter namedriverClassName/name valuecom.microsoft.jdbcx.sqlserver.SQLServerDataSource/value /parameter parameter namedriverName/namevalueSQLServer/value /parameter parameternamedescription/namevalueSQL Server DataSource/value/parameter parameternameserverName/namevaluedaxin/value/parameter parameternameportNumber/namevalue1433/value /parameter parameternameselectMethod/namevaluecursor/value/parameter parameternamedatabaseName/namevaluepubs/value/parameter parameternameuser/namevaluedzuo/value/parameter parameternamepassword/namevaluedzuo/value/parameter /ResourceParams .. /GlobalNamingResources ... ... /Engine /Service /Server web.xml: resource-ref descriptionSQL Server DataSource/description res-ref-namejdbc/dbName/res-ref-name res-typecom.microsoft.jdbc.sqlserver.SQLServerDataSource/res-type res-authContainer/res-auth /resource-ref /web-app Looking forward to more instruction. -Original Message- From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Sunday, May 02, 2004 4:07 PM To: Tomcat Users List Subject: Re: Please help on my DB pool problem --- I followed the struction on the web Try this code instead: Context ctx = new InitialContext(); if (ctx == null) { System.err.println(Conn.getConn ctx is null); throw new Exception(Boom - No Context); } DataSource ds = (DataSource) ctx.lookup(java:comp/env/jdbc/dbName); if (ds != null) connection = ds.getConnection(); I run this from a class. I have several util classes that handle my database queries and thus in my jsps and servlets I simly call the util class with a simple string. But we'll save that for another time. As for the code in the web.xml, it is fine. Doug - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Please help on my DB pool problem --- I followed the struction on the web
I thought Microsoft was the best. My jsp file is in tomcat\webapps\ROOT\zuo. In my tomcat\webapps\ROOT\WEB-INF\web.xml, there is no context block, should I create one or use resource-ref? If I need ot create a context block, Is the code bellow correct: context path=/zuo docBase=ROOT debug=0 privileged=true /context Thanks -Original Message- From: Eric Noel [mailto:[EMAIL PROTECTED] Sent: Sunday, May 02, 2004 5:55 PM To: Tomcat Users List Subject: Re: Please help on my DB pool problem --- I followed the struction on the web why not use jtds instead http://jtds.sourceforge.net/ ## download the jtds jar http://heanet.dl.sourceforge.net/sourceforge/jtds/jtds-0.7.1.jar ## place it in your common/lib ## server.xml Resource name=jdbc/DirectSQL auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/DirectSQL parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namemaxActive/name value3/value /parameter parameter namemaxIdle/name value1/value /parameter parameter namemaxWait/name value1/value /parameter parameter nameusername/name valueDBUSERNAME/value /parameter parameter namepassword/name valueDBPASSWORD/value /parameter parameter namedriverClassName/name valuenet.sourceforge.jtds.jdbc.Driver/value /parameter parameter nameurl/name valuejdbc:jtds:sqlserver://SERVERNAME/DBNAME/value /parameter /ResourceParams ## web.xml context-param param-namejavax.servlet.jsp.jstl.sql.dataSource/param-name param-valuejdbc/DirectSQL/param-value /context-param - 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]
sun.jdbc.rowset.*
Where can I get the sun.jdbc lib without install J2EE? Can I use sun.jdbc.rowset.* program on j2se without install J2EE? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]