RE: javax.naming.NamingException: Cannot create resource instance

2002-07-02 Thread Vikramjit Singh

sorry, for the delay in replying les, am working on a project, shall try
your solution. thanks for the suggestion.

Regards,
Vikramjit Singh,
Systems Engineer,
GTL Ltd.
Ph. 7612929-1031


-Original Message-
From: Les Hughes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 2:19 AM
To: 'Tomcat Users List'
Subject: RE: javax.naming.NamingException: Cannot create resource
instance



Ok, I've had a chance to modify my msql example to work with Oracle. Here's
what I found

1) When using the thin driver, make sure that the SID is actually the SID,
not the TNS name of the service. If you're not sure, open your TNSNames.ora
and look for the service name, it should have a entry (SID = ). Use this
as the SID.
Also try specifying the instance on the connect string as in

jdbc:oracle:thin:myinstance@somehost:1512:mysid

I'm not an oracle DB BTW - sorry if the terminology is wrong.

2) You need to remove the javax.sql.* classes from classes12.zip and rename
to classes12.jar. You also need commons.jar, pool.jar and collections.jar in
your common/lib directory.

Debug. If the driver is loading, the Datasource will be created. When you
hit your JSP, Tomcat will dump Ora errors to stdout. Use
$CATALINA_HOME/bin/catalina.bat run to keep the server running in a console
window to get at this dump.

If you see nothing then you have a classpath/driver not found kind of
problem.

So, try a get it to throw some SQLExceptions - that why we know that you're
at least finding the driver OK.

Keep trying - it does work in the end (honest!)

BTW I'm using TC 4.0.3 LE with JDK 1.4.0-b92 on W2K with classes12.zip
downloaded from OTN yesterday, against Oracle 8i

Les


 -Original Message-
 From: Vikramjit Singh [mailto:[EMAIL PROTECTED]]
 Sent: 27 June 2002 05:54
 To: 'Tomcat Users List'
 Subject: RE: javax.naming.NamingException: Cannot create resource
 instance
 
 
 Hi,
 
 Just read a mail from Rick. Thanks to ur advice to remove 
 slash, i removed
 slash and thank god didnt get the error that
 
 javax.naming.NamingException: Cannot create resource instance
 
 Now my jsp page is displayed. Really dont know why it gave 
 error due to
 slash(/).
 
 
 But  one more problem, when i run the code, i dont get any 
 connection, coz
 it says DataSource is null. 
 
 Am posting my code again.
 Here is my code in jsp. 
 
   Context ctx = new InitialContext();
   if(ctx == null ) 
   throw new Exception(Boom - No Context);
 
   DataSource ds = (DataSource) 
 ctx.lookup(java:comp/env/jdbc/ora);
   System.out.println(ds);
   if (ds != null) {
   Connection conn = ds.getConnection();
   
 if(conn != null)  {
   String foo = Got Connection +conn.toString();
 Statement stmt = conn.createStatement();
 ResultSet rst = stmt.executeQuery(select empno, 
 ename from
 emp);
   if(rst.next()) {
   foo=rst.getString(2);
   System.out.println(foo);
   }
 conn.close();
   }
   }
 
 lines in server.xml
 
   Context path=CorpMIS docBase=CorpMIS debug=0 
 reloadable=true
 crossContext=true 
   Logger className=org.apache.catalina.logger.FileLogger
   prefix=CorpMIS_log. suffix=.txt
   timestamp=true/
   Resource name=jdbc/ora auth=Container
 type=javax.sql.DataSource/
   ResourceParams name=jdbc/ora
   parameter
   namefactory/name
   
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
   
   
 parameternamemaxActive/namevalue100/value/parameter
   
 parameternamemaxIdle/namevalue3/value/parameter
 
 parameternamemaxWait/namevalue100/value/parameter
   
 parameternameusername/namevaluescott/value/parameter
   
 parameternamepassword/namevaluetiger/value/parameter
 
   parameter
   
 namedriverClassName/namevalueoracle.jdbc.driver.OracleDr
 iver/value
   /parameter
   parameter
   nameurl/name
   valuejdbc:oracle:thin@eou3:1521:incub/value
   /parameter
   /ResourceParams
 /Context
 
 web.xml
 
 resource-ref
   descriptionOracle Test App/description
   res-ref-namejdbc/ora/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
 /resource-ref
 
 Regards,
 Vikramjit Singh,
 Systems Engineer,
 GTL Ltd.
 Ph. 7612929-1031
 
 
 -Original Message-
 From: Les Hughes [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 26, 2002 3:25 AM
 To: 'Tomcat Users List'
 Subject: RE: javax.naming.NamingException: Cannot create resource
 instance
 
 
 
 Yet more digging about in CVS Perhaps one of the TC devs 
 can confirm
 this but it seems that 
 

Re: Tomcat 4 - OpenSSL - IE client certificate works partially

2002-07-02 Thread Ismael Blesa Part

The problem with homemade digital certificates generated with the 
Keytool is that they are self signed, then IExplorer and other browsers 
does
not trust them and does not let you use it for user authentication. 
However if you make your own CA using openssl and you generates server and
client certificates you will see that it works. You have only to add 
your new CA on the trusted group for IExplorer (similar with other 
browsers).

When you make a connection to a secure server, it returns data about in 
which  CAs it will accepct (which CA, means which client digital 
certificates
signed with the given CAs)

You can also use Thawte test certificates (client  server) but it is 
the same if you use openssl as I describe above.

Please, send me your howto and I will take a look :)

By the way If you use Apache as frontend your setup will work better and 
faster and you will be able to make load balance ;)

Henrik Schultz wrote:

Greetings all...

For those not interested in client certificates at the deep technical
level, this is probably not your favorite cup of tea. Otherwise read on.

Enabling SSL in Tomcat is really no sweat using your own home-made
certificates, thanks to the excellent  HOW-TO. Once you get your root CA
certificate installed in the right places, and a suitable certificate
installed in Tomcat, everything works just fine.

However, creating client certificates that works with IE has (at least for
me) shown to be a real pain. I've experimented for months, and tried
numerous postings on this list, but noone seemed to know the finer details.
It was only recently I had a breakthrough, in that a trial certificate from
Verisign allowed me to compare that and a home-made one, and find the bits
that makes the difference, that is, what it takes for it to be shown on the
selection list in IE when the server asks for a client certificate.
Last night I succeeded. The right combination of keytool and openssl
maneuvres to setup a private CA, finally generated a certificate that
installed without a hitch in IE, and came up when I subsequently connected
to my SSL enabled Tomcat. So far so good.

However there is still one major obstacle ... the server aborts the
connection right away :-

IE tells me:

The page cannot be displayed
The page you are looking for is currently unavailable.
The Web site might be experiencing technical difficulties,
or you may need to adjust your browser settings.

In other words, the usual message that indicates that the server screwed
up, and closed the connection.

Interestingly enough the Verisign certificate works just fine. So there is
apparently still a difference to Tomcat.
Have tried to connect using openssl s_client - works A-OK, also with my
home-made certificate.
Have looked in the tomcat logs to no avail. There is no trace anywhere why
the connection breaks.

So the question to the list is: how would I go by diagnosing this? I
believe that the problem must be related to the SSL container (?) that
responds to the traffic on port 443, and does all the SSL handshaking,
because my application never sees anything.
Just like in Apache there's an error log for all the pages that fail -
isn't there such a log in Tomcat?

Thanks for any input or advice you might have!

PS. If anyone is interested in a writeup or HOW-TO of making client
certificates for Tomcat, let me know. This is certainly tricky stuff!

Henrik Schultz
Senior Systems Architect
Consultant to Maersk Data AS
Tel.: +45 39 10 21 13
Mobile: +45 22 12 24 29
E-mail: [EMAIL PROTECTED]


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


  





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




Where to place pjaf files?

2002-07-02 Thread Mats Palats

When using pja with tomcat, where should I place the pjaf files (the fonts). 
Should they just be in a system path or some special directory inside the 
tomcat tree.

//Mats

_
På MSN hittar du det roliga, intressanta och användbara på internet: 
http://www.msn.se


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




AW: The best website database!

2002-07-02 Thread Ralph Einfeldt

Other things I noticed with postgres:
  - If you want 24x7 uptime the vacuum command is a show 
stopper because it optains table locks. So you can't
make updates while the vacuum runs. (Otherwise you risk 
deadlocks)
The latest postgres version has shortened the time
where the lock is hold, but the lock is still there.
  - The last time I tried postgres, it (or the driver) didn't
support alias names in selects.
  - The previous version of postres has a significant
performance degration if you join to many tables. One
of our custumers had joins over 10 to 15 tables and the
performance was horrible, so we had to switch to a commecial
one (MySQL was not an option as the application uses views 
and subselects, Firebird was not ready). Haven't tried the
current version.

 -Ursprüngliche Nachricht-
 Von: August Detlefsen [mailto:[EMAIL PROTECTED]]
 Gesendet: Montag, 1. Juli 2002 19:49
 An: Tomcat Users List
 Betreff: Re: The best website database!
 
 The biggest things I have missed so far are that 
 there are no built-in CONNECT BY, ROLLUP, and CUBE functions and the
fact that
 Postgres seems to slow down significantly if it is not VACUUM'd
 frequently. 


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




Re: Tomcat-4.1.6 and DBCP issue?

2002-07-02 Thread Remy Maucherat

Jacob Kjome wrote:
 Hi,
 
 I'm just checking to confirm whether others that used DBCP connection 
 pooling successfully in Tomcat-4.1.3 are running into problems when 
 using Tomcat-4.1.6?  That is the case for me.   I'll check again 
 tomorrow to see if I did anything stupid, but the only difference seems 
 to be the tomcat version, so it would follow that something broke in 
 DBCP between 4.1.3 and 4.1.6.

It is easy to replace the DBCP included with another version or a new 
nightly if there is a problem (just replace commons-dbcp.jar in common/lib).

In the case of 4.1.6, some last minute changes were integrated in DBCP, 
so maybe there was some regression.

Remy


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




AW: querying remote databases

2002-07-02 Thread Power-Netz \(Schwarz\)

 Hi,

 I want to query remote databases, which are located in different
 computers and different instituon by using servlets an JSP. For
 this purpose, I want to send a parameter to this remote databases
 using an HTML form. And I want to receive all responds and serve
 them in a HTML page to client. How can I do that?

of course, all you need is a class for handing your databases. make
different instances for different dbs and query them. Or let a
another class do it.. The request should not take too long,
as you have a max. response time für your http request..


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




Virtual hosts/Tomcat403/Apache2039/mod_jk

2002-07-02 Thread Rupert Young

After many days, I've got it cracked, so I thought this might help.

I am trying to set up a virtual host so that I can use the URL
bliss.mydomain.org (without any suffix), which will serve static and dynamic
(.jsp) files.

Here's what I did.

I used this guide, http://www.webmasterbase.com/article/305 to set things
up, except for the Include statement. I put the auto-generated (which I
don't think are quite right) directives, slightly edited, into httpd.conf
manually.

To the httpd.conf I added, at the end,

IfModule !mod_jk.c
  LoadModule jk_module c:/Apache/Apache2/modules/mod_jk.dll
/IfModule
JkWorkersFile c:/Apache/Tomcat/conf/jk/workers.properties
JkLogFile c:/Apache/Tomcat/logs/mod_jk.log

JkLogLevel debug

JkMount /examples ajp13
JkMount /examples/* ajp13

VirtualHost *
ServerName eai.mydomain.org
DocumentRoot C:/Apache/Apache2/htdocs/webdocs
/VirtualHost

VirtualHost *
ServerName web.mydomain.org
DocumentRoot C:/Apache/Apache2/htdocs/webdocs/web
ErrorLog logs/web-error.log
TransferLog logs/web-access.log
/VirtualHost

VirtualHost *
ServerName bliss.mydomain.org
JkMount /* ajp13
/VirtualHost

The first two hosts are static only (unless they have /examples context).
The bliss host will serve any dynamic files in its base directory.  The
corresponding Host directive in server.xml is,

Host name=bliss.mydomain.org debug=3 appBase=myapps
unpackWARs=true
Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
append=true /
Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs  prefix=mybliss_access_log.
suffix=.txt
 pattern=common/

Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=mybliss_log. suffix=.txt
timestamp=true/

Context path= docBase=ROOT debug=0/
/Host


the files for the bliss app are in tomcat/myapps/ROOT.  Hooray !

So I can give the URL http://bliss.mydomain.org/ and index.jsp (by
redirecting from index.html) will be served by tomcat automatically.

The host names, of course, must be set up in a DNS server.

Hope this helps.
Regards,
Rupert



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




Re: Tomcat 4 - OpenSSL - IE client certificate works partially

2002-07-02 Thread Henrik Schultz

Peter wrote:

this pretty much sounds like the same problem I was experiencing and
posted earlier today. Sadly, your link below only gives hints on how
to intall a SERVER certificate, but not on how to configure everything
to ask for a CLIENT cert.

This is what I found too. However, the ImportKey program sounds like
a nifty little thing that could come in handy. Thanks for the link
Schwarz!

The few other responses I got to my first posting were along the same
lines, so for the sake of making sure everybody understands this
correctly, let me reiterate:

This is about CLIENT certificates.
Apparently Tomcat gives up mysteriously when receiving a home-made
certificate (perhaps the thread dies or something), but in any case
the connection is quietly closed with no trace or log messages
to be found anywhere.

I have exactly the same problem where the
initial handshake with the exchange of the SERVER cert is just fine,
but then the connection breaks leaving you with absolutely NO
LOG-entry as to why it broke 

Ok, so I'm not the only having this problem, that's assuring... somehow ;-)

So far, I was only able to get an error-message out of Netscape (6.x)
saying unknown SSL Error -12227

I tried to use NS too to find out more, but I had some problems with the
firewall I'm behind to get to my server, so I never got to it.
Unknown SSL error ... Hmm!

Would it make sense to post this on the tomcat-development-list?

I think so. Regardless of why our own certificates does not work, it
is highly problematic that there are no trace of what goes wrong
anywhere.
Do you have experience in this, or do you have the FAQ handy?
I've never tried this myself, but one time has to be the first
I guess :-)

Regards -

Henrik Schultz
Senior Systems Architect
Consultant to Maersk Data AS
Tel.: +45 39 10 21 13
Mobile: +45 22 12 24 29
E-mail: [EMAIL PROTECTED]


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




querying remote databases

2002-07-02 Thread Halil AKINCI

Hi,

I want to query remote databases, which are located in different computers and 
different instituon by using servlets an JSP. For this purpose, I want to send a 
parameter to this remote databases using an HTML form. And I want to receive all 
responds and serve them in a HTML page to client. How can I do that?



Tomcat 3.3.1: AccessLogInterceptor doesn't log PUT requests

2002-07-02 Thread Lemke, Michael IZ/HZA-IC1

We are running Tomcat 3.3.1 in standalone mode (no Apache etc) 
and log requestes to AccessLog with AccessLogInterceptor.
Unless we misconfigured something it seems like PUT 
requests only show up in the log if they produced an error
(404, 500).  Is this a configuration problem or is there
something wrong with AccessLogInterceptor?

Thnaks,
Michael

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





RE: Greek (and other) encodings

2002-07-02 Thread Simon Juden

Thanks - I would have expected in the absence of a page directive the
encoding would be taken from the HTML Content-type tag, obviously I was
wrong.

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Sent: 01 July 2002 17:40
To: Tomcat Users List
Subject: AW: Greek (and other) encodings


I'm surprised that it worked in prior version without that.

According to the spec every thing outside of the jsp tags
is ignored, so this must have been a bug, not a feature.

 -Ursprüngliche Nachricht-
 Von: Simon Juden [mailto:[EMAIL PROTECTED]]
 Gesendet: Montag, 1. Juli 2002 18:19
 An: 'Tomcat Users List'
 Betreff: RE: Greek (and other) encodings
 
 Putting %@ page contentType=text/html;charset=windows-1253 
 % does indeed
 fix this under 3.2.4 and 3.3.1 in both netscape and explorer. 
  Not sure why it didn't work with the META-tag only (but it 
 didn't).  I now get to write a script to correct all their 
 JSPs...


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


_
This message has been checked for all known viruses by MessageLabs.


_

ProQuest Alison

Please note Alison Associates is now ProQuest Alison - this is purely a change of name 
to bring us in line with the rest of the ProQuest group.  As a result our e-mail 
domain has changed to proquestalison.com.  We will also continue to accept messages 
addressed to alisonassociates.com until 1st January 2003.  Please can you ensure that 
you change any address book entries that you have to use the new proquestalison.com 
addresses.  

The information contained in this e-mail and any attached files is intended only for 
the use of the person(s) to whom it is addressed and may be privileged, confidential 
and exempt from disclosure under applicable law. The views of the author may not 
necessarily reflect the views of the Company. If you are not the intended recipient 
please do not copy or convey this message or any attached files to any other person 
but delete this message and any attached files and notify us of incorrect receipt via 
e-mail to [EMAIL PROTECTED]


_
This message has been checked for all known viruses by MessageLabs.

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




load balance session

2002-07-02 Thread Stone Shi

Hello all,
  
   When I use the mod_jk in APACHE 2.0.39, I get following message
and can not start the httpd, where can i get compatible version mod_jk


--
httpd: module mod_jk.c is not compatible with this version of Apache.
Please contact the vendor for the correct version.

--

 Thank you!

Stone



RE: javax.naming.NamingException: Cannot create resource instance

2002-07-02 Thread Vikramjit Singh

Hi les,

Hi Les,
Did as you said, deleted all the javax.sql.* files from classes12.zip.
Renamed it to classes12.jar, tomcat is sure throwing out dump of Oracle
driver.
You said i needed these files commons.jar, pool.jar and collections.jar, but
where are they, i cant get them. And again i am getting datasource null.
Could  you mail me, the driver and the required jar files. 
Thanking in advance.

Regards,
Vikram


-Original Message-
From: Les Hughes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 2:19 AM
To: 'Tomcat Users List'
Subject: RE: javax.naming.NamingException: Cannot create resource
instance



Ok, I've had a chance to modify my msql example to work with Oracle. Here's
what I found

1) When using the thin driver, make sure that the SID is actually the SID,
not the TNS name of the service. If you're not sure, open your TNSNames.ora
and look for the service name, it should have a entry (SID = ). Use this
as the SID.
Also try specifying the instance on the connect string as in

jdbc:oracle:thin:myinstance@somehost:1512:mysid

I'm not an oracle DB BTW - sorry if the terminology is wrong.

2) You need to remove the javax.sql.* classes from classes12.zip and rename
to classes12.jar. You also need commons.jar, pool.jar and collections.jar in
your common/lib directory.

Debug. If the driver is loading, the Datasource will be created. When you
hit your JSP, Tomcat will dump Ora errors to stdout. Use
$CATALINA_HOME/bin/catalina.bat run to keep the server running in a console
window to get at this dump.

If you see nothing then you have a classpath/driver not found kind of
problem.

So, try a get it to throw some SQLExceptions - that why we know that you're
at least finding the driver OK.

Keep trying - it does work in the end (honest!)

BTW I'm using TC 4.0.3 LE with JDK 1.4.0-b92 on W2K with classes12.zip
downloaded from OTN yesterday, against Oracle 8i

Les


 -Original Message-
 From: Vikramjit Singh [mailto:[EMAIL PROTECTED]]
 Sent: 27 June 2002 05:54
 To: 'Tomcat Users List'
 Subject: RE: javax.naming.NamingException: Cannot create resource
 instance
 
 
 Hi,
 
 Just read a mail from Rick. Thanks to ur advice to remove 
 slash, i removed
 slash and thank god didnt get the error that
 
 javax.naming.NamingException: Cannot create resource instance
 
 Now my jsp page is displayed. Really dont know why it gave 
 error due to
 slash(/).
 
 
 But  one more problem, when i run the code, i dont get any 
 connection, coz
 it says DataSource is null. 
 
 Am posting my code again.
 Here is my code in jsp. 
 
   Context ctx = new InitialContext();
   if(ctx == null ) 
   throw new Exception(Boom - No Context);
 
   DataSource ds = (DataSource) 
 ctx.lookup(java:comp/env/jdbc/ora);
   System.out.println(ds);
   if (ds != null) {
   Connection conn = ds.getConnection();
   
 if(conn != null)  {
   String foo = Got Connection +conn.toString();
 Statement stmt = conn.createStatement();
 ResultSet rst = stmt.executeQuery(select empno, 
 ename from
 emp);
   if(rst.next()) {
   foo=rst.getString(2);
   System.out.println(foo);
   }
 conn.close();
   }
   }
 
 lines in server.xml
 
   Context path=CorpMIS docBase=CorpMIS debug=0 
 reloadable=true
 crossContext=true 
   Logger className=org.apache.catalina.logger.FileLogger
   prefix=CorpMIS_log. suffix=.txt
   timestamp=true/
   Resource name=jdbc/ora auth=Container
 type=javax.sql.DataSource/
   ResourceParams name=jdbc/ora
   parameter
   namefactory/name
   
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
   
   
 parameternamemaxActive/namevalue100/value/parameter
   
 parameternamemaxIdle/namevalue3/value/parameter
 
 parameternamemaxWait/namevalue100/value/parameter
   
 parameternameusername/namevaluescott/value/parameter
   
 parameternamepassword/namevaluetiger/value/parameter
 
   parameter
   
 namedriverClassName/namevalueoracle.jdbc.driver.OracleDr
 iver/value
   /parameter
   parameter
   nameurl/name
   valuejdbc:oracle:thin@eou3:1521:incub/value
   /parameter
   /ResourceParams
 /Context
 
 web.xml
 
 resource-ref
   descriptionOracle Test App/description
   res-ref-namejdbc/ora/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
 /resource-ref
 
 Regards,
 Vikramjit Singh,
 Systems Engineer,
 GTL Ltd.
 Ph. 7612929-1031
 
 
 -Original Message-
 From: Les Hughes [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 26, 2002 3:25 AM
 To: 'Tomcat 

[no subject]

2002-07-02 Thread tomcat-user-return-24700-archive=jab . org

æsoft.com
To: Tomcat Users List [EMAIL PROTECTED]
References: [EMAIL PROTECTED]
Subject: Re: load balance  session
Date: Tue, 2 Jul 2002 17:06:05 +0800
MIME-Version: 1.0
Content-Type: text/plain;
charset=gb2312
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N

Hi,
try the following two urls, you can find a binary version of mod_jk for
apache 2.0.39 in the first page, and the deploy instructions in the second
page.
http://www.acg-gmbh.de/mod_jk/
http://www.cnr.berkeley.edu/~salazar/apache_tomcat.html

for a slight modification for the deployment, I just include the auto
generated jk config file in the end of httpd.conf instead of copy the entire
config lines into it, and it works, but you need to add a special line in
the server.xml in order to indicate the abosulute path of the mod_jk.dll.

here is a sample:
httpd.conf:
at the end add the following line
Include D:/WEB/tomcat/4.04/conf/auto/mod_jk.conf

server.xml:
Server port=8005 shutdown=SHUTDOWN debug=0
   Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
modJk=D:/WEB/Apache2/modules/mod_jk.so /
   ...
   ...
   Context path=/examples docBase=examples debug=0
 reloadable=true crossContext=true
  Listener className=org.apache.ajp.tomcat4.config.ApacheConfig
append=true /
   ...

Good luck.

Yang Liu

- Original Message -
From: Stone Shi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 02, 2002 4:43 PM
Subject: load balance  session


 Hello all,

When I use the mod_jk in APACHE 2.0.39, I get following message
 and can not start the httpd, where can i get compatible version mod_jk

 
 
 --
 httpd: module mod_jk.c is not compatible with this version of Apache.
 Please contact the vendor for the correct version.
 
 
 --

  Thank you!

 Stone



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




Performance problems with tc4.0.4 and custom tags

2002-07-02 Thread Timo Carl

Hello,

We try to upgrade our setup from tomcat3.2.1/jdk1.2 to
tomcat4.0.4/jdk1.4.
There were some major performance problems on our jsp Pages that use
100+ custom tags.
I've already read some other threads adressing this problem.

But I wonder why tomcat3.2 with jasper1 does not have any problems, but
tomcat4. 
Any ideas?

Has anyone experiences with using tomcat4.0.4/jasper2 in a productive
environment?
Is it stable enough?

Thanks in advance,
Timo Carl

-- 
Timo Carl
Technik  Programmierung

travelchannel GmbH
Kehrwieder 8
D-20457 Hamburg
Telefon +49/40/38617-275
Telefax +49/40/38617-330

http://www.travelchannel.de - das neue Reisen



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




expired beans in expired sessions block new sessions? TC 3.3.x

2002-07-02 Thread Power-Netz \(Schwarz\)


Hi,

i wonder about this behavior:

1. Login in my site via a login bean ( self made )

login.jsp
...
jsp:useBean id=login scope=session class=web.Login/

if (login.valid()) {
%jsp:forward page=prozesse.jsp/%
}
...
login Form  target - login2.jsp
...

This works great as long as the session is valid.

2. The session times out and the login.jsp is forwarded from any page which
detects
that the login is no longer valid.

3. the login pages shows up and I enter the data , but the jsp can't connect
to the database
until the session is directly invalidated with session.invalidate();

4. stdout.log shows this


2002-07-02 11:36:48 - ErrorHandler: Error loop for R( /mailrobot +
/gfx/au1.png + null) error java.io.IOException: Connection reset by peer.
2002-07-02 11:36:48 - Ctx(/mailrobot) : IOException in R( /mailrobot +
/gfx/who1.png + null) - java.net.SocketException: Socket closed
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:126)
at com.sun.net.ssl.internal.ssl.OutputRecord.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
at org.apache.tomcat.modules.server.Http10.doWrite(Unknown Source)
at org.apache.tomcat.modules.server.HttpResponse.doWrite(Unknown
Source)
at org.apache.tomcat.core.OutputBuffer.realWriteBytes(Unknown
Source)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(Unknown Source)
at org.apache.tomcat.core.OutputBuffer.flush(Unknown Source)
at org.apache.tomcat.core.OutputBuffer.close(Unknown Source)
at org.apache.tomcat.core.Response.finish(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source)
at java.lang.Thread.run(Thread.java:536)

2002-07-02 11:36:48 - ErrorHandler: Error loop for R( /mailrobot +
/gfx/who1.png + null) error java.net.SocketException: Socket closed
2002-07-02 11:36:48 - Http10Interceptor: SocketException reading request,
ignored
2002-07-02 11:36:48 - DecodeInterceptor: Charset from session ISO-8859-1
ERROR(Tue Jul 02 11:16:16 CEST 2002): JDBC-Driver:
select:java.sql.SQLException: Lost connection to server during query
select ..SQL-QUERY
ERROR(Tue Jul 02 11:16:16 CEST 2002): JDBC-Driver:
colCount:java.lang.NullPointerException
ERROR(Tue Jul 02 11:16:16 CEST 2002): JDBC-Driver:
rowFetch:java.lang.NullPointerException
ERROR(Tue Jul 02 11:16:16 CEST 2002): JDBC-Driver:
select:java.sql.SQLException: Communication link failure:
java.net.SocketException
select ..SQL-QUERY
ERROR(Tue Jul 02 11:16:16 CEST 2002): JDBC-Driver:
colCount:java.lang.NullPointerException
ERROR(Tue Jul 02 11:16:16 CEST 2002): JDBC-Driver:
rowFetch:java.lang.NullPointerException
2002-07-02 11:41:35 - DecodeInterceptor: Charset from session ISO-8859-1
ERROR(Tue Jul 02 11:16:16 CEST 2002): JDBC-Driver:
select:java.sql.SQLException: Communication link failure:
java.net.SocketException
select ..SQL-QUERY


5. and our session expires to early, app. 5 minutes..  any suggestions?

 POWER-NETZ®
Full-Service-Provider 

Online-Support:
Support: 0190 - 15 11 15 (EUR 0,62/Min)
http://Support.Power-Netz.de (kostenlos)
http://Support.Power-Netz.com (kostenlos)

Vertrieb Tel:  01805 - 57 35 57 (EUR 0,12/Min.)
Vertrieb Fax: 01805 - 57 45 57 (EUR 0,12/Min.)

Power-Netz
Am Plan 1
37581 Bad Gandersheim

http://www.Power-Netz.de
mailto:[EMAIL PROTECTED]


+=+
--I N F O   C E N T E R--
+ Senden Sie eine leere e-mail an:
+ Providerwechsel: mailto:[EMAIL PROTECTED]
+ Daten/Preise Webspace: mailto:[EMAIL PROTECTED]
+ Reseller-Programm: mailto:[EMAIL PROTECTED]
+ Dedizierte Server: mailto:[EMAIL PROTECTED]
+ Adult/Erotikserver: mailto:[EMAIL PROTECTED]
+ Domainpreise: mailto:[EMAIL PROTECTED]
+ Domain-Nameserver: mailto:[EMAIL PROTECTED]
+ SSL-Zertifikate: mailto:[EMAIL PROTECTED]
+ Geschaeftsbedingungen: mailto:[EMAIL PROTECTED]
+ =+


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




Persistence Manager choice...

2002-07-02 Thread Vincent Lambert

Hi,
 
We are looking for a persistence manager. We are testing Castor (from
exolab : http://castor.exolab.org) and ObjectBridge (from jakarta :
http://jakarta.apache.org/ojb/).
 
Does any one have an opinion one those projects.
 
 
Thanks for your comments,
 
Regards,
Vincent



SV: Seeking working mod_jk.dll for Tomcat 4.0.4 and Apache 2.0.39 eo m

2002-07-02 Thread hermod . opstvedt

Hi

Just to verify, I tried your recipe and it did not work. The setup went
fine, but when I tried to access the examples under Tomcat, i got an
error in the Tomcat console stating BAD packet 256 In: : [B@3c468a
4/843..


Hermod

-Opprinnelig melding-
Fra: Carrie Salazar [mailto:[EMAIL PROTECTED]]
Sendt: 1. juli 2002 20:15
Til: Tomcat Users List
Emne: Re: Seeking working mod_jk.dll for Tomcat 4.0.4 and Apache 2.0.39
eo m


i didn't get the errors you posted. what i did to get Tomcat 4.0.4
and Apache 2.0.39 to work (including my config files) is all written 
here (probably not the most efficient way, but i do not have guru 
status):
http://www.CNR.Berkeley.EDU/~salazar/apache_tomcat.html
--
carrie s.

p.s. i used binaries.


On Mon, Jul 01, 2002 at 07:12:27PM +0100, Koes, Derrick wrote:
 
 Would you mind posting your configuration files?
 
 -Original Message-
 From: Carrie Salazar [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, July 01, 2002 2:03 PM
 To: Tomcat Users List
 Subject: Re: Seeking working mod_jk.dll for Tomcat 4.0.4 and Apache
2.0.39
 eo m
 
 
 for windows? i'm running Tomcat 4.0.4/Apache 2.0.39 on windows 2000
 and the compiled mod_jk.dll from here works:
 http://www.acg-gmbh.de/mod_jk/
 
 or you can compile your own.
 --
 carrie s.
 
 Mon, Jul 01, 2002 at 06:48:47PM +0100, Koes, Derrick wrote:
   
  
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that DnB cannot
accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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




Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread Przemyslaw Kowalczyk

Hi

I've just started to write servlets. Servlets that only do processing, without 
connecting to database work fine, but I have some problems to get the 
connection with postgresql via jdbc work.

Tomcat: 4.0.4   (on linux)
Postgresql: 7.2.1 (on linux)
Jdbc: pgjdbc2.jar (from jdbc.postgresql.org)

The servlet is quite simple:

import java.io.*;
import java.util.*;
import java.sql.*;
import javax.sql.*;
import javax.naming.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class InfoServlet extends HttpServlet {

Connection con;
private boolean conFree = true;

public void init() throws ServletException {
try  {
Context initCtx = new InitialContext();
Context envCtx = 
(Context)initCtx.lookup(java:comp/env);
DataSource ds = (DataSource)
envCtx.lookup(jdbc/BookDB);
Connection con = ds.getConnection();
} catch (Exception ex) {
throw new ServletException(Couldn't open connection 
to database:  + ex.getMessage());
}
}

public void destroy() {
try {
con.close();
} catch (SQLException ex) {
System.out.println(ex.getMessage());
}
}

public void doGet (HttpServletRequest request, HttpServletResponse 
response) throws ServletException, IOException {

HttpSession session = request.getSession();

// set content-type header before accessing the Writer
response.setContentType(text/html);
response.setBufferSize(8192);
PrintWriter out = response.getWriter();

// then write the data of the response
out.println(html +
headtitleDuke's Bookstore/title/head);
}
}

in web/WEB-INF/web.xml I defined:


!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
display-nameCurrency Converter Application/display-name
description
Test servlet
/description
servlet
servlet-nameinfo/servlet-name
display-nameinfo/display-name
descriptionno description/description
servlet-classInfoServlet/servlet-class
/servlet
servlet-mapping
servlet-nameinfo/servlet-name
url-pattern/info/url-pattern
/servlet-mapping
session-config
session-timeout30/session-timeout
/session-config
resource-ref
res-ref-namejdbc/BookDB/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainter/res-auth
/resource-ref
/web-app

And in server.xml in the contex of the application:

   Context path=/bookstore docBase=bookstore debug=0
 reloadable=true crossContext=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_bookstore_log. suffix=.txt
  timestamp=true/
  Resource name=jdbc/BookDB auth=Container
type=javax.sql.DataSource/
  ResourceParams name=jdbc/BookDB
parameter
  nameuser/name
  valuejava/value
/parameter
parameter
  namepassword/name
  valuejava/value
/parameter
parameter
  namedriverClassName/name
  valueorg.postgresql.Driver/value
/parameter
parameter
  namedriverName/name
  valuejdbc:postgresql:public/value
/parameter
  /ResourceParams
/Context

I've tried a few different driverName parameters: (restarting Tomcat after 
each change)
jdbc:postgresql://localhost/public
jdbc:postgresql://full.server.name/public
jdbc:postgresql:public
jdbc:postgresql://localhost/

But, despite the parameters, I always get the following error:

exception 
javax.servlet.ServletException: Couldn't open connection to database: 
Exception creating DataSource: org.hsql.jdbcDriver
at InfoServlet.init(Unknown Source)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918)


{cut}

I have no idea why Tomcat wants to connect using hsql driver. I grepped 
through tomcat directory and found only one reference to this driver (in 
examples section). I removed event the sample section, restarted Tomcat but 
it didn't help. 

Does anyone know what is wrong? 

regards
Przem


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




Re: TomCat 3.2.3 not respond suddenly.

2002-07-02 Thread TEOH KANG YIH

Hi TomCat user,

Remember I post this question 1 week ago and there is no feedback from you all?  
However, I have found out further information as follows:

1. Port 8080 still can be telneted in
2. Other JSP files still can be accessed 

These 2 important tell us that TomCat is still functioning!  Only it can't talk to 
Oracle Database, until I restart TomCat.

In order to refresh you, TomCat 3.2.3 runs on Solaris 8.

Any idea or experience with this, kindly share with me.

Thanks.


==
TEOH, KANG YIH
System Engineer

Think what you haven't done in the past and plan to do it now.

GloComp Systems (M) Sdn. Bhd. 
Unit 639, Blok A, Kelana Centre Point, 
Jalan SS7/19, Kelana Jaya, 47301, 
Petaling Jaya, Selangor. 
Tel: 03-78808607 
Fax: 03-78808609
H/P: 012-2252848



Where can I find SCO binaries for Tomcat

2002-07-02 Thread will

Hi,

I have been using tomcat for a little while now, on Linux
and Win2K and love it to bits. I have a need to run it on
a SCO Openserver box, and I have been trying to locate
some binaries for it.

I checked the archives and found some references to a
3.0.3 binary, but was unable to locate it. Could any one
point me in the right direction? I would prefer a 4.0.3
binary but will take what is available.

I was thinking of building it, but taking a look at the
build help file fills me with dread.

Regards,

Wm.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 20/06/2002
 

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




iis tomcat nt service

2002-07-02 Thread Xin Miao

Dear tomcat:

I am currently experience a difficulty set up the environment for my tomcat run as nt 
service under iis.
i down load the tomcat 4.0.4, and i install it correctly with iis. i put the webapps 
root under the iis root directory. i am encounter a problem when i import a class into 
my jsp page. i know my classpath is not right. tomcat can't my class. can you help me 
find out where should i put my class files?  
here is part of my server.xml

Host name=localhost debug=0 appBase=..\webs unpackWARs=true
where ..\webs is the root for my iis,


Context path=/geomemory docBase=geomemory debug=0
 reloadable=true crossContext=true/
and geomemory is a sub directory under ..\webs

thank you

xin 



AW: TomCat 3.2.3 not respond suddenly.

2002-07-02 Thread Ralph Einfeldt

If there is no error message in the logs, I guess 
it's a deadlock in the database.

Can you provide more info about the jsp that hangs ?

Try a kill -QUIT tomcat pid and have a look at the
stacktrace to see where the threads are.

Have a look at the oracle console (can't remember the name
of the management console for oracle, it's too long ago
that I used it) to find out which connections and statements 
are open.

 -Ursprüngliche Nachricht-
 Von: TEOH KANG YIH [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 2. Juli 2002 12:53
 An: [EMAIL PROTECTED]
 Betreff: Re: TomCat 3.2.3 not respond suddenly.
 
 Remember I post this question 1 week ago and there is no 
 feedback from you all?  However, I have found out further 
 information as follows:
 
 1. Port 8080 still can be telneted in
 2. Other JSP files still can be accessed 
 
 These 2 important tell us that TomCat is still 
 functioning!  Only it can't talk to Oracle Database, until I 
 restart TomCat.
 

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




Re: Performance problems with tc4.0.4 and custom tags

2002-07-02 Thread peter lin


I've been doing performance benchmarks and profiling of jasper2 with
4.0.3 and most indications tell me it's getting real close to release. 
Several tremendous improvements in jasper2 result in better CPU and
memory utilization. GC is now under control and scales well to 64
concurrent connections w/o any problems. On systems with more memory and
multiple CPU's, the performance should be even better.

The improvements I see in my profiling is speed and consistency. when I
profiled jasper1 with tomcat 4.0.3, the cpu and memory utilization
fluctuated wildly, causing unusually high variance in response time. GC
was horrible for pages with 100+ JSTL tags under 8+ concurrent
connections on a weak system.

I'm not recommending anyone use it in production, but my personal
feeling is it is getting very close to release quality.

peter


Timo Carl wrote:
 
 Hello,
 
 We try to upgrade our setup from tomcat3.2.1/jdk1.2 to
 tomcat4.0.4/jdk1.4.
 There were some major performance problems on our jsp Pages that use
 100+ custom tags.
 I've already read some other threads adressing this problem.
 
 But I wonder why tomcat3.2 with jasper1 does not have any problems, but
 tomcat4.
 Any ideas?
 
 Has anyone experiences with using tomcat4.0.4/jasper2 in a productive
 environment?
 Is it stable enough?
 
 Thanks in advance,
 Timo Carl
 
 --
 Timo Carl
 Technik  Programmierung
 
 travelchannel GmbH
 Kehrwieder 8
 D-20457 Hamburg
 Telefon +49/40/38617-275
 Telefax +49/40/38617-330
 
 http://www.travelchannel.de - das neue Reisen
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




AW: Performance problems with tc4.0.4 and custom tags

2002-07-02 Thread Ralph Einfeldt

AFAIK the main error is in the jdk 1.3 and 1.4. 
jasper2 just contains (beside other changes) a workaround for 
this bugs.

Have a look at this links: (Require login)
http://developer.java.sun.com/developer/bugParade/bugs/4414162.html
http://developer.java.sun.com/developer/bugParade/bugs/4697245.html

 -Ursprüngliche Nachricht-
 Von: Timo Carl [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 2. Juli 2002 11:44
 An: [EMAIL PROTECTED]
 Betreff: Performance problems with tc4.0.4 and custom tags
 
 But I wonder why tomcat3.2 with jasper1 does not have any 
 problems, but tomcat4. 
 Any ideas?
 

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




RE: Performance problems with tc4.0.4 and custom tags

2002-07-02 Thread Reynir Hübner

I have been playing a little bit around with jasper2 as released with tc 4.1.6 and I 
am haveing problems. 

I am using the OSCache taglibrary, and for some reason this does not work as it 
should. I cannot technically describe the problem, as I have not dug into it, but the 
tags are returning wrong values from cache. I think this has something to do with the 
tagpooling feature as this was not a problem in tc.4.1.3 version of jasper 2.

just wanted to bounce that of to somewhere. hopefully someone will pick this up, and 
check what's going wrong.

[EMAIL PROTECTED]


 -Original Message-
 From: peter lin [mailto:[EMAIL PROTECTED]]
 Sent: 2. júlí 2002 11:19
 To: Tomcat Users List
 Subject: Re: Performance problems with tc4.0.4 and custom tags
 
 
 
 I've been doing performance benchmarks and profiling of jasper2 with
 4.0.3 and most indications tell me it's getting real close to 
 release. 
 Several tremendous improvements in jasper2 result in better CPU and
 memory utilization. GC is now under control and scales well to 64
 concurrent connections w/o any problems. On systems with more 
 memory and
 multiple CPU's, the performance should be even better.
 
 The improvements I see in my profiling is speed and 
 consistency. when I
 profiled jasper1 with tomcat 4.0.3, the cpu and memory utilization
 fluctuated wildly, causing unusually high variance in 
 response time. GC
 was horrible for pages with 100+ JSTL tags under 8+ concurrent
 connections on a weak system.
 
 I'm not recommending anyone use it in production, but my personal
 feeling is it is getting very close to release quality.
 
 peter
 
 
 Timo Carl wrote:
  
  Hello,
  
  We try to upgrade our setup from tomcat3.2.1/jdk1.2 to
  tomcat4.0.4/jdk1.4.
  There were some major performance problems on our jsp Pages that use
  100+ custom tags.
  I've already read some other threads adressing this problem.
  
  But I wonder why tomcat3.2 with jasper1 does not have any 
 problems, but
  tomcat4.
  Any ideas?
  
  Has anyone experiences with using tomcat4.0.4/jasper2 in a 
 productive
  environment?
  Is it stable enough?
  
  Thanks in advance,
  Timo Carl
  
  --
  Timo Carl
  Technik  Programmierung
  
  travelchannel GmbH
  Kehrwieder 8
  D-20457 Hamburg
  Telefon +49/40/38617-275
  Telefax +49/40/38617-330
  
  http://www.travelchannel.de - das neue Reisen
  
  
  
  --
  To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 

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




RE: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread Les Hughes


Two things,

In your server.xml
user I think should be username
and
driverName has been deprecated in favour of url which needs the servername
and DB name as well
(as in something like jdbc:postgresql://full.server.name/mybookdb - or
whatever the DB is called)

Are you *sure* you're using the right install of TC and that the server.xml
has no reference to the hsql driver?

BTW - only got this working with Oracle and mySQL so most of this is
guesswork based on those two exercises. 

Bye,

Les
P.S. You shouldn't open the connection in init() nor cache the connection
BTW - use a pool instead :)

 -Original Message-
 From: Przemyslaw Kowalczyk [mailto:[EMAIL PROTECTED]]
 Sent: 02 July 2002 11:09
 To: 'Tomcat Users List'
 Subject: Tomcat 4.0.4, jndi, jdbc and postgresql [long]
 
 
 Hi
 
 I've just started to write servlets. Servlets that only do 
 processing, without 
 connecting to database work fine, but I have some problems to get the 
 connection with postgresql via jdbc work.
 
 Tomcat: 4.0.4 (on linux)
 Postgresql: 7.2.1 (on linux)
 Jdbc: pgjdbc2.jar (from jdbc.postgresql.org)
 
 The servlet is quite simple:
 
 import java.io.*;
 import java.util.*;
 import java.sql.*;
 import javax.sql.*;
 import javax.naming.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 
 public class InfoServlet extends HttpServlet {
 
 Connection con;
 private boolean conFree = true;
 
 public void init() throws ServletException {
 try  {
 Context initCtx = new InitialContext();
 Context envCtx = 
 (Context)initCtx.lookup(java:comp/env);
 DataSource ds = (DataSource)
 envCtx.lookup(jdbc/BookDB);
 Connection con = ds.getConnection();
 } catch (Exception ex) {
 throw new ServletException(Couldn't 
 open connection 
 to database:  + ex.getMessage());
 }
 }
 
 public void destroy() {
 try {
 con.close();
 } catch (SQLException ex) {
 System.out.println(ex.getMessage());
 }
 }
 
 public void doGet (HttpServletRequest request, 
 HttpServletResponse 
 response) throws ServletException, IOException {
 
 HttpSession session = request.getSession();
 
 // set content-type header before accessing the Writer
 response.setContentType(text/html);
 response.setBufferSize(8192);
 PrintWriter out = response.getWriter();
 
 // then write the data of the response
 out.println(html +
 headtitleDuke's Bookstore/title/head);
 }
 }
 
 in web/WEB-INF/web.xml I defined:
 
 
 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;
 web-app
 display-nameCurrency Converter Application/display-name
 description
 Test servlet
 /description
 servlet
 servlet-nameinfo/servlet-name
 display-nameinfo/display-name
 descriptionno description/description
 servlet-classInfoServlet/servlet-class
 /servlet
 servlet-mapping
 servlet-nameinfo/servlet-name
 url-pattern/info/url-pattern
 /servlet-mapping
 session-config
 session-timeout30/session-timeout
 /session-config
 resource-ref
 res-ref-namejdbc/BookDB/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainter/res-auth
 /resource-ref
 /web-app
 
 And in server.xml in the contex of the application:
 
Context path=/bookstore docBase=bookstore debug=0
  reloadable=true crossContext=true
   Logger className=org.apache.catalina.logger.FileLogger
  prefix=localhost_bookstore_log. suffix=.txt
   timestamp=true/
   Resource name=jdbc/BookDB auth=Container
 type=javax.sql.DataSource/
   ResourceParams name=jdbc/BookDB
 parameter
   nameuser/name
   valuejava/value
 /parameter
 parameter
   namepassword/name
   valuejava/value
 /parameter
 parameter
   namedriverClassName/name
   valueorg.postgresql.Driver/value
 /parameter
 parameter
   namedriverName/name
   valuejdbc:postgresql:public/value
 /parameter
   /ResourceParams
 /Context
 
 I've tried a few different driverName parameters: (restarting 
 Tomcat after 
 each change)
 jdbc:postgresql://localhost/public
 

Re: Performance problems with tc4.0.4 and custom tags

2002-07-02 Thread peter lin


have you tried the jakarta cache tag?  Perhaps try it with that first.
It could be the taglib is not compliant with JSP1.2. Also, I notice
OSCache tag examples use scriptlets.  If I remember correctly from
discussion on tomcat-dev, tagpooling should be used only if the tag body
doesn't contain scriplets.  You should ask Remy or Kin-man to get the
authorative answer.

peter


Reynir Hübner wrote:
 
 I have been playing a little bit around with jasper2 as released with tc 4.1.6 and I 
am haveing problems.
 
 I am using the OSCache taglibrary, and for some reason this does not work as it 
should. I cannot technically describe the problem, as I have not dug into it, but the 
tags are returning wrong values from cache. I think this has something to do with the 
tagpooling feature as this was not a problem in tc.4.1.3 version of jasper 2.
 
 just wanted to bounce that of to somewhere. hopefully someone will pick this up, and 
check what's going wrong.
 
 [EMAIL PROTECTED]
 
  -Original Message-
  From: peter lin [mailto:[EMAIL PROTECTED]]
  Sent: 2. júlí 2002 11:19
  To: Tomcat Users List
  Subject: Re: Performance problems with tc4.0.4 and custom tags
 
 
 
  I've been doing performance benchmarks and profiling of jasper2 with
  4.0.3 and most indications tell me it's getting real close to
  release.
  Several tremendous improvements in jasper2 result in better CPU and
  memory utilization. GC is now under control and scales well to 64
  concurrent connections w/o any problems. On systems with more
  memory and
  multiple CPU's, the performance should be even better.
 
  The improvements I see in my profiling is speed and
  consistency. when I
  profiled jasper1 with tomcat 4.0.3, the cpu and memory utilization
  fluctuated wildly, causing unusually high variance in
  response time. GC
  was horrible for pages with 100+ JSTL tags under 8+ concurrent
  connections on a weak system.
 
  I'm not recommending anyone use it in production, but my personal
  feeling is it is getting very close to release quality.
 
  peter
 
 
  Timo Carl wrote:
  
   Hello,
  
   We try to upgrade our setup from tomcat3.2.1/jdk1.2 to
   tomcat4.0.4/jdk1.4.
   There were some major performance problems on our jsp Pages that use
   100+ custom tags.
   I've already read some other threads adressing this problem.
  
   But I wonder why tomcat3.2 with jasper1 does not have any
  problems, but
   tomcat4.
   Any ideas?
  
   Has anyone experiences with using tomcat4.0.4/jasper2 in a
  productive
   environment?
   Is it stable enough?
  
   Thanks in advance,
   Timo Carl
  
   --
   Timo Carl
   Technik  Programmierung
  
   travelchannel GmbH
   Kehrwieder 8
   D-20457 Hamburg
   Telefon +49/40/38617-275
   Telefax +49/40/38617-330
  
   http://www.travelchannel.de - das neue Reisen
  
   
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




RE: javax.naming.NamingException: Cannot create resource instance

2002-07-02 Thread Les Hughes


OK, we're making progress!

commons, pool and collections.jar are available from the jakarta-commons
download area
http://jakarta.apache.org/commons

Grab those, try again and let us know how it goes.

Les


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




RE: Tomcat 3.3.1: AccessLogInterceptor doesn't log PUT requests

2002-07-02 Thread Larry Isaacs

AcessLogInterceptor writes the log entry using the
beforeCommit() hook.  If no response is generated by
the request, then it appears that no log entry would be
created.

Cheers,
Larry

 -Original Message-
 From: Lemke, Michael IZ/HZA-IC1 [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, July 02, 2002 4:10 AM
 To: 'Tomcat Users List'
 Subject: Tomcat 3.3.1: AccessLogInterceptor doesn't log PUT requests
 
 
 We are running Tomcat 3.3.1 in standalone mode (no Apache etc) 
 and log requestes to AccessLog with AccessLogInterceptor.
 Unless we misconfigured something it seems like PUT 
 requests only show up in the log if they produced an error
 (404, 500).  Is this a configuration problem or is there
 something wrong with AccessLogInterceptor?
 
 Thnaks,
 Michael
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 

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




Re: AW: Performance problems with tc4.0.4 and custom tags

2002-07-02 Thread Timo Carl

Es schrieb Ralph Einfeldt:
 
 AFAIK the main error is in the jdk 1.3 and 1.4.
 jasper2 just contains (beside other changes) a workaround for
 this bugs.
 
 Have a look at this links: (Require login)
 http://developer.java.sun.com/developer/bugParade/bugs/4414162.html
 http://developer.java.sun.com/developer/bugParade/bugs/4697245.html
I can acknowledge these bug reports. I've seen a significantly higher
memory usage. Additionally, the compiled jsp needs up to 20 sec to come
up. On jdk1.2 it came up within 1 second.

So, what do you propose me to do:
- wait for tc4.1 release (when can we exspect it: July,August or more?)
- play around with jasper2 on production system
- start with jdk1.2 and tomcat4.0

I'm a little bit confused what to decide now.

Timo

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




RE: Performance problems with tc4.0.4 and custom tags

2002-07-02 Thread Reynir Hübner

I tested the jakarta-cache-tag when it was first released, but it was not working, 
well it displayed the cached-informations but it also ran the process behind the 
cached info, so it was of no real use.

I think it has been fixed, I might take a look at that. 

I dont know if OScache is JSP1.2 compliant, but it is compliant with Servlet 2.2 and 
JSP 1.1 standards according to the website 
http://www.opensymphony.com/oscache/features.html

is tagpooling used if the tag-body contains other custom tags ? 

thanx
-reynir


 -Original Message-
 From: peter lin [mailto:[EMAIL PROTECTED]]
 Sent: 2. júlí 2002 12:06
 To: Tomcat Users List
 Subject: Re: Performance problems with tc4.0.4 and custom tags
 
 
 
 have you tried the jakarta cache tag?  Perhaps try it with that first.
 It could be the taglib is not compliant with JSP1.2. Also, I notice
 OSCache tag examples use scriptlets.  If I remember correctly from
 discussion on tomcat-dev, tagpooling should be used only if 
 the tag body
 doesn't contain scriplets.  You should ask Remy or Kin-man to get the
 authorative answer.
 
 peter
 
 
 Reynir Hübner wrote:
  
  I have been playing a little bit around with jasper2 as 
 released with tc 4.1.6 and I am haveing problems.
  
  I am using the OSCache taglibrary, and for some reason this 
 does not work as it should. I cannot technically describe the 
 problem, as I have not dug into it, but the tags are 
 returning wrong values from cache. I think this has something 
 to do with the tagpooling feature as this was not a problem 
 in tc.4.1.3 version of jasper 2.
  
  just wanted to bounce that of to somewhere. hopefully 
 someone will pick this up, and check what's going wrong.
  
  [EMAIL PROTECTED]
  
   -Original Message-
   From: peter lin [mailto:[EMAIL PROTECTED]]
   Sent: 2. júlí 2002 11:19
   To: Tomcat Users List
   Subject: Re: Performance problems with tc4.0.4 and custom tags
  
  
  
   I've been doing performance benchmarks and profiling of 
 jasper2 with
   4.0.3 and most indications tell me it's getting real close to
   release.
   Several tremendous improvements in jasper2 result in 
 better CPU and
   memory utilization. GC is now under control and scales well to 64
   concurrent connections w/o any problems. On systems with more
   memory and
   multiple CPU's, the performance should be even better.
  
   The improvements I see in my profiling is speed and
   consistency. when I
   profiled jasper1 with tomcat 4.0.3, the cpu and memory utilization
   fluctuated wildly, causing unusually high variance in
   response time. GC
   was horrible for pages with 100+ JSTL tags under 8+ concurrent
   connections on a weak system.
  
   I'm not recommending anyone use it in production, but my personal
   feeling is it is getting very close to release quality.
  
   peter
  
  
   Timo Carl wrote:
   
Hello,
   
We try to upgrade our setup from tomcat3.2.1/jdk1.2 to
tomcat4.0.4/jdk1.4.
There were some major performance problems on our jsp 
 Pages that use
100+ custom tags.
I've already read some other threads adressing this problem.
   
But I wonder why tomcat3.2 with jasper1 does not have any
   problems, but
tomcat4.
Any ideas?
   
Has anyone experiences with using tomcat4.0.4/jasper2 in a
   productive
environment?
Is it stable enough?
   
Thanks in advance,
Timo Carl
   
--
Timo Carl
Technik  Programmierung
   
travelchannel GmbH
Kehrwieder 8
D-20457 Hamburg
Telefon +49/40/38617-275
Telefax +49/40/38617-330
   
http://www.travelchannel.de - das neue Reisen
   

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

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




Re: Persistence Manager choice...

2002-07-02 Thread Umberto Nicoletti

Slightly OT?

Anyway, I have tried Torque (part of the turbine project) and it looks
fairly
complete.
I have looked at the various mailing lists concerning castor and many
people are
complaining about its performance, that's why I've been directed to
Torque.

Torque has also a very nice tool that will generated the classes, sql
scripts, etc from an
existent database (in my case it was Oracle).

Regards,
umberto

Vincent Lambert wrote:
 
 Hi,
 
 We are looking for a persistence manager. We are testing Castor (from
 exolab : http://castor.exolab.org) and ObjectBridge (from jakarta :
 http://jakarta.apache.org/ojb/).
 
 Does any one have an opinion one those projects.
 
 
 Thanks for your comments,
 
 Regards,
 Vincent

-- 
Umberto Nicoletti - [EMAIL PROTECTED] | [EMAIL PROTECTED]
Tel. 049-8239380 (assistenza)

We'll try to make different mistakes this time. - Larry Wall

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




Re: Performance problems with tc4.0.4 and custom tags

2002-07-02 Thread peter lin


I believe if the body contains only tags, it will use tagpooling. You
should be able to look at the generated source right?

if you post a chunk of the code, maybe others can take a look?

peter


Reynir Hübner wrote:
 
 I tested the jakarta-cache-tag when it was first released, but it was not working, 
well it displayed the cached-informations but it also ran the process behind the 
cached info, so it was of no real use.
 
 I think it has been fixed, I might take a look at that.
 
 I dont know if OScache is JSP1.2 compliant, but it is compliant with Servlet 2.2 and 
JSP 1.1 standards according to the website 
http://www.opensymphony.com/oscache/features.html
 
 is tagpooling used if the tag-body contains other custom tags ?
 
 thanx
 -reynir
 
  -Original Message-
  From: peter lin [mailto:[EMAIL PROTECTED]]
  Sent: 2. júlí 2002 12:06
  To: Tomcat Users List
  Subject: Re: Performance problems with tc4.0.4 and custom tags
 
 
 
  have you tried the jakarta cache tag?  Perhaps try it with that first.
  It could be the taglib is not compliant with JSP1.2. Also, I notice
  OSCache tag examples use scriptlets.  If I remember correctly from
  discussion on tomcat-dev, tagpooling should be used only if
  the tag body
  doesn't contain scriplets.  You should ask Remy or Kin-man to get the
  authorative answer.
 
  peter
 
 
  Reynir Hübner wrote:
  
   I have been playing a little bit around with jasper2 as
  released with tc 4.1.6 and I am haveing problems.
  
   I am using the OSCache taglibrary, and for some reason this
  does not work as it should. I cannot technically describe the
  problem, as I have not dug into it, but the tags are
  returning wrong values from cache. I think this has something
  to do with the tagpooling feature as this was not a problem
  in tc.4.1.3 version of jasper 2.
  
   just wanted to bounce that of to somewhere. hopefully
  someone will pick this up, and check what's going wrong.
  
   [EMAIL PROTECTED]
  
-Original Message-
From: peter lin [mailto:[EMAIL PROTECTED]]
Sent: 2. júlí 2002 11:19
To: Tomcat Users List
Subject: Re: Performance problems with tc4.0.4 and custom tags
   
   
   
I've been doing performance benchmarks and profiling of
  jasper2 with
4.0.3 and most indications tell me it's getting real close to
release.
Several tremendous improvements in jasper2 result in
  better CPU and
memory utilization. GC is now under control and scales well to 64
concurrent connections w/o any problems. On systems with more
memory and
multiple CPU's, the performance should be even better.
   
The improvements I see in my profiling is speed and
consistency. when I
profiled jasper1 with tomcat 4.0.3, the cpu and memory utilization
fluctuated wildly, causing unusually high variance in
response time. GC
was horrible for pages with 100+ JSTL tags under 8+ concurrent
connections on a weak system.
   
I'm not recommending anyone use it in production, but my personal
feeling is it is getting very close to release quality.
   
peter
   
   
Timo Carl wrote:

 Hello,

 We try to upgrade our setup from tomcat3.2.1/jdk1.2 to
 tomcat4.0.4/jdk1.4.
 There were some major performance problems on our jsp
  Pages that use
 100+ custom tags.
 I've already read some other threads adressing this problem.

 But I wonder why tomcat3.2 with jasper1 does not have any
problems, but
 tomcat4.
 Any ideas?

 Has anyone experiences with using tomcat4.0.4/jasper2 in a
productive
 environment?
 Is it stable enough?

 Thanks in advance,
 Timo Carl

 --
 Timo Carl
 Technik  Programmierung

 travelchannel GmbH
 Kehrwieder 8
 D-20457 Hamburg
 Telefon +49/40/38617-275
 Telefax +49/40/38617-330

 http://www.travelchannel.de - das neue Reisen

 

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

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




RE: querying remote databases

2002-07-02 Thread Turner, John


All you have to do is write a servlet to do this.  You are confusing
databases with web pages.  It doesn't matter where the database is...if it
is available on the network and you have a valid user account on that
database, then a servlet can connect to it.

If a servlet is running on machine A, and the database is on machine B, the
servlet can connect to the database.  So, in your doPost() method of your
servlet, accept the parameters of your Form, make your connection to the
database, get your results back, format your results, and then send them
back to the requester.  You will want to implement/extend HttpServlet when
you write your servlet.

John Turner
[EMAIL PROTECTED]
http://www.aas.com


-Original Message-
From: Halil AKINCI [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 3:13 AM
To: Tomcat Users List; servlet-interest group; JSP groups;
jakarta-tomcat yahoo groups
Subject: querying remote databases


Hi,

I want to query remote databases, which are located in different computers
and different instituon by using servlets an JSP. For this purpose, I want
to send a parameter to this remote databases using an HTML form. And I want
to receive all responds and serve them in a HTML page to client. How can I
do that?

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




application Context within a TagLib

2002-07-02 Thread info

Hi,

realy basics! I set some values in the web.xml like this:
.
.
.
context-param
 param-nameserver_pfad/param-name
 param-valuehttp://localhost:8080//param-value
 descriptionServer-Pfad/description
/context-param
.
.
.

And now I want to get the values within a TagLib:

.
.
pageContext.out().print(pageContext.getServletContext().getAttribute(server_pfad));
is null
.
.

Whats wrong??

thanks, Rainer



RE: tomcat 4.0.4 apache 2.0.39 integration

2002-07-02 Thread Turner, John


http://www.galatea.com/flashguides/apache-tomcat-24-win32.xml

John Turner
[EMAIL PROTECTED]


-Original Message-
From: Paul Ung [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 01, 2002 8:14 PM
To: '[EMAIL PROTECTED]'
Subject: tomcat 4.0.4 apache 2.0.39 integration


Hi,

Does anybody know of any good websites/pages that explains step-by-step how
to integrate Tomcat and Apache? I'm using Tomcat 4.0.4 and Apache 2.0.39 on
Windows 2000. I already tried the tutorial at
http://www.webmasterbase.com/article/305 but it didn't work maybe because
that tutorial was for Tomcat 4.0.3 and not 4.0.4. Should it matter? Well, if
anybody knows any other sites, please let me know.

Thanks,
Paul


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

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




RE: Tomcat-4.1.6 and DBCP issue?

2002-07-02 Thread Douglas, Rory
Title: RE: Tomcat-4.1.6 and DBCP issue?





Hi there


I had some problems using the DBCP connection pool with 4.1.6 and the MS SQL Server JDBC drivers. I couldn't get the pool to use the user parameter specified in server.xml, I ended up having to include the username and password as part of the JDBC URL.

Oh, I've never used the built-in connection pooling before, so I can't speak for 4.1.3. What's happening with your 4.1.6 setup??


-Original Message-
From: Remy Maucherat [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 3:10 AM
To: Tomcat Users List
Subject: Re: Tomcat-4.1.6 and DBCP issue?



Jacob Kjome wrote:
 Hi,
 
 I'm just checking to confirm whether others that used DBCP connection 
 pooling successfully in Tomcat-4.1.3 are running into problems when 
 using Tomcat-4.1.6? That is the case for me. I'll check again 
 tomorrow to see if I did anything stupid, but the only difference seems 
 to be the tomcat version, so it would follow that something broke in 
 DBCP between 4.1.3 and 4.1.6.


It is easy to replace the DBCP included with another version or a new 
nightly if there is a problem (just replace commons-dbcp.jar in common/lib).


In the case of 4.1.6, some last minute changes were integrated in DBCP, 
so maybe there was some regression.


Remy



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




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


plain MySQL DataSource in Tomcat (i know, damn topic)

2002-07-02 Thread Marc Logemann

Hi,

i am one of the guys trying to get a valid MysqlDataSource reference via
JNDI. But i am getting crazy without knowing where the problem is (perhaps
the reason is, i cant debug JNDI too good, cause i am no expert in it..)

i have the following:

server.xml
--
context 
Resource name=jdbc/TestDB auth=Cotainer type=javax.sql.DataSource/
ResourceParams name=jdbc/TestDB
parameter
namefactory/name
valueorg.gjt.mm.mysql.jdbc2.optional.MysqlDataSourceFactory/value
  /parameter
parameter nameuser/namevalueroot/value /parameter
parameter namepassword/namevalue/value /parameter
parameter 
namedriverClassName/namevalueorg.gjt.mm.mysql.jdbc2.optional.MysqlDataSource/value/parameter
parameter namedriverName/namevaluejdbc:mysql://localhost/maxbahr/value 
/parameter
/ResourceParams
/context

web.xml
---
web-app
resource-ref
  descriptionDataSource MySQL/description
  res-ref-namejdbc/TestDB/res-ref-name
  res-type javax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref
/web-app

i placed the mysql mm jar into commons/lib

When i run a servlet with the standard lookup code:
 try {
 javax.naming.Context jndictx = new InitialContext();
 if (jndictx == null) throw new Exception(Boom - No Context);

 DataSource ds =
 (DataSource) jndictx.lookup(java:comp/env/jdbc/TestDB);
 if (ds != null) {
[..]

i get no exception but i also dont get any reference returned from lookup.

I read tons of websites including the tomcat JNDI howto, without beeing able to 
understand it
better (in fact it gets worse cause of thousands of combinations in the web for 
server.xml and
web.xml)

When i leave out factory in the server.xml, i get a tyrex exception regarding loading 
a factory...

I just thought that using a datasource is better than just calling the DriverManager, 
but the
effort seems amazing... or i am too unclever... whatever...

thx for help.
---
greetings from
Marc Logemann
Homebase @ www.logemann.info


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




RE: Error with Oracle Jdbc

2002-07-02 Thread Les Hughes

If you're using a client install of oracle instead of the thin drivers (I'm
guessing because of your @TOMCATDB syntax) then the url is
jdbc:oracle:oci8:user/passwd@TNSname ie

jdbc:oracle:oci8:spifdogg/spifdogg@TOMCATDB
or
jdbc:oracle:oci8:@TOMCATDB and passs the user and password into the
getConnection call.

But for any non-trival system, you should be using a connection pool (search
the archives for a HowTo)

Les

 -Original Message-
 From: Vikramjit Singh [mailto:[EMAIL PROTECTED]]
 Sent: 02 July 2002 05:43
 To: 'Tomcat Users List'
 Subject: RE: Error with Oracle Jdbc
 
 
 the url which i use is like this
 
 DriverManager.getConnection(jdbc:oracle:thin:@ServerName:1521:SID,
 USERNAME, PASSWORD);
 
 Regards,
 Vikramjit Singh,
 Systems Engineer,
 GTL Ltd.
 Ph. 7612929-1031
 
 
 -Original Message-
 From: William Gustave [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 01, 2002 9:37 PM
 To: TOMCAT USER
 Subject: Error with Oracle Jdbc
 Importance: High
 
 
 I am getting the following Error from my app when I hit the 
 index.jsp page.
 Can somebody help me it would be greatly appreciated.
 
  jdbc java.sql.SQLException: Invalid Oracle URL specified
 
 I am running the following
 Tomcat 4  (It is on the same machine as the Database Server)
 Oracle 8.1
 Oracle8i 8.1.7.1JDBC Drivers (Which I have extracted into
 \tomcat4\webapps\testoracle\WEB-INF\classes directory)
 
 Below is the JSP code that is on the page.
 
 %@ page import=oracle.jdbc.driver.* %
 %@ page import=java.sql.* %
 
 %
 try{
 
 Class.forName(oracle.jdbc.driver.OracleDriver);
 Connection conn =
 DriverManager.getConnection(jdbc:oracle:localhost:@TOMCATDB,
 spifdogg,
 spifdogg);
 Statement statemnt = conn.createStatement();
 
 ResultSet users = statemnt.executeQuery(select * from user);
 
 }catch(Exception e){
   out.println(e);
 }
 %
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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




AW: AW: Performance problems with tc4.0.4 and custom tags

2002-07-02 Thread Ralph Einfeldt

I think you have to (stress-)test which combination is best for your 
environment and application.

I would test them in this order: 

- jdk1.2 + tc4.0
- jdk1.4 + tc4.0 + jasper2
- jdk1.4 + tc4.1

This is more a feeling than a rational decision driven by facts, as 
we don't have tomcat in production and currently don't use tags at 
all)

Depends a bit on the scale when you have to use the environment 
online.

 -Ursprüngliche Nachricht-
 Von: Timo Carl [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 2. Juli 2002 14:18
 An: Tomcat Users List
 Betreff: Re: AW: Performance problems with tc4.0.4 and custom tags
 
 So, what do you propose me to do:
 - wait for tc4.1 release (when can we exspect it: July,August 
 or more?)
 - play around with jasper2 on production system
 - start with jdk1.2 and tomcat4.0
 

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




RE: plain MySQL DataSource in Tomcat (i know, damn topic)

2002-07-02 Thread Les Hughes


http://marc.theaimsgroup.com/?l=tomcat-userm=102225547106556w=2

:-)


 -Original Message-
 From: Marc Logemann [mailto:[EMAIL PROTECTED]]
 Sent: 02 July 2002 13:35
 To: [EMAIL PROTECTED]
 Subject: plain MySQL DataSource in Tomcat (i know, damn topic)
 
 
 Hi,
 
 i am one of the guys trying to get a valid MysqlDataSource 
 reference via
 JNDI. But i am getting crazy without knowing where the 
 problem is (perhaps
 the reason is, i cant debug JNDI too good, cause i am no 
 expert in it..)
 
 i have the following:
 
 server.xml
 --
 context 
 Resource name=jdbc/TestDB auth=Cotainer 
 type=javax.sql.DataSource/
 ResourceParams name=jdbc/TestDB
 parameter
 namefactory/name
 
 valueorg.gjt.mm.mysql.jdbc2.optional.MysqlDataSourceFactory/value
   /parameter
 parameter nameuser/namevalueroot/value /parameter
 parameter namepassword/namevalue/value /parameter
 parameter 
 namedriverClassName/namevalueorg.gjt.mm.mysql.jdbc2.opti
 onal.MysqlDataSource/value/parameter
 parameter 
 namedriverName/namevaluejdbc:mysql://localhost/maxbahr/
 value /parameter
 /ResourceParams
 /context
 
 web.xml
 ---
 web-app
 resource-ref
   descriptionDataSource MySQL/description
   res-ref-namejdbc/TestDB/res-ref-name
   res-type javax.sql.DataSource/res-type
   res-authContainer/res-auth
 /resource-ref
 /web-app
 
 i placed the mysql mm jar into commons/lib
 
 When i run a servlet with the standard lookup code:
  try {
  javax.naming.Context jndictx = new InitialContext();
  if (jndictx == null) throw new Exception(Boom - No 
 Context);
 
  DataSource ds =
  (DataSource) 
 jndictx.lookup(java:comp/env/jdbc/TestDB);
  if (ds != null) {
 [..]
 
 i get no exception but i also dont get any reference returned 
 from lookup.
 
 I read tons of websites including the tomcat JNDI howto, 
 without beeing able to understand it
 better (in fact it gets worse cause of thousands of 
 combinations in the web for server.xml and
 web.xml)
 
 When i leave out factory in the server.xml, i get a tyrex 
 exception regarding loading a factory...
 
 I just thought that using a datasource is better than just 
 calling the DriverManager, but the
 effort seems amazing... or i am too unclever... whatever...
 
 thx for help.
 ---
 greetings from
 Marc Logemann
 Homebase @ www.logemann.info
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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




Re: Performance problems with tc4.0.4 and custom tags

2002-07-02 Thread Remy Maucherat

Reynir Hübner wrote:
 I have been playing a little bit around with jasper2 as released with tc 4.1.6 and I 
am haveing problems. 
 
 I am using the OSCache taglibrary, and for some reason this does not work as it 
should. I cannot technically describe the problem, as I have not dug into it, but the 
tags are returning wrong values from cache. I think this has something to do with the 
tagpooling feature as this was not a problem in tc.4.1.3 version of jasper 2.
 
 just wanted to bounce that of to somewhere. hopefully someone will pick this up, and 
check what's going wrong.

All the tags which behaved bad with tagpooling in Jasper 2 have so far 
been proven to be non-compliant, so it's unlikely to be caused by a bug 
in Jasper. In the defense of the tag authors, I have to add that the 
example tag from the examples webapp distributed with Tomcat, as well as 
two of the custom tags from the admin webapp, were also non-compliant. 
So there will probably be a lot of tags which will cause problems.

You can disable tagpooling in the case you can't easily fix the tag.

Remy


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




RE: tomcat 4.0.4 apache 2.0.39 integration

2002-07-02 Thread Koes, Derrick


http://www.galatea.com/flashguides/index



-Original Message-
From: Paul Ung [mailto:[EMAIL PROTECTED]] 
Sent: Monday, July 01, 2002 8:23 PM
To: '[EMAIL PROTECTED]'
Subject: tomcat 4.0.4 apache 2.0.39 integration

Hi,

Does anybody know of any good websites/pages that explains step-by-step how
to integrate Tomcat and Apache? I'm using Tomcat 4.0.4 and Apache 2.0.39 on
Windows 2000. I already tried the tutorial at
http://www.webmasterbase.com/article/305 but it didn't work maybe because
that tutorial was for Tomcat 4.0.3 and not 4.0.4. Should it matter? Well, if
anybody knows any other sites, please let me know.

Thanks,
Paul


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



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




Re: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread Przemyslaw Kowalczyk

On Tuesday 02 July 2002 14:00, Les Hughes wrote:
 Two things,

 In your server.xml
 user I think should be username
 and
 driverName has been deprecated in favour of url which needs the servername
 and DB name as well
 (as in something like jdbc:postgresql://full.server.name/mybookdb - or
 whatever the DB is called)

Ok. Now my configuration file looks as follows:

Context path=/bookstore1 docBase=bookstore1 debug=0
 reloadable=true crossContext=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_bookstore1_log. suffix=.txt
  timestamp=true/
  Resource name=jdbc/BookDB auth=Container
type=javax.sql.DataSource/
  ResourceParams name=jdbc/BookDB
parameter
 nameusername/name
  valuejava/value
/parameter
parameter
  namepassword/name
  valuejava/value
/parameter
parameter
  namedriverClassName/name
  valueorg.postgresql.Driver/value
/parameter
parameter
  namedriverName/name
  valuejdbc:postgresql://willow.forest/public/value
/parameter
  /ResourceParams
/Context


 Are you *sure* you're using the right install of TC and that the server.xml
 has no reference to the hsql driver?

I'm absolutely sure. I even reinstalled whole tomcat (to cleanup everything)

 BTW - only got this working with Oracle and mySQL so most of this is
 guesswork based on those two exercises.

 Bye,

 Les
 P.S. You shouldn't open the connection in init() nor cache the connection
 BTW - use a pool instead :)

For sure I will, but now all that I want is to connect my servlet to database.

regards
przem

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




RE: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread andre . powroznik

Would you have other applications running in tomcat?

-Original Message-
From: Przemyslaw Kowalczyk [mailto:[EMAIL PROTECTED]]
Sent: 02 July 2002 14:54
To: Tomcat Users List
Subject: Re: Tomcat 4.0.4, jndi, jdbc and postgresql [long]


On Tuesday 02 July 2002 14:00, Les Hughes wrote:
 Two things,

 In your server.xml
 user I think should be username
 and
 driverName has been deprecated in favour of url which needs the servername
 and DB name as well
 (as in something like jdbc:postgresql://full.server.name/mybookdb - or
 whatever the DB is called)

Ok. Now my configuration file looks as follows:

Context path=/bookstore1 docBase=bookstore1 debug=0
 reloadable=true crossContext=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_bookstore1_log. suffix=.txt
  timestamp=true/
  Resource name=jdbc/BookDB auth=Container
type=javax.sql.DataSource/
  ResourceParams name=jdbc/BookDB
parameter
 nameusername/name
  valuejava/value
/parameter
parameter
  namepassword/name
  valuejava/value
/parameter
parameter
  namedriverClassName/name
  valueorg.postgresql.Driver/value
/parameter
parameter
  namedriverName/name
  valuejdbc:postgresql://willow.forest/public/value
/parameter
  /ResourceParams
/Context


 Are you *sure* you're using the right install of TC and that the server.xml
 has no reference to the hsql driver?

I'm absolutely sure. I even reinstalled whole tomcat (to cleanup everything)

 BTW - only got this working with Oracle and mySQL so most of this is
 guesswork based on those two exercises.

 Bye,

 Les
 P.S. You shouldn't open the connection in init() nor cache the connection
 BTW - use a pool instead :)

For sure I will, but now all that I want is to connect my servlet to database.

regards
przem

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

 DISCLAIMER  
This e-mail and any attachments thereto may contain information 
which is confidential and/or protected by intellectual property 
rights and are intended for the sole use of the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, 
total or partial reproduction, communication or distribution in any form) 
by persons other than the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either 
by telephone or by e-mail and delete the material from any computer. 
Thank you for your cooperation.


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




Re: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread Przemyslaw Kowalczyk

On Tuesday 02 July 2002 14:53, Przemyslaw Kowalczyk wrote:

I came to another conclusion. Even if there was some reference to hsql driver 
in my server.xml it shouldn't affect my own servlet, as it uses its own 
context. Am I right?

przem


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




RE: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread andre . powroznik

Is this normal :

  resource-ref
res-ref-namejdbc/BookDB/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainter/res-auth
/resource-ref

More especially : res-authContainter/res-auth : CONTAINTER?

Andre Powroznik

-Original Message-
From: Przemyslaw Kowalczyk [mailto:[EMAIL PROTECTED]]
Sent: 02 July 2002 12:09
To: 'Tomcat Users List'
Subject: Tomcat 4.0.4, jndi, jdbc and postgresql [long]


Hi

I've just started to write servlets. Servlets that only do processing, without 
connecting to database work fine, but I have some problems to get the 
connection with postgresql via jdbc work.

Tomcat: 4.0.4   (on linux)
Postgresql: 7.2.1 (on linux)
Jdbc: pgjdbc2.jar (from jdbc.postgresql.org)

The servlet is quite simple:

import java.io.*;
import java.util.*;
import java.sql.*;
import javax.sql.*;
import javax.naming.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class InfoServlet extends HttpServlet {

Connection con;
private boolean conFree = true;

public void init() throws ServletException {
try  {
Context initCtx = new InitialContext();
Context envCtx = 
(Context)initCtx.lookup(java:comp/env);
DataSource ds = (DataSource)
envCtx.lookup(jdbc/BookDB);
Connection con = ds.getConnection();
} catch (Exception ex) {
throw new ServletException(Couldn't open connection 
to database:  + ex.getMessage());
}
}

public void destroy() {
try {
con.close();
} catch (SQLException ex) {
System.out.println(ex.getMessage());
}
}

public void doGet (HttpServletRequest request, HttpServletResponse 
response) throws ServletException, IOException {

HttpSession session = request.getSession();

// set content-type header before accessing the Writer
response.setContentType(text/html);
response.setBufferSize(8192);
PrintWriter out = response.getWriter();

// then write the data of the response
out.println(html +
headtitleDuke's Bookstore/title/head);
}
}

in web/WEB-INF/web.xml I defined:


!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
display-nameCurrency Converter Application/display-name
description
Test servlet
/description
servlet
servlet-nameinfo/servlet-name
display-nameinfo/display-name
descriptionno description/description
servlet-classInfoServlet/servlet-class
/servlet
servlet-mapping
servlet-nameinfo/servlet-name
url-pattern/info/url-pattern
/servlet-mapping
session-config
session-timeout30/session-timeout
/session-config
resource-ref
res-ref-namejdbc/BookDB/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainter/res-auth
/resource-ref
/web-app

And in server.xml in the contex of the application:

   Context path=/bookstore docBase=bookstore debug=0
 reloadable=true crossContext=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_bookstore_log. suffix=.txt
  timestamp=true/
  Resource name=jdbc/BookDB auth=Container
type=javax.sql.DataSource/
  ResourceParams name=jdbc/BookDB
parameter
  nameuser/name
  valuejava/value
/parameter
parameter
  namepassword/name
  valuejava/value
/parameter
parameter
  namedriverClassName/name
  valueorg.postgresql.Driver/value
/parameter
parameter
  namedriverName/name
  valuejdbc:postgresql:public/value
/parameter
  /ResourceParams
/Context

I've tried a few different driverName parameters: (restarting Tomcat after 
each change)
jdbc:postgresql://localhost/public
jdbc:postgresql://full.server.name/public
jdbc:postgresql:public
jdbc:postgresql://localhost/

But, despite the parameters, I always get the following error:

exception 
javax.servlet.ServletException: Couldn't open connection to database: 
Exception creating DataSource: org.hsql.jdbcDriver
at InfoServlet.init(Unknown Source)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at 

Only one message in digests?

2002-07-02 Thread Henrik Schultz

Is it just me, or do the rest of you also get only one message following
the index in your digests?
Same thing when requesting a range of messages to be sent to me, only the
first message is returned.
Could it be a problem with our Notes Domino mail gateway perhaps?

Regards -

Henrik Schultz
Senior Systems Architect
Consultant to Maersk Data AS
Tel.: +45 39 10 21 13
Mobile: +45 22 12 24 29
E-mail: [EMAIL PROTECTED]


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




RE: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread Les Hughes


Yep :-)

Oh, I think there's a typo in the URL - remove the two // - this is all
driver specific so it's a case of RTM :-)

 -Original Message-
 From: Przemyslaw Kowalczyk [mailto:[EMAIL PROTECTED]]
 Sent: 02 July 2002 14:00
 To: Tomcat Users List
 Subject: Re: Tomcat 4.0.4, jndi, jdbc and postgresql [long]
 
 
 On Tuesday 02 July 2002 14:53, Przemyslaw Kowalczyk wrote:
 
 I came to another conclusion. Even if there was some 
 reference to hsql driver 
 in my server.xml it shouldn't affect my own servlet, as it 
 uses its own 
 context. Am I right?
 
 przem
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

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




R: application Context within a TagLib

2002-07-02 Thread Alessio Fiore

Hi, there is difference between context attributes and context init
parameters...

Context attributes are managed with setAttribute and getAttribute
methods.
Init parameters are defined in the web.xml file and are read with
getInitParameter method.

Then, you should modify your code in following way:

pageContext.out().print(pageContext.getServletContext().getInitParameter(se
rver_pfad));


Alessio
[EMAIL PROTECTED]


-Messaggio originale-
Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Inviato: martedì 2 luglio 2002 14.32
A: Tomcat Users List
Oggetto: application Context within a TagLib


Hi,

realy basics! I set some values in the web.xml like this:
.
.
.
context-param
 param-nameserver_pfad/param-name
 param-valuehttp://localhost:8080//param-value
 descriptionServer-Pfad/description
/context-param
.
.
.

And now I want to get the values within a TagLib:

.
.
pageContext.out().print(pageContext.getServletContext().getAttribute(server
_pfad));
is null
.
.

Whats wrong??

thanks, Rainer



- Disclaimer -
This email and any attachments thereto may contain information which is
confidential and/or protected by intellectual property rights and are
intended for the sole use of the recipient(s) named above. Any use of the
information contained herein (including, but not limited to, total or
partial reproduction, communication or distribution in any form) or the
taking of any action in reliance on the contents, by persons other than the
designated recipient(s) is strictly prohibited.

If you have received this email in error, please notify the sender either by
telephone or by email and delete the material from any computer.

Thank you for your cooperation. 



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





RE: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread Les Hughes

web-app  
  resource-ref
  descriptionDB Connection/description
  res-ref-namejdbc/TestDB/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
  /resource-ref
/web-app

The description is missing (but I dont have a DTD to had to tell whether
this is optional) but other than that it's fine.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 02 July 2002 14:00
 To: [EMAIL PROTECTED]
 Subject: RE: Tomcat 4.0.4, jndi, jdbc and postgresql [long]
 
 
 Is this normal :
 
 resource-ref
 res-ref-namejdbc/BookDB/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainter/res-auth
 /resource-ref
 
 More especially : res-authContainter/res-auth : CONTAINTER?
 
 Andre Powroznik
 
 -Original Message-
 From: Przemyslaw Kowalczyk [mailto:[EMAIL PROTECTED]]
 Sent: 02 July 2002 12:09
 To: 'Tomcat Users List'
 Subject: Tomcat 4.0.4, jndi, jdbc and postgresql [long]
 
 
 Hi
 
 I've just started to write servlets. Servlets that only do 
 processing, without 
 connecting to database work fine, but I have some problems to get the 
 connection with postgresql via jdbc work.
 
 Tomcat: 4.0.4 (on linux)
 Postgresql: 7.2.1 (on linux)
 Jdbc: pgjdbc2.jar (from jdbc.postgresql.org)
 
 The servlet is quite simple:
 
 import java.io.*;
 import java.util.*;
 import java.sql.*;
 import javax.sql.*;
 import javax.naming.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 
 public class InfoServlet extends HttpServlet {
 
 Connection con;
 private boolean conFree = true;
 
 public void init() throws ServletException {
 try  {
 Context initCtx = new InitialContext();
 Context envCtx = 
 (Context)initCtx.lookup(java:comp/env);
 DataSource ds = (DataSource)
 envCtx.lookup(jdbc/BookDB);
 Connection con = ds.getConnection();
 } catch (Exception ex) {
 throw new ServletException(Couldn't 
 open connection 
 to database:  + ex.getMessage());
 }
 }
 
 public void destroy() {
 try {
 con.close();
 } catch (SQLException ex) {
 System.out.println(ex.getMessage());
 }
 }
 
 public void doGet (HttpServletRequest request, 
 HttpServletResponse 
 response) throws ServletException, IOException {
 
 HttpSession session = request.getSession();
 
 // set content-type header before accessing the Writer
 response.setContentType(text/html);
 response.setBufferSize(8192);
 PrintWriter out = response.getWriter();
 
 // then write the data of the response
 out.println(html +
 headtitleDuke's Bookstore/title/head);
 }
 }
 
 in web/WEB-INF/web.xml I defined:
 
 
 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;
 web-app
 display-nameCurrency Converter Application/display-name
 description
 Test servlet
 /description
 servlet
 servlet-nameinfo/servlet-name
 display-nameinfo/display-name
 descriptionno description/description
 servlet-classInfoServlet/servlet-class
 /servlet
 servlet-mapping
 servlet-nameinfo/servlet-name
 url-pattern/info/url-pattern
 /servlet-mapping
 session-config
 session-timeout30/session-timeout
 /session-config
 resource-ref
 res-ref-namejdbc/BookDB/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainter/res-auth
 /resource-ref
 /web-app
 
 And in server.xml in the contex of the application:
 
Context path=/bookstore docBase=bookstore debug=0
  reloadable=true crossContext=true
   Logger className=org.apache.catalina.logger.FileLogger
  prefix=localhost_bookstore_log. suffix=.txt
   timestamp=true/
   Resource name=jdbc/BookDB auth=Container
 type=javax.sql.DataSource/
   ResourceParams name=jdbc/BookDB
 parameter
   nameuser/name
   valuejava/value
 /parameter
 parameter
   namepassword/name
   valuejava/value
 /parameter
 parameter
   namedriverClassName/name
   valueorg.postgresql.Driver/value
 /parameter
 parameter
   namedriverName/name
   valuejdbc:postgresql:public/value
 

Re: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread Przemyslaw Kowalczyk

On Tuesday 02 July 2002 14:56, [EMAIL PROTECTED] wrote:
 Would you have other applications running in tomcat?

No, I've just started to learn, so there are other apps.

przem


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




Re: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread Przemyslaw Kowalczyk

On Tuesday 02 July 2002 15:00, [EMAIL PROTECTED] wrote:
 Is this normal :

 resource-ref
 res-ref-namejdbc/BookDB/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainter/res-auth
 /resource-ref

 More especially : res-authContainter/res-auth : CONTAINTER?


You are right, there is a misseling, but correcting it didn't help much :-(

I'm still curious why tomcat wants a hsql driver even though it's not 
mentioned in any configuration file.

przem




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




RE: Tomcat 4 - OpenSSL - IE client certificate works partially

2002-07-02 Thread Adam Greene

I don't know if this applies to Apache Tomcat, but Apache Web Server does
not like IE certs.  There was an article in Eweek that talked about how
Apache follows the standard, and Microsoft (as usual) innovated in regards
to SSL, TLS, etc.  So that Internet Explorer does work quite right with
Apache Web Server.  This might be what you are seeing.  Verisign must have
broken their certs to work with both IIS and Apache.

Adam Greene
ROMulin Group Inc

885 Main St, Suite 16
Moncton, NB
E1C 1G5

Ph: (506) 863-1014 x4
Fx: (506) 854-6886

http://www.romulin.com/

-Original Message-
From: Henrik Schultz [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 01, 2002 11:43 AM
To: tomcat-user
Subject: Tomcat 4 - OpenSSL - IE client certificate works partially


Greetings all...

For those not interested in client certificates at the deep technical
level, this is probably not your favorite cup of tea. Otherwise read on.

Enabling SSL in Tomcat is really no sweat using your own home-made
certificates, thanks to the excellent  HOW-TO. Once you get your root CA
certificate installed in the right places, and a suitable certificate
installed in Tomcat, everything works just fine.

However, creating client certificates that works with IE has (at least for
me) shown to be a real pain. I've experimented for months, and tried
numerous postings on this list, but noone seemed to know the finer details.
It was only recently I had a breakthrough, in that a trial certificate from
Verisign allowed me to compare that and a home-made one, and find the bits
that makes the difference, that is, what it takes for it to be shown on the
selection list in IE when the server asks for a client certificate.
Last night I succeeded. The right combination of keytool and openssl
maneuvres to setup a private CA, finally generated a certificate that
installed without a hitch in IE, and came up when I subsequently connected
to my SSL enabled Tomcat. So far so good.

However there is still one major obstacle ... the server aborts the
connection right away :-

IE tells me:

The page cannot be displayed
The page you are looking for is currently unavailable.
The Web site might be experiencing technical difficulties,
or you may need to adjust your browser settings.

In other words, the usual message that indicates that the server screwed
up, and closed the connection.

Interestingly enough the Verisign certificate works just fine. So there is
apparently still a difference to Tomcat.
Have tried to connect using openssl s_client - works A-OK, also with my
home-made certificate.
Have looked in the tomcat logs to no avail. There is no trace anywhere why
the connection breaks.

So the question to the list is: how would I go by diagnosing this? I
believe that the problem must be related to the SSL container (?) that
responds to the traffic on port 443, and does all the SSL handshaking,
because my application never sees anything.
Just like in Apache there's an error log for all the pages that fail -
isn't there such a log in Tomcat?

Thanks for any input or advice you might have!

PS. If anyone is interested in a writeup or HOW-TO of making client
certificates for Tomcat, let me know. This is certainly tricky stuff!

Henrik Schultz
Senior Systems Architect
Consultant to Maersk Data AS
Tel.: +45 39 10 21 13
Mobile: +45 22 12 24 29
E-mail: [EMAIL PROTECTED]


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


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




RE: Tomcat 4 - OpenSSL - IE client certificate works partially

2002-07-02 Thread Adam Greene

I would absolutely love a HOW-TO.  I have a project that is going to require
certs for security.  I will ultimately have to use a Verisign or Thawte
cert, but I can certainly test with the homemade ones.  Also, have you tried
to get Netscape or Mozilla to work??

Adam Greene
ROMulin Group Inc

885 Main St, Suite 16
Moncton, NB
E1C 1G5

Ph: (506) 863-1014 x4
Fx: (506) 854-6886

http://www.romulin.com/

-Original Message-
From: Henrik Schultz [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 01, 2002 11:43 AM
To: tomcat-user
Subject: Tomcat 4 - OpenSSL - IE client certificate works partially


Greetings all...

For those not interested in client certificates at the deep technical
level, this is probably not your favorite cup of tea. Otherwise read on.

Enabling SSL in Tomcat is really no sweat using your own home-made
certificates, thanks to the excellent  HOW-TO. Once you get your root CA
certificate installed in the right places, and a suitable certificate
installed in Tomcat, everything works just fine.

However, creating client certificates that works with IE has (at least for
me) shown to be a real pain. I've experimented for months, and tried
numerous postings on this list, but noone seemed to know the finer details.
It was only recently I had a breakthrough, in that a trial certificate from
Verisign allowed me to compare that and a home-made one, and find the bits
that makes the difference, that is, what it takes for it to be shown on the
selection list in IE when the server asks for a client certificate.
Last night I succeeded. The right combination of keytool and openssl
maneuvres to setup a private CA, finally generated a certificate that
installed without a hitch in IE, and came up when I subsequently connected
to my SSL enabled Tomcat. So far so good.

However there is still one major obstacle ... the server aborts the
connection right away :-

IE tells me:

The page cannot be displayed
The page you are looking for is currently unavailable.
The Web site might be experiencing technical difficulties,
or you may need to adjust your browser settings.

In other words, the usual message that indicates that the server screwed
up, and closed the connection.

Interestingly enough the Verisign certificate works just fine. So there is
apparently still a difference to Tomcat.
Have tried to connect using openssl s_client - works A-OK, also with my
home-made certificate.
Have looked in the tomcat logs to no avail. There is no trace anywhere why
the connection breaks.

So the question to the list is: how would I go by diagnosing this? I
believe that the problem must be related to the SSL container (?) that
responds to the traffic on port 443, and does all the SSL handshaking,
because my application never sees anything.
Just like in Apache there's an error log for all the pages that fail -
isn't there such a log in Tomcat?

Thanks for any input or advice you might have!

PS. If anyone is interested in a writeup or HOW-TO of making client
certificates for Tomcat, let me know. This is certainly tricky stuff!

Henrik Schultz
Senior Systems Architect
Consultant to Maersk Data AS
Tel.: +45 39 10 21 13
Mobile: +45 22 12 24 29
E-mail: [EMAIL PROTECTED]


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


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




RE: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread Les Hughes


Ignore the remove // comment - I was looking at my oracle notes :-)
I really have no idea why it's trying to load the hsql driver if there's no
ref in your
server.xml

Post your server.xml and web.xml and we'll both have a look.



 -Original Message-
 From: Przemyslaw Kowalczyk [mailto:[EMAIL PROTECTED]]
 Sent: 02 July 2002 14:13
 To: Tomcat Users List
 Subject: Re: Tomcat 4.0.4, jndi, jdbc and postgresql [long]
 
 
 On Tuesday 02 July 2002 15:00, [EMAIL PROTECTED] wrote:
  Is this normal :
 
resource-ref
  res-ref-namejdbc/BookDB/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainter/res-auth
  /resource-ref
 
  More especially : res-authContainter/res-auth : CONTAINTER?
 
 
 You are right, there is a misseling, but correcting it didn't 
 help much :-(
 
 I'm still curious why tomcat wants a hsql driver even though it's not 
 mentioned in any configuration file.
 
 przem
 
 
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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




RE: Tomcat 4 - OpenSSL - IE client certificate works partially

2002-07-02 Thread Henrik Schultz


You could also use a temporary Verisign certificate to test with, which is
what I have done so far.

No, I did not try Netscape myself due to a proxy issue, but someone else on
th list did that, and that came up with a strange error:
unknown SSL Error -12227
Have still no clue what this is. At least NS is saying something, contrary
to IE that just gives me that bloody Page cannot be displayed.

When I've gotten it all to work I'll write up a HOW-TO. Promise. Enough
people have been struggling with this now for way too long.

Regards -

Henrik Schultz
Senior Systems Architect
Consultant to Maersk Data AS
Tel.: +45 39 10 21 13
Mobile: +45 22 12 24 29
E-mail: [EMAIL PROTECTED]


   

   

Adam Greene  To: Tomcat Users List 
[EMAIL PROTECTED]
agreene@romulicc: 

n.com Subject:  RE: Tomcat 4 - OpenSSL - IE 
client certificate works partially
   

02-07-2002 

10:18  

Please respond 

to Tomcat 

Users List

   

   

   




I would absolutely love a HOW-TO.  I have a project that is going to
require
certs for security.  I will ultimately have to use a Verisign or Thawte
cert, but I can certainly test with the homemade ones.  Also, have you
tried
to get Netscape or Mozilla to work??

Adam Greene
ROMulin Group Inc

885 Main St, Suite 16
Moncton, NB
E1C 1G5

Ph: (506) 863-1014 x4
Fx: (506) 854-6886

http://www.romulin.com/

-Original Message-
From: Henrik Schultz [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 01, 2002 11:43 AM
To: tomcat-user
Subject: Tomcat 4 - OpenSSL - IE client certificate works partially


Greetings all...

For those not interested in client certificates at the deep technical
level, this is probably not your favorite cup of tea. Otherwise read on.

Enabling SSL in Tomcat is really no sweat using your own home-made
certificates, thanks to the excellent  HOW-TO. Once you get your root CA
certificate installed in the right places, and a suitable certificate
installed in Tomcat, everything works just fine.

However, creating client certificates that works with IE has (at least for
me) shown to be a real pain. I've experimented for months, and tried
numerous postings on this list, but noone seemed to know the finer details.
It was only recently I had a breakthrough, in that a trial certificate from
Verisign allowed me to compare that and a home-made one, and find the bits
that makes the difference, that is, what it takes for it to be shown on the
selection list in IE when the server asks for a client certificate.
Last night I succeeded. The right combination of keytool and openssl
maneuvres to setup a private CA, finally generated a certificate that
installed without a hitch in IE, and came up when I subsequently connected
to my SSL enabled Tomcat. So far so good.

However there is still one major obstacle ... the server aborts the
connection right away :-

IE tells me:

The page cannot be displayed
The page you are looking for is currently unavailable.
The Web site might be experiencing technical difficulties,
or you may need to adjust your browser settings.

In other words, the usual message that indicates that the server screwed
up, and closed the connection.

Interestingly enough the Verisign certificate works just fine. So there is
apparently still a difference to Tomcat.
Have tried to connect using openssl s_client - works A-OK, also with my
home-made 

Re: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread Przemyslaw Kowalczyk

On Tuesday 02 July 2002 15:06, Les Hughes wrote:
 web-app
   resource-ref
   descriptionDB Connection/description
   res-ref-namejdbc/TestDB/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
   /resource-ref
 /web-app

 The description is missing (but I dont have a DTD to had to tell whether
 this is optional) but other than that it's fine.

Neither adding description nor removing slashes helped.
I've checked the path in manual:
jdbc:postgresql:database
jdbc:postgresql://host/database
jdbc:postgresql://host:port/database

I wonder if there is a way to debug what exactly Tomcat does. What section of 
server.xml does it parse etc.

Does anyone tried to connect to postgresql and succeeded?

przem




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




Re: Tomcat-4.1.6 and DBCP issue?

2002-07-02 Thread Martin Jacobson

Douglas, Rory wrote:

 Hi there
 
 I had some problems using the DBCP connection pool with 4.1.6 and the MS 
 SQL Server JDBC drivers. I couldn't get the pool to use the user 
 parameter specified in server.xml, I ended up having to include the 
 username and password as part of the JDBC URL.
 
 Oh, I've never used the built-in connection pooling before, so I can't 
 speak for 4.1.3. What's happening with your 4.1.6 setup??
 
 


DBCP expects the user to be identified by a parameter called username, 
not user :-)

Martin



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




RE: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread andre . powroznik

Do you have already connected to a postgresql db using a java app? Are you sure the 
parameters are correct? What is public?
Where did you put the postgresql.jar?
Do you have a file named hsql.jar? Can you remove it?

-Original Message-
From: Przemyslaw Kowalczyk [mailto:[EMAIL PROTECTED]]
Sent: 02 July 2002 12:09
To: 'Tomcat Users List'
Subject: Tomcat 4.0.4, jndi, jdbc and postgresql [long]


Hi

I've just started to write servlets. Servlets that only do processing, without 
connecting to database work fine, but I have some problems to get the 
connection with postgresql via jdbc work.

Tomcat: 4.0.4   (on linux)
Postgresql: 7.2.1 (on linux)
Jdbc: pgjdbc2.jar (from jdbc.postgresql.org)

The servlet is quite simple:

import java.io.*;
import java.util.*;
import java.sql.*;
import javax.sql.*;
import javax.naming.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class InfoServlet extends HttpServlet {

Connection con;
private boolean conFree = true;

public void init() throws ServletException {
try  {
Context initCtx = new InitialContext();
Context envCtx = 
(Context)initCtx.lookup(java:comp/env);
DataSource ds = (DataSource)
envCtx.lookup(jdbc/BookDB);
Connection con = ds.getConnection();
} catch (Exception ex) {
throw new ServletException(Couldn't open connection 
to database:  + ex.getMessage());
}
}

public void destroy() {
try {
con.close();
} catch (SQLException ex) {
System.out.println(ex.getMessage());
}
}

public void doGet (HttpServletRequest request, HttpServletResponse 
response) throws ServletException, IOException {

HttpSession session = request.getSession();

// set content-type header before accessing the Writer
response.setContentType(text/html);
response.setBufferSize(8192);
PrintWriter out = response.getWriter();

// then write the data of the response
out.println(html +
headtitleDuke's Bookstore/title/head);
}
}

in web/WEB-INF/web.xml I defined:


!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
display-nameCurrency Converter Application/display-name
description
Test servlet
/description
servlet
servlet-nameinfo/servlet-name
display-nameinfo/display-name
descriptionno description/description
servlet-classInfoServlet/servlet-class
/servlet
servlet-mapping
servlet-nameinfo/servlet-name
url-pattern/info/url-pattern
/servlet-mapping
session-config
session-timeout30/session-timeout
/session-config
resource-ref
res-ref-namejdbc/BookDB/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainter/res-auth
/resource-ref
/web-app

And in server.xml in the contex of the application:

   Context path=/bookstore docBase=bookstore debug=0
 reloadable=true crossContext=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_bookstore_log. suffix=.txt
  timestamp=true/
  Resource name=jdbc/BookDB auth=Container
type=javax.sql.DataSource/
  ResourceParams name=jdbc/BookDB
parameter
  nameuser/name
  valuejava/value
/parameter
parameter
  namepassword/name
  valuejava/value
/parameter
parameter
  namedriverClassName/name
  valueorg.postgresql.Driver/value
/parameter
parameter
  namedriverName/name
  valuejdbc:postgresql:public/value
/parameter
  /ResourceParams
/Context

I've tried a few different driverName parameters: (restarting Tomcat after 
each change)
jdbc:postgresql://localhost/public
jdbc:postgresql://full.server.name/public
jdbc:postgresql:public
jdbc:postgresql://localhost/

But, despite the parameters, I always get the following error:

exception 
javax.servlet.ServletException: Couldn't open connection to database: 
Exception creating DataSource: org.hsql.jdbcDriver
at InfoServlet.init(Unknown Source)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918)


{cut}

I have no idea why Tomcat wants to connect 

Re: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread Martin Jacobson

Les Hughes wrote:

 Ignore the remove // comment - I was looking at my oracle notes :-)
 I really have no idea why it's trying to load the hsql driver if there's no
 ref in your
 server.xml
 
 Post your server.xml and web.xml and we'll both have a look.
 

I struggled for weeks (on and off) trying to figure out why Tyrex ALWAYS 
tries to load the hsql driver - in vain.

Don't bother trying to get Tyrex to work - it just doesn't! (And neither 
does it pool connections) - you should try TC 4.1, which uses the 
jakarta-commons DBCP. DBCP works, and pools connections!

Martin



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




Re: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread Przemyslaw Kowalczyk

On Tuesday 02 July 2002 15:16, Les Hughes wrote:
 Ignore the remove // comment - I was looking at my oracle notes :-)
 I really have no idea why it's trying to load the hsql driver if there's no
 ref in your
 server.xml

Ok, the full versions (I cut off all comments):

przem


server.xml

---cut---here
Server port=8005 shutdown=SHUTDOWN debug=0
  Service name=Tomcat-Standalone

Connector className=org.apache.catalina.connector.http.HttpConnector
   port=8080 minProcessors=5 maxProcessors=75
   enableLookups=true redirectPort=8443
   acceptCount=10 debug=0 connectionTimeout=6/
Engine name=Standalone defaultHost=localhost debug=0

  Logger className=org.apache.catalina.logger.FileLogger
  prefix=catalina_log. suffix=.txt
  timestamp=true/


  Realm className=org.apache.catalina.realm.MemoryRealm /

  Host name=localhost debug=0 appBase=webapps unpackWARs=true

Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs  prefix=localhost_access_log. 
suffix=.txt
 pattern=common/

Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=localhost_log. suffix=.txt
timestamp=true/

Context path=/manager docBase=manager 
 debug=0 privileged=true/

Context path=/bookstore1 docBase=bookstore1 debug=0
 reloadable=true crossContext=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_bookstore1_log. suffix=.txt
  timestamp=true/
  Resource name=jdbc/BookDB auth=Container
type=javax.sql.DataSource/
  ResourceParams name=jdbc/BookDB
parameter
 nameusername/name
  valuejava/value
/parameter
parameter
  namepassword/name
  valuejava/value
/parameter   
parameter
  namedriverClassName/name
  valueorg.postgresql.Driver/value
/parameter
parameter
  namedriverName/name
  valuejdbc:postgresql:/localhost/public/value
/parameter
  /ResourceParams
/Context 

  /Host

/Engine

  /Service


  Service name=Tomcat-Apache

Connector className=org.apache.catalina.connector.warp.WarpConnector
 port=8008 minProcessors=5 maxProcessors=75
 enableLookups=true
 acceptCount=10 debug=0/

Engine className=org.apache.catalina.connector.warp.WarpEngine
 name=Apache defaultHost=localhost debug=0 appBase=webapps

  Logger className=org.apache.catalina.logger.FileLogger
  prefix=apache_log. suffix=.txt
  timestamp=true/

  Realm className=org.apache.catalina.realm.MemoryRealm /

/Engine

  /Service

/Server

---cut---here

web.xml

---cut---here
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;

web-app
display-nameInfo Application/display-name
description
Just test application
/description
servlet
servlet-nameinfo/servlet-name
display-nameinfo/display-name
descriptionno description/description
servlet-classInfoServlet/servlet-class
/servlet
servlet-mapping
servlet-nameinfo/servlet-name
url-pattern/info/url-pattern
/servlet-mapping
session-config
session-timeout30/session-timeout
/session-config
resource-ref
descriptionDatabase Connection/description
res-ref-namejdbc/BookDB/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
/web-app
---cut---here---

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




apache-tomcat: localhost/examples/ ok, but not locahost/examples

2002-07-02 Thread Ralph Grove

I've installed tomcat 4.0.4 along with the webapp connector and have 
modified the Apache config (as follows) to relay certain requests to tomcat.

# make connection to tomcat
LoadModule webapp_module modules/mod_webapp.so
AddModule mod_webapp.c
WebAppConnection warpConnection warp localhost:8008
WebAppDeploy examples warpConnection /examples

Now, apache forwards requests to tomcat only when the URL ends with a 
'/'. When I request the URL http://localhost/examples, for example, the 
server response Not Found, but it correctly processes 
http://localhost/examples/ .

Thanks for any help or suggestions.

-- 
Ralph Grove
James Madison University
[EMAIL PROTECTED]


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




Re: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread Przemyslaw Kowalczyk

On Tuesday 02 July 2002 15:43, [EMAIL PROTECTED] wrote:
 Do you have already connected to a postgresql db using a java app? Are you
 sure the parameters are correct? What is public? Where did you put the
 postgresql.jar?

Yes, without any problems from 'standalone' application. I'm able to query and 
update database, so parameters (url, username and password) are ok.

There is no postgresql.jar, only pgjdbc2.jar. I put it in ${tomcat-root}/lib 
directory.  I tried first to add a link named postgresql.jar and then I've 
renamed it but it didn't help :-(

 Do you have a file named hsql.jar? Can you remove it?

I don't have such file.


przem


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




Fault= SOAP-ENV:Server.BadTargetObjectURI::: Can anyone help me?

2002-07-02 Thread Nishant_Awasthi

Hello eneryone...

I have problem that have been discussed many times but I couldn't find the
answer to it.

I am trying to run SOAP on tomcat.
I am using

  Apache SOAP 2.0   



  Apache Jakarta Tomcat 3.2.4   




  Apache Xerces XML Parser 1.2.3



I am doing everything as told on site
http://www-106.ibm.com/developerworks/webservices/library/ws-peer2/index.html
but when finally try to run my Client.class file following message appears

C:\demo1java Client
invoke service
  URL= http://localhost:8080/soap/servlet/rpcrouter
  URN =urn:demo1:exchange
Fault= SOAP-ENV:Server.BadTargetObjectURI, Unable to resolve target object:
Exchange

I have set the classpath like what is discussed on the above link but I
couldn't find out
the source of problem.

Can anyone tell me what can be done?

Thanks
Nishant

-

Nishant Awasthi
Corporate Systems Database Intern
Progressive Insurance
Phone: 440-603-4055 (Work)
Cell: 330-328-0243 (Cell)



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




taglibs and application context

2002-07-02 Thread Andreas Hirner

Hello,

I have set an attribute like this:

request.setAttribute(Constants.VARIABLE_KEY, variable);

now I would like retreive that variable in a taglib. But if call it
via

variable =
(String)pageContext.getServletContext().getAttribute(Constants.VARIABL
E_KEY);

the variable is null

Waht's wrong?

Thanks
Andreas



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




Re: application Context within a TagLib

2002-07-02 Thread info

thanxs!!

Rainer
- Original Message -
From: Alessio Fiore [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, July 02, 2002 3:07 PM
Subject: R: application Context within a TagLib


 Hi, there is difference between context attributes and context init
 parameters...

 Context attributes are managed with setAttribute and getAttribute
 methods.
 Init parameters are defined in the web.xml file and are read with
 getInitParameter method.

 Then, you should modify your code in following way:


pageContext.out().print(pageContext.getServletContext().getInitParameter(se
 rver_pfad));


 Alessio
 [EMAIL PROTECTED]


 -Messaggio originale-
 Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Inviato: martedì 2 luglio 2002 14.32
 A: Tomcat Users List
 Oggetto: application Context within a TagLib


 Hi,

 realy basics! I set some values in the web.xml like this:
 .
 .
 .
 context-param
  param-nameserver_pfad/param-name
  param-valuehttp://localhost:8080//param-value
  descriptionServer-Pfad/description
 /context-param
 .
 .
 .

 And now I want to get the values within a TagLib:

 .
 .

pageContext.out().print(pageContext.getServletContext().getAttribute(server
 _pfad));
 is null
 .
 .

 Whats wrong??

 thanks, Rainer



 - Disclaimer -
 This email and any attachments thereto may contain information which is
 confidential and/or protected by intellectual property rights and are
 intended for the sole use of the recipient(s) named above. Any use of the
 information contained herein (including, but not limited to, total or
 partial reproduction, communication or distribution in any form) or the
 taking of any action in reliance on the contents, by persons other than
the
 designated recipient(s) is strictly prohibited.

 If you have received this email in error, please notify the sender either
by
 telephone or by email and delete the material from any computer.

 Thank you for your cooperation.



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






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




RE: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread Les Hughes


Ok. Summary time.

Martin reflects my experience - I dumped tyrex and used DBCP as well. But
aren't we trying to go direct without a pool? Having said that I've only
ever managed to get datasources working when DBCP is being used...

Check that your driver jarfile does not contain the javax.sql extension
classes. If it does, delete them and rejar. Some versions of Tomcat will
ignore any jar that has these classes present. Be careful with this thought
- I work with jdk1.4 which has these built in.

Also, you don't specify a DataSourceFactory in your server.xml - see below.


Here's a known (well as far as I know...) good postgres solution using DBCP.
See
http://marc.theaimsgroup.com/?l=tomcat-userm=102225547106556w=2
for my original mysql post as well.



Resource name=jdbc/postgres auth=Container
  type=javax.sql.DataSource/ 

ResourceParams name=jdbc/postgres
  parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  parameter
namedriverClassName/name
valueorg.postgresql.Driver/value
  /parameter
  parameter
nameurl/name
valuejdbc:postgresql://127.0.0.1:5432/mydb/value
  /parameter
  parameter
nameusername/name
valuemyuser/value
  /parameter
  parameter
namepassword/name
valuemypasswd/value
  /parameter
  parameter
namemaxActive/name
value20/value
  /parameter
  parameter
namemaxIdle/name
value10/value
  /parameter
  parameter
namemaxWait/name
value-1/value
  /parameter
/ResourceParams 




 -Original Message-
 From: Przemyslaw Kowalczyk [mailto:[EMAIL PROTECTED]]
 Sent: 02 July 2002 14:53
 To: Tomcat Users List
 Subject: Re: Tomcat 4.0.4, jndi, jdbc and postgresql [long]
 
 
 On Tuesday 02 July 2002 15:43, [EMAIL PROTECTED] wrote:
  Do you have already connected to a postgresql db using a 
 java app? Are you
  sure the parameters are correct? What is public? Where 
 did you put the
  postgresql.jar?
 
 Yes, without any problems from 'standalone' application. I'm 
 able to query and 
 update database, so parameters (url, username and password) are ok.
 
 There is no postgresql.jar, only pgjdbc2.jar. I put it in 
 ${tomcat-root}/lib 
 directory.  I tried first to add a link named postgresql.jar 
 and then I've 
 renamed it but it didn't help :-(
 
  Do you have a file named hsql.jar? Can you remove it?
 
 I don't have such file.
 
 
 przem
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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




Re: Tomcat 4.0.4, jndi, jdbc and postgresql [long]

2002-07-02 Thread Brian P. Millett

On Tue, 2002-07-02 at 08:47, Przemyslaw Kowalczyk wrote:
 On Tuesday 02 July 2002 15:16, Les Hughes wrote:
  Ignore the remove // comment - I was looking at my oracle notes :-)
  I really have no idea why it's trying to load the hsql driver if there's no
  ref in your
  server.xml
 
 Ok, the full versions (I cut off all comments):
 
 przem

Przem,
 Here are the setting I have used with Tomcat 4.0.4, postgresql 7.2.1 
jdk1.4

I had to put the postgresql.jar, commons-dbcp.jar, commons-pool.jar into
the DIR/common/lib directory.

SERVER.XML:

Resource name=jdbc/tropicos auth=Container
type=javax.sql.DataSource/
  ResourceParams name=jdbc/tropicos
  parameter
 namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
   
parameternamemaxActive/namevalue100/value/parameter
   
parameternamemaxIdle/namevalue3/value/parameter
   
parameternamemaxWait/namevalue100/value/parameter
   
parameternameusername/namevalueX/value/parameter
   
parameternamepassword/namevalue/value/parameter
parameter
namedriverClassName/name
valueorg.postgresql.Driver/value
/parameter
parameter
nameurl/name
   
valuejdbc:postgresql://localhost:5432/ids_tropicos/value
/parameter
  /ResourceParams

Then the web.xml cruft:
resource-ref
  descriptionPostgreSQL DB Connection/description
  res-ref-namejdbc/tropicos/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

-- 
Brian Millett
Enterprise Consulting Group   Shifts in paradigms
(314) 205-9030   often cause nose bleeds.
[EMAIL PROTECTED]   Greg Glenn


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




RE: Tomcat-4.1.6 and DBCP issue?

2002-07-02 Thread Douglas, Rory
Title: RE: Tomcat-4.1.6 and DBCP issue?





Thanks Martin, that worked!


The problem is that the TC-4.1.6 Admin web-app adds a user ,not a username parameter when you add a DataSource resource.

-Original Message-
From: Martin Jacobson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 9:37 AM
To: Tomcat Users List
Subject: Re: Tomcat-4.1.6 and DBCP issue?



Douglas, Rory wrote:


 Hi there
 
 I had some problems using the DBCP connection pool with 4.1.6 and the MS 
 SQL Server JDBC drivers. I couldn't get the pool to use the user 
 parameter specified in server.xml, I ended up having to include the 
 username and password as part of the JDBC URL.
 
 Oh, I've never used the built-in connection pooling before, so I can't 
 speak for 4.1.3. What's happening with your 4.1.6 setup??
 
 



DBCP expects the user to be identified by a parameter called username, 
not user :-)


Martin




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




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


RE: Error with Oracle Jdbc

2002-07-02 Thread Lin, Zhongwu

try

DriverManager.getConnection(jdbc:oracle:thin:@HOST:PORT:TOMCATDB,spifdogg
,spifdogg);

instead of 

DriverManager.getConnection(jdbc:oracle:localhost:@TOMCATDB,spifdogg,sp
ifdogg);

It should work.



-Original Message-
From: William Gustave [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 01, 2002 11:37 PM
To: TOMCAT USER
Subject: Error with Oracle Jdbc
Importance: High


I am getting the following Error from my app when I hit the index.jsp page.
Can somebody help me it would be greatly appreciated.

 jdbc java.sql.SQLException: Invalid Oracle URL specified

I am running the following
Tomcat 4  (It is on the same machine as the Database Server)
Oracle 8.1
Oracle8i 8.1.7.1JDBC Drivers (Which I have extracted into
\tomcat4\webapps\testoracle\WEB-INF\classes directory)

Below is the JSP code that is on the page.

%@ page import=oracle.jdbc.driver.* %
%@ page import=java.sql.* %

%
try{

Class.forName(oracle.jdbc.driver.OracleDriver);
Connection conn =
DriverManager.getConnection(jdbc:oracle:localhost:@TOMCATDB,spifdogg,
spifdogg);


Statement statemnt = conn.createStatement();

ResultSet users = statemnt.executeQuery(select * from user);

}catch(Exception e){
out.println(e);
}
%


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

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




R: taglibs and application context

2002-07-02 Thread Alessio Fiore

Hi Andreas,

the problem is that you put an attribute in the request and then you get it
from the  context... you should, instead, get it from the request, so:

request.setAttribute(Constants.VARIABLE_KEY, variable);

...

variable =
(String)pageContext.getRequest().getAttribute(Constants.VARIABLE_KEY);


Regards
Alessio
[EMAIL PROTECTED]

-Messaggio originale-
Da: Andreas Hirner [mailto:[EMAIL PROTECTED]]
Inviato: martedì 2 luglio 2002 16.24
A: Tomcat Users List
Oggetto: taglibs and application context


Hello,

I have set an attribute like this:

request.setAttribute(Constants.VARIABLE_KEY, variable);

now I would like retreive that variable in a taglib. But if call it
via

variable =
(String)pageContext.getServletContext().getAttribute(Constants.VARIABL
E_KEY);

the variable is null

Waht's wrong?

Thanks
Andreas



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



- Disclaimer -
This email and any attachments thereto may contain information which is
confidential and/or protected by intellectual property rights and are
intended for the sole use of the recipient(s) named above. Any use of the
information contained herein (including, but not limited to, total or
partial reproduction, communication or distribution in any form) or the
taking of any action in reliance on the contents, by persons other than the
designated recipient(s) is strictly prohibited.

If you have received this email in error, please notify the sender either by
telephone or by email and delete the material from any computer.

Thank you for your cooperation. 



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




RE: Apache 2.0.39 modjk2

2002-07-02 Thread Short, Dave

jk2.shm is created in the Apache2\logs directory which has permissions set
to: Everyone - Full Control.

Any other ideas?

-Original Message-
From: Mark Pelillo [mailto:[EMAIL PROTECTED]]
Sent: July 01, 2002 5:32 PM
To: Tomcat Users List
Subject: Re: Apache 2.0.39  modjk2


check the permissions of the directory where jk2.shm file is going. 
Make sure the account which is running tomcat has permission to write
into the directory.




On Mon, 2002-07-01 at 15:25, Short, Dave wrote:
 Does anyone know why Apache 2.0.39 is reporting the [warn] messages in the
 error.log file?
 
 [Mon Jul 01 13:16:42 2002] [notice] Parent: Created child process 1752
 [Mon Jul 01 13:16:42 2002] [notice] Child 1752: Child process is running
 [Mon Jul 01 13:16:43 2002] [warn] workerEnv.init() ok
 C:/Apache2/conf/workers2.properties
 [Mon Jul 01 13:16:43 2002] [warn] mod_jk child init 1 -1
 [Mon Jul 01 13:16:43 2002] [notice] Child 1752: Acquired the start mutex.
 [Mon Jul 01 13:16:43 2002] [notice] Child 1752: Starting 250 worker
threads.
 
 
 httdp.conf file:
 
 Include /mod_jk2.conf
 
 
 mod_jk2.conf file:
 
 IfModule !mod_jk2.c
   LoadModule jk2_module c:/Apache2/modules/mod_jk2.dll
 /IfModule
 
 
 workers2.properties file:
 
 [logger]
 level=DEBUG
 
 [config:]
 file=${serverRoot}/conf/workers2.properties
 debug=0
 debugEnv=0
 
 [uriMap:]
 info=Maps the requests. Options: debug
 debug=0
 
 [shm:]
 info=Scoreboard. Required for reconfiguration and status with multiprocess
 servers
 file=${serverRoot}/logs/jk2.shm
 size=100
 debug=0
 disabled=0
 
 [workerEnv:]
 info=Global server options
 timing=1
 debug=0
 
 [channel.socket:localhost:8019]
 info=Ajp13 forwarding over socket
 debug=0
 tomcatId=localhost:8019
 
 [status:]
 info=Status worker, displays runtime informations
 
 [vm:]
 info=Parameters used to load a JVM in the server process
 OPT=-Djava.class.path=${TOMCAT_HOME}/bin/tomcat-jni.jar
 OPT=-Dtomcat.home=${TOMCAT_HOME}
 OPT=-Dcatalina.home=${TOMCAT_HOME}
 OPT=-Xmx128M
 disabled=1
 
 [worker.jni:jniCmd1]
 info=Command to be executed by the VM. This one will start tomcat.
 class=org/apache/jk/apr/TomcatStarter
 ARG=start
 disabled=1
 
 [uri:/jkstatus/*]
 info=Display status information and checks the config file for changes.
 group=status:
 
 [uri:/PSI]
 info=PSI Application
 context=/PSI
 debug=0
 
 [uri:/PSI/servlet/*]
 info=Prefix mapping
 
 [uri:/PSI/*.jsp]
 info=Extension mapping
 
 [uri:/PSI/*]
 info=Map the whole webapp
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 



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

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




plain MySQL DataSource in Tomcat (i know, damn topic)

2002-07-02 Thread Marc Logemann

Hi,

i figured out how to use the default DataSource with MySQL:

Resource name=jdbc/mysql auth=Container type=javax.sql.DataSource/
ResourceParams name=jdbc/mysql
parameter nameuser/namevalueroot/value /parameter
parameter namepassword/namevalue/value /parameter
parameter 
namedriverClassName/namevalueorg.gjt.mm.mysql.Driver/value/parameter
parameter namedriverName/namevaluejdbc:mysql://localhost/maxbahr/value 
/parameter
/ResourceParams

But i wonder how i can use the MysqlDataSource class and i wonder where is the real 
need to
use the MysqlDataSource class.

With this scenario however, is there a connection pooling implied? For me it seems that
when i do DataSource.getConnection() i just get a normal MySQL connection as when i do
classForName(Driver) or?


---
greetings from
Marc Logemann
Homebase @ www.logemann.info


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




Updating files without restarting Tomcat

2002-07-02 Thread cbarnes

I am using Tomcat 4.

I have a number of properties files in the WEB-INF/classes directory. I need
to be able to change the values of the properties in these files, but it
looks as though I need to restart Tomcat every time I change a value in
order for it to recognise the new version of the file. Is there any
configuration I can change so that it is not necessary to restart Tomcat
when I change the values of the properties. Is it possible for this to apply
just to specified files - I don't want it to check the status of all the
files in WEB-INF/classes because I know the class files won't change.

Thanks,
Catharine


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




RE: plain MySQL DataSource in Tomcat (i know, damn topic)

2002-07-02 Thread Clay Graham

Are alot of people having problems with the mySql drivers or am I being 
myopic...

i tried to do this with STRUTS datasource pooling and had the following 
issues...

I am asking a question because I am very suprised at an unexepected 
behaviour and thought that someone may have a hint.

I have linux 7.1 tomcat 404 ant struts 102 working and they have been 
tested, and I am taking the next step by starting to connect to my MySql 
database, all goodness.

So my first step was to add the datasource in my struts-config.xml as 
follows:

data-sources
  data-source
set-property property=autoCommit
  value=false/
set-property property=description
  value=The Test Datasource/
set-property property=driverClass
  value=org.gjt.mm.mysql.Driver/
set-property property=maxCount
  value=4/
set-property property=minCount
  value=2/
set-property property=password
  value=/
set-property property=url
  value=jdbc:mysql://localhost/test/
set-property property=user
  value=root/
  /data-source
/data-sources

the next step was to add the mm.mysql-2.0.6.1.jar to my project's 
WEB-INF/lib directory, the standard approach

[clay@meis test]$ jar -tvf test.war|grep mm.mysql
390333 Sun Jun 30 16:20:20 PDT 2002 WEB-INF/lib/mm.mysql-2.0.6.1.jar

I am sure this JAR has the mysql driver in it:

[clay@meis test]$ jar -tvf web/WEB-INF/lib/mm.mysql-2.0.6.1.jar |grep 
Driver
 15163 Sat Jun 16 09:20:28 PDT 2001 
mm.mysql-2.0.6/org/gjt/mm/mysql/Driver.java
  5443 Sat Jun 16 09:20:28 PDT 2001 
mm.mysql-2.0.6/org/gjt/mm/mysql/Driver.class

so when I install the application using ant the following error occurs:

- Root Cause -
java.sql.SQLException: open: java.lang.ClassNotFoundException: 
org.gjt.mm.mysql.Driver

I have even put mm.mysql-2.0.6.1.jar in tomcat/common/lib and it does not 
find the driver. I am asking this question on this list because it happens 
in struts-config.xml

so now I am looking into going over to the JNDI approach using  the guide 
at:

http://marc.theaimsgroup.com/?l=tomcat-userm=102225547106556w=2

but I am interested if there advantages to the JNDO pool ober the STRUTS 
pool if I go to all this trouble?

this seems like something alot people would care about.

Clay

-Original Message-
From:   Marc Logemann [SMTP:[EMAIL PROTECTED]]
Sent:   Tuesday, July 02, 2002 5:35 AM
To: [EMAIL PROTECTED]
Subject:plain MySQL DataSource in Tomcat (i know, damn topic)

Hi,

i am one of the guys trying to get a valid MysqlDataSource reference via
JNDI. But i am getting crazy without knowing where the problem is (perhaps
the reason is, i cant debug JNDI too good, cause i am no expert in it..)

i have the following:

server.xml
--
context 
Resource name=jdbc/TestDB auth=Cotainer type=javax.sql.DataSource/
ResourceParams name=jdbc/TestDB
parameter
namefactory/name
 
   valueorg.gjt.mm.mysql.jdbc2.optional.MysqlDataSourceFactory/va  
lue
  /parameter
parameter nameuser/namevalueroot/value /parameter
parameter namepassword/namevalue/value /parameter
parameter 
namedriverClassName/namevalueorg.gjt.mm.mysql.jdbc2.optional.Mysql  
DataSource/value/parameter
parameter 
namedriverName/namevaluejdbc:mysql://localhost/maxbahr/value 
/parameter
/ResourceParams
/context

web.xml
---
web-app
resource-ref
  descriptionDataSource MySQL/description
  res-ref-namejdbc/TestDB/res-ref-name
  res-type javax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref
/web-app

i placed the mysql mm jar into commons/lib

When i run a servlet with the standard lookup code:
 try {
 javax.naming.Context jndictx = new InitialContext();
 if (jndictx == null) throw new Exception(Boom - No Context);

 DataSource ds =
 (DataSource) jndictx.lookup(java:comp/env/jdbc/TestDB);
 if (ds != null) {
[..]

i get no exception but i also dont get any reference returned from lookup.

I read tons of websites including the tomcat JNDI howto, without beeing 
able to understand it
better (in fact it gets worse cause of thousands of combinations in the web 
for server.xml and
web.xml)

When i leave out factory in the server.xml, i get a tyrex exception 
regarding loading a factory...

I just thought that using a datasource is better than just calling the 
DriverManager, but the
effort seems amazing... or i am too unclever... whatever...

thx for help.
---
greetings from
Marc Logemann
Homebase @ www.logemann.info


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


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




Error on startup when using custom error pages

2002-07-02 Thread Sefton, Adam

Hi,

I'm trying to pick up error codes and display custom error pages. The one I'm working 
with currently is the 401 error in the case of failed logins. I've added the following 
in my /conf/web.xml:

error-page
error-code401/error-code
locationerror.html/location
/error-page

and I have error.html in the conf directory.

When I try to start the Tomcat server, I get the following errors:

ERROR reading java.io.FileInputStream@e06940
At Line 849 /web-app/error-page/ 

ERROR reading java.io.FileInputStream@90c06f
At Line 849 /web-app/error-page/ 

ERROR reading java.io.FileInputStream@766806
At Line 849 /web-app/error-page/ 

ERROR reading java.io.FileInputStream@c623af
At Line 849 /web-app/error-page/ 

Does anyone have any ideas? I recall reading somewhere that the custom error setup 
with TOmcat was quite buggy, is this the problem?

I am using Tomcat 4.0.3 standalone on Win2k

Cheers

Adam


**
This message may contain information which is confidential or privileged.
If you are not the intended recipient, please advise the sender immediately
by reply e-mail and delete this message and any attachments
without retaining a copy.  

**


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




Re: HTTP Status 500 - No Context configured to process this request

2002-07-02 Thread mpauley

Hi (Jose),

I  made  the  changes  you suggested but I'm still having problems.  Let me
give you a little more background:

The  website  we  would  like  to  drive  using  tomcat4  is located in the
/bioinformatics/webapps/bioinformatics directory (again, we're using RedHat
Linux 7.3; I don't think it matters but /bioinformatics is a RAID 0 drive).
Since  it  is possible that other websites might be developed in the future
that need tomcat we want to access it using
http://bioinformatics.ist.unomaha.edu/bioinformatics.   Thus,  lines  198 -
201 in my server.xml file now look like this

!--
Context path= docBase=ROOT debug=0/
--
Context  path=/var/tomcat4  docBase=/bioinformatics/webapps  debug
=0/

Note  that  bioinformatics.ist.  . . is a VirtualHost in Apache, configured
thusly,

VirtualHost 137.48.138.201
ServerName bioinformatics.ist.unomaha.edu
ServerAlias bioinformatics.unomaha.edu
DocumentRoot /bioinformatics/webapps
DirectoryIndex index.jsp index.html
/VirtualHost

Now  for  the  problem that we're having:  The website itself seems to work
butIcannot   access   any   of   the   manager   functions;   e.g.,
http://bioinformatics.ist.unomaha.edu:8180/bioinformatics/manager/list.   I
have  modified  the  tomcat-users.xml file to contain a user admin with a
role of manager.  This is the error message that I get:

Apache Tomcat/4.0.3 - HTTP Status 404 - /manager/list



type Status report

message /manager/list

description The requested resource (/manager/list) is not available.

Any  help  you  could  provide  to help solve this problem would be greatly
appreciated.

Other general questions (if you have time):
1)  I  know  that  tomcat  can not stand alone and requires Apache to work.
   However,  in  our  case,  how  do they interact?  Do we need to set up a
   VirtualHost?
2)  My  understanding  is that we need to specify the port when accessing a
   tomcat-enabled website, e.g., http://bioinformatics.ist.unomaha.edu:8180
   .   Is this true?  If so, is there any way to configure Apache/Tomcat so
   that the port number is NOT required?
3) Right now, all we have done is to use some include file statements in an
   otherwise  static webpage.  In this case, do we need a WEB-INF directory
   in .../bioinformatics?
4)  We  have not deployed anything but our application seems to work.  When
   is deploying necessary?

Mark


Mark A. Pauley, Ph.D.
College of Information Science  Technology, UNO
Omaha, NE 68182-0116
e-mail:  [EMAIL PROTECTED]
phone:  (402) 554-4954  fax:  (402) 554-3284
   
 
tomcat-user-digest-help@jakarta
 
.apache.org To: 
[EMAIL PROTECTED]  
cc:
 
07/01/2002 10:59 AM Subject: tomcat-user Digest 1 Jul 
2002 15:59:30 - Issue 980 
Please respond to Tomcat Users
 
List  
 
   
 
   
 




Hi Mark,

Your server.xml looks fine.

Question which URL are you trying to access?

If you are trying to access http://localhost/ you will get this
error because there is no context defined to answer this request, only
request of the form

http://localhost/examples/***

and

http://localhost/manager/***

will be answered since they are the only two context defined

If that is the case, do the following

Replace line 198 -200

!--
Context path= docBase=ROOT debug=0/
--

for

Context path=/bioinformatics docBase=bioinformatics debug=0/

which will create a context /bioinformatics, so you can access it using
http://localhost/bioinformatics/

Or you can setup this app as the default context as follows

Replace line 198 -200

!--
Context path= docBase=ROOT debug=0/
--

for

Context path=/ docBase=bioinformatics debug=0/

which will create a context /, so you can access it using
http://localhost/

well, I hope this helps you, let me know how it goes



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




APR not loaded?

2002-07-02 Thread Collins, Jim

Hi all,

Does anyone know what this message means:

INFO: APR not loaded, disabling jni components: java.io.IOException: no
jkjni in java.library.path

I get this message in my catalina log file whenever I start Tomcat. I am
trying to load a native library in a servlet with no luck so far and was
wondering if this had anything to do with it.

Thanks

Jim.


PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any 
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and 
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.



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




javax.servlet.ServletException: DbcpDataSourceFactory: on jwsdp1.0 / tomcat4.x

2002-07-02 Thread Jim Mangione

Has anyone come across this error before when trying to access a database
connection pool resource?
I'm using Tomcat 4.1 shipped with Java's Web Services Development Pack
v1.0 and trying to connect to a mySQL database. Currently, I'm not
employing any web services features. Just trying to get this working!

javax.servlet.ServletException: DbcpDataSourceFactory: driverClassName is
required

When my application hit's the last line of this code (it's a simple JSP
app):
  Context initCtx = new InitialContext();
  Context envCtx = (Context) initCtx.lookup(java:comp/env);
  DataSource ds = (DataSource) envCtx.lookup(jdbc/cdePool);

The driverClassName is indeed defined in the config.xml, and it appears
from catalina.log that it loads without a problem (meaning it's finding the
jdbc driver).

Here's the config.xml snippet:
Resource auth=Container name=jdbc/cdePool scope=Shareable type
=javax.sql.DataSource/
ResourceParams name=jdbc/cdePool
  parameter
namedriverClassName/name
valueorg.gjt.mm.mysql.Driver/value
  /parameter
  parameter
namevalidationQuery/name
valueselect count(*) from testtable/value
  /parameter
  parameter
nameuser/name
valuemonty/value
  /parameter
  parameter
namepassword/name
valuesome_pass/value
  /parameter
  parameter
namemaxActive/name
value5/value
  /parameter
  parameter
namemaxWait/name
value1000/value
  /parameter
  parameter
nameurl/name
valuejdbc:mysql://localhost/TestDB/value
  /parameter
  parameter
namemaxIdle/name
value3/value
  /parameter
/ResourceParams

And the web.xml snippet from the application directory:
  resource-env-ref
resource-env-ref-namejdbc/cdePool/resource-env-ref-name

resource-env-ref-typejavax.sql.DataSource/resource-env-ref-type
  /resource-env-ref

Has anyone seen this, or could offer advice?

Thanks!
-Jim
[EMAIL PROTECTED]



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




OT JBoss site offline?

2002-07-02 Thread David Mossakowski

Does anyone know what's going on?

d.

-- 
David Mossakowski  [EMAIL PROTECTED]
Instinet Corporation 212.310.7275



***
Disclaimer

This message is intended only for the use of the Addressee and 
may contain information that is PRIVILEGED and/or
CONFIDENTIAL or both.

This email is intended only for the personal and confidential use
of the recipient(s) named above.

If the reader of this email is not an intended recipient, you have
received this email in error and any review, dissemination,
distribution or copying is strictly prohibited.

If you have received this email in error, please notify the sender
immediately by return mail and permanently deleting the copy
you received.

Thank you.

***


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




Connection Pooling

2002-07-02 Thread Kevin Passey

Hi,

I am new to Tomcat so bear with me.

I have developed something using Websphere application server which has
connection pooling built-in.

Is there anything simple to plug in so that I can do the same with Tomcat?

Any docs or Howto's would be appreciated

Thanks

Kevin



RE: Apache 2.0.39 modjk2

2002-07-02 Thread Mladen Turk

 -Original Message-
 From: Short, Dave [mailto:[EMAIL PROTECTED]] 
 Sent: 2. srpanj 2002 17:00
 To: 'Tomcat Users List'
 Subject: RE: Apache 2.0.39  modjk2
 
 
 jk2.shm is created in the Apache2\logs directory which has 
 permissions set
 to: Everyone - Full Control.
 
 Any other ideas?

Sure :)

  
  [Mon Jul 01 13:16:42 2002] [notice] Parent: Created child 
 process 1752 
  [Mon Jul 01 13:16:42 2002] [notice] Child 1752: Child process is 
  running [Mon Jul 01 13:16:43 2002] [warn] workerEnv.init() ok 
  C:/Apache2/conf/workers2.properties
  [Mon Jul 01 13:16:43 2002] [warn] mod_jk child init 1 -1
  [Mon Jul 01 13:16:43 2002] [notice] Child 1752: Acquired the start 
  mutex. [Mon Jul 01 13:16:43 2002] [notice] Child 1752: Starting 250 
  worker
 threads.
  

If those log messages are bothering you, this is perfectly ok.
Look at the httpd.conf and find the directive LogLevel. It is by the
default set to warn.
Set the LogLevel error.

We are using the native logging for debugging and what are you seeing is
exactly that, the various stages of the connector itself.
The debug level itself is contolled with the debug=0..n for each worker
or channel, but in the code there is still some debugging code that
doesn't exactly follow that.


MT.


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




RE: APR not loaded?

2002-07-02 Thread Douglas, Rory
Title: RE: APR not loaded?





I don't think this is related to your problem.


YOu can remove this message by copying jkjni (.dll or .so) (from the binaries for the tomcat connectors) into one of tomcat\bin or jdk\jre\bin (can't remember which). I think this dll/so is only necessary for in-process integration of tomcat and a web server.

cheers
Rory


-Original Message-
From: Collins, Jim [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 11:42 AM
To: 'Tomcat Users List'
Subject: APR not loaded?



Hi all,


Does anyone know what this message means:


INFO: APR not loaded, disabling jni components: java.io.IOException: no
jkjni in java.library.path


I get this message in my catalina log file whenever I start Tomcat. I am
trying to load a native library in a servlet with no luck so far and was
wondering if this had anything to do with it.


Thanks


Jim.



PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any 
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and 
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.




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




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


How often would Tomcat crash?

2002-07-02 Thread Prashanth Pushpagiri

Hello everyone:

I realize that this might not be a problem to find a
solution for on this forum, but any input on this
might help me debug my problem.

This morning I was told that my website running IIS
5.0/Tomcat 4.0.2 was not accessible. Since I was
physically unavailable in the office, I could pass
only do some remote debuggin with the help of my
colleague. Apparently, IIS was working and so was
Tomcat. But no one was able to access the website. It
gave a 404. Now, one of the things I should have done
was to check if tomcat was running on 8080 (although
the tomcat service was running in the services
console). A restart of Tomcat did not help either.
FInally I had to have the server restarted and
everything was back online again.

I finally made it to the office an hour later and
started checking the logs to find a reason for the
failure...I have not been able to do so! The logs
suggest nothing went wrong. IIS did not record any
logs for the period when the service was not
available. Can I attribute this to an IIS crash? I did
not find and indications in the event log if so. or
could it be a problem with the isapi redirector?

I know it is as difficult giving comments on such a
topic without substantial input from me as it was for
me this morning, but any suggestions on what may have
gone wrong would be very helpful.

Thanks
Prashanth

__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




RE: APR not loaded?

2002-07-02 Thread Collins, Jim

Thanks Rory.

-Original Message-
From: Douglas, Rory [mailto:[EMAIL PROTECTED]]
Sent: 02 July 2002 16:55
To: 'Tomcat Users List'
Subject: RE: APR not loaded?



I don't think this is related to your problem. 

YOu can remove this message by copying jkjni (.dll or .so) (from the
binaries for the tomcat connectors) into one of tomcat\bin or jdk\jre\bin
(can't remember which). I think this dll/so is only necessary  for
in-process integration of tomcat and a web server.

cheers 
Rory 

-Original Message- 
From: Collins, Jim [ mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ] 
Sent: Tuesday, July 02, 2002 11:42 AM 
To: 'Tomcat Users List' 
Subject: APR not loaded? 


Hi all, 

Does anyone know what this message means: 

INFO: APR not loaded, disabling jni components: java.io.IOException: no 
jkjni in java.library.path 

I get this message in my catalina log file whenever I start Tomcat. I am 
trying to load a native library in a servlet with no luck so far and was 
wondering if this had anything to do with it. 

Thanks 

Jim. 


PLEASE READ: The information contained in this email is confidential 
and intended for the named recipient(s) only. If you are not an intended 
recipient of this email you must not copy, distribute or take any 
further action in reliance on it and you should delete it and notify the 
sender immediately. Email is not a secure method of communication and 
Nomura International plc cannot accept responsibility for the accuracy 
or completeness of this message or any attachment(s). Please examine this 
email for virus infection, for which Nomura International plc accepts 
no responsibility. If verification of this email is sought then please 
request a hard copy. Unless otherwise stated any views or opinions 
presented are solely those of the author and do not represent those of 
Nomura International plc. This email is intended for informational 
purposes only and is not a solicitation or offer to buy or sell 
securities or related financial instruments. Nomura International plc is 
regulated by the Financial Services Authority and is a member of the 
London Stock Exchange. 



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




PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any 
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and 
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.




Re: How often would Tomcat crash?

2002-07-02 Thread peter lin


this is just a guess, but if there were no logs, was the log directory
full?

I know with NT4 and IIS that once the log directory reaches 200+ mb of
logs, it can cause IIS to stop responding. It probably isn't it, but
just in case I thought I'd mention it.

peter


Prashanth Pushpagiri wrote:
 
 Hello everyone:
 
 I realize that this might not be a problem to find a
 solution for on this forum, but any input on this
 might help me debug my problem.
 
 This morning I was told that my website running IIS
 5.0/Tomcat 4.0.2 was not accessible. Since I was
 physically unavailable in the office, I could pass
 only do some remote debuggin with the help of my
 colleague. Apparently, IIS was working and so was
 Tomcat. But no one was able to access the website. It
 gave a 404. Now, one of the things I should have done
 was to check if tomcat was running on 8080 (although
 the tomcat service was running in the services
 console). A restart of Tomcat did not help either.
 FInally I had to have the server restarted and
 everything was back online again.
 
 I finally made it to the office an hour later and
 started checking the logs to find a reason for the
 failure...I have not been able to do so! The logs
 suggest nothing went wrong. IIS did not record any
 logs for the period when the service was not
 available. Can I attribute this to an IIS crash? I did
 not find and indications in the event log if so. or
 could it be a problem with the isapi redirector?
 
 I know it is as difficult giving comments on such a
 topic without substantial input from me as it was for
 me this morning, but any suggestions on what may have
 gone wrong would be very helpful.
 
 Thanks
 Prashanth
 
 __
 Do You Yahoo!?
 Sign up for SBC Yahoo! Dial - First Month Free
 http://sbc.yahoo.com
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




RE: Error on startup when using custom error pages

2002-07-02 Thread Sefton, Adam

Actually, I've managed to answer my own question - the location path needs to be 
from the web root of Tomcat. Now its working fine, but with an interesting problem.
Http Status 401 actually just means that authentication is required, which means that 
the site is automatically redirecting to the error page before asking for 
authentication ... is there any way of solving this? Or is it time I accepted I should 
be using FORM authentication rather than BASIC???

Cheers all
Adam

-Original Message-
From: Sefton, Adam [mailto:[EMAIL PROTECTED]]
Sent: 02 July 2002 16:39
To: 'Tomcat Users List'
Subject: Error on startup when using custom error pages


Hi,

I'm trying to pick up error codes and display custom error pages. The one I'm working 
with currently is the 401 error in the case of failed logins. I've added the following 
in my /conf/web.xml:

error-page
error-code401/error-code
locationerror.html/location
/error-page

and I have error.html in the conf directory.

When I try to start the Tomcat server, I get the following errors:

ERROR reading java.io.FileInputStream@e06940
At Line 849 /web-app/error-page/ 

ERROR reading java.io.FileInputStream@90c06f
At Line 849 /web-app/error-page/ 

ERROR reading java.io.FileInputStream@766806
At Line 849 /web-app/error-page/ 

ERROR reading java.io.FileInputStream@c623af
At Line 849 /web-app/error-page/ 

Does anyone have any ideas? I recall reading somewhere that the custom error setup 
with TOmcat was quite buggy, is this the problem?

I am using Tomcat 4.0.3 standalone on Win2k

Cheers

Adam


**
This message may contain information which is confidential or privileged.
If you are not the intended recipient, please advise the sender immediately
by reply e-mail and delete this message and any attachments
without retaining a copy.  

**


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

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




Re: How often would Tomcat crash?

2002-07-02 Thread Prashanth Pushpagiri

Hello peter,

The log files are not close to 200 mb. These are
relatively new machines.

Also, my current log_level for tomcat is debug. What
other options are available? isapi.log seems to be
growing by the day!

Thanks
Prashanth

--- peter lin [EMAIL PROTECTED] wrote:
 
 this is just a guess, but if there were no logs, was
 the log directory
 full?
 
 I know with NT4 and IIS that once the log directory
 reaches 200+ mb of
 logs, it can cause IIS to stop responding. It
 probably isn't it, but
 just in case I thought I'd mention it.
 
 peter
 
 
 Prashanth Pushpagiri wrote:
  
  Hello everyone:
  
  I realize that this might not be a problem to find
 a
  solution for on this forum, but any input on this
  might help me debug my problem.
  
  This morning I was told that my website running
 IIS
  5.0/Tomcat 4.0.2 was not accessible. Since I was
  physically unavailable in the office, I could pass
  only do some remote debuggin with the help of my
  colleague. Apparently, IIS was working and so was
  Tomcat. But no one was able to access the website.
 It
  gave a 404. Now, one of the things I should have
 done
  was to check if tomcat was running on 8080
 (although
  the tomcat service was running in the services
  console). A restart of Tomcat did not help either.
  FInally I had to have the server restarted and
  everything was back online again.
  
  I finally made it to the office an hour later and
  started checking the logs to find a reason for the
  failure...I have not been able to do so! The logs
  suggest nothing went wrong. IIS did not record any
  logs for the period when the service was not
  available. Can I attribute this to an IIS crash? I
 did
  not find and indications in the event log if so.
 or
  could it be a problem with the isapi redirector?
  
  I know it is as difficult giving comments on such
 a
  topic without substantial input from me as it was
 for
  me this morning, but any suggestions on what may
 have
  gone wrong would be very helpful.
  
  Thanks
  Prashanth
  
  __
  Do You Yahoo!?
  Sign up for SBC Yahoo! Dial - First Month Free
  http://sbc.yahoo.com
  
  --
  To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

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




AW: javax.servlet.ServletException: DbcpDataSourceFactory: on jwsdp1.0 / tomcat4.x

2002-07-02 Thread Ralph Einfeldt

config.xml ? Thought it should be server.xml.
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.htm
l

 -Ursprüngliche Nachricht-
 Von: Jim Mangione [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 2. Juli 2002 17:40
 An: [EMAIL PROTECTED]
 Betreff: javax.servlet.ServletException: DbcpDataSourceFactory: on
 jwsdp1.0 / tomcat4.x
 
 The driverClassName is indeed defined in the config.xml, and 
 it appears from catalina.log that it loads without a problem (meaning 
 it's finding the jdbc driver).
 
 Here's the config.xml snippet:

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




RE: Apache 2.0.39 modjk2

2002-07-02 Thread Short, Dave

So, these are debugging messages that can safely be ignored?

-Original Message-
From: Mladen Turk [mailto:[EMAIL PROTECTED]]
Sent: July 02, 2002 8:54 AM
To: 'Tomcat Users List'
Subject: RE: Apache 2.0.39  modjk2


 -Original Message-
 From: Short, Dave [mailto:[EMAIL PROTECTED]] 
 Sent: 2. srpanj 2002 17:00
 To: 'Tomcat Users List'
 Subject: RE: Apache 2.0.39  modjk2
 
 
 jk2.shm is created in the Apache2\logs directory which has 
 permissions set
 to: Everyone - Full Control.
 
 Any other ideas?

Sure :)

  
  [Mon Jul 01 13:16:42 2002] [notice] Parent: Created child 
 process 1752 
  [Mon Jul 01 13:16:42 2002] [notice] Child 1752: Child process is 
  running [Mon Jul 01 13:16:43 2002] [warn] workerEnv.init() ok 
  C:/Apache2/conf/workers2.properties
  [Mon Jul 01 13:16:43 2002] [warn] mod_jk child init 1 -1
  [Mon Jul 01 13:16:43 2002] [notice] Child 1752: Acquired the start 
  mutex. [Mon Jul 01 13:16:43 2002] [notice] Child 1752: Starting 250 
  worker
 threads.
  

If those log messages are bothering you, this is perfectly ok.
Look at the httpd.conf and find the directive LogLevel. It is by the
default set to warn.
Set the LogLevel error.

We are using the native logging for debugging and what are you seeing is
exactly that, the various stages of the connector itself.
The debug level itself is contolled with the debug=0..n for each worker
or channel, but in the code there is still some debugging code that
doesn't exactly follow that.


MT.


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

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




Re: AW: javax.servlet.ServletException: DbcpDataSourceFactory: on jwsdp1.0/ tomcat4.x

2002-07-02 Thread Jim Mangione


Yes: server.xml.
Typing too fast! Sorry.



   
  
  Ralph Einfeldt 
  
  ralph.einfeldt@uptTo:   Tomcat Users List 
[EMAIL PROTECTED]  
  ime-isc.decc:   
  
 Subject:  AW: 
javax.servlet.ServletException: DbcpDataSourceFactory: on 
  07/02/02 12:12 PM   jwsdp1.0 / tomcat4.x 
  
  Please respond to
  
  Tomcat Users List  
  
   
  
   
  




config.xml ? Thought it should be server.xml.
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.htm
l

 -Ursprüngliche Nachricht-
 Von: Jim Mangione [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 2. Juli 2002 17:40
 An: [EMAIL PROTECTED]
 Betreff: javax.servlet.ServletException: DbcpDataSourceFactory: on
 jwsdp1.0 / tomcat4.x

 The driverClassName is indeed defined in the config.xml, and
 it appears from catalina.log that it loads without a problem (meaning
 it's finding the jdbc driver).

 Here's the config.xml snippet:

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







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




Oracle jdbc driver not found

2002-07-02 Thread Carlton Lo

I'm using Tomcat 4.0.4 tyring to access Oracle 8.1.7 via oci driver.

I've tried many different approaches, they are
1. save classes12.zip into TOMCAT HOME\common\lib and changed the extension to .jar
2. save classes12.zip into TOMCAT HOME\lib and changed the extension to .jar
3. save classes12.zip into TOMCAT HOME\server\lib and changed the extension to .jar
4. unzip all contents of classes12.zip into TOMCAT HOME\classes

non of these works, I was able to connection to the same database in Tomcat 4.0.2, but 
not 4.0.4

here is the error that I got
javax.servlet.ServletException: no ocijdbc8 in java.library.path
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
at 
org.apache.jsp.cmp_0005fcampaign_0005finfo$jsp._jspService(cmp_0005fcampaign_0005finfo$jsp.java:544)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
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.valves.CertificatesValve.invoke(CertificatesValve.java:246)
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.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.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:536)
root cause 
java.lang.UnsatisfiedLinkError: no ocijdbc8 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1403)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:832)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:228)
at oracle.jdbc.driver.OracleConnection.(OracleConnection.java:249)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at 
org.apache.jsp.cmp_0005fcampaign_0005finfo$jsp._jspService(cmp_0005fcampaign_0005finfo$jsp.java:131)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 

RE: Apache 2.0.39 modjk2

2002-07-02 Thread Mladen Turk



 -Original Message-
 From: Short, Dave [mailto:[EMAIL PROTECTED]] 
 Sent: 2. srpanj 2002 18:15
 To: 'Tomcat Users List'
 Subject: RE: Apache 2.0.39  modjk2
 
 
 So, these are debugging messages that can safely be ignored?
 

Yes, as all warnigs can, until something hit you in the head :)

There is even one debugging message that's get logged as [error].

Don't wory will be fixed.

MT.


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




Re[2]: Tomcat-4.1.6 and DBCP issue?

2002-07-02 Thread Jacob Kjome

Hello Remy,

Cool, that did it!  Just by replacing the 4.1.6 version of
commons-dbcp.jar with the 4.1.3 version made everything work again.

I guess this definitely means a regression was introduced into
commons-dbcp in 4.1.6.


Jake

Tuesday, July 02, 2002, 2:09:40 AM, you wrote:

RM Jacob Kjome wrote:
 Hi,
 
 I'm just checking to confirm whether others that used DBCP connection 
 pooling successfully in Tomcat-4.1.3 are running into problems when 
 using Tomcat-4.1.6?  That is the case for me.   I'll check again 
 tomorrow to see if I did anything stupid, but the only difference seems 
 to be the tomcat version, so it would follow that something broke in 
 DBCP between 4.1.3 and 4.1.6.

RM It is easy to replace the DBCP included with another version or a new 
RM nightly if there is a problem (just replace commons-dbcp.jar in common/lib).

RM In the case of 4.1.6, some last minute changes were integrated in DBCP, 
RM so maybe there was some regression.

RM Remy


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



-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


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




j_security_check question

2002-07-02 Thread Kevin Andryc

I am using a servlet as a login form that uses  j_security_check. When
submitted I would like it to return back to the same servlet with the person
now authenticated except that it gives me the error:

Type Status report
message Invalid direct reference to form login page
description The request sent by the client was syntactically incorrect
(Invalid direct reference to form login page).

Here is my web.xml file:

security-constraint
  display-nameExample Security Constraint/display-name
  web-resource-collection
 web-resource-nameProtected Area/web-resource-name
 !-- Define the context-relative URL(s) to be protected --
 url-pattern/servlet/*/url-pattern
 !-- If you list http methods, only those methods are protected --
 http-methodDELETE/http-method
 http-methodGET/http-method
 http-methodPOST/http-method
 http-methodPUT/http-method
  /web-resource-collection
  auth-constraint
 !-- Anyone with one of the listed roles may access this area --
 role-nameuser/role-name
  /auth-constraint
/security-constraint

   !-- Default login configuration uses form-based authentication --
login-config
  auth-methodFORM/auth-method
  realm-nameExample Form-Based Authentication Area/realm-name
  form-login-config
form-login-page/servlet/CustomLogin/form-login-page
form-error-page/jsp/security/error.jsp/form-error-page
  /form-login-config
/login-config

I have searched through the archives and it appears no one responded. Anyone
have a solution?

Sincerely,
Kevin

Kevin Andryc
Web Systems Engineer
MISER
http://www.umass.edu/miser/
Phone: (413)-545-3460
[EMAIL PROTECTED]





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




RE: APR not loaded?

2002-07-02 Thread Short, Dave

I put jkjni.dll (tomcat also wanted libapr.dll) in the tomcat\bin directory
and the message went away.  Now it complains about not being able to find
the ${serverRoot}/conf/workers2.properties file.  This file exists in the
Apache2\conf directory.  How can I point tomcat to the Apache2\conf
directory (basically, how can I sent ${serverRoot)?

-Original Message-
From: Douglas, Rory [mailto:[EMAIL PROTECTED]]
Sent: July 02, 2002 8:55 AM
To: 'Tomcat Users List'
Subject: RE: APR not loaded?



I don't think this is related to your problem. 

YOu can remove this message by copying jkjni (.dll or .so) (from the
binaries for the tomcat connectors) into one of tomcat\bin or jdk\jre\bin
(can't remember which). I think this dll/so is only necessary  for
in-process integration of tomcat and a web server.

cheers 
Rory 

-Original Message- 
From: Collins, Jim [ mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ] 
Sent: Tuesday, July 02, 2002 11:42 AM 
To: 'Tomcat Users List' 
Subject: APR not loaded? 


Hi all, 

Does anyone know what this message means: 

INFO: APR not loaded, disabling jni components: java.io.IOException: no 
jkjni in java.library.path 

I get this message in my catalina log file whenever I start Tomcat. I am 
trying to load a native library in a servlet with no luck so far and was 
wondering if this had anything to do with it. 

Thanks 

Jim. 


PLEASE READ: The information contained in this email is confidential 
and intended for the named recipient(s) only. If you are not an intended 
recipient of this email you must not copy, distribute or take any 
further action in reliance on it and you should delete it and notify the 
sender immediately. Email is not a secure method of communication and 
Nomura International plc cannot accept responsibility for the accuracy 
or completeness of this message or any attachment(s). Please examine this 
email for virus infection, for which Nomura International plc accepts 
no responsibility. If verification of this email is sought then please 
request a hard copy. Unless otherwise stated any views or opinions 
presented are solely those of the author and do not represent those of 
Nomura International plc. This email is intended for informational 
purposes only and is not a solicitation or offer to buy or sell 
securities or related financial instruments. Nomura International plc is 
regulated by the Financial Services Authority and is a member of the 
London Stock Exchange. 



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




RE: Apache 2.0.39 modjk2

2002-07-02 Thread Short, Dave

Thanks!

-Original Message-
From: Mladen Turk [mailto:[EMAIL PROTECTED]]
Sent: July 02, 2002 9:36 AM
To: 'Tomcat Users List'
Subject: RE: Apache 2.0.39  modjk2




 -Original Message-
 From: Short, Dave [mailto:[EMAIL PROTECTED]] 
 Sent: 2. srpanj 2002 18:15
 To: 'Tomcat Users List'
 Subject: RE: Apache 2.0.39  modjk2
 
 
 So, these are debugging messages that can safely be ignored?
 

Yes, as all warnigs can, until something hit you in the head :)

There is even one debugging message that's get logged as [error].

Don't wory will be fixed.

MT.


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

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




RE: Updating files without restarting Tomcat

2002-07-02 Thread Douglas, Rory
Title: RE: Updating files without restarting Tomcat





You can specify the attribute 


 reloadable=true


in the context element for your web-application (in server.xml)


This will, however, watch all files for changes. There is no way to my knowledge of watching only some files.


cheers
Rory


-Original Message-
From: cbarnes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 11:31 AM
To: Tomcat Users List
Subject: Updating files without restarting Tomcat



I am using Tomcat 4.


I have a number of properties files in the WEB-INF/classes directory. I need
to be able to change the values of the properties in these files, but it
looks as though I need to restart Tomcat every time I change a value in
order for it to recognise the new version of the file. Is there any
configuration I can change so that it is not necessary to restart Tomcat
when I change the values of the properties. Is it possible for this to apply
just to specified files - I don't want it to check the status of all the
files in WEB-INF/classes because I know the class files won't change.


Thanks,
Catharine



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




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


  1   2   >