Re: Problems wth Apache, mod_jk2 and Tomcat

2004-10-25 Thread Christoph Fischer
Hi,
this seems also to be a problem in mod_jk , tomcat4.1.10, apache 1.3 on 
a linux server however it does build up slowly over the day.
The problem seems to be that the connection via mod_jk (Port 8009) does 
not close, so the java/tomcat processes
will not quit after responding to the request (or the other way 
around?). This problem occurs only in
heavy load situations. After that I see many open socket connections an 
some tomcat processes that will not quit.

Snapshot of the logfiles:
tomcat / catalina.out:
Failed to authentice as null
Error number: 50
tomcat / catalna_log:
2004-10-22 08:52:29 Ajp13Processor[8009][358] Starting background thread
2004-10-22 08:52:34 Ajp13Processor[8009][359] Starting background thread
2004-10-22 08:52:34 Ajp13Connector[8009] No processor available, 
rejecting this connection
2004-10-22 08:52:34 Ajp13Connector[8009] No processor available, 
rejecting this connection

apache / mod_jk
[Fri Oct 22 08:52:34 2004]  [jk_ajp_common.c (738)]: ERROR: can't 
receive the response message from tomcat, network problems or tomcat is 
down. err=-104
[Fri Oct 22 08:52:34 2004]  [jk_ajp_common.c (1137)]: Error reading 
reply from tomcat. Tomcat is down or network problems.

Is this a mod_jk problem not closing the connections or a tomcat problem 
not telling mod_jk that it's finished or a system problem not
releasing the sockets ?

Thanks for any ideas...
Chris
David Smith wrote:
Hmmm..  My assumption to your email was their was some kind of 
possible probing of your Apache server and/or a misbehaving client.  
Do you run snort on the box hosting the Apache httpd service?  It's an 
intrusion detection tool designed to log suspicious activity.  That 
could be something to look at.  Otherwise I can't think of a reason in 
the world for httpd to spontaneously go full out.  It's not something 
I've ever seen.

--David
Lars George wrote:
David,
This proves more difficult, since the requests look like standard 
requests that work at other times. Moreover the POST data is no 
logged anyway so I cannot check if it was a value that was sent in by 
chance.

Is there anything else I can check to see what is going on? I was 
more thinking along the lines of using some low-level tools to see if 
everything is OK, for example critical resources related to Apache or 
Tomcat (note, they are on separate machines). For example I tried 
using "netstat -p" on either side to see what the connections are 
saying. I als did a thread dump of the Tomcat JVM to see what the 
Coyote connectors and all the other threads are up to. But There is 
nothing conclusive so far. Just out of the blue the apache runs full, 
and there seems no relation to when during the day or how high the 
load etc.

Thanks,
Lars
David Smith wrote:
I would start with the apache logs and find out what kind of 
requests are logged in the access just before the event.  That 
should get you going in the right direction.

--David
Lars George wrote:
Hi,
We have an odd problem we cannot solve. Maybe someone else has come 
across this too.

We use Apache 2.0.52 with the Tomcat 5.0.25 and its included 
mod_jk2 with Coyote/JK2 AJP 1.3 connector.

Usually Apache uses 230 slots out of 1000 it has set as the 
maximum. This can be seen from the server-status page, it equals to 
say 32 requests per second.

Then all of sudden the Apache runs full and exceeds all empty 
slots, ie. goes up to 1000 requests currently being processed and 
accepts no further connections. All but a handful of these slots 
are in state "W". Looking at the URI's the requests are both static 
content (like images) served directly by Apache, but of course many 
requests are to the dynamic content created by the app server 
(Tomcat).

I do not think this is a load issue per se, ie. where we have 
someone hammering us with requests, since looking at the 
connections and URL's they are all so random but valid at the same 
time that I do not think this is it.

What puzzles me more is that they are all in the state "W". which 
means "sending reply". The network seems to be OK at that point of 
time too since I can connect to the machines no problem.

Only if I restart Apache by ultimately killing (killall -9 httpd) 
all processes I can revive the site. After the Apache restart 
everything goes back to normal right away. This seems to mean 
something too, at least that it seems to be getting stuck somehow 
but whatever caused it does not seem to exist anymore. Like 
something short, for example a specific request, caused this.

What could I check from here? I cannot take the Apache out since we 
need  it for rewriting and session handling.

Any help or pointers are greatly appreciated.
Thanks,
Lars
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional co

Tomcat+Apache installation problem

2004-10-25 Thread Vivek Behal

Hi,
   I installed tomcat with apache in the program files i.e directory
containg space in the name.
   It does not work fine. when i install it in some other directory it works
fine.Could any one tell me if we ca install
   it in the directory containing spaces or not? Is it Documentated??
 


Regards,
Vivek Behal.
 

-Original Message-
From: Vivek Behal [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 10:01 AM
To: [EMAIL PROTECTED]
Subject: can we install tomcat in the directory which contains spacen in
t he name ???


 
Regards,
Vivek Behal.
 
 
 

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



ENCTYPE + SetCharacterEncodingFilter = no go joe for Tomcat 5.0.28

2004-10-25 Thread Shawn
Hello,

When using ENCTYPE="multipart/form-data" in a form on a jsp page, text
sent ignores the SetCharacterEncodingFilter which is calling
request.setCharacterEncoding("UTF-8");

I thought about getting parameter values by using 

String field = request.getParameter("whatever");
field=new String(field.getBytes
("UTF-8"));

Does this seem a reasonable approach or is should the
SetCharacterEncodingFilter *really* be setting the charEncoding?

I don't want to be creating a new string for every parameter unless
necessary.

When ENCTYPE is not set, all works as expected.

This problem is seen on Tomcat 5.0.28, but not 4.x versions.  I
understand something changed around 5.0.27 for UTF-8 handeling but am
not sure if that is realated. 

-- 
Shawn <[EMAIL PROTECTED]>


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



can we install tomcat in the directory which contains spacen in t he name ???

2004-10-25 Thread Vivek Behal
 
Regards,
Vivek Behal.
 
 
 


Re: Problems wth Apache, mod_jk2 and Tomcat

2004-10-25 Thread David Smith
Hmmm..  My assumption to your email was their was some kind of possible 
probing of your Apache server and/or a misbehaving client.  Do you run 
snort on the box hosting the Apache httpd service?  It's an intrusion 
detection tool designed to log suspicious activity.  That could be 
something to look at.  Otherwise I can't think of a reason in the world 
for httpd to spontaneously go full out.  It's not something I've ever seen.

--David
Lars George wrote:
David,
This proves more difficult, since the requests look like standard 
requests that work at other times. Moreover the POST data is no logged 
anyway so I cannot check if it was a value that was sent in by chance.

Is there anything else I can check to see what is going on? I was more 
thinking along the lines of using some low-level tools to see if 
everything is OK, for example critical resources related to Apache or 
Tomcat (note, they are on separate machines). For example I tried 
using "netstat -p" on either side to see what the connections are 
saying. I als did a thread dump of the Tomcat JVM to see what the 
Coyote connectors and all the other threads are up to. But There is 
nothing conclusive so far. Just out of the blue the apache runs full, 
and there seems no relation to when during the day or how high the 
load etc.

Thanks,
Lars
David Smith wrote:
I would start with the apache logs and find out what kind of requests 
are logged in the access just before the event.  That should get you 
going in the right direction.

--David
Lars George wrote:
Hi,
We have an odd problem we cannot solve. Maybe someone else has come 
across this too.

We use Apache 2.0.52 with the Tomcat 5.0.25 and its included mod_jk2 
with Coyote/JK2 AJP 1.3 connector.

Usually Apache uses 230 slots out of 1000 it has set as the maximum. 
This can be seen from the server-status page, it equals to say 32 
requests per second.

Then all of sudden the Apache runs full and exceeds all empty slots, 
ie. goes up to 1000 requests currently being processed and accepts 
no further connections. All but a handful of these slots are in 
state "W". Looking at the URI's the requests are both static content 
(like images) served directly by Apache, but of course many requests 
are to the dynamic content created by the app server (Tomcat).

I do not think this is a load issue per se, ie. where we have 
someone hammering us with requests, since looking at the connections 
and URL's they are all so random but valid at the same time that I 
do not think this is it.

What puzzles me more is that they are all in the state "W". which 
means "sending reply". The network seems to be OK at that point of 
time too since I can connect to the machines no problem.

Only if I restart Apache by ultimately killing (killall -9 httpd) 
all processes I can revive the site. After the Apache restart 
everything goes back to normal right away. This seems to mean 
something too, at least that it seems to be getting stuck somehow 
but whatever caused it does not seem to exist anymore. Like 
something short, for example a specific request, caused this.

What could I check from here? I cannot take the Apache out since we 
need  it for rewriting and session handling.

Any help or pointers are greatly appreciated.
Thanks,
Lars
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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

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


Manager Error

2004-10-25 Thread Carl F. Hall
I've copied manager.xml from localhost to another host, say testhost1.com.
When I access testhost1.com/manager, I'm prompted and login successfully.
I'm shown 2 contexts; / and /manager.  Whenever I try to reload "/", I get
"FAIL - No context exists for path /".  I've tried doing the same for other
hosts and get the same error.  Is there something I've misconfigured or
missed alltogether?  Where should I start digging to get this working?


Carl F. Hall
[EMAIL PROTECTED]


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



Re: Problems wth Apache, mod_jk2 and Tomcat

2004-10-25 Thread Lars George
David,
This proves more difficult, since the requests look like standard 
requests that work at other times. Moreover the POST data is no logged 
anyway so I cannot check if it was a value that was sent in by chance.

Is there anything else I can check to see what is going on? I was more 
thinking along the lines of using some low-level tools to see if 
everything is OK, for example critical resources related to Apache or 
Tomcat (note, they are on separate machines). For example I tried using 
"netstat -p" on either side to see what the connections are saying. I 
als did a thread dump of the Tomcat JVM to see what the Coyote 
connectors and all the other threads are up to. But There is nothing 
conclusive so far. Just out of the blue the apache runs full, and there 
seems no relation to when during the day or how high the load etc.

Thanks,
Lars
David Smith wrote:
I would start with the apache logs and find out what kind of requests 
are logged in the access just before the event.  That should get you 
going in the right direction.

--David
Lars George wrote:
Hi,
We have an odd problem we cannot solve. Maybe someone else has come 
across this too.

We use Apache 2.0.52 with the Tomcat 5.0.25 and its included mod_jk2 
with Coyote/JK2 AJP 1.3 connector.

Usually Apache uses 230 slots out of 1000 it has set as the maximum. 
This can be seen from the server-status page, it equals to say 32 
requests per second.

Then all of sudden the Apache runs full and exceeds all empty slots, 
ie. goes up to 1000 requests currently being processed and accepts no 
further connections. All but a handful of these slots are in state 
"W". Looking at the URI's the requests are both static content (like 
images) served directly by Apache, but of course many requests are to 
the dynamic content created by the app server (Tomcat).

I do not think this is a load issue per se, ie. where we have someone 
hammering us with requests, since looking at the connections and URL's 
they are all so random but valid at the same time that I do not think 
this is it.

What puzzles me more is that they are all in the state "W". which 
means "sending reply". The network seems to be OK at that point of 
time too since I can connect to the machines no problem.

Only if I restart Apache by ultimately killing (killall -9 httpd) all 
processes I can revive the site. After the Apache restart everything 
goes back to normal right away. This seems to mean something too, at 
least that it seems to be getting stuck somehow but whatever caused it 
does not seem to exist anymore. Like something short, for example a 
specific request, caused this.

What could I check from here? I cannot take the Apache out since we 
need  it for rewriting and session handling.

Any help or pointers are greatly appreciated.
Thanks,
Lars
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


RE: Why mail/session always being set to localhost even Context.xml says otherwise?

2004-10-25 Thread Steve Kirk
OK. But is that a correct RFC address?  I understood from the JavaMail
javadocs that the "from" and "to" address values are supposed to be valid
RFC-822 addresses?

So is this allowed 
"Me "
or should it be 
"Me <[EMAIL PROTECTED]>" 
or just 
"[EMAIL PROTECTED]"

> -Original Message-
> From: Filip Hanik (lists) [mailto:[EMAIL PROTECTED] 
> Sent: Monday 25 October 2004 21:49
> To: Tomcat Users List
> Subject: RE: Why mail/session always being set to localhost 
> even Context.xml says otherwise?
> 
> 
> mailto: could come from someone's email client
> 
> Filip
> 
> -Original Message-
> From: Steve Kirk [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 25, 2004 3:41 PM
> To: 'Tomcat Users List'
> Subject: RE: Why mail/session always being set to localhost even
> Context.xml says otherwise?
> 
> 
> Not sure that this is your actual problem, but is it correct to use
> "mailto:"; within the to/from addresses?
>  
> > -Original Message-
> > From: David Lee [mailto:[EMAIL PROTECTED] 
> > Sent: October 25, 2004 3:51 PM
> > To: [EMAIL PROTECTED]
> > Subject: Why mail/session always being set to localhost even 
> > Context.xml
> > says otherwise?
> > 
> > 
> > Tomcat: 5.0.29
> > OS:  XP
> > JAVA: 1.5.0
> >  
> > Context.xml: jakarta-tomcat-5.0.29\conf\Catalina\localhost
> >  
> >  >   type="javax.mail.Session"/>
> > 
> >   
> > mail.smtp.host
> > company email server
> >   
> > 
> >  
> > Java program:
> >  
> > Context initCtx = new InitialContext();
> > Context envCtx = (Context) initCtx.lookup("java:comp/env");
> > Session session = (Session) envCtx.lookup("mail/Session");
> >  
> > Message message = new MimeMessage(session);
> > message.setFrom(new InternetAddress("from email
> >  "));
> > InternetAddress to[] = new InternetAddress[1];
> > to[0] = new InternetAddress("to email
> >  ");
> > message.setRecipients(Message.RecipientType.TO, to);
> > message.setSubject("test mail session from tomcat");
> > message.setContent("test mail session from tomcat", 
> > "text/plain");
> > Transport.send(message);
> >  
> > Catalina ERROR: 
> >  
> > javax.mail.SendFailedException: Sending failed;
> >   nested exception is:
> > javax.mail.MessagingException: Could not connect to 
> SMTP host:
> > localhost , port: 25;
> >   nested exception is:
> > java.net.ConnectException: Connection refused: connect
> > at javax.mail.Transport.send0(Transport.java:204)
> > at javax.mail.Transport.send(Transport.java:73)
> > at javaxml2.UpdateItemServlet.doPost(Unknown Source)
> > at 
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> > at 
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > at
> > 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> > icationFilterChain.java:237)
> > at
> > 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> > ilterChain.java:157)
> > 
> > 
> > !DSPAM:417d591a211741752920360!
> > 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



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



RE: Why mail/session always being set to localhost even Context.x ml says otherwise?

2004-10-25 Thread Phillip Qin
I use 5.0.28 and Tomcat Manager/catalina-ant tasks. The context file is
called context.xml and is lcoated at META-INF in war. When Manager deploys
web app, it

- uploads war to ${catalina_home}/webapps
- expands war to ${catalina_home}/webapps/yourapp
- copies context.xml to ${catalina_home}/${engine}/${host}/yourapp.xml

Use war task should help you properly package your web app for deployment.


-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 5:08 PM
To: [EMAIL PROTECTED]
Subject: RE: Why mail/session always being set to localhost even Context.x
ml says otherwise?


 Hi! Phillip,

Thanks for the help.

My questions are:

1. in web.xml

My context definition is: 

UpdateItemServlet
/servlet/chapter6


It works fine

2. I have a context file called javaxml2.xml, in this file: I defined:


...


3. where should this context file reside?
My war file name is javaxml2.war.

4. My practice app probably didn't read this javaxml2 context file!!!
   Because I have a test env variable also didn't get read:


  

  mail.smtp.host
  ismtp.irf.com

  

 

5. error message from catalina:

INFO: Jk running ID=0 time=0/31
config=C:\jakarta-tomcat-5.0.29\conf\jk2.proper
ties
Oct 25, 2004 1:57:36 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5467 ms
javax.naming.NameNotFoundException: Name david is not bound in this Context
at
org.apache.naming.NamingContext.lookup(NamingContext.java:768)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:151)
at javaxml2.UpdateItemServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)

Thanks a million

David

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 25, 2004 1:36 PM
To: 'Tomcat Users List'
Subject: RE: Why mail/session always being set to localhost even Context.x
ml says otherwise?

Add use plain email address, e.g. [EMAIL PROTECTED]



-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: October 25, 2004 4:34 PM
To: 'Tomcat Users List'
Subject: RE: Why mail/session always being set to localhost even Context.x
ml says otherwise?


Assume your Resource is closed by . Try addRecipient.

-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 4:26 PM
To: [EMAIL PROTECTED]
Subject: RE: Why mail/session always being set to localhost even Context.xml
says otherwise?


 My contents for mail/Session in web.xml:


  
Resource reference to a factory for javax.mail.Session
instances that may be used for sending electronic mail
messages, preconfigured to connect to the appropriate
SMTP server.
  
  
mail/Session
  
  
javax.mail.Session
  
  
Container
  


Thanks for the help!

David Lee

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 25, 2004 1:21 PM
To: 'Tomcat Users List'
Subject: RE: Why mail/session always being set to localhost even Context.xml
says otherwise?

What is in your web.xml?

-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED]
Sent: October 25, 2004 3:51 PM
To: [EMAIL PROTECTED]
Subject: Why mail/session always being set to localhost even Context.xml
says otherwise?


Tomcat: 5.0.29
OS:  XP
JAVA: 1.5.0
 
Context.xml: jakarta-tomcat-5.0.29\conf\Catalina\localhost
 


  
mail.smtp.host
company email server
  

 
Java program:
 
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
Session session = (Session) envCtx.lookup("mail/Session");
 
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress("from email
 "));
InternetAddress to[] = new InternetAddress[1];
to[0] = new InternetAddress("to email
 ");
message.setRecipients(Message.RecipientType.TO, to);
message.setSubject("test mail session from tomcat");
message.setContent("test mail session from tomcat", "text/plain");
Transport.send(message);
 
Catalina ERROR: 
 
javax.mail.SendFailedException: Sending failed;
  nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host:
localhost , port: 25;
  nested exception is:
java.net.ConnectException: Connection refused: connect
at javax.mail.Tra

Re: AW: AW: Session Definition Bug?

2004-10-25 Thread Bill Winspur
Shapira, Yoav wrote:
Hi,
 

I have not yet found where in the tomcat documentation, session
definition, cookies, etc. are discussed
   

These are defined and specified in the Servlet Specification very
clearly.
Yoav
 

Thanks Yoav,
I have read the spec 'srv.7 Sessions', and it is very clear, but not 
implementation-specific.
What I am looking for is the tomcat documentation on its session 
management parameters.

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


RE: Why mail/session always being set to localhost even Context.x ml says otherwise?

2004-10-25 Thread David Lee
 Hi! Phillip,

Thanks for the help.

My questions are:

1. in web.xml

My context definition is: 

UpdateItemServlet
/servlet/chapter6


It works fine

2. I have a context file called javaxml2.xml, in this file: I defined:


...


3. where should this context file reside?
My war file name is javaxml2.war.

4. My practice app probably didn't read this javaxml2 context file!!!
   Because I have a test env variable also didn't get read:


  

  mail.smtp.host
  ismtp.irf.com

  

 

5. error message from catalina:

INFO: Jk running ID=0 time=0/31
config=C:\jakarta-tomcat-5.0.29\conf\jk2.proper
ties
Oct 25, 2004 1:57:36 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5467 ms
javax.naming.NameNotFoundException: Name david is not bound in this
Context
at
org.apache.naming.NamingContext.lookup(NamingContext.java:768)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:151)
at javaxml2.UpdateItemServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)

Thanks a million

David

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 25, 2004 1:36 PM
To: 'Tomcat Users List'
Subject: RE: Why mail/session always being set to localhost even
Context.x ml says otherwise?

Add use plain email address, e.g. [EMAIL PROTECTED]



-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: October 25, 2004 4:34 PM
To: 'Tomcat Users List'
Subject: RE: Why mail/session always being set to localhost even
Context.x ml says otherwise?


Assume your Resource is closed by . Try addRecipient.

-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 4:26 PM
To: [EMAIL PROTECTED]
Subject: RE: Why mail/session always being set to localhost even
Context.xml
says otherwise?


 My contents for mail/Session in web.xml:


  
Resource reference to a factory for javax.mail.Session
instances that may be used for sending electronic mail
messages, preconfigured to connect to the appropriate
SMTP server.
  
  
mail/Session
  
  
javax.mail.Session
  
  
Container
  


Thanks for the help!

David Lee

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 25, 2004 1:21 PM
To: 'Tomcat Users List'
Subject: RE: Why mail/session always being set to localhost even
Context.xml
says otherwise?

What is in your web.xml?

-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED]
Sent: October 25, 2004 3:51 PM
To: [EMAIL PROTECTED]
Subject: Why mail/session always being set to localhost even Context.xml
says otherwise?


Tomcat: 5.0.29
OS:  XP
JAVA: 1.5.0
 
Context.xml: jakarta-tomcat-5.0.29\conf\Catalina\localhost
 


  
mail.smtp.host
company email server
  

 
Java program:
 
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
Session session = (Session) envCtx.lookup("mail/Session");
 
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress("from email
 "));
InternetAddress to[] = new InternetAddress[1];
to[0] = new InternetAddress("to email
 ");
message.setRecipients(Message.RecipientType.TO, to);
message.setSubject("test mail session from tomcat");
message.setContent("test mail session from tomcat",
"text/plain");
Transport.send(message);
 
Catalina ERROR: 
 
javax.mail.SendFailedException: Sending failed;
  nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host:
localhost , port: 25;
  nested exception is:
java.net.ConnectException: Connection refused: connect
at javax.mail.Transport.send0(Transport.java:204)
at javax.mail.Transport.send(Transport.java:73)
at javaxml2.UpdateItemServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)




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

Where can I find mod_jk2 for apache 1.3?

2004-10-25 Thread Sergey Kamshilin
Hi all,

Trying to find the subj. The link on jakarta web site has a tar file with
mod_jk2 for apache 2. The readme file states that there should be a version
for apache 1.3 but it's not there. Does anybody have idea where can I
download it from?

Thank you!

/Sergeyk


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



RE: Why mail/session always being set to localhost even Context.xml says otherwise?

2004-10-25 Thread Filip Hanik \(lists\)
mailto: could come from someone's email client

Filip

-Original Message-
From: Steve Kirk [mailto:[EMAIL PROTECTED]
Sent: Monday, October 25, 2004 3:41 PM
To: 'Tomcat Users List'
Subject: RE: Why mail/session always being set to localhost even
Context.xml says otherwise?


Not sure that this is your actual problem, but is it correct to use
"mailto:"; within the to/from addresses?
 
> -Original Message-
> From: David Lee [mailto:[EMAIL PROTECTED] 
> Sent: October 25, 2004 3:51 PM
> To: [EMAIL PROTECTED]
> Subject: Why mail/session always being set to localhost even 
> Context.xml
> says otherwise?
> 
> 
> Tomcat: 5.0.29
> OS:  XP
> JAVA: 1.5.0
>  
> Context.xml: jakarta-tomcat-5.0.29\conf\Catalina\localhost
>  
>type="javax.mail.Session"/>
> 
>   
> mail.smtp.host
> company email server
>   
> 
>  
> Java program:
>  
> Context initCtx = new InitialContext();
> Context envCtx = (Context) initCtx.lookup("java:comp/env");
> Session session = (Session) envCtx.lookup("mail/Session");
>  
> Message message = new MimeMessage(session);
> message.setFrom(new InternetAddress("from email
>  "));
> InternetAddress to[] = new InternetAddress[1];
> to[0] = new InternetAddress("to email
>  ");
> message.setRecipients(Message.RecipientType.TO, to);
> message.setSubject("test mail session from tomcat");
> message.setContent("test mail session from tomcat", 
> "text/plain");
> Transport.send(message);
>  
> Catalina ERROR: 
>  
> javax.mail.SendFailedException: Sending failed;
>   nested exception is:
> javax.mail.MessagingException: Could not connect to SMTP host:
> localhost , port: 25;
>   nested exception is:
> java.net.ConnectException: Connection refused: connect
> at javax.mail.Transport.send0(Transport.java:204)
> at javax.mail.Transport.send(Transport.java:73)
> at javaxml2.UpdateItemServlet.doPost(Unknown Source)
> at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:237)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:157)
> 
> 
> !DSPAM:417d591a211741752920360!
> 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.778 / Virus Database: 525 - Release Date: 10/15/2004


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



RE: Why mail/session always being set to localhost even Context.xml says otherwise?

2004-10-25 Thread Steve Kirk
Not sure that this is your actual problem, but is it correct to use
"mailto:"; within the to/from addresses?
 
> -Original Message-
> From: David Lee [mailto:[EMAIL PROTECTED] 
> Sent: October 25, 2004 3:51 PM
> To: [EMAIL PROTECTED]
> Subject: Why mail/session always being set to localhost even 
> Context.xml
> says otherwise?
> 
> 
> Tomcat: 5.0.29
> OS:  XP
> JAVA: 1.5.0
>  
> Context.xml: jakarta-tomcat-5.0.29\conf\Catalina\localhost
>  
>type="javax.mail.Session"/>
> 
>   
> mail.smtp.host
> company email server
>   
> 
>  
> Java program:
>  
> Context initCtx = new InitialContext();
> Context envCtx = (Context) initCtx.lookup("java:comp/env");
> Session session = (Session) envCtx.lookup("mail/Session");
>  
> Message message = new MimeMessage(session);
> message.setFrom(new InternetAddress("from email
>  "));
> InternetAddress to[] = new InternetAddress[1];
> to[0] = new InternetAddress("to email
>  ");
> message.setRecipients(Message.RecipientType.TO, to);
> message.setSubject("test mail session from tomcat");
> message.setContent("test mail session from tomcat", 
> "text/plain");
> Transport.send(message);
>  
> Catalina ERROR: 
>  
> javax.mail.SendFailedException: Sending failed;
>   nested exception is:
> javax.mail.MessagingException: Could not connect to SMTP host:
> localhost , port: 25;
>   nested exception is:
> java.net.ConnectException: Connection refused: connect
> at javax.mail.Transport.send0(Transport.java:204)
> at javax.mail.Transport.send(Transport.java:73)
> at javaxml2.UpdateItemServlet.doPost(Unknown Source)
> at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> at 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> icationFilterChain.java:237)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> ilterChain.java:157)
> 
> 
> !DSPAM:417d591a211741752920360!
> 



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



RE: Why mail/session always being set to localhost even Context.x ml says otherwise?

2004-10-25 Thread Phillip Qin
Add use plain email address, e.g. [EMAIL PROTECTED]



-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 4:34 PM
To: 'Tomcat Users List'
Subject: RE: Why mail/session always being set to localhost even Context.x
ml says otherwise?


Assume your Resource is closed by . Try addRecipient.

-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 4:26 PM
To: [EMAIL PROTECTED]
Subject: RE: Why mail/session always being set to localhost even Context.xml
says otherwise?


 My contents for mail/Session in web.xml:


  
Resource reference to a factory for javax.mail.Session
instances that may be used for sending electronic mail
messages, preconfigured to connect to the appropriate
SMTP server.
  
  
mail/Session
  
  
javax.mail.Session
  
  
Container
  


Thanks for the help!

David Lee

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 25, 2004 1:21 PM
To: 'Tomcat Users List'
Subject: RE: Why mail/session always being set to localhost even Context.xml
says otherwise?

What is in your web.xml?

-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED]
Sent: October 25, 2004 3:51 PM
To: [EMAIL PROTECTED]
Subject: Why mail/session always being set to localhost even Context.xml
says otherwise?


Tomcat: 5.0.29
OS:  XP
JAVA: 1.5.0
 
Context.xml: jakarta-tomcat-5.0.29\conf\Catalina\localhost
 


  
mail.smtp.host
company email server
  

 
Java program:
 
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
Session session = (Session) envCtx.lookup("mail/Session");
 
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress("from email
 "));
InternetAddress to[] = new InternetAddress[1];
to[0] = new InternetAddress("to email
 ");
message.setRecipients(Message.RecipientType.TO, to);
message.setSubject("test mail session from tomcat");
message.setContent("test mail session from tomcat", "text/plain");
Transport.send(message);
 
Catalina ERROR: 
 
javax.mail.SendFailedException: Sending failed;
  nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host:
localhost , port: 25;
  nested exception is:
java.net.ConnectException: Connection refused: connect
at javax.mail.Transport.send0(Transport.java:204)
at javax.mail.Transport.send(Transport.java:73)
at javaxml2.UpdateItemServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)




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





!DSPAM:417d6356217529789243331!


RE: Why mail/session always being set to localhost even Context.x ml says otherwise?

2004-10-25 Thread Phillip Qin
Assume your Resource is closed by . Try addRecipient.

-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 4:26 PM
To: [EMAIL PROTECTED]
Subject: RE: Why mail/session always being set to localhost even Context.xml
says otherwise?


 My contents for mail/Session in web.xml:


  
Resource reference to a factory for javax.mail.Session
instances that may be used for sending electronic mail
messages, preconfigured to connect to the appropriate
SMTP server.
  
  
mail/Session
  
  
javax.mail.Session
  
  
Container
  


Thanks for the help!

David Lee

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 25, 2004 1:21 PM
To: 'Tomcat Users List'
Subject: RE: Why mail/session always being set to localhost even Context.xml
says otherwise?

What is in your web.xml?

-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED]
Sent: October 25, 2004 3:51 PM
To: [EMAIL PROTECTED]
Subject: Why mail/session always being set to localhost even Context.xml
says otherwise?


Tomcat: 5.0.29
OS:  XP
JAVA: 1.5.0
 
Context.xml: jakarta-tomcat-5.0.29\conf\Catalina\localhost
 


  
mail.smtp.host
company email server
  

 
Java program:
 
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
Session session = (Session) envCtx.lookup("mail/Session");
 
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress("from email
 "));
InternetAddress to[] = new InternetAddress[1];
to[0] = new InternetAddress("to email
 ");
message.setRecipients(Message.RecipientType.TO, to);
message.setSubject("test mail session from tomcat");
message.setContent("test mail session from tomcat", "text/plain");
Transport.send(message);
 
Catalina ERROR: 
 
javax.mail.SendFailedException: Sending failed;
  nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host:
localhost , port: 25;
  nested exception is:
java.net.ConnectException: Connection refused: connect
at javax.mail.Transport.send0(Transport.java:204)
at javax.mail.Transport.send(Transport.java:73)
at javaxml2.UpdateItemServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)




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


!DSPAM:417d615f216943647852163!


RE: Why mail/session always being set to localhost even Context.xml says otherwise?

2004-10-25 Thread David Lee
 My contents for mail/Session in web.xml:


  
Resource reference to a factory for javax.mail.Session
instances that may be used for sending electronic mail
messages, preconfigured to connect to the appropriate
SMTP server.
  
  
mail/Session
  
  
javax.mail.Session
  
  
Container
  


Thanks for the help!

David Lee

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 25, 2004 1:21 PM
To: 'Tomcat Users List'
Subject: RE: Why mail/session always being set to localhost even
Context.xml says otherwise?

What is in your web.xml?

-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED]
Sent: October 25, 2004 3:51 PM
To: [EMAIL PROTECTED]
Subject: Why mail/session always being set to localhost even Context.xml
says otherwise?


Tomcat: 5.0.29
OS:  XP
JAVA: 1.5.0
 
Context.xml: jakarta-tomcat-5.0.29\conf\Catalina\localhost
 


  
mail.smtp.host
company email server
  

 
Java program:
 
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
Session session = (Session) envCtx.lookup("mail/Session");
 
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress("from email
 "));
InternetAddress to[] = new InternetAddress[1];
to[0] = new InternetAddress("to email
 ");
message.setRecipients(Message.RecipientType.TO, to);
message.setSubject("test mail session from tomcat");
message.setContent("test mail session from tomcat",
"text/plain");
Transport.send(message);
 
Catalina ERROR: 
 
javax.mail.SendFailedException: Sending failed;
  nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host:
localhost , port: 25;
  nested exception is:
java.net.ConnectException: Connection refused: connect
at javax.mail.Transport.send0(Transport.java:204)
at javax.mail.Transport.send(Transport.java:73)
at javaxml2.UpdateItemServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)


!DSPAM:417d591a211741752920360!

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



RE: Why mail/session always being set to localhost even Context.x ml says otherwise?

2004-10-25 Thread Phillip Qin
What is in your web.xml?

-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 3:51 PM
To: [EMAIL PROTECTED]
Subject: Why mail/session always being set to localhost even Context.xml
says otherwise?


Tomcat: 5.0.29
OS:  XP
JAVA: 1.5.0
 
Context.xml: jakarta-tomcat-5.0.29\conf\Catalina\localhost
 


  
mail.smtp.host
company email server
  

 
Java program:
 
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
Session session = (Session) envCtx.lookup("mail/Session");
 
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress("from email
 "));
InternetAddress to[] = new InternetAddress[1];
to[0] = new InternetAddress("to email
 ");
message.setRecipients(Message.RecipientType.TO, to);
message.setSubject("test mail session from tomcat");
message.setContent("test mail session from tomcat", "text/plain");
Transport.send(message);
 
Catalina ERROR: 
 
javax.mail.SendFailedException: Sending failed;
  nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host:
localhost , port: 25;
  nested exception is:
java.net.ConnectException: Connection refused: connect
at javax.mail.Transport.send0(Transport.java:204)
at javax.mail.Transport.send(Transport.java:73)
at javaxml2.UpdateItemServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)


!DSPAM:417d591a211741752920360!


Re: Running HSQLDB in-process?

2004-10-25 Thread Michael Schuerig
On Monday 25 October 2004 18:52, Peter Rossbach wrote:

> I think you can used ${catalina.base} or other system env variables
> inside server.xml and context.xml
> for an absolute path information. Only problem with this handling is,
> don't save your server.xml oder context.xml
> with the admin application.

Ah, good to know! I was unaware that Tomcat substitute properties in 
context.xml. I dumped the properties in my servlet (an axis-based web 
service, actually) and there doesn't seem to be a suitable property 
available. But as I'm using Spring and Log4j anyway, I noticed that

org.springframework.web.util.Log4jWebConfigurer in conjunction with
org.springframework.web.util.Log4jConfigListener

sets an appropriate property. It needs some declarations in web.xml:

  
webAppRootKey
mywebservice.root
  

  
log4jConfigLocation
/WEB-INF/log4j.properties
  

Then, in context.xml

  

  

It's not pretty, rather fragile, really, as it depends on the right 
order of evaluation. The url attribute must be evaluated after 
mywebservice.root is already set.


> Tipp: use a db resource path outside your application, than deployer
> can delete all
> files without you lose the data! ;-)

Thanks for reminding me. In this case it's okay to lose the data as it's 
read-only reference data.

Michael

-- 
Michael Schuerig  The usual excuse for our most unspeakable
mailto:[EMAIL PROTECTED]  public acts is that they are necessary.
http://www.schuerig.de/michael/  --Judith N. Shklar

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



Re: cookies problem with Tomcat 4.1.30

2004-10-25 Thread Mark
Hey,
Is proxy involved on client's side ?

-Mark.

--- Todor Todorov <[EMAIL PROTECTED]> wrote:

> Hello there,
>  
> We experienced strange behavior with Tomcat under heavy load. 
>  
> Fairly simple JSP generates a page based on a persistent cookie,
> unfortunately the browser receives someone else page. 
> For example, browser B1 sends request with cookie C1, but receives
> page
> based on cookie C2. 
>  
> Anyone with similar experience? Is it possible that Tomcat did not
> initialize reused objects like Request or tag? What else is shared
> between
> requests?
>  
> Unfortunately it's not reproducible even when we create artificial
> load, so
> we could only guess for possible reasons.
>  
> Thanks in advance,
> Todor
> 

> ATTACHMENT part 2 application/x-pkcs7-signature name=smime.p7s





___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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



Why mail/session always being set to localhost even Context.xml says otherwise?

2004-10-25 Thread David Lee
Tomcat: 5.0.29
OS:  XP
JAVA: 1.5.0
 
Context.xml: jakarta-tomcat-5.0.29\conf\Catalina\localhost
 


  
mail.smtp.host
company email server
  

 
Java program:
 
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
Session session = (Session) envCtx.lookup("mail/Session");
 
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress("from email
 "));
InternetAddress to[] = new InternetAddress[1];
to[0] = new InternetAddress("to email
 ");
message.setRecipients(Message.RecipientType.TO, to);
message.setSubject("test mail session from tomcat");
message.setContent("test mail session from tomcat",
"text/plain");
Transport.send(message);
 
Catalina ERROR: 
 
javax.mail.SendFailedException: Sending failed;
  nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host:
localhost
, port: 25;
  nested exception is:
java.net.ConnectException: Connection refused: connect
at javax.mail.Transport.send0(Transport.java:204)
at javax.mail.Transport.send(Transport.java:73)
at javaxml2.UpdateItemServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)


RE: Jakarta-Tomcat and Image Tag Library - SOLUTION

2004-10-25 Thread Lars Nielsen Lind
Hi.

I have found a solution to my problem.

In web.xml (webapp)/WEB-INF/web.xml I changed:

http://jakarta.apache.org/taglibs/image-1.0

to

TEST

and now it is working...


Lars Nielsen Lind

-Original Message-
From: Lars Nielsen Lind [mailto:[EMAIL PROTECTED] 
Sent: 24. oktober 2004 17:50
To: 'Tomcat Users List'
Subject: RE: Jakarta-Tomcat and Image Tag Library

Hi.

I have now located an error msg in jakarta-tomcat:


StandardContext[]ImageTag error: Cannot get ../../../images/employees/<%=
employee_image %>
StandardContext[]The exception was: 
- Javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: No trusted certificate found


Lars Nielsen Lind


-Original Message-
From: Lars Nielsen Lind [mailto:[EMAIL PROTECTED] 
Sent: 24. oktober 2004 16:27
To: 'Tomcat Users List'; [EMAIL PROTECTED]
Subject: RE: Jakarta-Tomcat and Image Tag Library

Hi.

It was not that...

I also have tried with this, but it will not display any images...

>




Lars Nielsen Lind

-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED] 
Sent: 24. oktober 2004 16:19
To: Tomcat Users List
Subject: RE: Jakarta-Tomcat and Image Tag Library

Not familiar with the tag-lib but try:
 src="images/employees/<%= employee_image %>"

NOTE: no "/" at the beginning of the relative url



On Sun, 2004-10-24 at 10:13, Lars Nielsen Lind wrote:
> Hi.
> 
> I use:
> 
> Jakarta-Tomcat-5.0.25
> J2SDK1.4.2_04
> Image Taglib 1.0 (from binaries)
> 
> There is no error msg.
> 
> I have copied taglibs-image.jar to /WEB-INF/lib.
> I have copied pjatools.jar to /WEB-INF/lib
> I have copied com.mullasseny.imaging... to /WEB-INF/classes/com/...
> I have copied taglibs-image.tld to /WEB-INF
> 
> I have added the following lines to /WEB-INF/web.xml:
> 
> 
>   http://jakarta.apache.org/taglibs/image-1.0
>   /WEB-INF/taglibs-image.tld
> 
> 
> 
> At the top of the *.jsp page:
> 
> <%@ taglib uri=http://jakarta.apache.org/taglibs/image-1.0 prefix="img" %>
> 
> Below at the same *.jsp page:
> 
>src="/images/employees/<%= employee_image %>"
>   name=<%= employee_image %>
> 
>   
> 
> 
> 
> 
> Lars Nielsen Lind
> 
> 
> 
> 
> -Original Message-
> From: QM [mailto:[EMAIL PROTECTED] 
> Sent: 24. oktober 2004 15:56
> To: Tomcat Users List
> Subject: Re: Jakarta-Tomcat and Image Tag Library
> 
> On Sun, Oct 24, 2004 at 03:42:28PM +0200, Lars Nielsen Lind wrote:
> : I am having some trouble making the Jakarta Image Tag Library work. I do
> as
> : outlined in the documentation but I am not apple to display any images.
> 
> As we're not clairvoyant, you'd do well to provide details if you want
> help:
> 
> - what "documentation" did you read?  If you provide the URL(s), someone
>   here may notice those docs are out of date
> 
> - what version of Tomcat do you use?
> 
> - what version of the Image taglib do you use?
> 
> - what error message do you get, if any?
> 
> - what's the source of the JSP that calls the taglib?
> 
> etc., etc.
> 
> -QM


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



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



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



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



RE: AW: AW: Session Definition Bug?

2004-10-25 Thread Shapira, Yoav

Hi,

>I have not yet found where in the tomcat documentation, session
>definition, cookies, etc. are discussed

These are defined and specified in the Servlet Specification very
clearly.

Yoav



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Problems wth Apache, mod_jk2 and Tomcat

2004-10-25 Thread David Smith
I would start with the apache logs and find out what kind of requests 
are logged in the access just before the event.  That should get you 
going in the right direction.

--David
Lars George wrote:
Hi,
We have an odd problem we cannot solve. Maybe someone else has come 
across this too.

We use Apache 2.0.52 with the Tomcat 5.0.25 and its included mod_jk2 
with Coyote/JK2 AJP 1.3 connector.

Usually Apache uses 230 slots out of 1000 it has set as the maximum. 
This can be seen from the server-status page, it equals to say 32 
requests per second.

Then all of sudden the Apache runs full and exceeds all empty slots, 
ie. goes up to 1000 requests currently being processed and accepts no 
further connections. All but a handful of these slots are in state 
"W". Looking at the URI's the requests are both static content (like 
images) served directly by Apache, but of course many requests are to 
the dynamic content created by the app server (Tomcat).

I do not think this is a load issue per se, ie. where we have someone 
hammering us with requests, since looking at the connections and URL's 
they are all so random but valid at the same time that I do not think 
this is it.

What puzzles me more is that they are all in the state "W". which 
means "sending reply". The network seems to be OK at that point of 
time too since I can connect to the machines no problem.

Only if I restart Apache by ultimately killing (killall -9 httpd) all 
processes I can revive the site. After the Apache restart everything 
goes back to normal right away. This seems to mean something too, at 
least that it seems to be getting stuck somehow but whatever caused it 
does not seem to exist anymore. Like something short, for example a 
specific request, caused this.

What could I check from here? I cannot take the Apache out since we 
need  it for rewriting and session handling.

Any help or pointers are greatly appreciated.
Thanks,
Lars
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: AW: AW: Session Definition Bug?

2004-10-25 Thread Bill Winspur
Steffen Heil wrote:
Hi
 

I'm using the firefox browser and have no proxy definitions.
   

First try another browser.
Then, maybe your tomcat is configured to use cookies as session ids and your
browser is configured not to accept cookies?
However, since there is no different code for local and remote clients, I
cannot believe this were a bug in tomcat.
Regards,
 Steffen
 

Steffen,
the problem appears using both IE and Firefox.
My firefox browsers (on the tomcat host (xp pro) and a linux host  are 
both set to 'use cookies - normally'.

I did a search of my tomcat installation for the word cookie, but that 
did not find any obvious
configuration of cookies, so I assume I'm running the default.

I tried allowing my browser to accept cookies from explicitly 
localhost:8090 (my tomcat server) , but it made no difference.

I have not yet found where in the tomcat documentation, session 
definition, cookies, etc. are discussed

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


Problems wth Apache, mod_jk2 and Tomcat

2004-10-25 Thread Lars George
Hi,
We have an odd problem we cannot solve. Maybe someone else has come 
across this too.

We use Apache 2.0.52 with the Tomcat 5.0.25 and its included mod_jk2 
with Coyote/JK2 AJP 1.3 connector.

Usually Apache uses 230 slots out of 1000 it has set as the maximum. 
This can be seen from the server-status page, it equals to say 32 
requests per second.

Then all of sudden the Apache runs full and exceeds all empty slots, ie. 
goes up to 1000 requests currently being processed and accepts no 
further connections. All but a handful of these slots are in state "W". 
Looking at the URI's the requests are both static content (like images) 
served directly by Apache, but of course many requests are to the 
dynamic content created by the app server (Tomcat).

I do not think this is a load issue per se, ie. where we have someone 
hammering us with requests, since looking at the connections and URL's 
they are all so random but valid at the same time that I do not think 
this is it.

What puzzles me more is that they are all in the state "W". which means 
"sending reply". The network seems to be OK at that point of time too 
since I can connect to the machines no problem.

Only if I restart Apache by ultimately killing (killall -9 httpd) all 
processes I can revive the site. After the Apache restart everything 
goes back to normal right away. This seems to mean something too, at 
least that it seems to be getting stuck somehow but whatever caused it 
does not seem to exist anymore. Like something short, for example a 
specific request, caused this.

What could I check from here? I cannot take the Apache out since we need 
 it for rewriting and session handling.

Any help or pointers are greatly appreciated.
Thanks,
Lars
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JK2: mapping urls from Apache to Tomcat

2004-10-25 Thread Lars George
Andrzej,
If you are referring to rewriting URI's before hitting the app servers 
then we do this with mod_rewrite which executes before mod_jk. So fr 
example if we have to change a legacy URI to a new one then we do this 
with a rewrite rule before even mod_jk is called. Works great for us.

HTH,
Lars George
WorldLingo
Andrzej Jan Taramina wrote:
Still hoping for some enlightenment on this
Douglas WF Acheson has said late last year:

# Define the Manager proxy that comes with Tomcat
[uri:/tomcat/manager/*]
context=/manager
info=Manager prefix mapping
But, after frustrating attempts I cannot seem to get it correct.  I have
search the mail archives and a few people have asked similar questions, but I
have not see any replies.  Hope someone can help me ...

I'm trying to do the same thing. I want Apache/JK2 to trap a specific URI 
(tomcat/manager/* in this example), but to map it to something else (eg. 
"manager") before it sends the request on to Tomcat through the JK 
connection.

The context parameter shown above in workers2.properties does not do this, in 
fact, who knows what it does. I agree with Doug that the JK2 docs are 
abysmal. 

Anyone figured out a way to do such URI mapping using JK2?  Is it even 
possible?

Thanks!
Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


Re: PLEASE HELP : time outs with sticky session and file store

2004-10-25 Thread pablo
Sorry forgot to add the config files as an attachment .


config_file.tar.gz
Description: GNU Zip compressed data

On Oct 25, 2004, at 1:22 PM, pablo wrote:
Hi folks,
I am currently running apache 2.0.52 , mod_jk2, solaris 8 &  
tomcat 5.0.28 on my servers .  I have two apache serves behind an 
alteon that service my webapps on 4 tomcat servers.  I have sticky 
sessions with a file store set up on my boxes.  My filestore is via 
nfs. All my hosts are on the same subnet. They are mulithomed hosts 
because I need a back interface for the webapps to talk to the db.  
But my default routes are all set the same .  I have one apache server 
that hits two tomcat servers and then another apache sever that has 
two other tomcat servers. Once I start that apache servers everything 
is fine , for a few hours .  After a few hours the tomcat servers 
start to time out. I can get to the apache index page but as soon as I 
ask the apache server to make a request to a webapp on the tomcat 
servers is just sits there and times out.  Sometimes the webapp does 
pop up but very slowly. I have examined the routing tables , I have 
done traceroutes I have pin pointed my problem down to the application 
layer.  So I must be doing something wrong in my configuration.  I 
checked over my configuration a hundred times and I did it exactly the 
way the book told me to "professional apache tomcat 5" . This all 
worked on my testing environment , but it is not working now.  I have 
included a very small tar file that has my config files . If any of 
you can give me an example of a working config or tell me what I am 
doing wrong I would greatly appreciate it .

-Pablo

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

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

PLEASE HELP : time outs with sticky session and file store

2004-10-25 Thread pablo
Hi folks,
I am currently running apache 2.0.52 , mod_jk2, solaris 8 &  tomcat 
5.0.28 on my servers .  I have two apache serves behind an alteon that 
service my webapps on 4 tomcat servers.  I have sticky sessions with a 
file store set up on my boxes.  My filestore is via nfs. All my hosts 
are on the same subnet. They are mulithomed hosts because I need a back 
interface for the webapps to talk to the db.  But my default routes are 
all set the same .  I have one apache server that hits two tomcat 
servers and then another apache sever that has two other tomcat 
servers. Once I start that apache servers everything is fine , for a 
few hours .  After a few hours the tomcat servers start to time out. I 
can get to the apache index page but as soon as I ask the apache server 
to make a request to a webapp on the tomcat servers is just sits there 
and times out.  Sometimes the webapp does pop up but very slowly. I 
have examined the routing tables , I have done traceroutes I have pin 
pointed my problem down to the application layer.  So I must be doing 
something wrong in my configuration.  I checked over my configuration a 
hundred times and I did it exactly the way the book told me to 
"professional apache tomcat 5" . This all worked on my testing 
environment , but it is not working now.  I have included a very small 
tar file that has my config files . If any of you can give me an 
example of a working config or tell me what I am doing wrong I would 
greatly appreciate it .

-Pablo

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


RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?

2004-10-25 Thread spammemothers
Yipp!! that fixed it!

Deleted those 4 *.jar files & put back in ojdbc14.jar & that works also!

Funny though as doc's show to include schema name
"jdbc:oracle:thin:[EMAIL PROTECTED]:1521:mysid"

Any ideas why?

Many thanks for all your help

-Original Message-
From: Graff, David [mailto:[EMAIL PROTECTED] 
Sent: 25 October 2004 17:54
To: 'Tomcat Users List'
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?


in your jdbc url, lose the prd_owner ... 

  
url
jdbc:oracle:thin:@127.0.0.1:1521:dev
  

-Original Message-
From: spammemothers [mailto:[EMAIL PROTECTED]
Sent: Monday, October 25, 2004 12:51 PM
To: 'Tomcat Users List'
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?


Copied classes111.jar, classes12.jar, nls_charset11.jar, nls_charset12.jar
from ora92\jdbc\lib directory to jakarta-tomcat-5.0.28\common\lib directory
- also deleted ojdbc14.jar from this dir - NullPointerException still
happening!

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: 25 October 2004 17:43
To: 'Tomcat Users List'
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?


Can you give classes12.jar a try so we can isolate the problem of ojdbc14. I
use the jdbc driver come with oracle 9i release 2. The name is
classes12.zip.



-Original Message-
From: spammemothers [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 12:39 PM
To: 'Tomcat Users List'
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?


Added the factory bit & still not working -

prd.xml now is- 



 
  

  
factory
org.apache.commons.dbcp.BasicDataSourceFactory
  
  
driverClassName
oracle.jdbc.driver.OracleDriver
  
  
url
jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev
  
  
username
prd_owner
  
  
password
prd_owner
  
  
maxActive
20
  
  
maxIdle
10
  
  
maxWait
-1
  




& web.xml still contains -


 Oracle Datasource example  
PRDConnectionPool
 javax.sql.DataSource
 Container



-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: 25 October 2004 17:20
To: Tomcat Users List
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?



Hi,
Add a  ResourceParam as shown in the docs.

Yoav Shapira http://www.yoavshapira.com
 

>-Original Message-
>From: spammemothers [mailto:[EMAIL PROTECTED]
>Sent: Monday, October 25, 2004 12:14 PM
>To: 'Tomcat Users List'
>Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>This is my app file i.e prd.xml in
>c:\jakarta-tomcat-5.0.28\conf\Catalina\localhost
>
>
>privileged="true" workDir="work\Catalina\localhost\PRD">
>  type="javax.sql.DataSource"/>
>  
>
>  maxWait
>  -1
>
>
>  maxActive
>  20
>
>
>  username
>  prd_user
>
>
>  password
>  prd_user
>
>
>  url
>  jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev
>
>
>  driverClassName
>  oracle.jdbc.driver.OracleDriver
>
>
>  maxIdle
>  10
>
>  
>
>
>My web.xml (in c:\jakarta-tomcat-5.0.28\conf) contains this -
>
>
> Oracle Datasource example
>PRDConnectionPool
> javax.sql.DataSource
> Container
>
>
>Hope this helps?
>
>Thanks
>
>harry
>
>
>
>
>
>-Original Message-
>From: Phillip Qin [mailto:[EMAIL PROTECTED]
>Sent: 25 October 2004 15:25
>To: 'Tomcat Users List'
>Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>
>What arr your  and ?
>
>-Original Message-
>From: Adrian Harrison [mailto:[EMAIL PROTECTED]
>Sent: October 23, 2004 12:28 PM
>To: [EMAIL PROTECTED]
>Subject: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>
>using tomcat 5.0.28, oracle 9.2.1.0 on windows 2000 (sp4)
>
>having a nightmare here, upgraded from oracle 8i to 9i, downloaded &
>installed ojdbc14.jar file in Tomcat's common\lib directory.
>
>Now all I get when trying to create a connection pool is this exception
-
>
>2004-10-22 17:04:22 StandardContext[/PRD]action: null
>java.lang.NullPointerException
>   at
>org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnection
.jav
>a
>:151)
>   at
>org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnecti
on.j
>a
>va:95)
>   at
>org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(Poolabl
eCon
>n
>ectionFactory.java:301)
>   at
>org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Basic
Data
>S
>ource.java:883)
>   at
>org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc
e.ja
>v
>a:851)
>etc...
>
>from my web.xml file -
>
>
> Oracle Datasource example
>PRDConnectionPool
> javax.sql.DataSource
> Contain

JK2: mapping urls from Apache to Tomcat

2004-10-25 Thread Andrzej Jan Taramina
Still hoping for some enlightenment on this

Douglas WF Acheson has said late last year:

> # Define the Manager proxy that comes with Tomcat
> [uri:/tomcat/manager/*]
> context=/manager
> info=Manager prefix mapping
> 
> But, after frustrating attempts I cannot seem to get it correct.  I have
> search the mail archives and a few people have asked similar questions, but I
> have not see any replies.  Hope someone can help me ...

I'm trying to do the same thing. I want Apache/JK2 to trap a specific URI 
(tomcat/manager/* in this example), but to map it to something else (eg. 
"manager") before it sends the request on to Tomcat through the JK 
connection.

The context parameter shown above in workers2.properties does not do this, in 
fact, who knows what it does. I agree with Doug that the JK2 docs are 
abysmal. 

Anyone figured out a way to do such URI mapping using JK2?  Is it even 
possible?

Thanks!

Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com


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



RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?

2004-10-25 Thread Graff, David
in your jdbc url, lose the prd_owner ... 

  
url
jdbc:oracle:thin:@127.0.0.1:1521:dev
  

-Original Message-
From: spammemothers [mailto:[EMAIL PROTECTED]
Sent: Monday, October 25, 2004 12:51 PM
To: 'Tomcat Users List'
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?


Copied classes111.jar, classes12.jar, nls_charset11.jar, nls_charset12.jar
from ora92\jdbc\lib directory to jakarta-tomcat-5.0.28\common\lib directory
- also deleted ojdbc14.jar from this dir - NullPointerException still
happening!

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: 25 October 2004 17:43
To: 'Tomcat Users List'
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?


Can you give classes12.jar a try so we can isolate the problem of ojdbc14. I
use the jdbc driver come with oracle 9i release 2. The name is
classes12.zip.



-Original Message-
From: spammemothers [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 12:39 PM
To: 'Tomcat Users List'
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?


Added the factory bit & still not working -

prd.xml now is- 



 
  

  
factory
org.apache.commons.dbcp.BasicDataSourceFactory
  
  
driverClassName
oracle.jdbc.driver.OracleDriver
  
  
url
jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev
  
  
username
prd_owner
  
  
password
prd_owner
  
  
maxActive
20
  
  
maxIdle
10
  
  
maxWait
-1
  




& web.xml still contains -


 Oracle Datasource example  
PRDConnectionPool
 javax.sql.DataSource
 Container



-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: 25 October 2004 17:20
To: Tomcat Users List
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?



Hi,
Add a  ResourceParam as shown in the docs.

Yoav Shapira http://www.yoavshapira.com
 

>-Original Message-
>From: spammemothers [mailto:[EMAIL PROTECTED]
>Sent: Monday, October 25, 2004 12:14 PM
>To: 'Tomcat Users List'
>Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>This is my app file i.e prd.xml in 
>c:\jakarta-tomcat-5.0.28\conf\Catalina\localhost
>
>
>privileged="true" workDir="work\Catalina\localhost\PRD">
>  type="javax.sql.DataSource"/>
>  
>
>  maxWait
>  -1
>
>
>  maxActive
>  20
>
>
>  username
>  prd_user
>
>
>  password
>  prd_user
>
>
>  url
>  jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev
>
>
>  driverClassName
>  oracle.jdbc.driver.OracleDriver
>
>
>  maxIdle
>  10
>
>  
>
>
>My web.xml (in c:\jakarta-tomcat-5.0.28\conf) contains this -
>
>
> Oracle Datasource example 
>PRDConnectionPool
> javax.sql.DataSource
> Container
>
>
>Hope this helps?
>
>Thanks
>
>harry
>
>
>
>
>
>-Original Message-
>From: Phillip Qin [mailto:[EMAIL PROTECTED]
>Sent: 25 October 2004 15:25
>To: 'Tomcat Users List'
>Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>
>What arr your  and ?
>
>-Original Message-
>From: Adrian Harrison [mailto:[EMAIL PROTECTED]
>Sent: October 23, 2004 12:28 PM
>To: [EMAIL PROTECTED]
>Subject: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>
>using tomcat 5.0.28, oracle 9.2.1.0 on windows 2000 (sp4)
>
>having a nightmare here, upgraded from oracle 8i to 9i, downloaded & 
>installed ojdbc14.jar file in Tomcat's common\lib directory.
>
>Now all I get when trying to create a connection pool is this exception
-
>
>2004-10-22 17:04:22 StandardContext[/PRD]action: null 
>java.lang.NullPointerException
>   at
>org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnection
.jav
>a
>:151)
>   at 
>org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnecti
on.j
>a
>va:95)
>   at 
>org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(Poolabl
eCon
>n
>ectionFactory.java:301)
>   at 
>org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Basic
Data
>S
>ource.java:883)
>   at 
>org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc
e.ja
>v
>a:851)
>etc...
>
>from my web.xml file -
>
>
> Oracle Datasource example 
>PRDConnectionPool
> javax.sql.DataSource
> Container
>
>
>from my app xml file -
>
>   
> factory
> org.apache.commons.dbcp.BasicDataSourceFactory
>   
>   
> driverClassName
> oracle.jdbc.driver.OracleDriver
>   
>   
> url
> jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev91
>   
>
>Worked fine under 8.1i but now I've hit a brick wall with this one - is
it
>possible to get these to work together?
>
>Probably doing something really stupid, any ideas?
>
>many

Re: Running HSQLDB in-process?

2004-10-25 Thread Peter Rossbach
Hey Michael,
I think you can used ${catalina.base} or other system env variables 
inside server.xml and context.xml
for an absolute path information. Only problem with this handling is, 
don't save your server.xml oder context.xml
with the admin application.

Tipp: use a db resource path outside your application, than deployer can 
delete all
files without you lose the data! ;-)

hope it works,
Peter
Michael Schuerig schrieb:
I'm trying to run HSQLDB in in-process mode in a web application. For 
this I've added a resource definition to the context file:

 
No problem so far. But there is a problem, when HSQLDB tries to open the 
database and can't find it:

   java.sql.SQLException: Database does not exists:
   file:/WEB-INF/db/verzeichnisdb
Now, what I need is some hook where I can resolve this to an absolute 
path. Unfortunately, what looks like an ordinary file-URL isn't one. 
That is, AFAICT, it wouldn't help to resolve this to a jndi-URL (I 
think that's what Tomcat does). If my understanding is correct, I need 
an absolute file-URL as HSQLDB interprets the URL scheme to decide how 
to access the database (server, file in-process, in-memory).

As a last resort, I could run HSQLDB as a server and be done with it. 
But as only my single web app is using the DB there's no independent 
reason to do this.

Michael
 


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


RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?

2004-10-25 Thread spammemothers
Copied classes111.jar, classes12.jar, nls_charset11.jar, nls_charset12.jar
from ora92\jdbc\lib directory to jakarta-tomcat-5.0.28\common\lib directory
- also deleted ojdbc14.jar from this dir - NullPointerException still
happening!

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: 25 October 2004 17:43
To: 'Tomcat Users List'
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?


Can you give classes12.jar a try so we can isolate the problem of ojdbc14. I
use the jdbc driver come with oracle 9i release 2. The name is
classes12.zip.



-Original Message-
From: spammemothers [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 12:39 PM
To: 'Tomcat Users List'
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?


Added the factory bit & still not working -

prd.xml now is- 



 
  

  
factory
org.apache.commons.dbcp.BasicDataSourceFactory
  
  
driverClassName
oracle.jdbc.driver.OracleDriver
  
  
url
jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev
  
  
username
prd_owner
  
  
password
prd_owner
  
  
maxActive
20
  
  
maxIdle
10
  
  
maxWait
-1
  




& web.xml still contains -


 Oracle Datasource example  
PRDConnectionPool
 javax.sql.DataSource
 Container



-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: 25 October 2004 17:20
To: Tomcat Users List
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?



Hi,
Add a  ResourceParam as shown in the docs.

Yoav Shapira http://www.yoavshapira.com
 

>-Original Message-
>From: spammemothers [mailto:[EMAIL PROTECTED]
>Sent: Monday, October 25, 2004 12:14 PM
>To: 'Tomcat Users List'
>Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>This is my app file i.e prd.xml in 
>c:\jakarta-tomcat-5.0.28\conf\Catalina\localhost
>
>
>privileged="true" workDir="work\Catalina\localhost\PRD">
>  type="javax.sql.DataSource"/>
>  
>
>  maxWait
>  -1
>
>
>  maxActive
>  20
>
>
>  username
>  prd_user
>
>
>  password
>  prd_user
>
>
>  url
>  jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev
>
>
>  driverClassName
>  oracle.jdbc.driver.OracleDriver
>
>
>  maxIdle
>  10
>
>  
>
>
>My web.xml (in c:\jakarta-tomcat-5.0.28\conf) contains this -
>
>
> Oracle Datasource example 
>PRDConnectionPool
> javax.sql.DataSource
> Container
>
>
>Hope this helps?
>
>Thanks
>
>harry
>
>
>
>
>
>-Original Message-
>From: Phillip Qin [mailto:[EMAIL PROTECTED]
>Sent: 25 October 2004 15:25
>To: 'Tomcat Users List'
>Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>
>What arr your  and ?
>
>-Original Message-
>From: Adrian Harrison [mailto:[EMAIL PROTECTED]
>Sent: October 23, 2004 12:28 PM
>To: [EMAIL PROTECTED]
>Subject: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>
>using tomcat 5.0.28, oracle 9.2.1.0 on windows 2000 (sp4)
>
>having a nightmare here, upgraded from oracle 8i to 9i, downloaded & 
>installed ojdbc14.jar file in Tomcat's common\lib directory.
>
>Now all I get when trying to create a connection pool is this exception
-
>
>2004-10-22 17:04:22 StandardContext[/PRD]action: null 
>java.lang.NullPointerException
>   at
>org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnection
.jav
>a
>:151)
>   at 
>org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnecti
on.j
>a
>va:95)
>   at 
>org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(Poolabl
eCon
>n
>ectionFactory.java:301)
>   at 
>org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Basic
Data
>S
>ource.java:883)
>   at 
>org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc
e.ja
>v
>a:851)
>etc...
>
>from my web.xml file -
>
>
> Oracle Datasource example 
>PRDConnectionPool
> javax.sql.DataSource
> Container
>
>
>from my app xml file -
>
>   
> factory
> org.apache.commons.dbcp.BasicDataSourceFactory
>   
>   
> driverClassName
> oracle.jdbc.driver.OracleDriver
>   
>   
> url
> jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev91
>   
>
>Worked fine under 8.1i but now I've hit a brick wall with this one - is
it
>possible to get these to work together?
>
>Probably doing something really stupid, any ideas?
>
>many thanks
>
>harry
>
>
>
>
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential

RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?

2004-10-25 Thread Phillip Qin
Can you give classes12.jar a try so we can isolate the problem of ojdbc14. I
use the jdbc driver come with oracle 9i release 2. The name is
classes12.zip.



-Original Message-
From: spammemothers [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 12:39 PM
To: 'Tomcat Users List'
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?


Added the factory bit & still not working -

prd.xml now is- 



 
  

  
factory
org.apache.commons.dbcp.BasicDataSourceFactory
  
  
driverClassName
oracle.jdbc.driver.OracleDriver
  
  
url
jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev
  
  
username
prd_owner
  
  
password
prd_owner
  
  
maxActive
20
  
  
maxIdle
10
  
  
maxWait
-1
  




& web.xml still contains -


 Oracle Datasource example  
PRDConnectionPool
 javax.sql.DataSource
 Container



-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: 25 October 2004 17:20
To: Tomcat Users List
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?



Hi,
Add a  ResourceParam as shown in the docs.

Yoav Shapira http://www.yoavshapira.com
 

>-Original Message-
>From: spammemothers [mailto:[EMAIL PROTECTED]
>Sent: Monday, October 25, 2004 12:14 PM
>To: 'Tomcat Users List'
>Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>This is my app file i.e prd.xml in
>c:\jakarta-tomcat-5.0.28\conf\Catalina\localhost
>
>
>privileged="true" workDir="work\Catalina\localhost\PRD">
>  type="javax.sql.DataSource"/>
>  
>
>  maxWait
>  -1
>
>
>  maxActive
>  20
>
>
>  username
>  prd_user
>
>
>  password
>  prd_user
>
>
>  url
>  jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev
>
>
>  driverClassName
>  oracle.jdbc.driver.OracleDriver
>
>
>  maxIdle
>  10
>
>  
>
>
>My web.xml (in c:\jakarta-tomcat-5.0.28\conf) contains this -
>
>
> Oracle Datasource example
>PRDConnectionPool
> javax.sql.DataSource
> Container
>
>
>Hope this helps?
>
>Thanks
>
>harry
>
>
>
>
>
>-Original Message-
>From: Phillip Qin [mailto:[EMAIL PROTECTED]
>Sent: 25 October 2004 15:25
>To: 'Tomcat Users List'
>Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>
>What arr your  and ?
>
>-Original Message-
>From: Adrian Harrison [mailto:[EMAIL PROTECTED]
>Sent: October 23, 2004 12:28 PM
>To: [EMAIL PROTECTED]
>Subject: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>
>using tomcat 5.0.28, oracle 9.2.1.0 on windows 2000 (sp4)
>
>having a nightmare here, upgraded from oracle 8i to 9i, downloaded &
>installed ojdbc14.jar file in Tomcat's common\lib directory.
>
>Now all I get when trying to create a connection pool is this exception
-
>
>2004-10-22 17:04:22 StandardContext[/PRD]action: null
>java.lang.NullPointerException
>   at 
>org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnection
.jav
>a
>:151)
>   at
>org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnecti
on.j
>a
>va:95)
>   at
>org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(Poolabl
eCon
>n
>ectionFactory.java:301)
>   at
>org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Basic
Data
>S
>ource.java:883)
>   at
>org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc
e.ja
>v
>a:851)
>etc...
>
>from my web.xml file -
>
>
> Oracle Datasource example
>PRDConnectionPool
> javax.sql.DataSource
> Container
>
>
>from my app xml file -
>
>   
> factory
> org.apache.commons.dbcp.BasicDataSourceFactory
>   
>   
> driverClassName
> oracle.jdbc.driver.OracleDriver
>   
>   
> url
> jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev91
>   
>
>Worked fine under 8.1i but now I've hit a brick wall with this one - is
it
>possible to get these to work together?
>
>Probably doing something really stupid, any ideas?
>
>many thanks
>
>harry
>
>
>
>
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL P

RE: Where do UnavailableExceptions get reported?

2004-10-25 Thread Steve Kirk

> Throwing a generic ServletException wrapping my UnavailableException
> would probably get the report showing up, but it also means Tomcat won't
be
> able to respond correctly to it.

Yes.  Sorry, I had missed the fact that UnavailableException is a subclass
of ServletException, so unless your web.xml specifies an error-page for
UnavailableException, there _shouldn't_ be any need to wrap an UE inside a
SE anyway.

But, back to your original question:
> > Where does it go?  If it disappears, what good is
> > having
> > UnavailableExceptions being thrown?

I've had problem with error and exception handling myself, so you got me
interested in this one.  I just read up on it in the servlet spec.
Interesting.  It seems that one good reason to use UEs is that servlet
containers are supposed to give them special treatment compared to SEs (see
servlet spec SRV.2.3.3.2).  It may be that this special treatment is
actually the problem that you're experiencing?

What I mean by this is, that the servlet spec requires TC to return a 404 or
503 to every request to the servlet after it has thrown the
UnavailableException (up toa time limit in the case of a temp UE).  So, each
new request to that servlet produces a new 404 or 503 error.  Therefore you
probably wouldn't expect each of these new Exceptions to contain the error
message from your original UnavailableException (and the spec does not seem
to require this as far as I can see).  This is maybe why a generic exception
message is returned each time instead.  At a guess, you are seeing the
UnavailableException manifested as a 404 error in your browser, like this:
"HTTP Status 404 - Servlet hemlock is not available", rather than an
UnavailableException ?

PS I just ran my own test of UnavailableException along the same lines that
you described, and found that my custom UE message was not shown in the
browser, but WAS logged in my catalina log file:

2004-10-25 17:30:31 StandardWrapperValve[uethrower]: Servlet.service() for
servlet uethrower threw exception
javax.servlet.UnavailableException: MY UE MSG
at myWebApp.test.UEThrower.doGet(UEThrower.java:24)
...
2004-10-25 17:30:31 StandardContext[/ao]Marking servlet uethrower as
unavailable



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



RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?

2004-10-25 Thread spammemothers
Added the factory bit & still not working -

prd.xml now is- 



 
  

  
factory
org.apache.commons.dbcp.BasicDataSourceFactory
  
  
driverClassName
oracle.jdbc.driver.OracleDriver
  
  
url
jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev
  
  
username
prd_owner
  
  
password
prd_owner
  
  
maxActive
20
  
  
maxIdle
10
  
  
maxWait
-1
  




& web.xml still contains -


 Oracle Datasource example  
PRDConnectionPool
 javax.sql.DataSource
 Container



-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: 25 October 2004 17:20
To: Tomcat Users List
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?



Hi,
Add a  ResourceParam as shown in the docs.

Yoav Shapira http://www.yoavshapira.com
 

>-Original Message-
>From: spammemothers [mailto:[EMAIL PROTECTED]
>Sent: Monday, October 25, 2004 12:14 PM
>To: 'Tomcat Users List'
>Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>This is my app file i.e prd.xml in 
>c:\jakarta-tomcat-5.0.28\conf\Catalina\localhost
>
>
>privileged="true" workDir="work\Catalina\localhost\PRD">
>  type="javax.sql.DataSource"/>
>  
>
>  maxWait
>  -1
>
>
>  maxActive
>  20
>
>
>  username
>  prd_user
>
>
>  password
>  prd_user
>
>
>  url
>  jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev
>
>
>  driverClassName
>  oracle.jdbc.driver.OracleDriver
>
>
>  maxIdle
>  10
>
>  
>
>
>My web.xml (in c:\jakarta-tomcat-5.0.28\conf) contains this -
>
>
> Oracle Datasource example  
>PRDConnectionPool
> javax.sql.DataSource
> Container
>
>
>Hope this helps?
>
>Thanks
>
>harry
>
>
>
>
>
>-Original Message-
>From: Phillip Qin [mailto:[EMAIL PROTECTED]
>Sent: 25 October 2004 15:25
>To: 'Tomcat Users List'
>Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>
>What arr your  and ?
>
>-Original Message-
>From: Adrian Harrison [mailto:[EMAIL PROTECTED]
>Sent: October 23, 2004 12:28 PM
>To: [EMAIL PROTECTED]
>Subject: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>
>using tomcat 5.0.28, oracle 9.2.1.0 on windows 2000 (sp4)
>
>having a nightmare here, upgraded from oracle 8i to 9i, downloaded & 
>installed ojdbc14.jar file in Tomcat's common\lib directory.
>
>Now all I get when trying to create a connection pool is this exception
-
>
>2004-10-22 17:04:22 StandardContext[/PRD]action: null 
>java.lang.NullPointerException
>   at 
>org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnection
.jav
>a
>:151)
>   at 
>org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnecti
on.j
>a
>va:95)
>   at 
>org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(Poolabl
eCon
>n
>ectionFactory.java:301)
>   at 
>org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Basic
Data
>S
>ource.java:883)
>   at 
>org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc
e.ja
>v
>a:851)
>etc...
>
>from my web.xml file -
>
>
> Oracle Datasource example 
>PRDConnectionPool
> javax.sql.DataSource
> Container
>
>
>from my app xml file -
>
>   
> factory
> org.apache.commons.dbcp.BasicDataSourceFactory
>   
>   
> driverClassName
> oracle.jdbc.driver.OracleDriver
>   
>   
> url
> jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev91
>   
>
>Worked fine under 8.1i but now I've hit a brick wall with this one - is
it
>possible to get these to work together?
>
>Probably doing something really stupid, any ideas?
>
>many thanks
>
>harry
>
>
>
>
>!DSPAM:417a864a256491205720536!
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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




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



RE: modify web deployment descriptor at runtime

2004-10-25 Thread Phillip Qin
Have you tried admin application?

-Original Message-
From: Saravanan Veerappan [mailto:[EMAIL PROTECTED] 
Sent: October 25, 2004 10:34 AM
To: [EMAIL PROTECTED]
Subject: modify web deployment descriptor at runtime


Is there a way to modify web deployment descriptor (web.xml) at runtime
using MBeans? I would like to add security roles/ constraints at runtime by
providing a admin interface, so admin can add /remove users described in
web.xml. Appreciate your replies.

Thanks

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


!DSPAM:417d1051178491506210100!


RE: GZip compression in 4.1.27 ..

2004-10-25 Thread Shapira, Yoav

Hi,
You wouldn't even have to write such a filter, tons of them are freely
available online, see Google...

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Jacob Kjome [mailto:[EMAIL PROTECTED]
>Sent: Monday, October 25, 2004 12:35 PM
>To: Tomcat Users List
>Subject: Re: GZip compression in 4.1.27 ..
>
>I'm not 100% sure of this, but I don't think GZIP compression was added
to
>the
>connector until Tomcat 5.0.xx.  Look at the appropriate docs to verify
>this.
>Either way, you can always write a servlet filter to do the
compression.
>This
>way you don't have to worry about whether Tomcat (or any other app
server)
>natively supports gzip compression.
>
>Jake
>
>Quoting Ben Bookey <[EMAIL PROTECTED]>:
>
>>
>> Dear Ladies and Gentlemen,
>>
>> This is a follow-on for a question from last week, but as its now on
a
>> "different-page" of the mailing list. I decided to
>> post another new questions, so no-one misses it.
>>
>> 1) Below is an original extract of my tomcat 4.1.27 server.xml.  I
want
>to
>> enable compression in my HTTP connector.
>> I have a customer with v. low bandwidth. I have read the Apache
readme
>> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html on
>this,
>> but I am still not 100% clear.
>>
>>
>> Would I be right in understanding that *ALL* I need to do (in the
case of
>TC
>> 4.*) is add the following attribute compression="on" ???
>>
>>
>> 
>> > port="8080"   minProcessors="5" maxProcessors="75"
>>enableLookups="true" redirectPort="8443"
>>acceptCount="100" debug="0" connectionTimeout="2"
>>useURIValidationHack="false"
disableUploadTimeout="true"
>/>
>> 
>>
>>
>> 2)  Any suggestions on a way of testing this in our high bandwidth
>> environment first ?
>>
>> regards
>>
>> Ben
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: GZip compression in 4.1.27 ..

2004-10-25 Thread Jacob Kjome
I'm not 100% sure of this, but I don't think GZIP compression was added to the
connector until Tomcat 5.0.xx.  Look at the appropriate docs to verify this. 
Either way, you can always write a servlet filter to do the compression.  This
way you don't have to worry about whether Tomcat (or any other app server)
natively supports gzip compression.

Jake

Quoting Ben Bookey <[EMAIL PROTECTED]>:

>
> Dear Ladies and Gentlemen,
>
> This is a follow-on for a question from last week, but as its now on a
> "different-page" of the mailing list. I decided to
> post another new questions, so no-one misses it.
>
> 1) Below is an original extract of my tomcat 4.1.27 server.xml.  I want to
> enable compression in my HTTP connector.
> I have a customer with v. low bandwidth. I have read the Apache readme
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html on this,
> but I am still not 100% clear.
>
>
> Would I be right in understanding that *ALL* I need to do (in the case of TC
> 4.*) is add the following attribute compression="on" ???
>
>
> 
>  port="8080"   minProcessors="5" maxProcessors="75"
>enableLookups="true" redirectPort="8443"
>acceptCount="100" debug="0" connectionTimeout="2"
>useURIValidationHack="false" disableUploadTimeout="true" />
> 
>
>
> 2)  Any suggestions on a way of testing this in our high bandwidth
> environment first ?
>
> regards
>
> Ben
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>




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



RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?

2004-10-25 Thread Shapira, Yoav

Hi,
Add a  ResourceParam as shown in the docs.

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: spammemothers [mailto:[EMAIL PROTECTED]
>Sent: Monday, October 25, 2004 12:14 PM
>To: 'Tomcat Users List'
>Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>This is my app file i.e prd.xml in
>c:\jakarta-tomcat-5.0.28\conf\Catalina\localhost
>
>
>privileged="true" workDir="work\Catalina\localhost\PRD">
>  type="javax.sql.DataSource"/>
>  
>
>  maxWait
>  -1
>
>
>  maxActive
>  20
>
>
>  username
>  prd_user
>
>
>  password
>  prd_user
>
>
>  url
>  jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev
>
>
>  driverClassName
>  oracle.jdbc.driver.OracleDriver
>
>
>  maxIdle
>  10
>
>  
>
>
>My web.xml (in c:\jakarta-tomcat-5.0.28\conf) contains this -
>
>
> Oracle Datasource example
> PRDConnectionPool
> javax.sql.DataSource
> Container
>
>
>Hope this helps?
>
>Thanks
>
>harry
>
>
>
>
>
>-Original Message-
>From: Phillip Qin [mailto:[EMAIL PROTECTED]
>Sent: 25 October 2004 15:25
>To: 'Tomcat Users List'
>Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>
>What arr your  and ?
>
>-Original Message-
>From: Adrian Harrison [mailto:[EMAIL PROTECTED]
>Sent: October 23, 2004 12:28 PM
>To: [EMAIL PROTECTED]
>Subject: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>
>using tomcat 5.0.28, oracle 9.2.1.0 on windows 2000 (sp4)
>
>having a nightmare here, upgraded from oracle 8i to 9i, downloaded &
>installed ojdbc14.jar file in Tomcat's common\lib directory.
>
>Now all I get when trying to create a connection pool is this exception
-
>
>2004-10-22 17:04:22 StandardContext[/PRD]action: null
>java.lang.NullPointerException
>   at
>org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnection
.jav
>a
>:151)
>   at
>org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnecti
on.j
>a
>va:95)
>   at
>org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(Poolabl
eCon
>n
>ectionFactory.java:301)
>   at
>org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Basic
Data
>S
>ource.java:883)
>   at
>org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc
e.ja
>v
>a:851)
>etc...
>
>from my web.xml file -
>
>
> Oracle Datasource example
>PRDConnectionPool
> javax.sql.DataSource
> Container
>
>
>from my app xml file -
>
>   
> factory
> org.apache.commons.dbcp.BasicDataSourceFactory
>   
>   
> driverClassName
> oracle.jdbc.driver.OracleDriver
>   
>   
> url
> jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev91
>   
>
>Worked fine under 8.1i but now I've hit a brick wall with this one - is
it
>possible to get these to work together?
>
>Probably doing something really stupid, any ideas?
>
>many thanks
>
>harry
>
>
>
>
>!DSPAM:417a864a256491205720536!
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?

2004-10-25 Thread spammemothers
This is my app file i.e prd.xml in
c:\jakarta-tomcat-5.0.28\conf\Catalina\localhost



  
  

  maxWait
  -1


  maxActive
  20


  username
  prd_user


  password
  prd_user


  url
  jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev


  driverClassName
  oracle.jdbc.driver.OracleDriver


  maxIdle
  10

  


My web.xml (in c:\jakarta-tomcat-5.0.28\conf) contains this -


 Oracle Datasource example
 PRDConnectionPool
 javax.sql.DataSource
 Container


Hope this helps?

Thanks

harry





-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED] 
Sent: 25 October 2004 15:25
To: 'Tomcat Users List'
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?


What arr your  and ?

-Original Message-
From: Adrian Harrison [mailto:[EMAIL PROTECTED] 
Sent: October 23, 2004 12:28 PM
To: [EMAIL PROTECTED]
Subject: Does Oracle 9i thin jdbc driver work in Tomcat 5?


using tomcat 5.0.28, oracle 9.2.1.0 on windows 2000 (sp4)

having a nightmare here, upgraded from oracle 8i to 9i, downloaded &
installed ojdbc14.jar file in Tomcat's common\lib directory.

Now all I get when trying to create a connection pool is this exception -

2004-10-22 17:04:22 StandardContext[/PRD]action: null
java.lang.NullPointerException
   at
org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnection.java
:151)
   at
org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnection.ja
va:95)
   at
org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(PoolableConn
ectionFactory.java:301)
   at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataS
ource.java:883)
   at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:851)
etc...

from my web.xml file -


 Oracle Datasource example
PRDConnectionPool
 javax.sql.DataSource
 Container


from my app xml file -

   
 factory
 org.apache.commons.dbcp.BasicDataSourceFactory
   
   
 driverClassName
 oracle.jdbc.driver.OracleDriver
   
   
 url
 jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev91
   

Worked fine under 8.1i but now I've hit a brick wall with this one - is it
possible to get these to work together?

Probably doing something really stupid, any ideas?

many thanks

harry




!DSPAM:417a864a256491205720536!



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



Embedded Tomcat5 - access to Context file

2004-10-25 Thread sven morales
1.  How do I access the context file, the ones
separated from server.xml and put in the
tomcat5/conf//localhost/ ?

2. Or if embedded in the war file, how to access it
from the war file's  META-INF/contexfile.xml  ?  I
need access to  where the datasource and
jndi is normally defined.

3.  Similarly how to access the
myapplications/WEB-INF/web.xml ?  In this web.xml it
references jdbc/Taglib but it is stored usually at
server.xml or the new fragment contextfile.xml.

I am looking at StandardContext,  Context and
NamingResources api and am just not clear how to go
about  setting it up to look for example jdbc/Taglib
defined in the contextfile.xml.  My understanding is
the Digester reads these xml file, but how do I get
hold of the results it parses?   Furthermore, is there
a different Digester instance that reads the
server.xml, web.xml, and the contextfile.xml? 
Any help in how to put these together mixing both
config  xml files and programmatically?

Thanks in advance.



___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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



Re: GZip compression in 4.1.27 ..

2004-10-25 Thread Dave Been
I posted last week I tried compression="on" compression="force" and 
compression="5" for compress output if > 5 bytes without any success.
Note that your client must send the header "Accept-encoding: gzip" for a 
web server to consider you as able to consume it.  i use

 "Accept-encoding: gzip, compression", e.g.
httpConn.setRequestProperty("Accept-Encoding", "compress, gzip")

I'm using a pure java client using the standard java.net API and it is not 
working for me.
We communicate with POST, not GET, and our typical response packet size is 
> 2k up to 5Meg.

Another person in our group got Httpd 2.0 configed to do this, but with 
another web server.  I use tomcat, so .
Next step is probably to build tomcat and try to figure out what its 
problem is (in eclipse).

Is your client Java?   i suppose i could write a small test app/servlet. 
would that be useful?

Dave Been




"Ben Bookey" <[EMAIL PROTECTED]>
10/25/2004 12:53 AM
Please respond to "Tomcat Users List"
 
To: "Tomcat User List" <[EMAIL PROTECTED]>
cc: 
Subject:GZip compression in 4.1.27 ..



Dear Ladies and Gentlemen,

This is a follow-on for a question from last week, but as its now on a
"different-page" of the mailing list. I decided to
post another new questions, so no-one misses it.

1) Below is an original extract of my tomcat 4.1.27 server.xml.  I want to
enable compression in my HTTP connector.
I have a customer with v. low bandwidth. I have read the Apache readme
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html on 
this,
but I am still not 100% clear.


Would I be right in understanding that *ALL* I need to do (in the case of 
TC
4.*) is add the following attribute compression="on" ???







2)  Any suggestions on a way of testing this in our high bandwidth
environment first ?

regards

Ben


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




RE: [Slightly OT] coercing AWT/image libraries to release resources

2004-10-25 Thread Shapira, Yoav

Hi,

>"In any case, so what if the ImageIcon takes 30MB?"
>
>So what?  Right now, my Tomcat server is sitting taking up 24mb.  When
the
>thumbnail servlet activates, that will jump up to an ADDITIONAL 30mb.
If I
>attempt to create/load a bunch of thumbs on the fly, Tomcat comes close
to
>maxing its memory quota.  Even for those who aren't as anal-retentive
as
>me,
>it's still way too much memory to leave allocated until the next server
>restart.

Step back ;)  This memory is used.  It's not wasted.  It has a purpose.
It's not a memory leak.  If it were wasted or a leak, I'd agree with
you.

But it's plausible that given your technology choice of AWT's ImageIcon,
your memory quota is inadequate and needs to be revised.  54MB is
virtually nothing for server apps.  (If you're running Tomcat on J2ME or
a portable, I completely understand your concern, but then again in that
case you wouldn't be using this approach anyways).

Don't look at overall heap size as a measure of an app's quality.
Requiring more memory in order to ensure better performance is a typical
and usually good tradeoff.

Yoav



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: [Slightly OT] coercing AWT/image libraries to release resources

2004-10-25 Thread Robert Hunt
"In any case, so what if the ImageIcon takes 30MB?"
So what?  Right now, my Tomcat server is sitting taking up 24mb.  When the 
thumbnail servlet activates, that will jump up to an ADDITIONAL 30mb.  If I 
attempt to create/load a bunch of thumbs on the fly, Tomcat comes close to 
maxing its memory quota.  Even for those who aren't as anal-retentive as me, 
it's still way too much memory to leave allocated until the next server 
restart.


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


RE: How to shutdown Tomcat gracefully when hung???

2004-10-25 Thread Shapira, Yoav

Hi,
Please don't cross-post to tomcat-dev and tomcat-user at the same time.

Gracefully, probably not.  Kill it.

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: John MccLain [mailto:[EMAIL PROTECTED]
>Sent: Monday, October 25, 2004 11:38 AM
>To: Tomcat Dev List; Tomcat user list
>Subject: How to shutdown Tomcat gracefully when hung???
>
>I have run into a problem where Tomcat is hanging inside ofg JNI code.
This
>causes the allocated thread to stay allocated.
>When I go to shutdown Tomcat, it responds with 'Waiting for 1
instance(s)
>to
>be deallocated'. Is there a way
>to shutdown Tomcat gracefully under this condition so that the
>contextDestroyed listener responds and I can get debug info???
>
>John McClain
>Senior Software Engineer
>TCS Healthcare
>[EMAIL PROTECTED]
>(530)886-1700x235
>"Before you criticize someone, walk a mile in their shoes.
>That way, you'll be a mile from them, and you'll have their shoes."
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



How to shutdown Tomcat gracefully when hung???

2004-10-25 Thread John MccLain
I have run into a problem where Tomcat is hanging inside ofg JNI code. This
causes the allocated thread to stay allocated.
When I go to shutdown Tomcat, it responds with 'Waiting for 1 instance(s) to
be deallocated'. Is there a way
to shutdown Tomcat gracefully under this condition so that the
contextDestroyed listener responds and I can get debug info???

John McClain
Senior Software Engineer
TCS Healthcare
[EMAIL PROTECTED]
(530)886-1700x235
"Before you criticize someone, walk a mile in their shoes.
That way, you'll be a mile from them, and you'll have their shoes."


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



Re: Unknown errors when running tomcat via apache/jk2

2004-10-25 Thread Blaine Barber

Just a note that I figured out that the logging configuration for the
jk connector has been moved to the workers.properties file.  I have enabled
"debug" there.

If there is anything within tomcat that I can enable to see more debug
type information, I would appreciate any pointers.  I would like to bring
the application back up with Apache but I want to make sure I have all
appropriate logging enabled first.

thnx

-Blaine

In message <[EMAIL PROTECTED]>you write:
>
>I have been running tomcat behind Apache 2 and the jk2 binary for RedHat.  We 
>noticed
>in the apache access log that we were sending a lot of "500" responses back to
>requests for a supported URL.  When we stopped apache and sent all of the 
>requests directly to the Coyote HTTP connector, all responses were successful 
>(200).
>
>We would really like to use Apache on the front end - can anyone recommend som
>e 
>logging settings within Apache/Tomcat in order to find out which requests are
>returning with a server error?  I have enabled the tomcat access log but
>that doesn't really tell me much.
>
>Thanks for any assistance.
>
>-Blaine
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

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



RE: Where do UnavailableExceptions get reported?

2004-10-25 Thread Chris Bergstresser
Steve Kirk wrote:
> ...I think you'll find that the Tomcat error page (or your
> own custom error page, if configured) will automatically
> strip the outer ServletException layer off and report the
> underlying UnavailableException.

That's a possible workaround.  But the JavaDocs are pretty clear: 

 public class UnavailableException extends ServletException
 
 Defines an exception that a servlet or filter throws 
 to indicate that it is permanently or temporarily unavailable. 

 When a servlet or filter is permanently unavailable, 
 something is wrong with the it, and it cannot handle requests 
 until some action is taken. For example, a servlet might be 
 configured incorrectly, or a filter's state may be corrupted. 
 The component should log both the error and the corrective 
 action that is needed.

Throwing a generic ServletException wrapping my UnavailableException
would probably get the report showing up, but it also means Tomcat won't be
able to respond correctly to it.

> I think your problelm might be related to my previous post
> regarding a similar issue with ServletException:
>
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]
he.org&msgNo=158528
> 
> I have also submitted a report to the JSR154 team as
> suggested by Yoav.  Let me know if your problem is similar, and I'll
> add it to my report. 

I'm not sure it is.  That's a problem with wrapping Exceptions, mine's a
problem with reporting them.  Slightly different.

-- Chris


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



modify web deployment descriptor at runtime

2004-10-25 Thread Saravanan Veerappan
Is there a way to modify web deployment descriptor (web.xml) at
runtime using MBeans? I would like to add security roles/ constraints
at runtime by providing a admin interface, so admin can add /remove
users described in web.xml. Appreciate your replies.

Thanks

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



RE: [OFF-TOPIC] Validated Environment (FDA)

2004-10-25 Thread Robert Walther
We have been using Tomcat 4 and Tomcat 5 for years in our software
product  that we install into the data centers of major pharmaceutical
companies.  It has worked with great success!



-Original Message-
From: Kaiser, Paul [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 25, 2004 8:50 AM
To: 'Tomcat Users List'
Subject: RE: [OFF-TOPIC] Validated Environment (FDA)

I haven't seen the paperwork but my understanding is that our web
infrastructure is validated. Environments include Tomcat 4 and 5 among
other
things. 

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 21, 2004 10:25 AM
To: Tomcat Users List
Subject: [OFF-TOPIC] Validated Environment (FDA)



Hi,
Is anyone running Tomcat in a validated environment?  As in validated
for Biotech/pharma, CFR Part 11, GxP operations.  If so, I'm interested
in hearing from you, please send a note my way.  No details needed, just
that you've done it.

Yoav Shapira http://www.yoavshapira.com
 




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary
and/or privileged.  This e-mail is intended only for the individual(s)
to
whom it is addressed, and may not be saved, copied, printed, disclosed
or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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





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

--

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



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



RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?

2004-10-25 Thread Phillip Qin
What arr your  and ?

-Original Message-
From: Adrian Harrison [mailto:[EMAIL PROTECTED] 
Sent: October 23, 2004 12:28 PM
To: [EMAIL PROTECTED]
Subject: Does Oracle 9i thin jdbc driver work in Tomcat 5?


using tomcat 5.0.28, oracle 9.2.1.0 on windows 2000 (sp4)

having a nightmare here, upgraded from oracle 8i to 9i, downloaded &
installed ojdbc14.jar file in Tomcat's common\lib directory.

Now all I get when trying to create a connection pool is this exception -

2004-10-22 17:04:22 StandardContext[/PRD]action: null
java.lang.NullPointerException
   at
org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnection.java
:151)
   at
org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnection.ja
va:95)
   at
org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(PoolableConn
ectionFactory.java:301)
   at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataS
ource.java:883)
   at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:851)
etc...

from my web.xml file -


 Oracle Datasource example
PRDConnectionPool
 javax.sql.DataSource
 Container


from my app xml file -

   
 factory
 org.apache.commons.dbcp.BasicDataSourceFactory
   
   
 driverClassName
 oracle.jdbc.driver.OracleDriver
   
   
 url
 jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev91
   

Worked fine under 8.1i but now I've hit a brick wall with this one - is it
possible to get these to work together?

Probably doing something really stupid, any ideas?

many thanks

harry




!DSPAM:417a864a256491205720536!


RE: Where do UnavailableExceptions get reported?

2004-10-25 Thread Steve Kirk

If you really need to, you can wrap one exception inside the other, e.g.

throw new ServletException(new UnavailableException("my unavaiable
message"));

and I think you'll find that the Tomcat error page (or your own custom error
page, if configured) will automatically strip the outer ServletException
layer off and report the underlying UnavailableException.

I think your problelm might be related to my previous post regarding a
similar issue with ServletException:
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]
he.org&msgNo=158528

I have also submitted a report to the JSR154 team as suggested by Yoav.  Let
me know if your problem is similar, and I'll add it to my report.

> -Original Message-
> From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
> Sent: Monday 25 October 2004 14:18
> To: Tomcat Users List
> Subject: RE: Where do UnavailableExceptions get reported?
> 
> 
> 
> Hi,
> UnavailableExceptions are a bit of an unusual beast in how they're
> handled by the server, especially when thrown by users.  Try throwing
> the exception type actually declared by the init method
> (ServletException) ;)
> 
> Yoav Shapira http://www.yoavshapira.com
>  
> 
> >-Original Message-
> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >Sent: Friday, October 22, 2004 6:44 PM
> >To: [EMAIL PROTECTED]
> >Subject: Where do UnavailableExceptions get reported?
> >
> >Hi all --
> >
> >   I just installed Tomcat, and created a servlet, and installed it.
> It
> >worked.
> > I then added an init() method, which also worked.  Finally, 
> I changed
> my
> >init
> >method to throw an "UnavailableException" if a configuration variable
> >wasn't
> >specified.
> >   Now, obviously, I get an "The requested resource (Servlet 
> hemlock is
> not
> >available) is not available" error.  But the message I 
> specified in the
> >exception I threw does not show up -- not in the logs, not when I
> reload
> >the
> >servlet in the manager, not on the page when I try to run 
> the servlet.
> I
> >searched all the available files in the Apache install directory, and
> it's
> >not
> >in any of them.  Where does it go?  If it disappears, what good is
> having
> >UnavailableExceptions being thrown?
> >
> >-- Chris
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> This e-mail, including any attachments, is a confidential 
> business communication, and may contain information that is 
> confidential, proprietary and/or privileged.  This e-mail is 
> intended only for the individual(s) to whom it is addressed, 
> and may not be saved, copied, printed, disclosed or used by 
> anyone else.  If you are not the(an) intended recipient, 
> please immediately delete this e-mail from your computer 
> system and notify the sender.  Thank you.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



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



RE: cookies problem with Tomcat 4.1.30

2004-10-25 Thread Steve Kirk
I haven't experience this myself, but as no-one else has responded yet, here
are some thoughts that come to mind in case they help :-)
 
Perhaps the session associated with cookie C1 has expired by the time that
Tomcat receives the request that contains C1?  Then, if your code uses
request.getSession(true), this might be creating a new session, and a new
cookie is returned for the new session (C2)?  Or is C2 a cookie that was
already in use by another user?
 
Is it possible that there is a cacheing server somewhere between browser and
tomcat that is returning cached pages from another browser when it
shouldn't?  This used to be a general HTTP security concern (rather than a
tomcat-specific issue), not sure if it's still a real issue or not
 
Do C1 and C2 definitely belong to different users?
Do C1 and C2 definitely belong to different PCs?
Could the same user be logged in more than once concurrently, from different
PCs or browsers?
 
Are you using any javascript code in the browser to read/write cookies, or
just relying on tomcat to handle cookies?
-Original Message-
From: Todor Todorov [mailto:[EMAIL PROTECTED] 
Sent: Sunday 24 October 2004 19:42
To: [EMAIL PROTECTED]
Subject: cookies problem with Tomcat 4.1.30


Hello there,
 
We experienced strange behavior with Tomcat under heavy load. 
 
Fairly simple JSP generates a page based on a persistent cookie,
unfortunately the browser receives someone else page. 
For example, browser B1 sends request with cookie C1, but receives page
based on cookie C2. 
 
Anyone with similar experience? Is it possible that Tomcat did not
initialize reused objects like Request or tag? What else is shared between
requests?
 
Unfortunately it's not reproducible even when we create artificial load, so
we could only guess for possible reasons.
 
Thanks in advance,
Todor


RE: [OFF-TOPIC] Validated Environment (FDA)

2004-10-25 Thread Kaiser, Paul
I haven't seen the paperwork but my understanding is that our web
infrastructure is validated. Environments include Tomcat 4 and 5 among other
things. 

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 21, 2004 10:25 AM
To: Tomcat Users List
Subject: [OFF-TOPIC] Validated Environment (FDA)



Hi,
Is anyone running Tomcat in a validated environment?  As in validated
for Biotech/pharma, CFR Part 11, GxP operations.  If so, I'm interested
in hearing from you, please send a note my way.  No details needed, just
that you've done it.

Yoav Shapira http://www.yoavshapira.com
 




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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




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

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



RE: Can Tomcat be configured to be an FTP Server?

2004-10-25 Thread Pawson, David
 

-Original Message-
From: Dov Rosenberg

If you need to include some logic with your FTP, you should 
really look at Kermit (I think it is from University of 
Chicago). It has the best command line interface around and 
is very capable and open source to boot. You could easily 
wrap a servlet around it if needed

Now there's a thought!
Has Kermit progressed from the 232+tty interface it had last time
I used  it :-)

Thanks.

DaveP.

-- 
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




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



RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?

2004-10-25 Thread Shapira, Yoav

Hi,
I use Oracle 9 with Tomcat 5, using DBCP, following the docs in the JNDI
DataSources how-to, no problem.  I use the ojdbc14.jar drivers, like
you, but the classes12 ones also work, albeit slower.  I haven't seen
the NPE you quote below.

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: spammemothers [mailto:[EMAIL PROTECTED] On Behalf Of
Adrian
>Harrison
>Sent: Saturday, October 23, 2004 12:28 PM
>To: [EMAIL PROTECTED]
>Subject: Does Oracle 9i thin jdbc driver work in Tomcat 5?
>
>using tomcat 5.0.28, oracle 9.2.1.0 on windows 2000 (sp4)
>
>having a nightmare here, upgraded from oracle 8i to 9i, downloaded &
>installed ojdbc14.jar file in Tomcat's common\lib directory.
>
>Now all I get when trying to create a connection pool is this exception
-
>
>2004-10-22 17:04:22 StandardContext[/PRD]action: null
>java.lang.NullPointerException
>   at
>org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnection
.jav
>a
>:151)
>   at
>org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnecti
on.j
>a
>va:95)
>   at
>org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(Poolabl
eCon
>n
>ectionFactory.java:301)
>   at
>org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(Basic
Data
>S
>ource.java:883)
>   at
>org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc
e.ja
>v
>a:851)
>etc...
>
>from my web.xml file -
>
>
> Oracle Datasource example
> PRDConnectionPool
> javax.sql.DataSource
> Container
>
>
>from my app xml file -
>
>   
> factory
> org.apache.commons.dbcp.BasicDataSourceFactory
>   
>   
> driverClassName
> oracle.jdbc.driver.OracleDriver
>   
>   
> url
> jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev91
>   
>
>Worked fine under 8.1i but now I've hit a brick wall with this one - is
it
>possible to get these to work together?
>
>Probably doing something really stupid, any ideas?
>
>many thanks
>
>harry
>




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Trouble deploying with manager app when war includes context.xml

2004-10-25 Thread Shapira, Yoav

Hi,
If you want the Manager webapp to use the context-specific XML file you
have to tell it, using the path and config params on the same deployment
URL.  This is covered in the Manager doc page,
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html,
under the heading Install using a Context configuration ".xml" file.

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: QM [mailto:[EMAIL PROTECTED]
>Sent: Friday, October 22, 2004 7:26 PM
>To: Tomcat Users List
>Subject: Re: Trouble deploying with manager app when war includes
>context.xml
>
>On Fri, Oct 22, 2004 at 04:18:30PM -0500, Robert Rasmussen wrote:
>: If I take the same war file and try to deploy it using the manager
>: webapp, the context.xml file in META-INF is ignored.  The manager
does
>: expand the war correctly in the webapps directory, and I can manually
>: move the context.xml to the correct place and the webapp runs.
>
>Do you remove the old context-specific XML file (from the WAR
>deployment) first?  Tomcat doesn't remove the file if it already
exists,
>even if it predates the WAR file's context.xml.
>
>-QM
>
>--
>
>software  -- http://www.brandxdev.net
>tech news -- http://www.RoarNetworX.com
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Configuration Management, JSP Recompiles, War Files

2004-10-25 Thread Shapira, Yoav

Hi,

> If I understand correctly, WAR file is just a glorified JAR file,
>which in turn is just a glorified tar file.  So unless you're
>unjarring it, editing the config file and rejarring it, you can't
>really muck with the config settings inside it.  How/where do people
>normally keep the configuration variables for the webapp?

You might want to read up the Servlet Spec's section on resource-ref and
env-entry refs.  These provide a way for you to keep one WAR and edit
server.xml (or another server-specific, outside-your-WAR configuration
file) to modify configuration information.  Your understanding above is
incomplete.

Yoav



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Where do UnavailableExceptions get reported?

2004-10-25 Thread Shapira, Yoav

Hi,
UnavailableExceptions are a bit of an unusual beast in how they're
handled by the server, especially when thrown by users.  Try throwing
the exception type actually declared by the init method
(ServletException) ;)

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Sent: Friday, October 22, 2004 6:44 PM
>To: [EMAIL PROTECTED]
>Subject: Where do UnavailableExceptions get reported?
>
>Hi all --
>
>   I just installed Tomcat, and created a servlet, and installed it.
It
>worked.
> I then added an init() method, which also worked.  Finally, I changed
my
>init
>method to throw an "UnavailableException" if a configuration variable
>wasn't
>specified.
>   Now, obviously, I get an "The requested resource (Servlet hemlock is
not
>available) is not available" error.  But the message I specified in the
>exception I threw does not show up -- not in the logs, not when I
reload
>the
>servlet in the manager, not on the page when I try to run the servlet.
I
>searched all the available files in the Apache install directory, and
it's
>not
>in any of them.  Where does it go?  If it disappears, what good is
having
>UnavailableExceptions being thrown?
>
>-- Chris
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: discussion on webapp reload in production environments

2004-10-25 Thread Allistair Crossley
Ok, understood. Thanks for taking the time to explain.

Allistair.

> -Original Message-
> From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
> Sent: 25 October 2004 14:08
> To: Tomcat Users List
> Subject: RE: discussion on webapp reload in production environments
> 
> 
> 
> Hi,
> Yeah.  Webapp reload is a great thought and sometimes possible to do
> in-place in true-hotswap fashion.  Unfortunately in the real 
> world there
> are several factors which prevent this from really happening.  They
> include:
> 
> Libraries that use static resources in such a way they can't be
> reloaded.  Libraries that use System resources (as in System
> classloader) in such a way they can't be reloaded.  Libraries 
> that spawn
> off their own threads and don't manage them properly.  These 
> things can
> be hard to track, and can be in your code, the library code, 
> or the way
> your code uses the library.  This is exemplified in Bugzilla 26372.
> 
> Another reason is that real apps frequently do a lot of things on
> startup (and sometimes shutdown).  So the reload even if it worked
> perfectly would take an unacceptable amount of time.  So sites that
> really can't afford downtime don't do in-place reloading.  They have
> either a server cluster where they update server at a time, taking it
> off the cluster for the update instead of doing an in-memory 
> reload, or
> they much with context paths, e.g. /appv1, /appv2, and /app with /app
> being just forwarding filter.  Both of these approaches have been
> explained and successfully used on this list in the past.  There are
> other approaches as well when you throw other pieces into the 
> mix, such
> as Apache, Squid, etc.
> 
> So I'm sure there are people out there doing webapp reload 
> in-memory in
> true hotswap fashion, and that's great for them.  But I think they're
> the minority and that the state of the industry right now means it's
> extremely difficult to do it perfectly.  Most of things the container
> can't solve for you.  And that's why we take the approach of 
> addressing
> the issues that are shown conclusively to be Tomcat bugs, and not
> jumping through hoops to cover faults created by other libraries,
> because that ultimately reduces the maintainability, speed, 
> and quality
> of Tomcat itself.
> 
> By the way, these arguments are not Tomcat-specific (except 
> for the last
> sentence above obviously ;)).  I've had the same experience 
> with the $$$
> servers I use.  In-memory webapp reload is a good goal, great 
> marketing,
> and sometimes works well in real life, but not that often.  YMMV.
> 
> Yoav Shapira http://www.yoavshapira.com
>  
> 
> >-Original Message-
> >From: Allistair Crossley [mailto:[EMAIL PROTECTED]
> >Sent: Monday, October 25, 2004 4:34 AM
> >To: [EMAIL PROTECTED]
> >Subject: discussion on webapp reload in production environments
> >
> >Hi,
> >
> >Yoav, you suggested we should pick up this thread here in the list
> rather
> >than the bugzilla report at
> >http://issues.apache.org/bugzilla/show_bug.cgi?id=26372
> >
> >I have copied the last 4 replies for any interested parties to start
> >following this thread.
> >
> >I look forward to hearing the position on webapp reloading 
> in terms of
> >desirable behaviour and the specification when you have time 
> to do so.
> >
> >All the best, Allistair.
> >
> >YOAV
> >I'd point out it's only 'dying' when you're trying the
> >app reload, nor normal usage.  This feature is not mandated 
> by the Spec
> so
> >we're not obliged to provided it in the first place: it's 
> caused mostly
> >trouble
> >and has very limited usage in production environments.  So 
> if you have
> >patches
> >for it, that's great, but the common usage scenario for 
> Tomcat doesn't
> >include
> >webapp reload, and so doesn't suffer from this issue at all.
> >
> >ME
> >I am interested in your comment that reload of webapp is 
> mostly trouble
> and
> >limited in production environments though. My understanding 
> was that if
> you
> >want to make a build to production or a patch of some files, 
> you would
> use
> >ant
> >or similar as we do here to reconstruct the WAR to deploy. Does this
> not
> >require tomcat being able to reload? In fact, we tell the 
> business the
> >intranet
> >will be down for 5 minutes and post a message page up for inbound
> requests.
> >We
> >stop tomcat, delete the old war and expanded war files and place the
> new
> >war
> >and startup tomcat again. We constantly get irked by the 
> fact that if a
> bug
> >is
> >on production we have to wait until the evening to patch it 
> whereas our
> ASP
> >coutnerparts can so easily hot-patch. We also use JSP 
> precompilation to
> >improve
> >performance so it's not so easy to patch JSPs either.
> >
> >REMY
> >I hope hot deployment and redeployment is a reality. 
> However, there are
> >issues
> >when the webapp tries to interact with some services which reside in
> the
> >system
> >classloader (logging here). Packaging webapps a litt

RE: Race condition in session handling?

2004-10-25 Thread Shapira, Yoav

Hi,
Please try a stable version like 5.0.28, and if it still happens, post a
WAR we can use to reproduce the issue.

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Ronald Klop [mailto:[EMAIL PROTECTED]
>Sent: Monday, October 25, 2004 5:42 AM
>To: [EMAIL PROTECTED]
>Subject: Race condition in session handling?
>
>Hello, I get this stacktrace when using Tomcat 5.0.25, Java 1.4.2 on
Linux.
>
>java.util.NoSuchElementException
> java.util.HashMap$HashIterator.nextEntry(HashMap.java:785)
> java.util.HashMap$KeyIterator.next(HashMap.java:818)
> java.util.AbstractCollection.toArray(AbstractCollection.java:174)
>
>org.apache.catalina.session.StandardSession.keys(StandardSession.java:1
523)
>
>org.apache.catalina.session.StandardSession.expire(StandardSession.java
:706
>)
>
>org.apache.catalina.session.StandardSession.expire(StandardSession.java
:632
>)
>
>org.apache.catalina.session.StandardSession.invalidate(StandardSession.
java
>:1051)
>
>org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSe
ssio
>nFacade.java:149)
> nl.base.servlets.Login.processRequest(Login.java:100)
> nl.base.servlets.Login.doGet(Login.java:81)
> nl.base.servlets.Login.doPost(Login.java:114)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>
>
>It is probably caused by my code in which the login screen and logout
>action are conflicting, but I would expect to get this exception from
>Tomcat.
>
>Any thoughts?
>
>Ronald.



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: discussion on webapp reload in production environments

2004-10-25 Thread Shapira, Yoav

Hi,
Yeah.  Webapp reload is a great thought and sometimes possible to do
in-place in true-hotswap fashion.  Unfortunately in the real world there
are several factors which prevent this from really happening.  They
include:

Libraries that use static resources in such a way they can't be
reloaded.  Libraries that use System resources (as in System
classloader) in such a way they can't be reloaded.  Libraries that spawn
off their own threads and don't manage them properly.  These things can
be hard to track, and can be in your code, the library code, or the way
your code uses the library.  This is exemplified in Bugzilla 26372.

Another reason is that real apps frequently do a lot of things on
startup (and sometimes shutdown).  So the reload even if it worked
perfectly would take an unacceptable amount of time.  So sites that
really can't afford downtime don't do in-place reloading.  They have
either a server cluster where they update server at a time, taking it
off the cluster for the update instead of doing an in-memory reload, or
they much with context paths, e.g. /appv1, /appv2, and /app with /app
being just forwarding filter.  Both of these approaches have been
explained and successfully used on this list in the past.  There are
other approaches as well when you throw other pieces into the mix, such
as Apache, Squid, etc.

So I'm sure there are people out there doing webapp reload in-memory in
true hotswap fashion, and that's great for them.  But I think they're
the minority and that the state of the industry right now means it's
extremely difficult to do it perfectly.  Most of things the container
can't solve for you.  And that's why we take the approach of addressing
the issues that are shown conclusively to be Tomcat bugs, and not
jumping through hoops to cover faults created by other libraries,
because that ultimately reduces the maintainability, speed, and quality
of Tomcat itself.

By the way, these arguments are not Tomcat-specific (except for the last
sentence above obviously ;)).  I've had the same experience with the $$$
servers I use.  In-memory webapp reload is a good goal, great marketing,
and sometimes works well in real life, but not that often.  YMMV.

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Allistair Crossley [mailto:[EMAIL PROTECTED]
>Sent: Monday, October 25, 2004 4:34 AM
>To: [EMAIL PROTECTED]
>Subject: discussion on webapp reload in production environments
>
>Hi,
>
>Yoav, you suggested we should pick up this thread here in the list
rather
>than the bugzilla report at
>http://issues.apache.org/bugzilla/show_bug.cgi?id=26372
>
>I have copied the last 4 replies for any interested parties to start
>following this thread.
>
>I look forward to hearing the position on webapp reloading in terms of
>desirable behaviour and the specification when you have time to do so.
>
>All the best, Allistair.
>
>YOAV
>I'd point out it's only 'dying' when you're trying the
>app reload, nor normal usage.  This feature is not mandated by the Spec
so
>we're not obliged to provided it in the first place: it's caused mostly
>trouble
>and has very limited usage in production environments.  So if you have
>patches
>for it, that's great, but the common usage scenario for Tomcat doesn't
>include
>webapp reload, and so doesn't suffer from this issue at all.
>
>ME
>I am interested in your comment that reload of webapp is mostly trouble
and
>limited in production environments though. My understanding was that if
you
>want to make a build to production or a patch of some files, you would
use
>ant
>or similar as we do here to reconstruct the WAR to deploy. Does this
not
>require tomcat being able to reload? In fact, we tell the business the
>intranet
>will be down for 5 minutes and post a message page up for inbound
requests.
>We
>stop tomcat, delete the old war and expanded war files and place the
new
>war
>and startup tomcat again. We constantly get irked by the fact that if a
bug
>is
>on production we have to wait until the evening to patch it whereas our
ASP
>coutnerparts can so easily hot-patch. We also use JSP precompilation to
>improve
>performance so it's not so easy to patch JSPs either.
>
>REMY
>I hope hot deployment and redeployment is a reality. However, there are
>issues
>when the webapp tries to interact with some services which reside in
the
>system
>classloader (logging here). Packaging webapps a little differently
could
>solve
>the problems for now.
>
>YOAV
>Allistair, I'll be glad to continue this discussion on the mailing list
and
>try
>and explain why I think reloading an app in-place has only limited
usage in
>production environments.  This (Bugzilla) is not the right forum for
>discussions.
>
>
>
>---
>QAS Ltd.
>Developers of QuickAddress Software
>http://www.qas.com";>www.qas.com
>Registered in England: No 2582055
>Registered in Australia: No 082 851 474
>-

RE: [Slightly OT] coercing AWT/image libraries to release resources

2004-10-25 Thread Shapira, Yoav

Hi,
A profiler would show you what references are being kept, so that might
be helpful in knowing what to flush (assuming it's possible at all --
not a trivial assumption with AWT).  In any case, so what if the
ImageIcon takes 30MB?

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Robert Hunt [mailto:[EMAIL PROTECTED]
>Sent: Saturday, October 23, 2004 9:35 AM
>To: [EMAIL PROTECTED]
>Subject: [Slightly OT] coercing AWT/image libraries to release
resources
>
>I've got a servlet that produces thumbnail images on-the-fly (using TC
>5.0.25, JDK 1.4.2).  Once the servlet becomes active, it gobbles about
30mb
>per servlet/instance.  I've gone through and tried to apply as many
>flush()/dispose()/gc()/etc. methods as I could find, but still, the
memory
>remains allocated.  Has anyone found a way to coerce the AWT (or
>appropriate
>Java imaging class) into releasing the memory?
>
>
>
>The code (from doGet( request, response) method):
>
>ImageIcon imgIcon = null;
>Image img = null;
>try {
>imgIcon = new ImageIcon( jpegFile );// this is the
point at
>which memory swells to like 30mb.
>}
>catch ( Exception e )
>{
>e.printStackTrace();
>response.sendError( HttpServletResponse.SC_NOT_FOUND,
>filename );
>}
>img = imgIcon.getImage();
>imgIcon = null;
>
>
>// Determine the scale.
>double scale = Math.min( (double) h / (double) img.getHeight(
null
>)
>   , (double) w / (double) img.getWidth(
null )
>   );
>
>
>// Determine size of new image.
>int scaledW = (int)( scale * img.getWidth( null ) );
>int scaledH = (int)( scale * img.getHeight( null ) );
>
>BufferedImage thumb = new BufferedImage( scaledW, scaledH,
>BufferedImage.TYPE_INT_RGB );
>
>// Set the scale.
>AffineTransform tx = new AffineTransform();
>if ( scale < 1.0d ) tx.scale( scale, scale );
>
>// Paint image.
>Graphics2D g2d = thumb.createGraphics();
>g2d.drawImage( img, tx, null );
>g2d.dispose();
>g2d = null;
>
>img.flush();
>img = null;
>
>OutputStream out = response.getOutputStream();
>ImageIO.write( thumb, ext, out );
>
>thumb.flush();
>thumb = null;
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: AW: Session Definition Bug?

2004-10-25 Thread Shapira, Yoav

Hi,
Another WORKSFORME on my end ;)

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Steffen Heil [mailto:[EMAIL PROTECTED]
>Sent: Monday, October 25, 2004 5:36 AM
>To: 'Tomcat Users List'
>Subject: AW: AW: Session Definition Bug?
>
>Hi
>
>> I'm using the firefox browser and have no proxy definitions.
>
>First try another browser.
>Then, maybe your tomcat is configured to use cookies as session ids and
>your
>browser is configured not to accept cookies?
>
>However, since there is no different code for local and remote clients,
I
>cannot believe this were a bug in tomcat.
>
>Regards,
>  Steffen



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Multiple Hosts, multiple Root apps, path="/" -- Is it possible?

2004-10-25 Thread Shapira, Yoav

Hi,
The path for the "root" webapp is "", not "/".  Yes, if the separate
hosts have different names, each can have a webapp at path "".  It would
be http://x.y.com, http://y.y.com, http://z.y.com, etc.

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Brendan Colthurst [mailto:[EMAIL PROTECTED]
>Sent: Saturday, October 23, 2004 5:37 PM
>To: 'Tomcat Users List'
>Subject: Multiple Hosts, multiple Root apps, path="/" -- Is it
possible?
>
>
>Can I setup my server.xml to have multiple "root" webapps, each with
>path="/" in its Context tag, if I use multiple Host descriptors?
>
>Has anyone done this who could share some server.xml configuration
code?
>
>I mostly want to do this so that my session cookies don't have to have
the
>webapp name in them...
>
>Thanks,
>Brendan
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Does Oracle 9i thin jdbc driver work in Tomcat 5?

2004-10-25 Thread Ben Souther
On Mon, 2004-10-25 at 08:21, Ben Souther wrote:
> I believe (and I'm sure I'll be corrected if I'm wrong), the drivers
> need to go into commmon/lib so that the container can access them.
If you're having Tomcat manage your connection pool, that is..
> 
> 
> On Mon, 2004-10-25 at 08:13, Dov Rosenberg wrote:
> > I have successfully used Oracle 9 with JBoss, Jrun, and Tomcat. I don't
> > remember any specific differences between the JNDI configurations. Make sure
> > that you have the classes12.jar, nls_charset12.jar files in your runtime
> > classpath, i.e. /WEB-INF/lib or somewhere else.
> > 
> > The driver class is oracle.jdbc.OracleDriver
> > The URL format is: jdbc:oracle:thin:@::
> > 
> > In your code you need to create an instance of the Oracle connection pool
> > class.
> > 
> > I think Oracle10g renamed the jar files to something like ojdbc14.jar.
> > 
> > HTH
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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



Re: Does Oracle 9i thin jdbc driver work in Tomcat 5?

2004-10-25 Thread Ben Souther
I believe (and I'm sure I'll be corrected if I'm wrong), the drivers
need to go into commmon/lib so that the container can access them.


On Mon, 2004-10-25 at 08:13, Dov Rosenberg wrote:
> I have successfully used Oracle 9 with JBoss, Jrun, and Tomcat. I don't
> remember any specific differences between the JNDI configurations. Make sure
> that you have the classes12.jar, nls_charset12.jar files in your runtime
> classpath, i.e. /WEB-INF/lib or somewhere else.
> 
> The driver class is oracle.jdbc.OracleDriver
> The URL format is: jdbc:oracle:thin:@::
> 
> In your code you need to create an instance of the Oracle connection pool
> class.
> 
> I think Oracle10g renamed the jar files to something like ojdbc14.jar.
> 
> HTH


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



Re: Can Tomcat be configured to be an FTP Server?

2004-10-25 Thread Dov Rosenberg
If you need to include some logic with your FTP, you should really look at
Kermit (I think it is from University of Chicago). It has the best command
line interface around and is very capable and open source to boot. You could
easily wrap a servlet around it if needed


-- 
Dov Rosenberg
Conviveon Corporation
http://www.conviveon.com



On 10/25/04 3:52 AM, "Pawson, David" <[EMAIL PROTECTED]> wrote:

> 
> 
>   -Original Message-
>   From: Cees van de Griend
 Is it possible to configure Tomcat as an FTP Server?
>>> 
>>> No.
>>> 
>>> Tomcat is a HTTP server, not a FTP server: different
>   port numbers, 
>>> different commands, different kind of application.
>   
>   
>   
>   Yes, in theory you are right, but practical you have to
>   write a ServletContainer which is FTP aware; not a simple
>   task as FTP is not a simple protocol.
>   
>   Take a look at a new Apache project: FtpServer at
>   http://incubator.apache.org/projects/ftpserver/.
>   
>   What are you trying to do?
> 
> I've a similar need, but it would be helpful if I could hand off
> uploads/downloads to an ftpserver.
> 
> My concern is timeouts with large file transfers, which I believe
> ftp to be better suited?
> 
> It may not be very common, but I guess this is not unusual.
> 
> 
> regards DaveP
> 
> 
> ** snip here **
> 
> 
> 
> 
> 
> 



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



Re: Does Oracle 9i thin jdbc driver work in Tomcat 5?

2004-10-25 Thread Dov Rosenberg
I have successfully used Oracle 9 with JBoss, Jrun, and Tomcat. I don't
remember any specific differences between the JNDI configurations. Make sure
that you have the classes12.jar, nls_charset12.jar files in your runtime
classpath, i.e. /WEB-INF/lib or somewhere else.

The driver class is oracle.jdbc.OracleDriver
The URL format is: jdbc:oracle:thin:@::

In your code you need to create an instance of the Oracle connection pool
class.

I think Oracle10g renamed the jar files to something like ojdbc14.jar.

HTH

-- 
Dov Rosenberg
Conviveon Corporation
http://www.conviveon.com


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



Re: Configuration Management, JSP Recompiles, War Files

2004-10-25 Thread QM
On Mon, Oct 25, 2004 at 12:28:27PM +0100, Allistair Crossley wrote:
: your suggestion is precisely what we do here, but it still leads to 5 minutes
: downtime (web server "nice maintenance page", removing old war, unpacking new
: war takes time).

I guess my clients have always listed this as a far-off want, not a hard
need. =)  They feel that regular, scheduled webapp outages are a
necessity.


: do any application servers support "hot deploying" if that is correct term,
: i.e user requests are served by the older webapp until the new webapp is
: ready?

IIRC BEA WebLogic 8.x (or was that 7.x?) has such a concept: it will
load a setup a new webapp, then "flip the switch" when you say so.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



RE: Configuration Management, JSP Recompiles, War Files

2004-10-25 Thread Allistair Crossley
your suggestion is precisely what we do here, but it still leads to 5 minutes downtime 
(web server "nice maintenance page", removing old war, unpacking new war takes time). 

do any application servers support "hot deploying" if that is correct term, i.e user 
requests are served by the older webapp until the new webapp is ready?

> -Original Message-
> From: QM [mailto:[EMAIL PROTECTED]
> Sent: 25 October 2004 12:18
> To: Tomcat Users List; [EMAIL PROTECTED]
> Subject: Re: Configuration Management, JSP Recompiles, War Files
> 
> 
> On Sun, Oct 24, 2004 at 11:00:38PM -0400, Steven J. Owens wrote:
> :  I'm interested in hearing how people are dealing with
> : configuration management issues.
> : 
> :  We've been running into some problems with JSP recompiles,
> : particularly when the changed JSP is an included JSP.
> : [snip]
> 
> Simplify your life: rely on formal releases instead of updating
> piecemeal (e.g. tweaking a JSP on a live site).
> 
> In theory, you should be able to automate the following:
> 1/ pull a release label from source code control
> 2/ build the code, package it up into a WAR file (this includes JSP
> precompiles)
> 3/ push the new WAR out to your Tomcat server(s)
> 4/ stop Tomcat, clear the work dir, restart Tomcat
> 
> For rollback purposes, you'll want a step 3.5: stash the original WAR
> file somewhere.
> 
> 
> :  This reminds me of another question; I'm beginning to wonder if
> : we wouldn't be wiser to use a dozen separate tomcat installations.
> 
> I'm all for app separation.  Even if they stay the same/similar for
> their entire lifetime, management of separate apps is easier.  Either
> that, or find some way to deploy a single app but use 
> creative branding
> so each customer gets their own look'n'feel.
> 
> 
> : I
> : know that in theory using the same tomcat installation for multiple
> : webapps is supposed to be "standard",
> 
> Says who?
> 
> 
> 
> -QM
> 
> -- 
> 
> software  -- http://www.brandxdev.net
> tech news -- http://www.RoarNetworX.com
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?

2004-10-25 Thread spammemothers
Sorry to go on but I'm completely stumped, has anyone come across this
problem using Oracle 9 with tomcat 5?

-Original Message-
From: Dale, Matt [mailto:[EMAIL PROTECTED] 
Sent: 24 October 2004 12:17
To: Tomcat Users List
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?



I'm fairly sure that there are people using it but you may have to wait
until it's not the weekend for you get an answer.

-Original Message-
From: spammemothers [mailto:[EMAIL PROTECTED]
Sent: 24 October 2004 12:13
To: 'Tomcat Users List'
Subject: RE: Does Oracle 9i thin jdbc driver work in Tomcat 5?


Please is anyone using Oracle 9 with tomcat 5? - I've really hit a brick
wall here & still have no idea if it's my fault or it just doesn't work!

I just want to setup a connection pool of Oracle 9 thin JDBC connections!

Thanks

harry

-Original Message-
From: spammemothers [mailto:[EMAIL PROTECTED] On Behalf Of Adrian
Harrison
Sent: 23 October 2004 17:28
To: [EMAIL PROTECTED]
Subject: Does Oracle 9i thin jdbc driver work in Tomcat 5?


using tomcat 5.0.28, oracle 9.2.1.0 on windows 2000 (sp4)

having a nightmare here, upgraded from oracle 8i to 9i, downloaded &
installed ojdbc14.jar file in Tomcat's common\lib directory.

Now all I get when trying to create a connection pool is this exception -

2004-10-22 17:04:22 StandardContext[/PRD]action: null
java.lang.NullPointerException
   at
org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnection.java
:151)
   at
org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnection.ja
va:95)
   at
org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(PoolableConn
ectionFactory.java:301)
   at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataS
ource.java:883)
   at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:851)
etc...

from my web.xml file -


 Oracle Datasource example
PRDConnectionPool
 javax.sql.DataSource
 Container


from my app xml file -

   
 factory
 org.apache.commons.dbcp.BasicDataSourceFactory
   
   
 driverClassName
 oracle.jdbc.driver.OracleDriver
   
   
 url
 jdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev91
   

Worked fine under 8.1i but now I've hit a brick wall with this one - is it
possible to get these to work together?

Probably doing something really stupid, any ideas?

many thanks

harry





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




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



Re: Securing directory: httpd vs tomcat configuration

2004-10-25 Thread QM
On Mon, Oct 25, 2004 at 10:11:43AM +0100, Mark Benussi wrote:
: Hi I need to secure two directories with a user name and password prompt. 
: Just one is fine at the moment. I know I can do this using httpd but I was 
: wondering if there was a better solution for Tomcat (5), i.e. by 
: configuring something in the server config or web.xml. If anyone has a 
: solution I would be really appreciative.

1/ Search the archives (or check a book on J2EE/servlets, or read the
servlet spec...).  This question comes up frequently.  Here's a hint:
""

2/ Please post a *new* message when writing to the list.  Replying to
an old (unrelated) message confuses thread-aware mailers, which makes
your question harder to find (and thus answer).

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Sv: Webapp don't start after shutdown

2004-10-25 Thread QM
On Mon, Oct 25, 2004 at 09:10:41AM +0200, Roland Carlsson wrote:
: I found out why tomcat is using the path of my workstation instead of the
: server as context path. It is a feature of Netbeans to put a file in the
: Manifest-folder of the webapp with the path to the files and contextpath.

"feature"

;)

-QM


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Configuration Management, JSP Recompiles, War Files

2004-10-25 Thread QM
On Sun, Oct 24, 2004 at 11:00:38PM -0400, Steven J. Owens wrote:
:  I'm interested in hearing how people are dealing with
: configuration management issues.
: 
:  We've been running into some problems with JSP recompiles,
: particularly when the changed JSP is an included JSP.
: [snip]

Simplify your life: rely on formal releases instead of updating
piecemeal (e.g. tweaking a JSP on a live site).

In theory, you should be able to automate the following:
1/ pull a release label from source code control
2/ build the code, package it up into a WAR file (this includes JSP
precompiles)
3/ push the new WAR out to your Tomcat server(s)
4/ stop Tomcat, clear the work dir, restart Tomcat

For rollback purposes, you'll want a step 3.5: stash the original WAR
file somewhere.


:  This reminds me of another question; I'm beginning to wonder if
: we wouldn't be wiser to use a dozen separate tomcat installations.

I'm all for app separation.  Even if they stay the same/similar for
their entire lifetime, management of separate apps is easier.  Either
that, or find some way to deploy a single app but use creative branding
so each customer gets their own look'n'feel.


: I
: know that in theory using the same tomcat installation for multiple
: webapps is supposed to be "standard",

Says who?



-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Configuration Management, JSP Recompiles, War Files

2004-10-25 Thread Tim Funk
I try to precompile my jsp's, copy all the precompiled JSP's into a JAR file, 
then delete all the JSP's. Less stuff to deploy. No surprises with respect to 
caching, or missing compiles, or broken JSP's making it to production.

-Tim
Steven J. Owens wrote:
Hi folks,
 I'm interested in hearing how people are dealing with
configuration management issues.
 We've been running into some problems with JSP recompiles,
particularly when the changed JSP is an included JSP.  Tomcat seems to
sort of get stuck on the old version, even if we restart tomcat it
doesn't reload.  Manually deleting the foo_jsp.java and foo_jsp.class
files from the tomcat/working/etc directory and *then* restarting
seems to do the trick.
 Somebody I talked to suggested that using a WAR file and
redeploying would make tomcat more reliably recompile the JSPs.
I've been meaning to move to using WAR files sooner or later, but
one question has always bugged me - how do you save your
deployment-specific configuration info?  

 If I understand correctly, WAR file is just a glorified JAR file,
which in turn is just a glorified tar file.  So unless you're
unjarring it, editing the config file and rejarring it, you can't
really muck with the config settings inside it.  How/where do people
normally keep the configuration variables for the webapp?
 We have a single tomcat installation with a dozen
almost-identical webapps, one webapp for each customer.  When we do
our jobs right, each app is in fact identical, except for:
- two colors in the app-wide CSS stylesheet
- the customer's logo image
- the  tags in server.xml
- a few details of the web.xml file (webapp name, database resource name)
- a properties file with a couple dozen configuration properties
- a separate database in the mysql server
 We extend and refine the application constantly, so we're
changing the code every month or two.  So far we've been using cvs to
manage this.  Each webapp is a cvs checkout ; the specific files
mentioned above exist in template form in the checkout
(e.g. web_template.xml, styles_template.css) that we copy into the
right name for deployment and then edit, so they don't get overwritten
by cvs.
 Using cvs worked pretty well for a while, but it's gotten
unwieldly, especially when we run into the JSP recompiling problem,
because then we have to restart the entire server to try to get it to
recompile the jsp.
 This reminds me of another question; I'm beginning to wonder if
we wouldn't be wiser to use a dozen separate tomcat installations.  I
know that in theory using the same tomcat installation for multiple
webapps is supposed to be "standard", but any time we have to tweak
the server.xml-level configuration of a single webapp, we have to
restart all of them.  How do people normally deal with this?  Is it
at all common to run multiple tomcat servers behind apache for this
sort of purpose?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: AW: AW: Session Definition Bug?

2004-10-25 Thread Ben Souther
There is a plugin to Mozilla/Firefox that allows you to watch your
headers:
http://livehttpheaders.mozdev.org/

With that installed, you will be able to see if the browser is sending
back session IDs properly.

BTW: I use Mozilla and Firefox and have never had this problem.




On Mon, 2004-10-25 at 05:35, Steffen Heil wrote:
> Hi
> 
> > I'm using the firefox browser and have no proxy definitions.
> 
> First try another browser.
> Then, maybe your tomcat is configured to use cookies as session ids and your
> browser is configured not to accept cookies?
> 
> However, since there is no different code for local and remote clients, I
> cannot believe this were a bug in tomcat.
> 
> Regards,
>   Steffen


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



Race condition in session handling?

2004-10-25 Thread Ronald Klop
Hello, I get this stacktrace when using Tomcat 5.0.25, Java 1.4.2 on Linux.
java.util.NoSuchElementException
java.util.HashMap$HashIterator.nextEntry(HashMap.java:785)
java.util.HashMap$KeyIterator.next(HashMap.java:818)
java.util.AbstractCollection.toArray(AbstractCollection.java:174)
org.apache.catalina.session.StandardSession.keys(StandardSession.java:1523)
org.apache.catalina.session.StandardSession.expire(StandardSession.java:706)
org.apache.catalina.session.StandardSession.expire(StandardSession.java:632)
org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1051)
org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:149)
nl.base.servlets.Login.processRequest(Login.java:100)
nl.base.servlets.Login.doGet(Login.java:81)
nl.base.servlets.Login.doPost(Login.java:114)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
It is probably caused by my code in which the login screen and logout action are 
conflicting, but I would expect to get this exception from Tomcat.
Any thoughts?
Ronald.


catalina.policy and default settings for web applications

2004-10-25 Thread Thomas Zumbrunn
I'm running Tomcat 4.1.31 with SecurityManager and tried to understand the 
default settings for web applications in conf/catalina.policy.

Lines 83-91:
[...]
// These permissions are granted by default to all web applications
// In addition, a web application will be given a read FilePermission
// and JndiPermission for all files and directories in its document root.
grant { 
  // Required for JNDI lookup of named JDBC DataSource's and
  // javamail named MimePart DataSource used to send mail
  permission java.util.PropertyPermission "java.home", "read";
  permission java.util.PropertyPermission "java.naming.*", "read";
  permission java.util.PropertyPermission "javax.sql.*", "read";
[...]

As far as I understood the comments, I thought this would allow me to specify 
JDBC DataSources and mail sessions as Resources in my context and then make 
use of them in my servlets with

Context initContext = new InitialContext();
Context envContext  = (Context) initContext.lookup("java:comp/env");
DataSource dataSource = (DataSource) envContext.lookup("jdbc/foo");

and

Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
Session session = (Session) envCtx.lookup("mail/Session");

respectively. However, I had to add additional permissions to catalina.policy 
to make the servlets work:

grant codeBase "file:/path/to/my/webapp/WEB-INF/classes/-" {
  permission java.net.SocketPermission "mysqlserver:3306","connect,resolve";
  permission java.util.PropertyPermission "javax.mail.Session.Factory","read";
  permission java.net.SocketPermission "mysmtpserver:25","connect,resolve";
};

Is there a more elegant way to achieve the same result (e.g. without changing 
catalina.policy)? Any advice is very much appreciated.

Cheers
Thomas Zumbrunn


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



AW: AW: Session Definition Bug?

2004-10-25 Thread Steffen Heil
Hi

> I'm using the firefox browser and have no proxy definitions.

First try another browser.
Then, maybe your tomcat is configured to use cookies as session ids and your
browser is configured not to accept cookies?

However, since there is no different code for local and remote clients, I
cannot believe this were a bug in tomcat.

Regards,
  Steffen


smime.p7s
Description: S/MIME cryptographic signature


Securing directory: httpd vs tomcat configuration

2004-10-25 Thread Mark Benussi
Hi I need to secure two directories with a user name and password prompt. 
Just one is fine at the moment. I know I can do this using httpd but I was 
wondering if there was a better solution for Tomcat (5), i.e. by configuring 
something in the server config or web.xml. If anyone has a solution I would 
be really appreciative.

Thanks.
Mark 

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


RE: error while starting Tomcat5 service

2004-10-25 Thread Allistair Crossley
I thought you had to have Tomcat 5.5 with JDK 5.0. If you are using Tomcat 5.0 there 
is a compatibility download that should be installed. 

If that is not your problem, try uninstalling the service and use the 
tomcat/bin/service.bat install method.

Allistair.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: 25 October 2004 09:45
> To: [EMAIL PROTECTED]
> Subject: RE: error while starting Tomcat5 service
> 
> 
> Hi,
> I'm still waiting for ur reply.
> Please reply me
> 
> -Original Message-
> From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
> Sent: Monday, October 18, 2004 6:36 PM
> To: Tomcat Users List
> Subject: RE: error while starting Tomcat5 service
> 
> 
> Hi,
> HTML emails don't work on ASF lists (in general), so we can't see your
> image.  If there's a full error with stack trace in any of 
> your logs, post
> that.
> 
> I worked with EMC for a few months about seven years ago.  ;) 
>  Though not in
> India, but in their HQ here outside Boston.  Good company, 
> was some wicked
> cool hardware reliability stuff at the time.
> 
> Yoav Shapira http://www.yoavshapira.com
>  
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Monday, October 18, 2004 6:44 AM
> To: [EMAIL PROTECTED]
> Subject: error while starting Tomcat5 service
> 
> Hi,
> I have installed Tomcat5.0 on Windows XP professional with 
> Sun's JDK 1.5
> I'm getting the following error dialog box while starting the 
> tomcat 5.0
> service.
> <> 
> "It says the specified service doesn't exist as an installed 
> service. Unable
> to open Tomcat5"
> With best regards:
> Ashutosh Sharma
>  
> EMC Data Storage Systems (India) Private Limited 
> No. 12, Subramanya Arcade, Tower B,Bannerghatta Road, 
> Bangalore - 560 076.
> Tel. +91-80-26788930 x 6296
>  
> 
> 
> 
> This e-mail, including any attachments, is a confidential business
> communication, and may contain information that is 
> confidential, proprietary
> and/or privileged.  This e-mail is intended only for the 
> individual(s) to
> whom it is addressed, and may not be saved, copied, printed, 
> disclosed or
> used by anyone else.  If you are not the(an) intended 
> recipient, please
> immediately delete this e-mail from your computer system and 
> notify the
> sender.  Thank you.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



RE: error while starting Tomcat5 service

2004-10-25 Thread Sharma_Ashutosh
Hi,
I'm still waiting for ur reply.
Please reply me

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 18, 2004 6:36 PM
To: Tomcat Users List
Subject: RE: error while starting Tomcat5 service


Hi,
HTML emails don't work on ASF lists (in general), so we can't see your
image.  If there's a full error with stack trace in any of your logs, post
that.

I worked with EMC for a few months about seven years ago.  ;)  Though not in
India, but in their HQ here outside Boston.  Good company, was some wicked
cool hardware reliability stuff at the time.

Yoav Shapira http://www.yoavshapira.com
 
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 18, 2004 6:44 AM
To: [EMAIL PROTECTED]
Subject: error while starting Tomcat5 service

Hi,
I have installed Tomcat5.0 on Windows XP professional with Sun's JDK 1.5
I'm getting the following error dialog box while starting the tomcat 5.0
service.
<> 
"It says the specified service doesn't exist as an installed service. Unable
to open Tomcat5"
With best regards:
Ashutosh Sharma
 
EMC Data Storage Systems (India) Private Limited 
No. 12, Subramanya Arcade, Tower B,Bannerghatta Road, 
Bangalore - 560 076.
Tel. +91-80-26788930 x 6296
 



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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

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



discussion on webapp reload in production environments

2004-10-25 Thread Allistair Crossley
Hi,

Yoav, you suggested we should pick up this thread here in the list rather than the 
bugzilla report at http://issues.apache.org/bugzilla/show_bug.cgi?id=26372

I have copied the last 4 replies for any interested parties to start following this 
thread.

I look forward to hearing the position on webapp reloading in terms of desirable 
behaviour and the specification when you have time to do so.

All the best, Allistair.

YOAV
I'd point out it's only 'dying' when you're trying the 
app reload, nor normal usage.  This feature is not mandated by the Spec so we're not 
obliged to provided it in the first place: it's caused mostly trouble 
and has very limited usage in production environments.  So if you have patches 
for it, that's great, but the common usage scenario for Tomcat doesn't include 
webapp reload, and so doesn't suffer from this issue at all.

ME
I am interested in your comment that reload of webapp is mostly trouble and limited in 
production environments though. My understanding was that if you 
want to make a build to production or a patch of some files, you would use ant 
or similar as we do here to reconstruct the WAR to deploy. Does this not 
require tomcat being able to reload? In fact, we tell the business the intranet 
will be down for 5 minutes and post a message page up for inbound requests. We 
stop tomcat, delete the old war and expanded war files and place the new war 
and startup tomcat again. We constantly get irked by the fact that if a bug is 
on production we have to wait until the evening to patch it whereas our ASP 
coutnerparts can so easily hot-patch. We also use JSP precompilation to improve 
performance so it's not so easy to patch JSPs either.

REMY
I hope hot deployment and redeployment is a reality. However, there are issues
when the webapp tries to interact with some services which reside in the system
classloader (logging here). Packaging webapps a little differently could solve
the problems for now.

YOAV
Allistair, I'll be glad to continue this discussion on the mailing list and try 
and explain why I think reloading an app in-place has only limited usage in production 
environments.  This (Bugzilla) is not the right forum for 
discussions.


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



RE: Can Tomcat be configured to be an FTP Server?

2004-10-25 Thread Pawson, David
 

-Original Message-
From: Cees van de Griend 
> > > Is it possible to configure Tomcat as an FTP Server?
> >
> > No.
> >
> > Tomcat is a HTTP server, not a FTP server: different 
port numbers, 
> > different commands, different kind of application.



Yes, in theory you are right, but practical you have to 
write a ServletContainer which is FTP aware; not a simple 
task as FTP is not a simple protocol.

Take a look at a new Apache project: FtpServer at 
http://incubator.apache.org/projects/ftpserver/.

What are you trying to do?

I've a similar need, but it would be helpful if I could hand off
uploads/downloads to an ftpserver.

My concern is timeouts with large file transfers, which I believe
ftp to be better suited?

It may not be very common, but I guess this is not unusual.


regards DaveP


** snip here **







-- 
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




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



GZip compression in 4.1.27 ..

2004-10-25 Thread Ben Bookey

Dear Ladies and Gentlemen,

This is a follow-on for a question from last week, but as its now on a
"different-page" of the mailing list. I decided to
post another new questions, so no-one misses it.

1) Below is an original extract of my tomcat 4.1.27 server.xml.  I want to
enable compression in my HTTP connector.
I have a customer with v. low bandwidth. I have read the Apache readme
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html on this,
but I am still not 100% clear.


Would I be right in understanding that *ALL* I need to do (in the case of TC
4.*) is add the following attribute compression="on" ???







2)  Any suggestions on a way of testing this in our high bandwidth
environment first ?

regards

Ben


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



Sv: Webapp don't start after shutdown

2004-10-25 Thread Roland Carlsson
Hi again!

I found out why tomcat is using the path of my workstation instead of the
server as context path. It is a feature of Netbeans to put a file in the
Manifest-folder of the webapp with the path to the files and contextpath.

So it turns out that it had nothing to do with tomcat behaving strange.

Sorry for the trouble

Regards
Roland Carlsson


Den 04-10-22 20.16, skrev "Roland Carlsson" <[EMAIL PROTECTED]>:

> Hi!
> (I'm home now so it is another email-adress)
> I think that I have found another lead to why tomcat doesn't do right with
> my web-apps. In the web.xml in the %tomcat-home%/conf/Catalina/mydomain ..
> there is a context path... and of some freak reason the path to the files
> are the one that I use on my workstation and not the path to where
> tomcat-manager save the .war and unpacks it to. No wonder why tomcat don't
> find the files after a restart of tomcat.
> 
> I'm going to take weekend now but if anyone has any ideas why tomcat tries
> to use the path from the uploading client instead of the path on the server
> I'd be happy to hear about it.
> 
> Thanks you very much!
> 
> Regards
> Roland Carlsson
> 
> 
> - Original Message -
> From: "Shapira, Yoav" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Friday, October 22, 2004 3:58 PM
> Subject: RE: Webapp don't start after shutdown
> 
> 
> 
> Hi,
> 
>> Then I run the bin/shutdown.sh script and bin/startup.sh
> 
> Are you sure shutdown is completed properly, i.e. the JVM process is
> gone?
> 
>> I attempt to access the web-app and only get 404 errors.
> 
> Are there any errors or startup?  If so, please post the relevant logs
> and/or configuration information.  Is the context information for your
> deployed webapp saved correctly?
> 
> Yoav
> 
> 
> 
> This e-mail, including any attachments, is a confidential business
> communication, and may contain information that is confidential, proprietary
> and/or privileged.  This e-mail is intended only for the individual(s) to
> whom it is addressed, and may not be saved, copied, printed, disclosed or
> used by anyone else.  If you are not the(an) intended recipient, please
> immediately delete this e-mail from your computer system and notify the
> sender.  Thank you.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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