mod_jk 1.2.13 logging - bug in mod_jk?

2005-06-15 Thread Ryszard Lach
Hi.

After upgrading mod_jk to 1.2.13 I'm observing a strange change in my
mo_jk.log. I'm almost sure, that not all entries appear in my log, there
is an extra empty line between every log line and dates displayed in log
entries are not ordered, as they were before upgrade, e.g.:

[Wed Jun 15 20:15:53 2005] inst1 0.023552 3526 my.host.pl 443 
/servlet/document_view_autor_statement.xml
[Wed Jun 15 20:15:55 2005] inst1 0.011634 3690 my.host.pl 443 
/servlet/177214.xml
[Wed Jun 15 20:16:16 2005] inst1 0.035606 4455 my.host.pl 443 
/servlet/scheduler_list.xml
[Wed Jun 15 20:16:42 2005] inst1 0.023546 3484 my.host.pl 443 
/servlet/document_view_session_schedule.xml
[Wed Jun 15 20:16:54 2005] inst1 0.081832 4137 my.host.pl 443 
/servlet/message.xml
[Wed Jun 15 20:21:22 2005] inst1 0.229055 7964 my.host.pl 443 /servlet/desk.xml
[Wed Jun 15 20:21:47 2005] inst1 0.366541 7059 my.host.pl 443 /servlet/desk.xml
[Wed Jun 15 19:59:04 2005] inst1 0.110294 3619 my.host.pl 443 
/servlet/cons_top.xml
[Wed Jun 15 19:59:04 2005] inst1 0.002093 2071 my.host.pl 443 
/servlet/servlets.JavaScriptConfiguration
[Wed Jun 15 20:00:00 2005] inst1 0.234826 12577 my.host.pl 443 
/servlet/catalog_list.xml
[Wed Jun 15 20:00:05 2005] inst1 0.143422 12577 my.host.pl 443 
/servlet/catalog_list.xml
[Wed Jun 15 20:00:15 2005] inst1 0.132816 12577 my.host.pl 443 
/servlet/catalog_list.xml

Is this a bug?

My config is:

a few virtualhosts, in main section of httpd.conf only JkWorkersFile directive,
in every virtualhost section logging defined by:

  JkLogFile /var/log/apache/mod_jk.log
  JkLogLevel info
  JkRequestLogFormat %w %T %b %V %p %U

I was using mod_jk 1.2.6 before and mod_jk.log looked fine. This strange
behaviour I'm observing with 1.2.13 and 1.2.10. 

Version 1.2.8 generates a log with lines like

[Wed Jun 15 19:52:00 2005] [info]  jk_handler::mod_jk.c (1691): Service 
returned error=1 with status=200 for worker=inst1

instead of empty lines added by 1.2.13.

Is there a known issue with this logging problem?

Richard.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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



Turning cookie JSESSIONID off (selectively)

2003-10-24 Thread Ryszard Lach
Hi.

Is there possible to turn off cookie JSESSIONID? I would like to use
squid in reverse-proxy mode with a Java application (Tomcat 4.1), but
squid does not cache pages with this cookie set. I can not turn it off
at all, because a part o my application uses cookies for session
management. 

Any suggestions will be appreciated.

Richard.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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



Debugging tomcat cluster performance (Apache1.3+mod_jk+Tomcat4.1.18)

2003-03-16 Thread Ryszard Lach
Hi!

Is there any way to debug performance/load of particular node in tomcat
cluster? I remember that it was possible with JServ to configure log
file so, that it contained information about how many requests are
served by each node. I tried to configure JkRequestLogFormat to do the
same thing, but it can show only worker name, which is 'loadbalancer'
for all requests. It seems that increasing JkLogLevel doesn't help too.
Do you have any other ideas? I'd like to get an info like this:


Worker  Request ExecTime
tomcat1 /servlet/some.servlet2  2.34
tomcat2 /servlet/some.other.servlet 3.12
tomcat3 /servlet/some.servlet   0.28
tomcat2 /servlet/some.servlet3  1.21

with workers.properties like this:

[...]
worker.list=loadbalancer
worker.loadbalancer.balanced_workers=tomcat1,tomcat2,tomcat3
[...]


If it is not possible with mod_jk - maybe mod_jk2 has similar feature?

TIA

Richard.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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



Access control in Apache+tomcat (mod_jk)

2002-11-18 Thread Ryszard Lach
Hi!

How does work access control with apache 'Location' directive? I'm using
apache+mod_jk+tomcat with 

JkMount /servlet/* ajp13


and 

Location /servlet/some.servlet.*
..
require user someuser
/Location

and apache seems to ignore this access control restriction when I'm
entering the url http://myhost.mydomain/servlet/some.servlet.example
Should I include this restriction into my app's web.xml file? Anyway,
adding something like 

  servlet-mapping
servlet-nameinvoker/servlet-name
url-pattern/servlet/*/url-pattern
  /servlet-mapping

  security-constraint
web-resource-collection
   web-resource-namemyhost.mydomain/web-resource-name
   url-pattern/servlet/some.servlet.*/url-pattern
/web-resource-collection
auth-constraint
   role-namesomerole/role-name
/auth-constraint
  /security-constraint

does not require to authenticate too. What am I doing wrong?

TIA

Richard.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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




How to disable autoloading all directories in 'appBase'?

2002-11-16 Thread Ryszard Lach
Hi!

Does anybody now how to prevent tomcat (4.0.5) from loading all
directories created in directory defined in 'app base' as applications?

Look at this setting:

Engine name=Inst-6-Engine defaultHost=myhost debug=0

  Host name=myhost debug=0 appBase=webapps unpackWARs=false
Context path= docBase=myhost
 debug=0/
/Engine

webapps contains directories:

  myhost
  otherdir

and tomcat loads

webapps/myhost at context 
webapps/myhost at context /myhost
webapps/otherdir at context /otherdir

How to switch it off?

Richard.


-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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




Balancer and sessions

2002-11-06 Thread Ryszard Lach
Hi!

I'm trying to get work apache + tomcat4.0.5 with load balancer worker
(mod_jk), but it seems it doesn't forward all requests of one session to
the same worker. I've been used balancing with jserv and that wasn't a
problem - if servicing of the session was started with jserv1, then the
whole session was served with jserv1 (as long as jserv1 was running).
Now, with tomcat4.0.5 I see the requests are forwarding regardless of
sessions, what causes losing sessions after first (or second) request.

Is there something I'm missing with setting of the balancer?

My workers.properties is as follows:

worker.list=loadbalancer,ajp13  # I'm using ajp13 worker as is in other
# virtualhost too, I'hope it's not a
# problem

worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=100

worker.ajp13s.port=8009
worker.ajp13s.host=192.168.130.9
worker.ajp13s.type=ajp13
worker.ajp13s.lbfactor=100

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp13,ajp13s

Is there any documentation about using loadbalancer and its directives?

Thanks for any help.

Richard.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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




Re: Balancer and sessions

2002-11-06 Thread Ryszard Lach
On Wed, Nov 06, 2002 at 11:44:07AM +0100, Juan Fco. Herrera Utande wrote:
 Hi,
 
 Make sure that you have the following in the server.xml files:
 
 - server.xml in Localhost: jvmroute=ajp13
 - server.xml in 192.168.130.9: jvmroute=ajp13s
 

In which section should it be? 

R.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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




Re: Balancer and sessions

2002-11-06 Thread Ryszard Lach
On Wed, Nov 06, 2002 at 11:56:51AM +0100, Juan Fco. Herrera Utande wrote:
 In the Engine section.
 
 You have more details in the documentation.
 

Yes, indeed. Now it works just great.

Thanks a lot.

Richard.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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




Re: Response encoding problem

2002-10-16 Thread Ryszard Lach

On Wed, Oct 16, 2002 at 05:41:58PM +0200, Dragomir Denev wrote:
 Hi all,
 
 I have a simple servlet that retrieves a string from the database via jdbc.
 The database is sybase and its default encoding is utf-8. I run tomcat
 with -Dfile.encoding=iso-8859-7 option. In the servlet I do a
 System.out.println() for the string and on the console I get the correct
 greek symbols. But when I send the string via the response object I get
 trash in the browser. The servlet looks like this:
 

Did you try:

-Djavax.servlet.request.encoding=ISO-8859-7 

???

BTW: I didn't know there is -Dfile.encoding switch recognized by Tomcat.
I hope it will solve my problems with encoding during file or tcp socket
print ;-))

Richard.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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




Re: Response encoding problem

2002-10-16 Thread Ryszard Lach

On Wed, Oct 16, 2002 at 06:06:02PM +0200, Ryszard Lach wrote:
 On Wed, Oct 16, 2002 at 05:41:58PM +0200, Dragomir Denev wrote:
  Hi all,
  
  I have a simple servlet that retrieves a string from the database via jdbc.
  The database is sybase and its default encoding is utf-8. I run tomcat
  with -Dfile.encoding=iso-8859-7 option. In the servlet I do a
  System.out.println() for the string and on the console I get the correct
  greek symbols. But when I send the string via the response object I get
  trash in the browser. The servlet looks like this:
  
 
 Did you try:
 
 -Djavax.servlet.request.encoding=ISO-8859-7 
 
 ???
 
 BTW: I didn't know there is -Dfile.encoding switch recognized by Tomcat.
 I hope it will solve my problems with encoding during file or tcp socket
 print ;-))
 

Well, file.encoding does not change anything in my installation.

R.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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




Tomcat 4.0.5 threads are not closing

2002-10-16 Thread Ryszard Lach

Hi!

I have tomcat-4.0.5 running on JDK 1.3.1_05 (SUN) on. I see that tomcat
threads are not closing and it's only a matter of time when it runs out
of processors even if I set maxProcessors to pretty high value. Do you
have any idea what can cause such a behaviour?

Richard.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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




Re: Tomcat 4.0.5 threads are not closing

2002-10-16 Thread Ryszard Lach

On Thu, Oct 17, 2002 at 07:02:23AM +0200, Ryszard Lach wrote:
 Hi!
 
 I have tomcat-4.0.5 running on JDK 1.3.1_05 (SUN) on. I see that tomcat
 threads are not closing and it's only a matter of time when it runs out
 of processors even if I set maxProcessors to pretty high value. Do you
 have any idea what can cause such a behaviour?
 

I have an impression that this problem is connected with adding JDBC
Realm to my configuration. I see also a

 9590 ?S  0:00 postgres: tomcat users 192.168.130.82 idle in
 transaction

line in my process list. Is it normal?

Richard.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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




What does tomcat with character encoding?

2002-10-15 Thread Ryszard Lach

Hi!

Problem of non-US characters in Tomcat is returning again and again...

My setup is:

1. Tomcat 4.0.5, SUN JDK 1.3.1, JSP page with 
%@ page contentType=text/html;CHARSET=ISO-8859-2 %

2. 
String variable 's' with some LATIN2 characters in JSP code

3. 
out.printlin(s) displays correctly all characters in a browser

4. 
PrintWriter pw = new PrintWriter (new FileWriter (/var/tmp/syf.txt));
pw.println (s);
pw.close ();

writes string 's' to /var/tmp/syf.txt with non-US characters prepended
with an '' character.

All above behaviour does not depend on 'LANG' variable visible by tomcat
(during it's start) and -Djavax.servlet.request.encoding=ISO-8859-2 used
in CATALINA_OPTS (i.e. does not depend whether it is set or not). 

Can anyone explain what is going on?

TIA

Richard.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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




Closing Tomcat processors (ajp13 connector)

2002-10-03 Thread Ryszard Lach

Hello,

Is there any parameter defining how many idle processors will Tomcat
keep running (Tomcat 4.x)? I have a pretty loaded server, wich from time
to time spawns even more tomcat threads to number defined in
maxProcessor (now it is 400!) and I did not observe closing of them
unless I stop tomcat.

The second problem is  that acceptCount seems not to work. As I
understood acceptCount defines number of connections accepted and queued
until there will be processors available to service them. When I look at
catalina_log and see that there is no more available processors -
an error  No processor available, rejecting this connection occurs
immediatly, even if acceptCount is set to 200. Am I missing something?

Richard.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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




Re: Running multiple tomcat instances ?????

2002-09-25 Thread Ryszard Lach

On Mon, Sep 23, 2002 at 05:31:45PM +0200, Ralph Einfeldt wrote:
 
 We install different versions of tomcat like this:
 
 /usr/local/java/tomcat-4.0.3
 /usr/local/java/tomcat-4.1.10
 
 For each site we have something like this:
 
 /www/online/site

Could you tell me how many instances do you have and how strong is your
machine (CPU's, RAM)?

Richard.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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




Cannot allocate servlet instance

2002-08-09 Thread Ryszard Lach

Hi!

Since yesterday I receive an error while calling one servlet, which
allways has run properly. What is wrong with it ? 

My configuration: Tomcat 4.0.4, JDK1.3.1.

2002-08-09 08:51:38 StandardWrapper[:org.apache.catalina.INVOKER.]: Marking servlet 
org.apache.catalina.INVOKER. as unavailable
2002-08-09 08:51:38 invoker: Cannot allocate servlet instance for path /
javax.servlet.ServletException: Wrapper cannot find servlet class  or a class it 
depends on
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:873)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
at 
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:400)
at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
at java.lang.Thread.run(Thread.java:484)


- Root Cause -
java.lang.ClassNotFoundException: 
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1406)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1254)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:867)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
at 
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:400)
at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 

Re: Connection between TOMCAT and DB2 ???

2002-08-01 Thread Ryszard Lach

On Wed, Jul 31, 2002 at 03:11:03PM -0400, [EMAIL PROTECTED] wrote:
 
 Thanks Richard for your help,
 
 Yes, just now I managed to connect DB2 to Tomcat and using simple java file
 able to retrieve the values from sample database.
 
 But I have a question for you.
 while defining my Connection URL I never specified a port number.
   String url = jdbc:db2://100.3.13.34/sample;
 
 If you see above I just gave IP address of my machine and not port number.
 In past cases I have used port number given to me by the DBA.
 
 I would like to know what is the importance of port number and which
 service is running on this port.
 

DB2 usually listens on 5 port (the server). You use it in 'catalog
tcpip node' command on client, then you execute 'catalog
database...as...at node ...' on the client machine and then use the new
database name and ip of the client machine. You don't need the port
number, DB2 client knows it.

Richard.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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




Re: Tomcat 4.0.3 and non-asci characters (JSP pages)

2002-07-31 Thread Ryszard Lach

On Tue, Jul 30, 2002 at 12:53:58AM -0700, Daniel Bruce Lynes wrote:
 On Tuesday 23 July 2002 04:03, Ryszard Lach wrote:
 
  Could anyone explain how are non-ascii characters processed by Tomcat ?
  I have the following configuraton:
 
  Tomcat 4.0.3 running with apache (mod_webapp), environment: LANG=pl_PL,
  JDK1.4.0 with command-line parameter
  -Djavax.servlet.request.encoding=ISO-8859-2
 
  JSP page with '%@ page contentType=text/html;CHARSET=ISO-8859-2 %'
  declared.
 
  All polish characters are displayed in the browser correctly, they also
  are inserted into database correctly, but I cannot receive them in
  e-mail sent from the JSP page - all non-ASCI characters are coming in
  the message as proper LATIN2 characters preceded by '' or ''
  characters. When I look at the generated from JSP Java code in
  ~catalina/work directory, I see exactly the same.
 
 Are you sure the characters you stored in the database are stored in Latin2, 
 and not unicode?

Yes, I am.

  Decompiled (generated from JSP) class contains octal codes of LATIN2
  characters (i suppose there should be rather UNICODE character's codes).
 
 Octal codes?  Could you give an example of what you are calling an 'octal 
 code'?

e.g. \261

I trully don't understand how, but it worked when I used

new String (body.getBytes (ISO-8859-1), ISO-8859-2)

instead of just 'body'.

Regards,

Richard.

-- 
** Internet Designers S.A., ul. Przedmiejska 6-10, 54-201 Wrocaw **
 tel. (071) 35 00 445 w. 25; fax (071) 37 35 946; http://www.id.pl/

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




Re: Connection between TOMCAT and DB2 ???

2002-07-31 Thread Ryszard Lach

On Wed, Jul 31, 2002 at 09:21:59AM -0400, [EMAIL PROTECTED] wrote:
 Hello everyone...
 thanks for showing interest in the list and to make it grow...
 
 I have a situation here.
 I am using tomcat 4.0.3 and jdk 1.3.1_04. I want to write a soap
 service which will bring the resultset from IBM DB2 database.
 

I'm sorry, I don't have a time to read the all thread. Did you manage to
connect to DB2 from tomcat ? If not - I did, so I think I could help
you. 

Richard

-- 
** Internet Designers S.A., ul. Przedmiejska 6-10, 54-201 Wrocaw **
 tel. (071) 35 00 445 w. 25; fax (071) 37 35 946; http://www.id.pl/

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




Re: AW: Connection between TOMCAT and DB2 (RESOLVED)

2002-07-31 Thread Ryszard Lach

On Wed, Jul 31, 2002 at 01:26:07PM -0400, [EMAIL PROTECTED] wrote:
 
 Hello all,
 
 I finally resolved the problem...
 Problem lied in the as everyone mentioned Connection URL
 Earlier I was using url = jdbc:db2:sample
 Then I changed it to follwing
 and everything worked fine...
 
  String url = jdbc:db2://xxx.xxx.xxx.xxx/SAMPLE;
 
 where xxx.xxx.xxx.xxx is the IP address of my machine.
 
 Three Important things:
 1. Database name should be all in capital letters.( strange but yes)
 2. If you notice I never specified any PORT NUMBER... (I don't know why it
 doenot need any port number...though ealier I was using 5 as listening
 port for DB2 instance DB2MPP but it didn't work)
 but without port number it worked...

It was strange to me too. Unlike other databases DB2 requires DB2 Client
to be installed on machine running application server (here: tomcat);
then you have to catalog the (possibly remote) database locally and you
can connect to it using the name it was cataloged as.

Richard.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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




warp connector and number of connecionst

2002-07-28 Thread Ryszard Lach

Hi!

What does maxProcessors attribute in warp connector mean ? I thought it
is the total number of connections between apache and the engine the
connector was defined in, but I see there is many times more established
tcp connections between my apache and tomcat then defined in
maxProcessors. Maybe it is the number of connections for every
application ?

Richard.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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




Re: Best practice for virtual host configuration

2002-07-25 Thread Ryszard Lach

On Wed, Jul 24, 2002 at 09:46:28AM -0400, Cox, Charlie wrote:
 if your context is under the appBase, then it will autoload it. If your
 context is not under the appBase(shared contexts), then you 
 have to provide the path to it. 
 
 I've never tried leaving docBase empty for a context, so I don't know what
 path it would look under. I guess webapps could be  assumed as the default
 directory for defined contexts even if you change the appbase.
 
 so you changed your example to:
 
 Context path=
 docBase= debug=1
 reloadable=true
 /Context
 
 This would take the ROOT context, which is fine if all your virtual hosts
 use ROOT as their root context. I have different contexts that are the
 default context for their virtual hosts, so I have to provide a docBase to
 distinguish between them. My configuration is similar to your original
 except that I have a dummy appBase(prevent autoloading) and specify a
 absolute path for docBase.

Well, I suppose this won't work with mod_webapp - using application name
in WebAppDeploy in httpd.conf couses tomcat (probably) to search for
this name under appBase. So my working configuration is

appBase=webapps/aaa
docBase=aaa

and application in webapps/aaa/aaa. 

A little mesh, but I think I will be able to cut one 'aaa' as soon as
I'll be able to migrate to mod_jk (now I'm not because of mod_jserv used
with the same apache).

Regards,

Richard.

-- 
** Internet Designers S.A., ul. Przedmiejska 6-10, 54-201 Wrocaw **
 tel. (071) 35 00 445 w. 25; fax (071) 37 35 946; http://www.id.pl/

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




Re: Best practice for virtual host configuration

2002-07-24 Thread Ryszard Lach

On Wed, Jul 24, 2002 at 08:37:50AM -0400, Cox, Charlie wrote:
 
 
 
 if you change the appBase, then you need to change the docBase to be the
 absolute path.
 
 Charlie
 

Are you sure ? I tried to leave docBase empty and it worked too.

R.

-- 
** Internet Designers S.A., ul. Przedmiejska 6-10, 54-201 Wrocaw **
 tel. (071) 35 00 445 w. 25; fax (071) 37 35 946; http://www.id.pl/

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




Tomcat 4.0.3 and non-asci characters (JSP pages)

2002-07-23 Thread Ryszard Lach


Hi!

Could anyone explain how are non-ascii characters processed by Tomcat ?
I have the following configuraton:

Tomcat 4.0.3 running with apache (mod_webapp), environment: LANG=pl_PL,
JDK1.4.0 with command-line parameter -Djavax.servlet.request.encoding=ISO-8859-2

JSP page with '%@ page contentType=text/html;CHARSET=ISO-8859-2 %'
declared.

All polish characters are displayed in the browser correctly, they also
are inserted into database correctly, but I cannot receive them in
e-mail sent from the JSP page - all non-ASCI characters are coming in
the message as proper LATIN2 characters preceded by '' or ''
characters. When I look at the generated from JSP Java code in
~catalina/work directory, I see exactly the same.

Decompiled (generated from JSP) class contains octal codes of LATIN2
characters (i suppose there should be rather UNICODE character's codes).

Do you have any suggestion about possible ways of debugging/fixing it ?

Richard.

-- 
First they ignore you. Then they laugh at you. Then they
fight you. Then you win. - Mohandas Gandhi.

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




Any info about charset encodings in Tomcat needed

2002-07-23 Thread Ryszard Lach

Hi!

Do you know any documents about strings/encodings processing in Tomcat ? 

TIA

Richard.

-- 
** Internet Designers S.A., ul. Przedmiejska 6-10, 54-201 Wrocaw **
 tel. (071) 35 00 445 w. 25; fax (071) 37 35 946; http://www.id.pl/

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




Problem with Postgresql JDBC driver

2001-06-18 Thread Ryszard Lach

Hi!

I have serious problem with JDBC driver for postgresql. I'm using tomcat 3.2.2
with jdk1.3.1 (I've tried 1.2.2 too). I've tried to put jdbc7.0-1.2.jar into:

$TOMCAT_HOME/lib
$TOMCAT_HOME/webapp/my_app/WEB-INF/lib

and unpacked jdbc7.0-1.2.jar into 

$TOMCAT_HOME/classes
$TOMCAT_HOME/webapp/my_app/WEB-INF/classes

and I still receive an error (included at bottom of the message) while calling
Class.forName("postgresql.Driver") in a .jsp file located in .../webapp/my_app
directory.


I'm sure that classpath containing jdbc.*.jar is used by tomcat's startup
script, but it seems I'm missing something...

What could be wrong ? Do I have to configure workers or webapps in any special
way? 

Any help would be very appreciated.

This is the error I receive:

Error: 500

Location: /test_pgsql.jsp

Internal Servlet Error:

javax.servlet.ServletException: No suitable driver
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java, 
Compiled Code)
at 
_0002ftest_0005fpgsql_0002ejsptest_0005fpgsql_jsp_1._jspService(_0002ftest_0005fpgsql_0002ejsptest_0005fpgsql_jsp_1.java,
 Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java, Compiled 
Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled
Code) 
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java, 
Compiled Code)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java, 
Compiled Code)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java, 
Compiled Code)
at org.apache.tomcat.core.Handler.service(Handler.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled 
Code)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java, 
Compiled Code)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled 
Code)
at 
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java,
 Compiled Code)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, 
Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, 
Compiled Code)
at java.lang.Thread.run(Thread.java, Compiled Code)

Root cause: 

java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java, Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java, Compiled Code)
at 
_0002ftest_0005fpgsql_0002ejsptest_0005fpgsql_jsp_1._jspService(_0002ftest_0005fpgsql_0002ejsptest_0005fpgsql_jsp_1.java,
 Compiled Code)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java, Compiled 
Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java, 
Compiled Code) 
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java, Compiled Code)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java, 
Compiled Code)
at org.apache.tomcat.core.Handler.service(Handler.java, Compiled Code)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled 
Code)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java, 
Compiled Code)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled 
Code)
at 
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java,
 Compiled Code)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, 
Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, 
Compiled Code)
at java.lang.Thread.run(Thread.java, Compiled Code)


-- 
** Internet Designers S.A., ul. Przedmiejska 6--10, 54-201 Wrocaw **
 tel. (071) 35 00 445 w. 25; fax (071) 37 35 946; http://www.id.pl/



Re: Problem with Postgresql JDBC driver

2001-06-18 Thread Ryszard Lach

On Mon, Jun 18, 2001 at 12:52:56PM +0200, Tim Stoop wrote:
 Ryszard Lach wrote:
  
  and I still receive an error (included at bottom of the message) while calling
  Class.forName("postgresql.Driver") in a .jsp file located in .../webapp/my_app
  directory.
 
 Try not using the DriverManager, like so:
 
 Driver drv = org.postgresql.Driver;
 Connection conn = drv.connect("jdbc:postgresql:localhost", "username",
 "password");
 
 Worked for me (although you should look for the exact connect-method,
 I'm not very sure about this one).
 

The effect is the same. I forgott to write, that normal (java) program using 
this driver works fine. I've checked also whether java executable
($JAVA_HOME/bin/java) opens apropriate files (using unix strace command) and I
found it doaes.

Do you have any other suggestions ? 

R.

-- 
** Internet Designers S.A., ul. Przedmiejska 6--10, 54-201 Wrocaw **
 tel. (071) 35 00 445 w. 25; fax (071) 37 35 946; http://www.id.pl/



Re: Problem with Postgresql JDBC driver

2001-06-18 Thread Ryszard Lach

On Mon, Jun 18, 2001 at 10:05:16AM -0400, Jeff Waugh wrote:
 Sorry, I hadn't read your error message closely enough.
 
 'No suitable driver' usually means a problem with the database
 URL to which you are trying to connect.
 
 That should look something like:
 
 db = DriverManager.getConnection("jdbc:postgresql://hostname/dbname",
 "username", "password");
 
 Try playing with that.

Well, now it works. It seems you were right. I can not connect using
DriverManager, but the following code works pretty fine:

Driver drv = new org.postgresql.Driver();
Properties p = new Properties();
p.put("user","my_username");
p.put("password","my_password");
Connection con = drv.connect("jdbc:postgresql://localhost:5432/testowa",p);

Thanks all of you for your help.

Best regards,

R.

-- 
** Internet Designers S.A., ul. Przedmiejska 6--10, 54-201 Wrocaw **
 tel. (071) 35 00 445 w. 25; fax (071) 37 35 946; http://www.id.pl/