RE: How to serve static EXCEL or POWERPOINT files from Tomcat ?

2004-01-13 Thread Altankov Peter
They are fixed in 6.0

 -Original Message-
 From: Cox, Charlie [mailto:[EMAIL PROTECTED] 
 Sent: 12  2004 . 19:14
 To: 'Tomcat Users List'
 Subject: RE: How to serve static EXCEL or POWERPOINT files 
 from Tomcat ?
 
 
 Actually Mozilla and Netscape can open Excel and Powerpoint 
 based upon the .xls or .ppt extension if the mime-type is not 
 set. However IE only opens them properly if you add the 
 mime-type to web.xml. Otherwise you get a browser full of 
 garbled text. I find this most amusing. (They may have fixed 
 this in IE 6.0).
 
 Charlie
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Monday, January 12, 2004 11:30 AM
  To: [EMAIL PROTECTED]
  Subject: RE: How to serve static EXCEL or POWERPOINT files 
 from Tomcat 
  ?
  
  Wouldn't you just have a URL link to the actual files in 
 your HTML?  
  The browser should be smart enough to open up the appropriate 
  application and display it, since it will recognize its 
  extension/mime-type.
  
  bruno
  
  -Original Message-
  From: ext Vitor Buitoni [mailto:[EMAIL PROTECTED]
  Sent: Monday, January 12, 2004 10:07 AM
  To: Tomcat Users List
  Subject: Re: How to serve static EXCEL or POWERPOINT files 
 from Tomcat 
  ?
  
  
  Hi,
  
  Probably your browser is misconfigured. I don't think this 
 is a tomcat 
  issue. Check the file type associations in your browser and 
 make sure 
  that xls files are configured to be opened by msexcel.
  Also check the .doc file association, if it is opening properly, it
  should be configured to be opened by msword.
  
  Vitor
  
  Enrique MARTIN wrote:
  
  Hi,
  
  I am trying to serve .xls and .ppt files from tomcat so that the 
  browser opens the right application (excel and powerpoint 
  respectively) . What I obtain instead is that the byte content is 
  sent by the web server and
  this
  content is then interpreted as text by the browser.
  For the .doc files, on the other hand, I have the desired 
 behavior: 
  word opens.
  
  Does anybody know how to obtain from tomcat this behavior?
  
  Thanks,
  Enrique.
  
  
  
  
  
  
  
 -
  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 serve static EXCEL or POWERPOINT files from Tomcat ?

2004-01-13 Thread Altankov Peter
I was talking about the case mimetype 'text/plain' which is set in the dist 
conf/web.xml
 Snap ...
mime-mapping
extensionxsl/extension
mime-typetext/xml/mime-type
/mime-mapping
 /Snap ...

, combined with a .xsl and .ppt extensions.


 -Original Message-
 From: Ralph Einfeldt [mailto:[EMAIL PROTECTED] 
 Sent: 13  2004 . 11:26
 To: Tomcat Users List
 Subject: RE: How to serve static EXCEL or POWERPOINT files 
 from Tomcat ?
 
 
 In my experience not really.
 
 In IE Version 6.0.2600... a file with mimetype 
 'application/vnd.ms-excel' and 
 an extension that is not registered for Excel resulted in 
 openening Word (at 
 least for some users). Renaming the file to .xls solved the problem.
 
  -Original Message-
  From: Altankov Peter [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, January 13, 2004 10:05 AM
  To: Tomcat Users List
  Subject: RE: How to serve static EXCEL or POWERPOINT files
  from Tomcat ?
  
  
  They are fixed in 6.0
  
   -Original Message-
   From: Cox, Charlie [mailto:[EMAIL PROTECTED]
   Sent: 12  2004 . 19:14
   To: 'Tomcat Users List'
   Subject: RE: How to serve static EXCEL or POWERPOINT files 
   from Tomcat ?
   
   
   Actually Mozilla and Netscape can open Excel and Powerpoint
   based upon the .xls or .ppt extension if the mime-type is not 
   set. However IE only opens them properly if you add the 
   mime-type to web.xml. Otherwise you get a browser full of 
   garbled text. I find this most amusing. (They may have fixed 
   this in IE 6.0).
   
 
 -
 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: Customizing '500 Internal Server Error' when Tomcat is down in mod_jk configuration

2004-01-13 Thread Altankov Peter
ErrorDocument directive in apache's httpd.conf for 500

But there is 1 more interesting issue here. While TC is completely down u get 500 by 
mod_jk and apache can easyly handle it. 
You can easily set up an error page handlers per web-application in its web.xml.

The interesting part is when the TC is actually up, but it still havent loaded the 
requested context. Then the user gets a HTTP error issued by TC. How that can be 
handled? Any suggestions any1?


 -Original Message-
 From: Thierry Thelliez [mailto:[EMAIL PROTECTED] 
 Sent: 13  2004 . 03:14
 To: [EMAIL PROTECTED]
 Subject: Customizing '500 Internal Server Error' when Tomcat 
 is down in mod_jk configuration
 
 
 In an Apache - mod_jk - Tomcat configuration we have Tomcat 
 occasionally going down. We then get the Internal Server 
 Error message. It would be very useful for our support staff 
 to have a more explicit message. Can this be done?
 
  
 
 Thanks
 
 Thierry
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: UTF-9 encoding in FORM with POST

2004-01-13 Thread Altankov Peter
Try request.setCharacterEncoding(UTF-8) BEFORE you getParameter() out of it

 -Original Message-
 From: Mariano [mailto:[EMAIL PROTECTED] 
 Sent: 13  2004 . 15:31
 To: 'Tomcat Users List'
 Subject: UTF-9 encoding in FORM with POST
 
 
 Hi, all
 
 I have installed tomcat 5.0.16 in windows 2000 
 professional(j2sdk 1.4.2) and i hava a jsp page with:
 
 pageEncoding=utf-8
 contentType=text/html; charset=UTF-8
 
 and
 
 META http-equiv=Content-Type content=text/html; charset=UTF-8
 
 i had modified the URIEncoding=UTF-8 of my Coyote HTTP/1.1 
 Connector in server.xml file.
 
 When i try to submit my form with GET method retrives right 
 the values of my form in UTF-8 encoding but when i do it with 
 POST method not.
 
 Any ideas why?
 
 Thanks
 
 Mariano
 
 
 -
 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: Customizing Error Pages

2004-01-13 Thread Altankov Peter
Via setup in your applications web.xml. Example:
  error-page
error-code404/error-code
location/404.html/location
  /error-page
  error-page
error-code500/error-code
location/500.html/location
  /error-page

 -Original Message-
 From: Krishnamoorthy Rao [mailto:[EMAIL PROTECTED] 
 Sent: 13  2004 . 15:14
 To: [EMAIL PROTECTED]
 Subject: Customizing Error Pages
 
 
 Hi,
 
 I am using Tomcat 4.0. How to customize error pages?
 
 Your help will be valuable for us.
 
 Thanks and Regards,
 Krishnamoorthy Rao
 PLAYWIN - Vashi
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



mc@fornby.fhsk.se - no such user here.

2004-01-13 Thread Altankov Peter
Do you guys all receive this bounce when posting to the list?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 4.1.29: Pool exhausted

2004-01-13 Thread Altankov Peter
Dimitry, sorry for the late response.

Try adding 
  parameter
 nameremoveAbandoned/name
 valuetrue/value
  /parameter
  parameter
 nameremoveAbandonedTimeout/name
 value60/value
  /parameter

 -Original Message-
 From: Dmitry Guralnik [mailto:[EMAIL PROTECTED] 
 My resource params for DataSource:
 
 Resource name=jdbc/KDb auth=Container
 type=javax.sql.DataSource/
 
 ResourceParams name=jdbc/KDb
 parameter
 namefactory/name
 
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 parameter
 namedriverClassName/name
 
 valuecom.informix.jdbc.IfxDriver/value
 /parameter
 parameter
 nameurl/name
 
 valuejdbc:informix-sqli://h1:1526/kdb:INFORMIXSERVER=ifx_h1/value
 /parameter
 parameter
 nameusername/name
 valueinformix/value
 /parameter
 parameter
 namepassword/name
 valueinformix/value
 /parameter
 parameter
 namemaxActive/name
 value20/value
 /parameter
 parameter
 namemaxIdle/name
 value10/value
 /parameter
 parameter
 namemaxWait/name
 value-1/value
 /parameter
 /ResourceParams

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: mc@fornby.fhsk.se - no such user here.

2004-01-13 Thread Altankov Peter
Thanks, Yoav

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
 Howdy,
 I've unsubscribed this user, we'll see if things improve.


 -Original Message-
 From: Altankov Peter [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, January 13, 2004 9:37 AM
 To: Tomcat Users List
 Subject: [EMAIL PROTECTED] - no such user here.
 
 
 Do you guys all receive this bounce when posting to the list?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: mc@fornby.fhsk.se - no such user here.

2004-01-13 Thread Altankov Peter
You bet it has been done the firs second I got the bounce, but it still wold bother my 
mail server :))

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
 Sent: 13  2004 . 17:56
 To: Tomcat Users List
 Subject: RE: [EMAIL PROTECTED] - no such user here.
 
 
 
 Howsy,
 
 Yes, pretty annoying isn't it?  I hope an admin (if there is such a
 person)
 will remove this user from the list.
 
 Newsflash ;)  This has happened in the past where the user 
 was NOT subscribed to the list, in which there's not much I 
 can do.  I've already unsubscribed this particular user.  I 
 suggest if it annoys you that you block messages from this 
 user so that you don't see them.
 
 Yoav Shapira

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: MM:Tomcat with SSL

2004-01-13 Thread Altankov Peter
I think this has the taste of wrong/not_provided security provider.
If you are using sun's JSSE

Add this to your $JAVA_HOME/jre/lib/security/java.security

security.provider.1=sun.security.provider.Sun
security.provider.2=com.sun.net.ssl.internal.ssl.Provider
security.provider.3=com.sun.rsajca.Provider



 -Original Message-
 From: Keshav Sarin [mailto:[EMAIL PROTECTED] 
 Sent: 13  2004 . 18:08
 To: [EMAIL PROTECTED]
 Subject: Re: MM:Tomcat with SSL
 
 
 Look for a .keystore file under the home directory of the 
 user that generated the key. Make sure Tomcat is started by 
 the same user.
 
  [EMAIL PROTECTED] 01/13/04 09:01AM 
 GlacierDear guys;
 
 - I have Java 2 SDK 1.4.2 that come with JSSE
 - Apache Tomcat version 4.1
 - I'm using Windows environment
 
 I'm having a problem when I configured Tomcat with SSL, I 
 followed HOW TO steps in Apache web site like this
 
 1. have generated the key using this command 
 %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA
 
 2. Uncommented the SSL HTTP/1.1 Connector in server.xml
 
 3. Restarted Tomcat
 
 But I got the following problem
 Jan 13, 2004 9:56:44 AM org.apache.coyote.http11.Http11Protocol init
 SEVERE: Error initializing socket factory
 java.lang.ClassNotFoundException: Can't find any SSL 
 implementation at 
 org.apache.tomcat.util.net.SSLImplementation.getInstance(SSLIm
 plementation.j
 ava:97)
 at 
 org.apache.tomcat.util.net.SSLImplementation.getInstance(SSLIm
 plementation.j
 ava:103)
 
 
 I searched for SSLImplementation class and I found it in a 
 jar file, and that jar file is in the class path.
 
 Any answers or suggestion why I'm getting this error and how 
 to solve it???
 
 
 Thanks
 Mohammad Musleh
 Software Architect and Developer
 Computer Science Dept, MUM
 Fairfield, IA 52557 USA
 Phone: (641) 472 7000 x 4326

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Datasource - OK in app context - Fails in Global context

2004-01-12 Thread Altankov Peter
Hi
 From: Antonio Fiol Bonnin [mailto:[EMAIL PROTECTED] 
 Sent: 11  2004 . 11:39
 Subject: Re: Datasource - OK in app context - Fails in Global context
 
 
 So, could someone summarize for me the different ways of 
 creating a JDBC 
 DataSource in Tomcat?
 
 I will start the summary, so that it's easier to correct/complete. 
 Please fill in the gaps ;-)
 
 1. Have the DataSource defined in your application's context.
 That way, if you have two apps, you have to copy the datasource 
 definition from one to the other.
 Two connection pools will be created.

If the database schema is different for each your of you applications you will end up 
using this setup anyway, so just go for that.

 3. Have the DataSource defined in GlobalNamingResources.
 If you have two apps, you need to ResourceLink in both contexts.
 ... connection pool(s) will be created.

This setup suit the case, when your applications all use the same database schema 
(means can access their database objects trough the same authentication/db user). 
Ofcourse only 1 pool will be created, so you'll have to scale the pool parameters for 
all the applications that use it.

Hope this is usefull

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Encoding issues

2004-01-12 Thread Altankov Peter
I used to have similar problems with windows-1251 cyrylic codeapge and I solved it by 
creating a siple filter, mapped to all request that explicitly sets the encoding of 
the request before any1 else gets the request:

request.setCharacterEncoding(windows-1251);

I think this happens because Internet Explorer does not set the appropriate encoding 
headers on HTTP level of the protocol and tomcat just assumes it is ISO8859-1 (leading 
to garbage ofcourse)


Here is the full source of the filter:
package bg.cbm.servlet.filter;

import javax.servlet.*;
import java.io.IOException;

/**
 * Creator: paltankov
 * Date: 2003-10-30
 * Time: 10:03:49
 */
public class LocaleHelperFilter implements Filter
{
private String defaultRequestEncoding = null;

public void init (FilterConfig filterConfig) {
defaultRequestEncoding = 
filterConfig.getInitParameter(defaultRequestEncoding);
}

public void doFilter(ServletRequest request, ServletResponse response, 
FilterChain chain)
  throws IOException, ServletException {

if (null == request.getCharacterEncoding())
request.setCharacterEncoding(defaultRequestEncoding);

chain.doFilter(request, response);
}

public void destroy() {}

}


Here is the mapping entry for web.xml of the application that uses it:

filter
filter-namelocaleHelper/filter-name
filter-classbg.cbm.servlet.filter.LocaleHelperFilter/filter-class
init-param
param-namedefaultRequestEncoding/param-name
param-valuewindows-1251/param-value
/init-param
/filter

filter-mapping
filter-namelocaleHelper/filter-name
url-pattern*.jsp/url-pattern
/filter-mapping

I hope this helps (making my sleepless nights worth :)))
cheers

 -Original Message-
 From: K. Harvatis [mailto:[EMAIL PROTECTED] 
 Sent: 12  2004 . 13:53
 To: [EMAIL PROTECTED]
 Subject: Encoding issues
 
 
 I run Tomcat 3.2 and it reports unsupported encoding 
 iso-8859-7 when using FORMs. As a result, servlets receive 
 garbage instead of data. Is there a workaround?
 
 
 Kostas Harvatis
 -
 National Center for Social Research - Directorate of Research 
 Support www.ekke.gr
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat: Connection reset by peer: socket write error

2004-01-10 Thread Altankov Peter
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5735
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4663

 -Original Message-
 From: Boemio, Neil (IT, FGIC) [mailto:[EMAIL PROTECTED] 
 Sent: 07  2004 . 22:16
 To: Tomcat Users List
 Subject: Tomcat: Connection reset by peer: socket write error
 
 
 My W2K, Apache 2.0.47, Tomcat 4.1.27,  JK2 2.0.43 setup works 
 fine . for a while.  After an hour, a few hours, maybe 
 minutes (I don't really see a pattern), my JSP pages will 
 hang.  When I restart the Tomcat service, everything is fine 
 again until the next hang.
 
 Here's the sequence:
 
 About every minute in the jk2.log, I get this set or errors 
 over and over again.  This doesn't seem to be directly 
 related to my problem because this happens even when 
 everything is OK  but I thought I would include it as well:
 
 [Wed Jan 07 14:19:27 2004] (error ) [jk_channel_socket.c 
 (557)]  channelSocket.receive(): Error receiving message body 
 -1 0 [Wed Jan 07 14:19:27 2004] (error ) [jk_workerEnv.c 
 (482)]  workerEnv.processCallbacks() Error reading reply [Wed 
 Jan 07 14:19:27 2004] (error ) [jk_worker_ajp13.c (416)]  
 ajp13.service() ajpGetReply recoverable error 12 [Wed Jan 
 07 14:19:49 2004] (error ) [jk_channel_socket.c (557)]  
 channelSocket.receive(): Error receiving message body -1 0 
 [Wed Jan 07 14:19:49 2004] (error ) [jk_workerEnv.c (482)]  
 workerEnv.processCallbacks() Error reading reply [Wed Jan 07 
 14:19:49 2004] (error ) [jk_worker_ajp13.c (416)]  
 ajp13.service() ajpGetReply recoverable error 12
 
 When the problem occurs, I get this in the Tomcat Error Log:
 
 Jan 7, 2004 2:21:25 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(Unknown Source)
   at java.net.SocketOutputStream.write(Unknown Source)
   at 
 org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407)
   at 
 org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:599)
   at 
 org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:385)
   at org.apache.coyote.Response.action(Response.java:222)
   at org.apache.coyote.Response.finish(Response.java:343)
   at 
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:268)
   at 
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
   at 
 org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
   at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSo
 cket.java:562)
   at 
 org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
   at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
ThreadPool.java:619)
   at java.lang.Thread.run(Unknown Source)
 
 Then at about the same time as the error, I get this in the jk2.log:
 
 [Wed Jan 07 14:21:25 2004] (error ) [jk_handler_response.c 
 (200)]  Error ajp_process_callback - write failed [Wed Jan 07 
 14:21:25 2004] (error ) [jk_worker_ajp13.c (416)]  
 ajp13.service() ajpGetReply recoverable error 3 [Wed Jan 07 
 14:21:25 2004] (error ) [jk_handler_response.c (200)]  Error 
 ajp_process_callback - write failed [Wed Jan 07 14:21:25 
 2004] (error ) [jk_worker_ajp13.c (416)]  ajp13.service() 
 ajpGetReply recoverable error 3 [Wed Jan 07 14:21:25 2004] 
 (error ) [jk_worker_ajp13.c (512)]  ajp13.service() Error  
 forwarding ajp13:localhost:8009 1 0 [Wed Jan 07 14:21:25 
 2004] (error ) [mod_jk2.c (678)]  mod_jk.handler() Error 
 connecting to tomcat 3
 
 Any ideas?
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat stops handling HTTP connections, socket is SYN_RECV

2004-01-10 Thread Altankov Peter
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5735

 -Original Message-
 From: Frode E. Moe [mailto:[EMAIL PROTECTED] 
 Sent: 08  2004 . 09:39
 To: Tomcat Users List
 Subject: Re: Tomcat stops handling HTTP connections, socket 
 is SYN_RECV
 
 
 On Wed, Jan 07, 2004 at 21:00:30 +0100, Antonio Fiol Bonnn wrote:
  I have not read through all the thread, so maybe I am repeating
  something. If so, sorry about being lazy.
  
  You seem to be hitting maxProcessors. If you do, no more threads are
  created, and connections start getting into SYN_RECV state, simply 
  because Tomcat is not accept()ing them, exactly as you told 
 it to do.
  
  So, either reduce your concurrency level for the tests, or increase
  maxProcessors.
 
 Actually, I don't think I'm hitting maxProcessors - usually 
 when that happens, you only get an error message about no 
 more threads being available in the pool. Here, the issue is 
 that Java is unable to create a new native thread and 
 therefore throws an OutOfMemoryError.
 
 So the problem is that even after the tests are complete and 
 there are no active connections at all, it's no longer 
 possible to connect. I think perhaps the OutOfMemoryError 
 causes whatever thread is accept()ing new http connections to die. 
 
 - Frode
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 4.1.29: Pool exhausted

2004-01-10 Thread Altankov Peter
Actually im heavily using 4.1.29's Dbcp 1.1 package after a sraight forward migration 
from 4.1.27's Dbcp 1.0
Can you post your ResourceParams section of the configuration?

 -Original Message-
 From: Dmitry Guralnik [mailto:[EMAIL PROTECTED] 
 Sent: 09  2004 . 15:14
 To: [EMAIL PROTECTED]
 Subject: Tomcat 4.1.29: Pool exhausted
 
 
 Hello,
 
 I tried to move my web application from Tomcat 4.1.27 to 
 Tomcat 4.1.29. The application has a JNDI datasource. 
 Everything worked properly in 4.1.27, but after I moved to 
 4.1.29 I've got an exception:
 
 Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot 
 get a connection, pool exhausted, cause: 
 java.util.NoSuchElementException: Could not create a 
 validated object at 
 org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Ge
 nericObjectPoo
 l.java:851) at 
 org.apache.commons.dbcp.PoolingDataSource.getConnection(Poolin
 gDataSource.ja
 va:140) at 
 org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDat
 aSource.java:5
 18) at 
 net.sf.hibernate.connection.DatasourceConnectionProvider.getCo
 nnection(Datas
 ourceConnectionProvider.java:59) at
 net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:257)
 
 
 I know that 4.1.29 has the newest versions of Dbcp and Pool. 
 May be some new parameters appeared for Dbcp 1.1. I think it 
 is the reason of my exception. When I replace version 1.1 of 
 Dbcp and Pool to version 1.0 in common/lib of Tomcat 4.1.29 - 
 everything started working well!
 
 I wonder if anybody got success using JNDI datasource and 
 Tomcat 4.1.29. Tomcat works under J2SE 1.3.1.
 
 Thanks. Dmitry
 
 
 
 -
 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: ajp13 errors

2004-01-07 Thread Altankov Peter
You can monitor bug 4663 issue at 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4663
Lots of people encounter this or similar traces under load conditions. Search the mail 
archive too.
BR

-Original Message-
From: Steve Harris [mailto:[EMAIL PROTECTED] 
Sent: 06  2004 . 18:12
To: [EMAIL PROTECTED]
Subject: ajp13 errors


Hi all,

Has anyone encountered errors similar to the following in the catalina_log file ?

If so - any ideas as to the cause.

Cheers - Steve

=
He didn't administer a reign of terror, just the occasional light shower.  -Terry 
Pratchett, Sourcery =


2004-01-06 07:33:33 Ajp13Processor[8009][2] process: invoke
java.io.IOException: Broken pipe
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:91)
at org.apache.ajp.Ajp13.send(Ajp13.java:525)
at org.apache.ajp.RequestHandler.finish(RequestHandler.java:501)
at org.apache.ajp.Ajp13.finish(Ajp13.java:395)
at
org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:196)
at
org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:464)
at
org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
at java.lang.Thread.run(Thread.java:479)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver

2004-01-07 Thread Altankov Peter
Devinder, if you are on windows put your classes12.jar in common/lib if you on 
linux/unix - just make it a symlink in common/lib for the same .jar

-Original Message-
From: Sachdeva, Devinder [mailto:[EMAIL PROTECTED] 
Sent: 06  2004 . 17:10
To: [EMAIL PROTECTED]
Subject: java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver


All-
I'm getting the following error ,though Oracle driver classes(zip)are in 
tomcat/common/lib  placed.
java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver 
Any clue--- 

Thanks
Devinder


--
Notice:  This e-mail message, together with any attachments, contains information of 
Merck  Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or 
its affiliates (which may be known outside the United States as Merck Frosst, Merck 
Sharp  Dohme or MSD) that may be confidential, proprietary copyrighted and/or legally 
privileged, and is intended solely for the use of the individual or entity named on 
this message. If you are not the intended recipient, and have received this message in 
error, please immediately return this by e-mail and then delete it.
--

-
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: [Q] Multi server environment

2004-01-07 Thread Altankov Peter
Mark is right. If you go for, lets say, 2 tomcat workers they are totally independent 
instances of jvm and if they use DBCP and pool you actually get 2 pools. Thus if you 
set it with 16 connections each this is actually what you get.

-Original Message-
From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] 
Sent: 07  2004 . 11:18
To: [EMAIL PROTECTED]
Subject: [Q] Multi server environment


I'm asking this because I've had experience in
WebLogic with this, but I'm not even sure Tomcat can
be set up like this, so maybe this is a non-issue...
anyway...

Suppose you setup Tomcat to have two servers do load
balancing. Thus, you application is replicated over
two servers, although you only deploy it once to the
cluster.

How would Tomcat setup datasources? If I define a
connection pool with 16 connections, will it be sread
over the two servers, or will *each* get 16
connections.

If they are spread, how is it done? Tomcat uses DBCP,
which uses the Pool package which I guess have a
singleton that manages the connections ... but on
which server is the pool (singleton) then actually
active?

This is purely a matter of interest... I run Tomcat as
a single-server, so in theory I am free to use
singletons and be assured that they are indeed true
singletons and not a singleton per server.


__
Do you Yahoo!?
Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes 
http://hotjobs.sweepstakes.yahoo.com/signingbonus

-
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: Threaded servlets okay in a compliant container?

2004-01-07 Thread Altankov Peter
David, you can have wget/Scheduled task on Win box

-Original Message-
From: David Wall [mailto:[EMAIL PROTECTED] 
Sent: 05  2004 . 20:54
To: Tomcat Users List
Subject: Re: Threaded servlets okay in a compliant container?


The use of a cron job that does a WGET on a URL that triggers the background 
processing sounds nice, but what's the process that triggers that on a Windows box 
that doesn't have cron?  A huge power of our application is that it's written in Java 
and we can run it easily on Windows or Linux or Solaris.  Linux and Solaris could 
allow a cron job, but I'm not a Windows person so I don't know how I'd do the same 
there.

Also, if a process needs to be run every minute, or perhaps even every 5 to 15 seconds 
(like for processing a work queue), cron would be overkill because it would launch a 
new process, that process would have to construct the simple URL and the POST it to 
the system.  Also, if someone else also did POSTs to that same URL, they'd also 
trigger the background processing though it wouldn't be on schedule per se.

Using cron doesn't sound that much better than just writing a batch C/Java program 
that does this in a loop so that a process doesn't have to be started each time 
(though you then have the issue of what to do if the batch program terminates 
unexpectedly).  The key for me is to have a very simple to deploy and manage 
application, and keeping Tomcat and a database running should be the minimum in our 
environment, though we probably will also have an Apache web server handling the SSL 
and static content like javascripts, images, URL rewriting, allowing for easy port 
80/443 port listening without having to run as root, and allowing other types of 
backend apps run, like Perl/CGI or whatever.

By far the easiest way to deal with work queues is to allow one thread to insert a 
transaction into a queue and then notify() the other waiting threads that work has 
been inserted.  But that means that the work queue thread is a background thread and 
thus has issues with being truly compliant now and in the future.

By far the easiest way to deal with background tasks is to simply launch a thread that 
waits() for a certain amount of time and then does work when that times out.

Clearly, the cron type solution solves the thread issues, but at the expense of 
creating another program that needs to be configured and must run and must be checked 
if it's not running, and causes overhead each time it's launched.

David


-
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: Warning of session timeout.

2004-01-07 Thread Altankov Peter
And ofcourse, if you dont like the simple solutions and/or want to add more complex 
behaviour, you can always go for a Java Applet that connects to the server

-Original Message-
From: Michael Cardon [mailto:[EMAIL PROTECTED] 
Sent: 06  2004 . 20:04
To: Tomcat Users List
Subject: Warning of session timeout.


Hello,

When I'm doing online banking over the internet, I get a popup notice telling me my 
session is about to expire and asking me if I want to stay logged in or not.

How do they do this?  I would like to offer the same kind of message on our web site 
to our users when the session is about to expire.  Anyone know how this is done?

Thanks.

Michael


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Warning of session timeout.

2004-01-07 Thread Altankov Peter
No sorry, was just an idea :(

 -Original Message-
 From: Michael Cardon [mailto:[EMAIL PROTECTED] 
 Sent: 07  2004 . 17:51
 To: Tomcat Users List
 Subject: RE: Warning of session timeout.
 
 
 Do you know of any Java Applets out there that I could look 
 at for examples?
 
 Thanks.
 
 Michael
 
 -Original Message-
 From: Altankov Peter [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, January 07, 2004 6:23 AM
 To: Tomcat Users List
 Subject: RE: Warning of session timeout.
 
 
 And ofcourse, if you dont like the simple solutions and/or 
 want to add more complex behaviour, you can always go for a 
 Java Applet that connects to the server
 
 -Original Message-
 From: Michael Cardon [mailto:[EMAIL PROTECTED]
 Sent: 06  2004 . 20:04
 To: Tomcat Users List
 Subject: Warning of session timeout.
 
 
 Hello,
 
 When I'm doing online banking over the internet, I get a 
 popup notice telling me my session is about to expire and 
 asking me if I want to stay logged in or not.
 
 How do they do this?  I would like to offer the same kind of 
 message on our web site to our users when the session is 
 about to expire.  Anyone know how this is done?
 
 Thanks.
 
 Michael
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 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: TC 4.1.12 on Linux - session swapping

2004-01-07 Thread Altankov Peter
This has the taste of a thread safety issue. Do you guys happen to run the query 
against the same servlet? If yes, do you happen to use variables, defined in the 
servlet class scope in order to extract objects from session?

BR

 -Original Message-
 From: Norris Shelton [mailto:[EMAIL PROTECTED] 
 Sent: 07  2004 . 16:17
 To: 'Tomcat Users List'
 Subject: TC 4.1.12 on Linux - session swapping
 
 
 We are running TC 4.1.12 on Linux.  We have 8 different 
 websites that run on tomcat.  Most of them are low volume.
 
 We have encountered the problem where a test engine is 
 executing multiple requests from multiple machines using 
 multiple user accounts against a specific webapp.  Sometimes 
 the search results that come back are the search results for 
 a query that was supposed to be ran by one of the other machines.
 
 Here is an example.
 
 Machine 1 - user 1 -query 1
 Machine 2 - user 2 - query 2
 
 machine 1 will sometimes get the results from query 2.
 
 
 The session information holds all of the information.  This 
 is from an internal test against a test server so there is no 
 firewall, proxy, etc in the way.
 
 I have also been told that this has happened on one of our 
 other web apps also.  This time it was a production machine 
 and one of our most used webapps.  
 
 
 Any ideas?
 
 =
 
 Norris Shelton
 Software Engineer
 Sun Certified Java 1.1 Programmer
 Appriss, Inc.
 ICQ# 26487421
 AIM NorrisEShelton
 YIM norrisshelton
 
 
 __
 Do you Yahoo!?
 Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes 
 http://hotjobs.sweepstakes.yahoo.com/signingbonus
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat reconnect to database server?

2004-01-07 Thread Altankov Peter
The DBCP pool that you lookup from JNDI is already such a connection manager. Just try 
adding the validation query that Arthur suggested.
Im not sure for MSSQL but I use this for Oracle:
  parameter
 namevalidationQuery/name
 valueSELECT 1 FROM dual/value
  /parameter

This goes underResourceParams name=jdbc/your_resource

BR
 -Original Message-
 From: Derek Mahar [mailto:[EMAIL PROTECTED] 
 Sent: 07  2004 . 18:21
 To: Tomcat Users List
 Subject: RE: Tomcat reconnect to database server?
 
 
 Thanks for your reply.  Unfortunately, the Microsoft SQL 
 Server JDBC driver does not support an autoreconnect option.  
 Do I need a separate connection pool manager?  The MS SQL 
 Server JDBC driver documentation suggests that I might need 
 such a manager since the driver does not itself manage the 
 connection pool.
 
 Derek
 
 -Original Message-
 From: Philipp Taprogge [mailto:[EMAIL PROTECTED] 
 Sent: January 7, 2004 9:47 AM
 To: Tomcat Users List
 Subject: Re: Tomcat reconnect to database server?
 
 
 Hi!
 
 I don't know MSSQL in particular, but in princible it should be as 
 simple as adding ?autoreconnect=true to the driver URL.
 
   Phil
 
 Derek Mahar wrote:
  How can I configure Tomcat 5.0.16 to reconnect to a Microsot SQL
  Server after a server restart?  I have configured Tomcat to 
 use JNDI 
  datasources (through Resource and ResourceParam elements within 
  GlobalNamingResources).  I presume that at startup, 
 Tomcat connects 
  to the server and creates a pool of connections for later use.  
  However, when we restart our server, Tomcat loses its connection(s) 
  and does not re-establish these connections.
 
 -- 
 And on the seventh day, He exited from append mode.
 (Book of create(2), line 255)
 
 
 -
 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: Broken Pipe and Tomcat 4.1.24 -- Fixed?

2004-01-05 Thread Altankov Peter
Im was getting the same error in 4.1.24 then migrated to 4.1.29 but still getting it

-Original Message-
From: news.basebeans.net [mailto:[EMAIL PROTECTED] 
Sent: 03  2004 . 22:23
To: [EMAIL PROTECTED]
Subject: Broken Pipe and Tomcat 4.1.24 -- Fixed?


I'm using Tomcat 4.1.24 and I'm still getting broken pipe stack traces 
in my catalina log.

This ultimately forces a Out of Memory error.  Are we certain that this 
problem was resolved with 4.1.24? 
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4663)

Lukas


-
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: Errors when connecting Tomcat to Apache

2003-12-29 Thread Altankov Peter
Try this URL:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 29  2003 . 15:26
To: Tomcat Users List
Subject: Re: Errors when connecting Tomcat to Apache



How do I create the workers.properties?



-
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: strange error messages in tomcat log and mod_jk2 log

2003-12-16 Thread Altankov Peter
My production server setup is Apache/1.3.19 (built on HP-UX)mod_ssl/mod_jk/tomcat 
4.1.29 on a separate machine
I have a moderate loads of 5-10 hits per second and no really big responses (no more 
than 300k)
What I know so far is that this is caused by an attempt by the coyote connector to 
write in a already closed by the mod_jk socked.
The hints I have so far:
1. some proxy servers in the middle might explicitly close lenghty collections
2. lotso ppl blame users pressing stop button in browser!?
3. I follwed some forum thread somewhere (cant remember now) where the guys had 
observed as a weird bahaviour of Windows IE. They had narrowed the log entry 
appearances to a hit to a page where the request was submited like this:
a href=blah/blah.html onclick=if (boolean_exp) some_form.submit()
They were saying that the IE evaluates the onclick and submits the form, at the same 
time requests the blah/blah.html document, and THEN decides that the blah/blah.html 
document is not needed and just closes the socket. The guys also were saying that such 
a behaviour was not observed while tested with Mozzila and Opera browsers. They have 
been able to avoid it just by making the onclick event handler return false:
a href=blah/blah.html onclick=if (boolean_exp) some_form.submit(); return 
false
Though, I have not tested it myself.


-Original Message-
From: Chris Joelly [mailto:[EMAIL PROTECTED] 
Sent: 15  2003 . 10:31
To: Tomcat Users List
Subject: Re: strange error messages in tomcat log and mod_jk2 log


Hi!

thanx for your reply. hm. it's a very strange thing.

some questions:

are you running your application under heavy load?
are the responses very big in size?
do you use the apache2/mod_jk2/tomcat4 config on a windows nt4 box? does a dialogbox 
appear on the server with an error message stateing that the apache.exe caused an 
internal error, and after pressing Ok the apache2 server continues to run?

maybe we can find some similarities.

we have no idea what direction to look for, and the problem is very critical because a 
very big application is crashing every few minutes, so a production environment 
couldn't be setup... :-((

thx, Chris

Am Fri, Dec 12, 2003 at 01:46:13PM +0200, Altankov Peter meinte:
 Hi!
 Im gettting a similar traces in catalina.out:
 
 Dec 11, 2003 8:00:03 PM org.apache.jk.server.JkCoyoteHandler action
 SEVERE: Error in action code
 java.net.SocketException: Broken pipe
 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:457)
 at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:654)
 at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:435)
 at org.apache.coyote.Response.action(Response.java:222)
 at org.apache.coyote.Response.finish(Response.java:343)
 at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:314)
 at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387)
 at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)
 at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615)
 at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)
 at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
 at java.lang.Thread.run(Thread.java:536)
 
 Acompanied with this in mod_jk.log:
 [Thu Dec 11 20:38:39 2003]  [jk_ajp13_worker.c (381)]: Error 
 ajp13_process_callback - write failed (in my config they run on 
 separate UNIX boxes and unfortunately the one is 38 minutes ahead in 
 time )
 
 I have no clue what might be causing it. Posted it coupleof times but 
 got no comments. Although my tomcat don?t seem to crash, I don?t 
 consider it?s a normal situation.
 
 Any ideas someone?
 Thanks in advance!

-- 
mit freundlichen Gren / with kind regards
 
Ing. Christian Jlly @ Solutions
unycom  Information Technology Services GmbH
A-8042 Graz | Schmiedlstrae 1 / III

Tel: ++43 (0)316 / 818 828 - 30
Fax: ++43 (0)316 / 818 828 - 38
[EMAIL PROTECTED]
http://www.unycom.com

Ein Physiker, ein Mathematiker und ein Windows-Programmierer fahren in einem Auto, als 
dieses pltzlich der Geist aufgibt. Der Physiker schlgt vor, mal das Benzin zu 
kontrollieren.  Der Mathematiker sagt, er verstehe nicht viel von Autos, aber man 
solle mal das Khlwasser berprfen. Der Windows-Programmierer meint, er wrde 
zuerst alle Fenster schlieen, aussteigen, erneut einsteigen und dann alle Fenster 
wieder ffnen.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: response.reset() and forward() ... problematic? DBCP related?

2003-12-15 Thread Altankov Peter
Thanks for the nice feed-back Anthony.
And Antonio, just for the record, the snipplet:

public class TestServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
[]
forward(whatever, req, res);

}
protected void forward(String s, HttpServletRequest req, HttpServletResponse 
res) {
[...]
}
}

IS thread safe, since only method variables are used (which actually are copied for 
every thread).

-Original Message-
From: Anthony Presley [mailto:[EMAIL PROTECTED] 
Sent: 12  2003 . 18:33
To: Tomcat Users List
Subject: Re: response.reset() and forward() ... problematic? DBCP related?


Thanks for your help everyone . after some number of hours of work yesterday, I 
managed to get everything changed over, and I'm NOT using the SingleThreadModel.  I 
inherited part of the code, and wrote most of the rest  a couple of perl scripts 
was able to help significantly.

Long and the short, was we were trying to get away with an OOP design, in which all of 
our servlets derived from a single class (which in turn, implements HttpServlet), so 
that our forward(), logging, and erroring methods could be easily implemented.  In 
doing so, you were all correct, we were over-writing our own variables.

On Wednesday I upgraded to the latest DBCP and Commons Pool, as well as the latest 
JDBC driver for our vendor, reducing the number of those errors from an enormous 760 
to 220.  Today, thus far, we've had a total of 10 errors, only two of which were 
related to that same problem, and probably are from me missing something in the code.

Thanks for your help in this mess 

--Anthony


On Thu, 2003-12-11 at 15:00, Antonio Fiol Bonnn wrote:
 So . what your telling me, is that it's a concurrency problem 
 created by having object attributes?  That if they were, in fact 
 being called more like:
 
  doProcess2 ();
 
 than like:
 
  doProcess1 ();
 
 I wouldn't have these problems?  Very interesting.
   
 
 
 Not quite. I don't really understand your structue, but it seems it
 needs some refactoring.
 
 Please write back and ensure that's what you mean . because I'm 
 pretty sure it is.  Oh, fun.  Here I go to change  some 100K 
 lines of code :-)
 
   
 
 
 As a rule of thumb, do not let your req and res leave local scope
 (do not store them anywhere [attribute, static attribute, other 
 object, ...]).
 
 If you need help with the refactoring and I can access your code, I
 might help on saturday. (Which timezone do you live on?)
 
 Yours,
 
 Antonio Fiol

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: response.reset() and forward() ... problematic? DBCP related?

2003-12-12 Thread Altankov Peter
I totally agree with you, its not :), I just had 10 free minutes and layed out some 
hints

-Original Message-
From: Antonio Fiol Bonnin [mailto:[EMAIL PROTECTED] 
Sent: 11  2003 . 22:51
To: Tomcat Users List
Subject: Re: response.reset() and forward() ... problematic? DBCP related?


Sorry, but I think your solution is not completely thread safe, because you do not 
declare doGet synchronized. If you did that, it would be thread safe. But what is the 
point then? Declare the servlet as implements SingleThreadModel, and you are done!

Obviously, you will not avoid other global or out of scope variables concurrency 
problems with that.

Yours,

Antonio Fiol


Altankov Peter wrote:

If you go for the SingleThreadModel, try this to workaround your 
problem:

public class TestServlet extends HttpServlet implements SingleThreadModel {
...
}

However, this interface does not prevent synchronization problems that 
result from servlets accessing shared resources such as static class 
variables or classes outside the scope of the servlet and moreover its 
depricated.(http://jakarta.apache.org/tomcat/tomcat-5.0-doc/servletapi/
javax/servlet/SingleThreadModel.html)

In general avoid any global variables in the scope of the servlet class 
definition unless you know what you are doing. Use method variables 
instead. If you decide to go for the real problem solution, either 
declare the req and res objects in the, lets say,  doGet method and 
pass them to the forward method, or keep their declaration in the 
servlet class but mark the forward method as syncronized (causing 
threads to enter it one by one).

Here are your hnt snipplets:

// the workaround
public class TestServlet extends HttpServlet {
private HttpServletRequest req;
private HttpServletResponse res;
[...]
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
[.]
forward(whatever);
}

protected synchronized void forward(String s) {
[.. Here is where you refer the global req and res objects ..]
[.. but its safe, since the method is marked as synchronized ..]
}
}

-- Or --

// some real solution
public class TestServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
HttpServletRequest req;
HttpServletResponse res;
[]
forward(whatever, req, res);

}
protected void forward(String s, HttpServletRequest req, HttpServletResponse 
 res) {
[...]
}
}


I hope this helps.


-Original Message-
From: Philipp Taprogge [mailto:[EMAIL PROTECTED]
Sent: 11  2003 . 16:28
To: Tomcat Users List
Subject: Re: response.reset() and forward() ... problematic? DBCP 
related?


Hi!

Antonio Fiol Bonnn wrote:

  

My guess:

req and res are attributes of the Servlet, like in:
public class TestServlet extends HttpServlet {
private HttpServletRequest req;
private HttpServletResponse res;
[...]
}

So you are calling forward(s) for a request once req and res have 
been overwritten by another request.



Hmm... Im a bit lost here... could anyone perhaps be so kind and post a 
code snipplet of how a thread safe use of a Servlet's request and 
response attribute could look like? I have not been working with 
Servlets for too long and I worried I might run into the same problem.
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5 and oracle

2003-12-12 Thread Altankov Peter
By the way, since you are redefining the Resource in your metrology2.xml, you can 
actually remove it form the server.xml.


-Original Message-
From: Jonathan Drnek [mailto:[EMAIL PROTECTED] 
Sent: 11  2003 . 21:05
To: Tomcat Users List
Subject: RE: Tomcat 5 and oracle


I got it. 

I was not putting the ResourceParams in my metrology2.xml file

Thanks for the help

Jon

-Original Message-
From: Jonathan Drnek 
Sent: Thursday, December 11, 2003 1:30 PM
To: Tomcat Users List
Subject: RE: Tomcat 5 and oracle

I've been spending some time RTFM with out much progress.

I don't know if it matters but my data source is setup under GlobalNamingResources

I do not have any context defined in server.xml  instead I have the context in a file 
at conf/Catalina/localhost/metrology2.xml and it looks like

Context debug=9 displayName=Metrology Lab docBase=metrology2 path=/metrology2
  Loader className=org.apache.catalina.loader.WebappLoader debug=9/
  Logger className=org.apache.catalina.logger.FileLogger debug=9 
prefix=metrology2 suffix=.txt timestamp=true verbosity=4/
  Resource auth=Container description=Oracle Datasource example name=jdbc/ordt 
type=javax.sql.DataSource/ /Context 

I didn't actually create it.  Tomcat must have created it for me.

Web.xml is located in webapps/metrology2/WEB-INF and looks like

Context debug=9 displayName=Metrology Lab docBase=metrology2 path=/metrology2
  Loader className=org.apache.catalina.loader.WebappLoader debug=9/
  Logger className=org.apache.catalina.logger.FileLogger debug=9 
prefix=metrology2 suffix=.txt timestamp=true verbosity=4/
  Resource auth=Container description=Oracle Datasource example name=jdbc/ordt 
type=javax.sql.DataSource/ /Context

My default server.xml got overwritten when I was playing around with the admin tool 
and now looks like:

?xml version='1.0' encoding='utf-8'?
Server
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener/
  Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/
  GlobalNamingResources
Environment name=simpleValue type=java.lang.Integer value=30/
Resource auth=Container description=User database that can be updated and 
saved name=UserDatabase type=org.apache.catalina.UserDatabase/
Resource auth=Container description=orderline test database name=jdbc/ordt  
scope=Shareable type=javax.sql.DataSource/
ResourceParams name=UserDatabase
  parameter
namefactory/name
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams
ResourceParams name=jdbc/ordt
  parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  parameter
nameurl/name
valuejdbc:oracle:thin:@holl302h:1521:ORDT/value
  /parameter
  parameter
namepassword/name
valuejunk/value
  /parameter
  parameter
namemaxActive/name
value4/value
  /parameter
  parameter
namemaxWait/name
value5000/value
  /parameter
  parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
nameusername/name
valueordline/value
  /parameter
  parameter
namemaxIdle/name
value2/value
  /parameter
/ResourceParams
  /GlobalNamingResources 
  Service name=Catalina
Connector acceptCount=100 connectionTimeout=2 disableUploadTimeout=true 
port=8080 redirectPort=8443
/Connector
Connector port=8009 protocol=AJP/1.3 
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler redirectPort=8443
/Connector
Engine defaultHost=localhost name=Catalina
  Host appBase=webapps name=localhost
Logger className=org.apache.catalina.logger.FileLogger 
prefix=localhost_log. suffix=.txt timestamp=true/
  /Host
  Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. 
suffix=.txt timestamp=true/
  Realm className=org.apache.catalina.realm.UserDatabaseRealm/
/Engine
  /Service
/Server

I found a JSP page that will display my JNDI recources and here is part of what that 
shows

* Context: java:/ 
o Context: java:/comp 
* UserTransaction=Reference Class Name: javax.transaction.UserTransaction Reference
type: javax.transaction.UserTransaction
* Context: java:/comp/env 
* Context: java:/comp/env/jdbc 
* ordt=[EMAIL PROTECTED] 
Url - null
DriverClassName - null
Username - null
Password - null
ValidationQuery - null
NumActive - 0
NumIdle - 0


Back to the docs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For 

RE: JNDI comp namespace

2003-12-12 Thread Altankov Peter
Howdy,Try this setup in your context definition:
   Resource name=jdbc/NNT auth=Container type=javax.sql.DataSource/

   ResourceParams name=jdbc/NNT .


After that in the source where u access it go for:
Context ictx = new InitialContext();
if (ictx == null) {
throw new Exception(Boom - No Context);
}
DtataSource ds = (DataSource) ictx.lookup(java:comp/env/jdbc/NNT);

I dont have the time to go into JNDI details, but im pretty sure that wold work for 
you


-Original Message-
From: Tony Colson [mailto:[EMAIL PROTECTED] 
Sent: 12  2003 . 10:48
To: 'Tomcat Users List'
Subject: RE: JNDI comp namespace


As per a suggestion I am posting my server.xml file.

I have several applications on different ports.  I am trying to use JNDI on the NNT 
application running on port 9000.  Do a search for 9000 and you will be at the 
Service... tag.  Just scroll down to see the Context and Resource tags to look 
at my setup.  (Also note that I am trying to use GlobalNamingResources as seen at 
the top of the file.)

Thanks
Tony
= START SERVER.XML ==

!-- Example Server Configuration File --
!-- Note that component elements are nested corresponding to their
 parent-child relationships with each other --

!-- A Server is a singleton element that represents the entire JVM,
 which may contain one or more Service instances.  The Server
 listens for a shutdown command on the indicated port.

 Note:  A Server is not itself a Container, so you may not
 define subcomponents such as Valves or Loggers at this level.  --

Server port=8005 shutdown=SHUTDOWN debug=0


  !-- Comment these entries out to disable JMX MBeans support --
  !-- You may also configure custom components (e.g. Valves/Realms) by 
   including your own mbean-descriptor file(s), and setting the 
   descriptors attribute to point to a ';' seperated list of paths
   (in the ClassLoader sense) of files to add to the default list.
   e.g. descriptors=/com/myfirm/mypackage/mbean-descriptor.xml
  --
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
debug=0/
  Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
debug=0/

  !-- Global JNDI resources --
  GlobalNamingResources

!-- Test entry for demonstration purposes --
Environment name=simpleValue type=java.lang.Integer value=30/

!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users --
Resource name= UserDatabase 
  auth= Container
  type= org.apache.catalina.UserDatabase
  description = User database that can be updated and saved
/Resource
ResourceParams name=UserDatabase
  parameter
namefactory/name
 
valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value
  /parameter
  parameter
namepathname/name
valueconf/tomcat-users.xml/value
  /parameter
/ResourceParams

!-- The PostgreSQL NNT database on horse --



  /GlobalNamingResources

  !-- A Service is a collection of one or more Connectors that share
   a single Container (and therefore the web applications visible
   within that Container).  Normally, that Container is an Engine,
   but this is not required.

   Note:  A Service is not itself a Container, so you may not
   define subcomponents such as Valves or Loggers at this level.
   --

  !-- Define the Tomcat Stand-Alone Service --
  Service name=Tomcat-Standalone

!-- A Connector represents an endpoint by which requests are received
 and responses are returned.  Each Connector passes requests on to the
 associated Container (normally an Engine) for processing.

 By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
 You can also enable an SSL HTTP/1.1 Connector on port 8443 by
 following the instructions below and uncommenting the second Connector
 entry.  SSL support requires the following steps (see the SSL Config
 HOWTO in the Tomcat 4.0 documentation bundle for more detailed
 instructions):
 * Download and install JSSE 1.0.2 or later, and put the JAR files
   into $JAVA_HOME/jre/lib/ext.
 * Execute:
 %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA
(Windows)
 $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA
(Unix)
   with a password value of changeit for both the certificate and
   the keystore itself.

 By default, DNS lookups are enabled when a web application calls
 request.getRemoteHost().  This can have an adverse impact on
 performance, so you can disable it by setting the
 enableLookups attribute to false.  When DNS lookups are disabled,
 request.getRemoteHost() will return the String version of the
 IP address of the 

RE: strange error messages in tomcat log and mod_jk2 log

2003-12-12 Thread Altankov Peter
Hi!
Im gettting a similar traces in catalina.out:

Dec 11, 2003 8:00:03 PM org.apache.jk.server.JkCoyoteHandler action
SEVERE: Error in action code
java.net.SocketException: Broken pipe
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:457)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:654)
at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:435)
at org.apache.coyote.Response.action(Response.java:222)
at org.apache.coyote.Response.finish(Response.java:343)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:314)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:615)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
at java.lang.Thread.run(Thread.java:536)

Acompanied with this in mod_jk.log:
[Thu Dec 11 20:38:39 2003]  [jk_ajp13_worker.c (381)]: Error ajp13_process_callback - 
write failed
(in my config they run on separate UNIX boxes and unfortunately the one is 38 minutes 
ahead in time )

I have no clue what might be causing it. Posted it coupleof times but got no comments.
Although my tomcat dont seem to crash, I dont consider its a normal situation.

Any ideas someone?
Thanks in advance!


-Original Message-
From: Chris Joelly [mailto:[EMAIL PROTECTED] 
Sent: 11  2003 . 12:30
To: [EMAIL PROTECTED]
Subject: strange error messages in tomcat log and mod_jk2 log


Hello!

i found some strange error messages in both tomcat log and mod_jk2 log and i can't 
figure out whats going on:

tomcat log:

Dec 10, 2003 11:40:58 AM org.apache.jk.server.JkCoyoteHandler action

SEVERE: Error in action code

java.net.SocketException: Software caused connection abort: socket write error

 at java.net.SocketOutputStream.socketWrite0(Native Method)
 at java.net.SocketOutputStream.socketWrite (SocketOutputStream.java:92)
 at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
 at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407)
 at org.apache.jk.common.ChannelSocket.invoke (ChannelSocket.java:599)
 at org.apache.jk.server.JkCoyoteHandler.action (JkCoyoteHandler.java:385)
 at org.apache.coyote.Response.action(Response.java:222)
 at org.apache.coyote.Response.finish(Response.java:343)
 at org.apache.coyote.tomcat4.OutputBuffer.close (OutputBuffer.java:326)
 at org.apache.coyote.tomcat4.CoyoteResponse.finishResponse 
(CoyoteResponse.java:500)
 at org.apache.coyote.tomcat4.CoyoteAdapter.service 
(CoyoteAdapter.java:224)
 at org.apache.jk.server.JkCoyoteHandler.invoke (JkCoyoteHandler.java:263)
 at org.apache.jk.common.HandlerRequest.invoke (HandlerRequest.java:360)
 at org.apache.jk.common.ChannelSocket.invoke (ChannelSocket.java:604)
 at org.apache.jk.common.ChannelSocket.processConnection 
(ChannelSocket.java:562)
 at org.apache.jk.common.SocketConnection.runIt (ChannelSocket.java:679)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run 
(ThreadPool.java:619)
 at java.lang.Thread.run(Thread.java:536)

Dec 10, 2003 11:40:58 AM org.apache.jk.server.JkCoyoteHandler action

SEVERE: Error in action code

java.net.SocketException: Software caused connection abort: socket write error

 at java.net.SocketOutputStream.socketWrite0(Native Method)
 at java.net.SocketOutputStream.socketWrite (SocketOutputStream.java:92)
 at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
 at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407)
 at org.apache.jk.common.ChannelSocket.invoke (ChannelSocket.java:599)
 at org.apache.jk.server.JkCoyoteHandler.action (JkCoyoteHandler.java:385)
 at org.apache.coyote.Response.action(Response.java:222)
 at org.apache.coyote.Response.finish(Response.java:343)
 at org.apache.jk.server.JkCoyoteHandler.invoke (JkCoyoteHandler.java:268)
 at org.apache.jk.common.HandlerRequest.invoke (HandlerRequest.java:360)
 at org.apache.jk.common.ChannelSocket.invoke (ChannelSocket.java:604)
 at org.apache.jk.common.ChannelSocket.processConnection 
(ChannelSocket.java:562)
 at org.apache.jk.common.SocketConnection.runIt (ChannelSocket.java:679)
 

RE: mapping different JKMounts to same Tomcat context

2003-12-11 Thread Altankov Peter
Why dont you try the Apache's mod_alias directive:

IfModule mod_alias.c
   Alias /xyz/ /path/to/abc
/IfModule

Since you have only 1 instance of tomcat and one instance of your webapp - this 
should do.


-Original Message-
From: Vijay Kandy [mailto:[EMAIL PROTECTED] 
Sent: 10  2003 . 18:52
To: 'Tomcat Users List'
Subject: RE: mapping different JKMounts to same Tomcat context


Thank you but the doc doesnt describe mapping to same context.

If I have one worker per Tomcat instance, they work fine e.g:

JKMount /abc/* WORKER1
JKMount /xyz/* WORKER2

where WORKER1 and WORKER2 are two different instances - this setup works fine.

But I would like to do:

JKMount /abc/* WORKER
JKMount /xyz/* WORKER

where WORKER is a Tomcat with just one context.

Thanks,
Vijay



-Original Message-
From: Michael Cardon [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 11:45 AM
To: Tomcat Users List
Subject: RE: mapping different JKMounts to same Tomcat context


You can look at my HOW-TO file at http://www.cardon.biz/docs/tomcat/ and see if this 
helps you...


-Original Message-
From: Vijay Kandy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 8:35 AM
To: 'Tomcat Users List'
Subject: mapping different JKMounts to same Tomcat context


Hello all,

I am not able to find a solution in the archives to my issue. I would like to mount 
different requests to the same context in Tomcat e.g:

Lets say I have a context called /test in Tomcat (v4.1.27)

I would like to map requests starting with
www.abc.net/foo to /test
www.abc.net/bar to /test

Has anyone done this before?

Thanks,
Vijay

-
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: response.reset() and forward() ... problematic? DBCP related?

2003-12-11 Thread Altankov Peter
Antonio Fiol wrote:
If you really cannot follow any of the above, there is still one
solution:

- Make sure your servlet implements SingleThreadModel. This will
ensure a different instance is used for all concurrent requests, or
that
no concurrent requests will occur.

Hope that helps.

Antonio Fiol


Either that or you can just declare your method syncrnized:

 protected synchronized void forward(String s) { 

Which ofcourse will become a bottleneck of you application during loads.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: response.reset() and forward() ... problematic? DBCP related?

2003-12-11 Thread Altankov Peter
If you go for the SingleThreadModel, try this to workaround your problem:

public class TestServlet extends HttpServlet implements SingleThreadModel {
...
}

However, this interface does not prevent synchronization problems that result from 
servlets accessing shared resources such as static class variables or classes outside 
the scope of the servlet and moreover its 
depricated.(http://jakarta.apache.org/tomcat/tomcat-5.0-doc/servletapi/javax/servlet/SingleThreadModel.html)

In general avoid any global variables in the scope of the servlet class definition 
unless you know what you are doing. Use method variables instead.
If you decide to go for the real problem solution, either declare the req and res 
objects in the, lets say,  doGet method and pass them to the forward method, or keep 
their declaration in the servlet class but mark the forward method as syncronized 
(causing threads to enter it one by one).

Here are your hnt snipplets:

// the workaround
public class TestServlet extends HttpServlet {
private HttpServletRequest req;
private HttpServletResponse res;
[...]
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
[.]
forward(whatever);
}

protected synchronized void forward(String s) {
[.. Here is where you refer the global req and res objects ..]
[.. but its safe, since the method is marked as synchronized ..]
}
}

-- Or --

// some real solution
public class TestServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
HttpServletRequest req;
HttpServletResponse res;
[]
forward(whatever, req, res);

}
protected void forward(String s, HttpServletRequest req, HttpServletResponse 
res) {
[...]
}
}


I hope this helps.


-Original Message-
From: Philipp Taprogge [mailto:[EMAIL PROTECTED]
Sent: 11  2003 . 16:28
To: Tomcat Users List
Subject: Re: response.reset() and forward() ... problematic? DBCP related?


Hi!

Antonio Fiol Bonnn wrote:

 My guess:

 req and res are attributes of the Servlet, like in:
 public class TestServlet extends HttpServlet {
 private HttpServletRequest req;
 private HttpServletResponse res;
 [...]
 }

 So you are calling forward(s) for a request once req and res have
 been
 overwritten by another request.

Hmm... Im a bit lost here... could anyone perhaps be so kind and post
a code snipplet of how a thread safe use of a Servlet's request and
response attribute could look like? I have not been working with
Servlets for too long and I worried I might run into the same problem.

Thanks in advance

Phil

--
I love deadlines, I love the whooshing noise they make as they go by
- Douglas Adams


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to configure the default application in apache to point to tomcat??

2003-12-09 Thread Altankov Peter
The reason for 404 is that your application context is mapped in tomcat container 
under /myapp. Try this:

   JkMount /* your_worker_definition

In apache httpd.conf, and:

Context debug=0
 docBase=/absolute/path/to/myapp  - (or relative to CATALINA_HOME 
ofcorse)
 path=   - this tells comcat that 
requests for / should be mapped to myapp

I hope this hints help.

-Original Message-
From: Natarajan Arun [mailto:[EMAIL PROTECTED] 
Sent: 09  2003 . 00:03
To: [EMAIL PROTECTED]
Subject: How to configure the default application in apache to point to tomcat??


Hi,
I have integrated tomcat and apache. Now when I type http://localhost/myapp i get the 
page from the tomcat myapp application. However now, I want http://localhost to point 
to this application, since this is my default application. What configuration would I 
have to change ?? I tried using
+ Redirect / http://localhost/myapp in the apache httpd.conf but that 
+ did
not work.
+ Changing the alias in mod_jk.conf to / instead of /myapp also did not
help. It lists the directory but then invoking any pages results in a file not found 
because it is probably looking in apcahe's document root.

Thanks for any help.
Arun N.


-
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: where to put context myapp.xml files

2003-12-09 Thread Altankov Peter
It must be put in TOMCAT_HOME/webapps, where webapps is defined in your server.xml 
's Host tag, i.e.:

Host name=localhost debug=0 appBase=path_to_webapps_folder/

---AND ---

Your context is marked as reloadable i.e:

Context debug=0
 docBase=/path/to/your_app
 path=/desired_mapping
 reloadable=true  this property set to true



-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 09  2003 . 13:09
To: Tomcat Users List
Subject: where to put context myapp.xml files


Hi,
I thought that xml context configuration files had to reside in 
tomcat/webapps, but it seems they only take effect when they are placed 
in tomcat/conf/Catalina/localhost.

Is this correct or am I doing something that prevents tomcat from using 
it when I place it in webapps?

Thanks
Adam

-
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]



java.net.SocketException: Broken pipe

2003-12-08 Thread Altankov Peter
Im running tomcat 4.1.29 with mod_jk2 under apache and getting constant
stack traces in catalina.out like this one:
 
Dec 8, 2003 8:04:49 PM org.apache.jk.server.JkCoyoteHandler action
SEVERE: Error in action code
java.net.SocketException: Broken pipe
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:457)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:654)
at
org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:435)
at org.apache.coyote.Response.action(Response.java:222)
at org.apache.coyote.Response.finish(Response.java:343)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:314)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:387)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:673)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
615)
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:786)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:666)
at java.lang.Thread.run(Thread.java:536)

 
Have anybody ran over this issue and is it fixable? I already red some
posting about firewalls closing connections after some period of time
and Stop button pressed in browser. But is there any reasonable
solution for this, since i cant ignore firewalls and cant make users not
press stop?
 
thanks in advance for any hints
 


Tomcat 4.1.24 and mod_jk

2003-12-03 Thread Altankov Peter
Hi,
I am migrating to tomcat 4.1.24 and mod_jk on apache 1.3.26
configuration
Unfortunately when i deploy my production webapp im getting constant
lines in the catalina.out log file
 
[INFO] ChannelSocket - -server has been restarted or reset this
connection
 
This INFO line is actually loged 3 and more times per request (js, img,
css includes in HTML?).
When I google it all I get is some postings about apache restarting its
childs in order to avoid memory leeks. Obviously its not the case.
 
Do u guys have any clue?
Thanks in advance.