ENCTYPE + SetCharacterEncodingFilter = no go joe for Tomcat 5.0.28

2004-10-26 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]



Tomcat+Apache installation problem

2004-10-26 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]



Re: Problems wth Apache, mod_jk2 and Tomcat

2004-10-26 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 commands, 

TOMCAT 5 Memory Trouble

2004-10-26 Thread Jérôme GALLOT
Hi,
I've got some trouble with tomcat 5 :
It doesn't start with the parameters (It hangs) : CATALINA_OPTS= -Xms512m 
-Xmx1024m -server
Whithout those args, tomcat works properly.

Here is my configuration :
Tomcat 5.0.27
Java j2sdk 1.4.2_06
There is nothing in tomcat logs
any idea ?


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


Apache2 + mod_jk2 on FreeBSD - default socket timeout (bug?)

2004-10-26 Thread Michael Diener
Hi there,

I've got a problem with mod_jk2 and Apache2 under FreeBSD and I think it is
a bug. I configured mod_jk2 for two Tomcat servers. If one of these machines
is down (unplugging the network cable), mod_jk2 should send all requests to
the server that kept running. That is working 90 percent of the time, but
sometimes forwarding the request takes about 75 seconds. I found out that
this is the default socket timeout of FreeBSD. The problem is that I
configured mod-jk2 the way, that it has its own timeout for connecting (see
attached workers2.properties). But this value is not recognized. If I
decrease the default connect timeout for FreeBSD (by /etc/sysctl.conf),
mod_jk2 will use this value and everything is fine. But I don't want to
decrease that value, it could cause other problems.
So I think it is a bug, that mod_jk2 is not using the timeout values from
its workers2.properties in FreeBSD.
Btw exactly the same setup for Apache2 and mod_jk2 works fine on Linux.

Regards,
Michael

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

Error messages on Apache2 with load balancing jk2 and Tomcat

2004-10-26 Thread Stephan Müller
Hallo!

My Enviroment:

Suse Linux 9.1
Tomcat 5.0.28
JK2 Connector 2.0.4
Apache2 2.0.50

I've configured the jk2-connctor to load balance. Here my
worker2.properties:

# Set a Logger
[logger.apache2]
file=/usr/local/apache2/logs/error.log
level=DEBUG
#debug=1

# config settings
[config]
file=/usr/local/apache2/conf/workers2.properties
debug=0

# Shared Memory file settings
[shm]
file=/usr/local/apache2/conf/jk2.shm
size=10

# communication channel settings for our HDTTomcat1
[channel.socket:192.168.120.148:8009]
port=8009
host=192.168.120.148
tomcatId=myTomcat
group=balanced
lb_factor=1
route=jvm1

# communication channel settings for our HDTTomcat2
[channel.socket:192.168.120.147:8009]
port=8009
host=192.168.120.147
tomcatId=yourTomcat
group=balanced
lb_factor=1
route=jvm2

# Declare a Tomcat worker
[ajp13:192.168.120.148:8009]
channel=channel.socket:myTomcat

[ajp13:192.168.120.147:8009]
channel=channel.socket:yourTomcat

#Load balanced worker
[lb:balanced]
worker=ajp13:192.168.120.148:8009
worker=ajp13:192.168.120.147:8009
timeout=30
attempts=2
recovery=90
StickySession=1
noWorkersMsg=Server Busy please retry after some time.
noWorkerCodeMsg=503

[uri:/jsp-examples/*]
info= Mapping for examples of tomcat
context=/jsp-examples
group=balanced

[uri:/manager/*]

#uri:/HDTHTTPService/*]
#nfo=HDT MZS.net

[status:]

[uri:/jkstatus/*]
group=status 


After start apache2 I'll get these error messages in th error_log of
apache2:

:
:
[Mon Oct 25 16:41:35 2004] [notice] config.update(): done
ajp13:192.168.120.148:8009
[Mon Oct 25 16:41:35 2004] [notice] config.update(): done
ajp13:192.168.120.147:8009
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced timeout 30
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced attempts 2
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced recovery 90
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced stickySession 1
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced noWorkersMsg Server Busy please retry after some time.
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced noWorkerCodeMsg 503
[Mon Oct 25 16:41:35 2004] [notice] config.update(): done lb:balanced 
:
:

Why cannot set apache2 these attributes? What is my mistake? Need I another
module?

Stephan Müller

-- 
Geschenkt: 3 Monate GMX ProMail + 3 Ausgaben der TV Movie mit DVD
 Jetzt anmelden und testen http://www.gmx.net/de/go/mail 


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



RE: ENCTYPE + SetCharacterEncodingFilter = no go joe for Tomcat 5.0.28

2004-10-26 Thread Allistair Crossley
When a form has the ENCTYPE=multipart/form-data specified, the data sent is not 
accessible via the request.getParameter method. You should only really need the 
ENCTYPE when the form is posting files.

This is nothing to do with Tomcat. You need to decode the data using something like 
Commons FileUpload 1.0 or similar. 

Cheers, Allistair.

 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]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Apache2 + mod_jk2 on FreeBSD - default socket timeout (bug?)

2004-10-26 Thread Michael Diener
Ok, and here is the attachment.
I also forgot to mention that FreeBSD has the version 5.x and Tomcat the
version 5.

Michael


--

[logger]
level=DEBUG

[shm]
file=/tmp/shmFile

# Defines a load balancer named lb. 
[lb:lb]

[workerEnv:]
info=Global server options
timing=1

# Example socket channel, override port and host.
[channel.socket:192.168.1.124:8009]
tomcatId=camenzind
timeout=1

# Example socket channel, override port and host.
[channel.socket:192.168.1.123:8009]
tomcatId=haller
timeout=1

# define the worker 1
[ajp13:192.168.1.124:8009]
channel=channel.socket:192.168.1.124:8009

# define the worker 2
[ajp13:192.168.1.123:8009]
channel=channel.socket:192.168.1.123:8009

# Mapping my URI to Tomcats
[uri:/myURI*]
group=lb

[status:]
info=Status worker, displays runtime information

[uri:/jkstatus/*]
info=The Tomcat /jkstatus handler
group=status:


-Original Message-
From: Michael Diener [mailto:[EMAIL PROTECTED] 
Sent: Dienstag, 26. Oktober 2004 09:41
To: [EMAIL PROTECTED]
Subject: Apache2 + mod_jk2 on FreeBSD - default socket timeout (bug?)

Hi there,

I've got a problem with mod_jk2 and Apache2 under FreeBSD and I think it is
a bug. I configured mod_jk2 for two Tomcat servers. If one of these machines
is down (unplugging the network cable), mod_jk2 should send all requests to
the server that kept running. That is working 90 percent of the time, but
sometimes forwarding the request takes about 75 seconds. I found out that
this is the default socket timeout of FreeBSD. The problem is that I
configured mod-jk2 the way, that it has its own timeout for connecting (see
attached workers2.properties). But this value is not recognized. If I
decrease the default connect timeout for FreeBSD (by /etc/sysctl.conf),
mod_jk2 will use this value and everything is fine. But I don't want to
decrease that value, it could cause other problems.
So I think it is a bug, that mod_jk2 is not using the timeout values from
its workers2.properties in FreeBSD.
Btw exactly the same setup for Apache2 and mod_jk2 works fine on Linux.

Regards,
Michael



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



Embedded Tomcat3.3.2 Shutdown issue

2004-10-26 Thread Slava Risenberg
Hi all!
I'm developing an application which embeds Tomcat. There is a management 
Java process which never ends and executes a Tomcat on request and shuts him 
down.
I have a problem with Tomcat shutdown, it leaves a threads after overall 
shutdown, these threads marked as TP-Processor with number appended to 
it's name.
One important issue to remeber - I cannot use System.exit() call, which is 
restricted by custom security manager. So, I need to get the same state of 
Tomcat after shutdown, as it was before (clean state). When I try to start 
the Tomcat again I get NullPointerException in LogSetter, probably due to 
living threads... And when I run the Tomcat for the first time, it starts 
successfully.
The code I'm using to start Tomcat is:
  context = embededTomcat.addContext(
path,
new File(rootWEB + path).toURL(),
null);
embededTomcat.execute();

on shutdown I execute the following:
 ContextManager contextManager =
  embededTomcat.getContextManager();
 contextManager.removeContext(context);
 context.shutdown();
 embededTomcat.shutdown();
I tried to debug the problem and I found that one of ThreadPool objects 
still to be locked by wait command, ThreadPool class, line 616
Any ideas?

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


Re: Running HSQLDB in-process?

2004-10-26 Thread Michael Schuerig
On Monday 25 October 2004 21:59, Michael Schuerig wrote:

 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.
[snip]

 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.

Indeed, it's not pretty and it doesn't work :-(
Tomcat keeps its Properties global, not per application instance. Thus, 
when I tried this method yesterday it worked I had another instance of 
my webapp running in the same Tomcat process before. Therefore the 
mywebservice.root property was already set. Then, when I reloaded the 
webapp, the existing property is substituted for the variable in 
context.xml. Alas, when the web app is started for the first time, the 
property is not set.

Michael

-- 
Michael Schuerig Not only does lightning not strike
mailto:[EMAIL PROTECTED]   twice, it usually doesn't strike once.
http://www.schuerig.de/michael/  --Salman Rushdie, Fury

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



JNDI DataSource GlobalResources problem

2004-10-26 Thread Roland Carlsson
Hi!

I'm trying to use the JNDI DataSource to administer my database-connections.
But it seems like the DataSource doesn't get the properties I set. I get the
following error:

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null' (Full stacktrace below)

I have checked that the driver is there and I have re-read the configuration
and documentation many times now but doesn't find anything wrong. What am I
missing?

Thanks in advance
Roland Carlsson


 from GlobalNamingResources element in server.xml 

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

  ResourceParams name=login/myDB
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

!-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --
parameter
  namemaxActive/name
  value100/value
/parameter

!-- Maximum number of idle dB connections to retain in pool.
 Set to -1 for no limit.  See also the DBCP documentation on this
 and the minEvictableIdleTimeMillis configuration parameter.
 --
parameter
  namemaxIdle/name
  value2/value
/parameter

!-- Maximum time to wait for a dB connection to become available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --
parameter
  namemaxWait/name
  value1/value
/parameter

!-- MySQL dB username and password for dB connections  --
parameter
 nameusername/name
 valuexxx/value
/parameter
parameter
 namepassword/name
 valueyyy/value
/parameter

!-- Class name for the official MySQL Connector/J driver --
parameter
   namedriverClassName/name
   valuecom.mysql.jdbc.Driver/value
/parameter

!-- The JDBC connection url for connecting to your MySQL dB.
 The autoReconnect=true argument to the url makes sure that the
 mm.mysql JDBC Driver will automatically reconnect if mysqld
 closed the connection.  mysqld by default closes idle connections
 after 8 hours.
 --
parameter
  nameurl/name
  valuejdbc:mysql://192.168.x.x:/login?autoReconnect=true/value
/parameter
  /ResourceParams


- from web-app element in web.xml 


resource-ref
  descriptionMysql database login/description
  res-ref-namejdbc/loginDB/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
  /resource-ref

-- Full stacktrace of the exception -
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null'
at 
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:780)
at 
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5
40)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:62)
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
24)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:237)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
at 
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter
.java:305)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:186)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:198)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:152)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
)

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

2004-10-26 Thread William Ferguson
The Apache FTP Server is where I started :-)
Made me wonder whether I couldn't write a servlet that delegated to it.
Or whether someone else hadn't already done it.

I have a website on which I now also want to host a blog.
I'm using BlogSpot for the blog but want to publish to my own host, which
requires an FTP Server.
So since I already run Tomcat for the webserver I thought I could simplify
my machine's config and conserve resources by running the FTP server within
Tomcat.

I'm sure it is reasonably common to want to host both an FTP and  HTTP
server.
Has no-one combined both within Tomcat before?
Whats the consensus on how to best proceed?

William


- Original Message - 
From: Cees van de Griend [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Sunday, October 24, 2004 9:19 PM
Subject: Re: Can Tomcat be configured to be an FTP Server?

 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?

 It is possible to use Tomcat for uploading/downloading of files. Maybe the
 WebDAV protocol (on top of the HTTP protocol) is enough for your demands.

 Why do you want to run the 2 servers in 1 JVM?

 It makes more sense to separate the two services in different JVM's. Even
if
 you are able to create a FtpContainer, the implementation would run in a
 different thread and more realisticly in a different JVM which is started
by
 the mail process. I expect there is little gain to combine the two
services
 in one JVM, not for resource usage.
 It is only needed if you need the two services to interact directly with
each
 order and even then is is more easy to use a communication or messaging
 protocol like JMS.

 With kind regards,
 Cees.

 -
 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: JNDI DataSource GlobalResources problem

2004-10-26 Thread Shinobu Kawai

Hi Roland,

 I'm trying to use the JNDI DataSource to administer my database-connections.
 But it seems like the DataSource doesn't get the properties I set. I get the
 following error:
 
 org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
 class '' for connect URL 'null' (Full stacktrace below)
 
 I have checked that the driver is there and I have re-read the configuration
 and documentation many times now but doesn't find anything wrong. What am I
 missing?

  from GlobalNamingResources element in server.xml 
snip /

 - from web-app element in web.xml 
snip /

 -- Full stacktrace of the exception -
snip /

Have you set the ResourceLink?
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/globalresources.html

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html#Resource%20Links

Best regards,
-- Shinobu Kawai

--
Shinobu Kawai [EMAIL PROTECTED]


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



Re: Error messages on Apache2 with load balancing jk2 and Tomcat

2004-10-26 Thread Peter Johnson
Try
It has been a while since I touched jk2 but try
group=lb:balanced
PJ
Stephan Müller wrote:
Hallo!
My Enviroment:
Suse Linux 9.1
Tomcat 5.0.28
JK2 Connector 2.0.4
Apache2 2.0.50
I've configured the jk2-connctor to load balance. Here my
worker2.properties:
# Set a Logger
[logger.apache2]
file=/usr/local/apache2/logs/error.log
level=DEBUG
#debug=1
# config settings
[config]
file=/usr/local/apache2/conf/workers2.properties
debug=0
# Shared Memory file settings
[shm]
file=/usr/local/apache2/conf/jk2.shm
size=10
# communication channel settings for our HDTTomcat1
[channel.socket:192.168.120.148:8009]
port=8009
host=192.168.120.148
tomcatId=myTomcat
group=balanced
lb_factor=1
route=jvm1
# communication channel settings for our HDTTomcat2
[channel.socket:192.168.120.147:8009]
port=8009
host=192.168.120.147
tomcatId=yourTomcat
group=balanced
lb_factor=1
route=jvm2
# Declare a Tomcat worker
[ajp13:192.168.120.148:8009]
channel=channel.socket:myTomcat
[ajp13:192.168.120.147:8009]
channel=channel.socket:yourTomcat
#Load balanced worker
[lb:balanced]
worker=ajp13:192.168.120.148:8009
worker=ajp13:192.168.120.147:8009
timeout=30
attempts=2
recovery=90
StickySession=1
noWorkersMsg=Server Busy please retry after some time.
noWorkerCodeMsg=503
[uri:/jsp-examples/*]
info= Mapping for examples of tomcat
context=/jsp-examples
group=balanced
[uri:/manager/*]
#uri:/HDTHTTPService/*]
#nfo=HDT MZS.net
[status:]
[uri:/jkstatus/*]
group=status 

After start apache2 I'll get these error messages in th error_log of
apache2:
:
:
[Mon Oct 25 16:41:35 2004] [notice] config.update(): done
ajp13:192.168.120.148:8009
[Mon Oct 25 16:41:35 2004] [notice] config.update(): done
ajp13:192.168.120.147:8009
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced timeout 30
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced attempts 2
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced recovery 90
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced stickySession 1
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced noWorkersMsg Server Busy please retry after some time.
[Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
lb:balanced noWorkerCodeMsg 503
[Mon Oct 25 16:41:35 2004] [notice] config.update(): done lb:balanced 
:
:

Why cannot set apache2 these attributes? What is my mistake? Need I another
module?
Stephan Müller
 


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


RE: can we install tomcat in the directory which contains spacen in the name ???

2004-10-26 Thread Steve Kirk
try a quick googling: 
http://www.google.com/search?hl=enlr=q=tomcat+space+%22folder+name%22btnG
=Search 

I always omit spaces from folder names, on the basis that it _might_ cause
an unexpected problem - why tempt fate?
If you have to use spaces in the name, you may need to enclose paths in
quotes e.g. c:\tomcat install\conf\server.xml.

 -Original Message-
 From: Vivek Behal [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 26 October 2004 05:31
 To: [EMAIL PROTECTED]
 Subject: can we install tomcat in the directory which 
 contains spacen in the name ???
 
 
  
 Regards,
 Vivek Behal.
  
  
  
 



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



RE: can we install tomcat in the directory which contains spacen in the name ???

2004-10-26 Thread Ben Souther
Tomcat, by default, installs into c:\program files\ when you use the
.exe installer.



On Tue, 2004-10-26 at 05:56, Steve Kirk wrote:
 try a quick googling: 
 http://www.google.com/search?hl=enlr=q=tomcat+space+%22folder+name%22btnG
 =Search 
 
 I always omit spaces from folder names, on the basis that it _might_ cause
 an unexpected problem - why tempt fate?
 If you have to use spaces in the name, you may need to enclose paths in
 quotes e.g. c:\tomcat install\conf\server.xml.
 
  -Original Message-
  From: Vivek Behal [mailto:[EMAIL PROTECTED] 
  Sent: Tuesday 26 October 2004 05:31
  To: [EMAIL PROTECTED]
  Subject: can we install tomcat in the directory which 
  contains spacen in the name ???
  
  
   
  Regards,
  Vivek Behal.
   
   
   
  
 
 
 
 -
 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 : Jakarta-Tomcat and Image Tag Library - SOLUTION

2004-10-26 Thread LERBSCHER Jean-Pierre
This is an extract of taglib directive definition
(http://java.sun.com/products/jsp/syntax/1.2/syntaxref1211.html )

Taglib Directive
Defines a tag library and prefix for the custom tags used in the JSP page. 

JSP Syntax
%@ taglib uri=URIForLibrary prefix=tagPrefix %

XML Syntax
None. However, see jsp:root. 

Examples
%@ taglib uri=http://www.jspcentral.com/tags; prefix=public %  

public:loop   
   ...  
/public:loop

Description
The taglib directive declares that the JSP page uses custom tags, names the
tag library that defines them, and specifies their tag prefix. 

You must use a taglib directive before you use the custom tag in a JSP page.
You can use more than one taglib directive in a JSP page, but the prefix
defined in each must be unique. 

Tutorials on creating custom tags are available at
http://java.sun.com/products/jsp/taglibraries.html#tutorials. 

Attributes
uri=URIForLibrary 

The Uniform Resource Identifier (URI) that uniquely locates the TLD that
describes the set of custom tags associated with the named tag prefix. A URI
can be any of the following: 

A Uniform Resource Locator (URL), as defined in RFC 2396, available at
http://www.hut.fi/u/jkorpela/rfc/2396/full.html 
A Uniform Resource Name (URN), as defined in RFC 2396 
An absolute or relative pathname 

If the URI is a URL or URN, then the TLD is located by consulting the
mapping indicated in web.xml extended using the implicit maps in the
packaged tag libraries. If URI is pathname, it is interpreted relative to
the root of the web application and should resolve to a TLD file directly,
or to a JAR file that has a TLD file at location META-INF/taglib.tld. 

prefix=tagPrefix 

The prefix that precedes the custom tag name, for example, public in
public:loop. Empty prefixes are illegal. If you are developing or using
custom tags, you cannot use the tag prefixes jsp, jspx, java, javax,
servlet, sun, and sunw, as they are reserved by Sun Microsystems.

-Message d'origine-
De : Lars Nielsen Lind [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 25 octobre 2004 21:37
À : 'Tomcat Users List'
Objet : RE: Jakarta-Tomcat and Image Tag Library - SOLUTION

Hi.

I have found a solution to my problem.

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

taglib-urihttp://jakarta.apache.org/taglibs/image-1.0/taglib-uri

to

taglib-uriTEST/taglib-uri

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

img:image
src=../../../images/employees/%= employee_image %
name=%= employee_image %

img:resize scale=50% /
/img:image

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:
 
 taglib
   taglib-urihttp://jakarta.apache.org/taglibs/image-1.0/taglib-uri
   taglib-location/WEB-INF/taglibs-image.tld/taglib-location
 /taglib
 
 
 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:
 
 img:image
   src=/images/employees/%= employee_image %
   name=%= employee_image %
 
   img:resize scale=50% /
 /img: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, 

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk
This type of bug crops up a lot on this list.  The best answer seems to be
to make sure you follow the instructions on this page _exactly_:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-how
to.html

I assume that where you have x/y in your config file this is to hide values
before posting here rather than your actual config  - worth checking!!

It might help if you post a snippet of your Java source

Can you connect to the database called login on the IP and port in your
urlvalue tag with the username xxx and password yyy using the mysql
command line client?  If not, then you probably have a mysql account or
security issue that's blocking access to the database.  It might be that you
have only created an account [EMAIL PROTECTED], which will deny access from any
other IP apart from the 192.168.x.x address of the server.

Where is your driver file?  It should be in the common\lib folder e.g. on my
machine it is 

C:\jakarta-tomcat-5.0.27\common\lib\mysql-connector-java-3.0.14-production-b
in.jar

PS even if quotes are allowed in ResourceLinkdescription (which I'm not
sure about), it's the sort of thing I'd avoid, especially when trying to
debug a problem like this. It's an extra unknown you'd be better off
without.

 -Original Message-
 From: Roland Carlsson [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 26 October 2004 10:13
 To: TomcatUsers
 Subject: JNDI DataSource GlobalResources problem
 
 
 Hi!
 
 I'm trying to use the JNDI DataSource to administer my 
 database-connections.
 But it seems like the DataSource doesn't get the properties I 
 set. I get the
 following error:
 
 org.apache.commons.dbcp.SQLNestedException: Cannot create 
 JDBC driver of
 class '' for connect URL 'null' (Full stacktrace below)
 
 I have checked that the driver is there and I have re-read 
 the configuration
 and documentation many times now but doesn't find anything 
 wrong. What am I
 missing?
 
 Thanks in advance
 Roland Carlsson
 
 
  from GlobalNamingResources element in server.xml 
 
 
 Resource name=jdbc/loginDB
auth=Container
type=javax.sql.DataSource/
 
   ResourceParams name=login/myDB
 parameter
   namefactory/name
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 
 !-- Maximum number of dB connections in pool. Make sure you
  configure your mysqld max_connections large enough to handle
  all of your db connections. Set to 0 for no limit.
  --
 parameter
   namemaxActive/name
   value100/value
 /parameter
 
 !-- Maximum number of idle dB connections to retain in pool.
  Set to -1 for no limit.  See also the DBCP 
 documentation on this
  and the minEvictableIdleTimeMillis configuration parameter.
  --
 parameter
   namemaxIdle/name
   value2/value
 /parameter
 
 !-- Maximum time to wait for a dB connection to become available
  in ms, in this example 10 seconds. An Exception is thrown if
  this timeout is exceeded.  Set to -1 to wait indefinitely.
  --
 parameter
   namemaxWait/name
   value1/value
 /parameter
 
 !-- MySQL dB username and password for dB connections  --
 parameter
  nameusername/name
  valuexxx/value
 /parameter
 parameter
  namepassword/name
  valueyyy/value
 /parameter
 
 !-- Class name for the official MySQL Connector/J driver --
 parameter
namedriverClassName/name
valuecom.mysql.jdbc.Driver/value
 /parameter
 
 !-- The JDBC connection url for connecting to your MySQL dB.
  The autoReconnect=true argument to the url makes 
 sure that the
  mm.mysql JDBC Driver will automatically reconnect if mysqld
  closed the connection.  mysqld by default closes idle connections
  after 8 hours.
  --
 parameter
   nameurl/name
   
 valuejdbc:mysql://192.168.x.x:/login?autoReconnect=true/value
 /parameter
   /ResourceParams
 
 
 - from web-app element in web.xml 
 
 
 resource-ref
   descriptionMysql database login/description
   res-ref-namejdbc/loginDB/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
   /resource-ref
 
 -- Full stacktrace of the exception -
 org.apache.commons.dbcp.SQLNestedException: Cannot create 
 JDBC driver of
 class '' for connect URL 'null'
 at 
 org.apache.commons.dbcp.BasicDataSource.createDataSource(Basic
 DataSource.jav
 a:780)
 at 
 org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDat
 aSource.java:5
 40)
 at org.apache.jsp.index_jsp._jspService(index_jsp.java:62)
 at 
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
 at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at 
 

RE: RE : Jakarta-Tomcat and Image Tag Library - SOLUTION

2004-10-26 Thread Lars Nielsen Lind
Yes I know - I did not find the solution. I tried to remove any thing that
might be a 'reference' outside the https.

I have done some testing within the http area and the taglib worked fine.
When I returned to the https area the taglib at first sight was working -
but ofcourse the image was the one that the taglib produced in the http
area.

Maybe it will help if I sign the image taglib jars with the certificate used
within the https area?

Lars Nielsen Lind


-Original Message-
From: LERBSCHER Jean-Pierre [mailto:[EMAIL PROTECTED] 
Sent: 26. oktober 2004 12:24
To: 'Tomcat Users List'
Subject: RE : Jakarta-Tomcat and Image Tag Library - SOLUTION

This is an extract of taglib directive definition
(http://java.sun.com/products/jsp/syntax/1.2/syntaxref1211.html )

Taglib Directive
Defines a tag library and prefix for the custom tags used in the JSP page. 

JSP Syntax
%@ taglib uri=URIForLibrary prefix=tagPrefix %

XML Syntax
None. However, see jsp:root. 

Examples
%@ taglib uri=http://www.jspcentral.com/tags; prefix=public %  

public:loop   
   ...  
/public:loop

Description
The taglib directive declares that the JSP page uses custom tags, names the
tag library that defines them, and specifies their tag prefix. 

You must use a taglib directive before you use the custom tag in a JSP page.
You can use more than one taglib directive in a JSP page, but the prefix
defined in each must be unique. 

Tutorials on creating custom tags are available at
http://java.sun.com/products/jsp/taglibraries.html#tutorials. 

Attributes
uri=URIForLibrary 

The Uniform Resource Identifier (URI) that uniquely locates the TLD that
describes the set of custom tags associated with the named tag prefix. A URI
can be any of the following: 

A Uniform Resource Locator (URL), as defined in RFC 2396, available at
http://www.hut.fi/u/jkorpela/rfc/2396/full.html 
A Uniform Resource Name (URN), as defined in RFC 2396 
An absolute or relative pathname 

If the URI is a URL or URN, then the TLD is located by consulting the
mapping indicated in web.xml extended using the implicit maps in the
packaged tag libraries. If URI is pathname, it is interpreted relative to
the root of the web application and should resolve to a TLD file directly,
or to a JAR file that has a TLD file at location META-INF/taglib.tld. 

prefix=tagPrefix 

The prefix that precedes the custom tag name, for example, public in
public:loop. Empty prefixes are illegal. If you are developing or using
custom tags, you cannot use the tag prefixes jsp, jspx, java, javax,
servlet, sun, and sunw, as they are reserved by Sun Microsystems.

-Message d'origine-
De : Lars Nielsen Lind [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 25 octobre 2004 21:37
À : 'Tomcat Users List'
Objet : RE: Jakarta-Tomcat and Image Tag Library - SOLUTION

Hi.

I have found a solution to my problem.

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

taglib-urihttp://jakarta.apache.org/taglibs/image-1.0/taglib-uri

to

taglib-uriTEST/taglib-uri

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

img:image
src=../../../images/employees/%= employee_image %
name=%= employee_image %

img:resize scale=50% /
/img:image

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:
 
 taglib
   taglib-urihttp://jakarta.apache.org/taglibs/image-1.0/taglib-uri
   taglib-location/WEB-INF/taglibs-image.tld/taglib-location
 /taglib
 
 
 At the top of the *.jsp page:
 
 %@ taglib 

Random 500 errors

2004-10-26 Thread James McGovern

I am currently running Apache 2.0.48 with JK2 and Tomcat 5.0.28 on Redhat
Enterprise 2.1 and experience random 500 errors. I am getting them for GIFs
files and other non Java related access. I am not finding anything in the
error logs to indicate the problem. The access log does show the file with
the 500 error code.

What should I be looking for in order to resolve this problem?


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



Sv: JNDI DataSource GlobalResources problem

2004-10-26 Thread Roland Carlsson
Hello!

Thanks for your answer. I have no ResourceLink in my configuration. I
understand that I should put it a Context-tag but not where.

How does this affect the configuration I already have done? Is the use of
resource-ref and Resource correct?

Thanks in advance
Roland Carlsson


Den 04-10-26 11.25, skrev Shinobu Kawai [EMAIL PROTECTED]:

 
 Hi Roland,
 
 I'm trying to use the JNDI DataSource to administer my database-connections.
 But it seems like the DataSource doesn't get the properties I set. I get the
 following error:
 
 org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
 class '' for connect URL 'null' (Full stacktrace below)
 
 I have checked that the driver is there and I have re-read the configuration
 and documentation many times now but doesn't find anything wrong. What am I
 missing?
 
  from GlobalNamingResources element in server.xml 
 snip /
 
 - from web-app element in web.xml 
 snip /
 
 -- Full stacktrace of the exception -
 snip /
 
 Have you set the ResourceLink?
 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html
 
 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/globalresources.html
 
 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html#Resource%2
 0Links
 
 Best regards,
 -- Shinobu Kawai
 
 --
 Shinobu Kawai [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: Random 500 errors

2004-10-26 Thread Steve Kirk

When you say random do you mean that accessing the same URL sometimes
gives a 500 and sometimes not, or that you can't see a pattern in the URLs
that cause the 500?

Are you looking in all the tomcat log files (under CATALINA_HOME\logs ), and
the apache httpd logs, as well as any TC log file you might have configured
yourself?

What error messages are you seeing in the browser when the 500 occurs?

Are you seeing the standard tomcat error page or have you configured your
own?

Can you give an example URL that triggers the 500, and your web.xml config
(esp your servlet mappings)?

 -Original Message-
 From: James McGovern [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 26 October 2004 11:55
 To: [EMAIL PROTECTED]
 Subject: Random 500 errors
 
 
 
 I am currently running Apache 2.0.48 with JK2 and Tomcat 
 5.0.28 on Redhat
 Enterprise 2.1 and experience random 500 errors. I am getting 
 them for GIFs
 files and other non Java related access. I am not finding 
 anything in the
 error logs to indicate the problem. The access log does show 
 the file with
 the 500 error code.
 
 What should I be looking for in order to resolve this problem?
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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



Sv: JNDI DataSource GlobalResources problem

2004-10-26 Thread Roland Carlsson
Hi Steve! 

X:s and y:s are to hide a few details of our setup, perhaps a little
paranoid :-)

I can connect to the database with user and password at that url.

My driver is in common/lib, I also check the other libs.

Regards
Roland Carlsson


Den 04-10-26 12.27, skrev Steve Kirk [EMAIL PROTECTED]:

 This type of bug crops up a lot on this list.  The best answer seems to be
 to make sure you follow the instructions on this page _exactly_:
 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-how
 to.html
 
 I assume that where you have x/y in your config file this is to hide values
 before posting here rather than your actual config  - worth checking!!
 
 It might help if you post a snippet of your Java source
 
 Can you connect to the database called login on the IP and port in your
 urlvalue tag with the username xxx and password yyy using the mysql
 command line client?  If not, then you probably have a mysql account or
 security issue that's blocking access to the database.  It might be that you
 have only created an account [EMAIL PROTECTED], which will deny access from any
 other IP apart from the 192.168.x.x address of the server.
 
 Where is your driver file?  It should be in the common\lib folder e.g. on my
 machine it is 
 
 C:\jakarta-tomcat-5.0.27\common\lib\mysql-connector-java-3.0.14-production-b
 in.jar
 
 PS even if quotes are allowed in ResourceLinkdescription (which I'm not
 sure about), it's the sort of thing I'd avoid, especially when trying to
 debug a problem like this. It's an extra unknown you'd be better off
 without.
 
 -Original Message-
 From: Roland Carlsson [mailto:[EMAIL PROTECTED]
 Sent: Tuesday 26 October 2004 10:13
 To: TomcatUsers
 Subject: JNDI DataSource GlobalResources problem
 
 
 Hi!
 
 I'm trying to use the JNDI DataSource to administer my
 database-connections.
 But it seems like the DataSource doesn't get the properties I
 set. I get the
 following error:
 
 org.apache.commons.dbcp.SQLNestedException: Cannot create
 JDBC driver of
 class '' for connect URL 'null' (Full stacktrace below)
 
 I have checked that the driver is there and I have re-read
 the configuration
 and documentation many times now but doesn't find anything
 wrong. What am I
 missing?
 
 Thanks in advance
 Roland Carlsson
 
 
  from GlobalNamingResources element in server.xml
 
 
 Resource name=jdbc/loginDB
auth=Container
type=javax.sql.DataSource/
 
   ResourceParams name=login/myDB
 parameter
   namefactory/name
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 
 !-- Maximum number of dB connections in pool. Make sure you
  configure your mysqld max_connections large enough to handle
  all of your db connections. Set to 0 for no limit.
  --
 parameter
   namemaxActive/name
   value100/value
 /parameter
 
 !-- Maximum number of idle dB connections to retain in pool.
  Set to -1 for no limit.  See also the DBCP
 documentation on this
  and the minEvictableIdleTimeMillis configuration parameter.
  --
 parameter
   namemaxIdle/name
   value2/value
 /parameter
 
 !-- Maximum time to wait for a dB connection to become available
  in ms, in this example 10 seconds. An Exception is thrown if
  this timeout is exceeded.  Set to -1 to wait indefinitely.
  --
 parameter
   namemaxWait/name
   value1/value
 /parameter
 
 !-- MySQL dB username and password for dB connections  --
 parameter
  nameusername/name
  valuexxx/value
 /parameter
 parameter
  namepassword/name
  valueyyy/value
 /parameter
 
 !-- Class name for the official MySQL Connector/J driver --
 parameter
namedriverClassName/name
valuecom.mysql.jdbc.Driver/value
 /parameter
 
 !-- The JDBC connection url for connecting to your MySQL dB.
  The autoReconnect=true argument to the url makes
 sure that the
  mm.mysql JDBC Driver will automatically reconnect if mysqld
  closed the connection.  mysqld by default closes idle connections
  after 8 hours.
  --
 parameter
   nameurl/name
   
 valuejdbc:mysql://192.168.x.x:/login?autoReconnect=true/value
 /parameter
   /ResourceParams
 
 
 - from web-app element in web.xml 
 
 
 resource-ref
   descriptionMysql database login/description
   res-ref-namejdbc/loginDB/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
   /resource-ref
 
 -- Full stacktrace of the exception -
 org.apache.commons.dbcp.SQLNestedException: Cannot create
 JDBC driver of
 class '' for connect URL 'null'
 at 
 org.apache.commons.dbcp.BasicDataSource.createDataSource(Basic
 DataSource.jav
 a:780)
 at 
 

Adding user whitout manager

2004-10-26 Thread Nacho Conde
HI,
I want add user whitout manager of tomcat (writting lines in 
stomcat-user.xml),
Is it possible that tomcat updates changes whitout restart tomcat?

sorry for my bad language...
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Sv: JNDI DataSource GlobalResources problem

2004-10-26 Thread David Smith
Any place within the Context.../Context tags for your webapp is 
fine.  I don't believe these are validated against a DTD, so order isn't 
an issue.  The rest of your config looks good and should work.  Oh yeah 
-- and name your resources consistently.  If your name attribute in 
Resource is jdbc/loginDb, then it should be the same (case as well as 
spelling) in Resource-Params, ResourceLink, and resource-ref.

--David
Roland Carlsson wrote:
Hello!
Thanks for your answer. I have no ResourceLink in my configuration. I
understand that I should put it a Context-tag but not where.
How does this affect the configuration I already have done? Is the use of
resource-ref and Resource correct?
Thanks in advance
Roland Carlsson
Den 04-10-26 11.25, skrev Shinobu Kawai [EMAIL PROTECTED]:
 

Hi Roland,
   

I'm trying to use the JNDI DataSource to administer my database-connections.
But it seems like the DataSource doesn't get the properties I set. I get the
following error:
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null' (Full stacktrace below)
I have checked that the driver is there and I have re-read the configuration
and documentation many times now but doesn't find anything wrong. What am I
missing?
 

 from GlobalNamingResources element in server.xml 
 

snip /
   

- from web-app element in web.xml 
 

snip /
   

-- Full stacktrace of the exception -
 

snip /
Have you set the ResourceLink?
   http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html
   
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/globalresources.html
   
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html#Resource%2
0Links

Best regards,
-- Shinobu Kawai
--
Shinobu Kawai [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: Can Tomcat be configured to be an FTP Server?

2004-10-26 Thread QM
On Tue, Oct 26, 2004 at 07:14:56PM +1000, William Ferguson wrote:
:  [snip]
: I'm sure it is reasonably common to want to host both an FTP and  HTTP
: server.

Maybe, maybe not; but some of us just use separate FTP and HTTP
programs and call it a day.


: Has no-one combined both within Tomcat before?

Um, I think you've already asked that in this thread. ;)


: Whats the consensus on how to best proceed?

Best is up to you.  Your choices, as far as I can see:

1/ Write it yourself.  Time-consuming, but it'll be exactly what you
want in the end. (-or at least you can only hassle yourself for updates
;)

1.1/ Get creative and transfer files using HTTP POST instead of raw FTP.
(Think outside the box, no pun intended.)

2/ Change hosts.  (You say they require FTP.)

3/ Use a separate FTP daemon.  (Sometimes, simple == better.)


-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: TOMCAT 5 Memory Trouble

2004-10-26 Thread QM
On Tue, Oct 26, 2004 at 09:26:12AM +0200, J?r?me GALLOT wrote:
: I've got some trouble with tomcat 5 :
: It doesn't start with the parameters (It hangs) : CATALINA_OPTS= -Xms512m 
: -Xmx1024m -server
: Whithout those args, tomcat works properly.

What OS?
Further explain It hangs -- what's the last message in the logs (or on
the console), what's the CPU utilization at that point, etc?

Have you tried to dissect which param causes the problem?

Do you have 1024m RAM free when Tomcat starts?

etc., etc., etc.

-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: Error messages on Apache2 with load balancing jk2 and Tomcat

2004-10-26 Thread Stephan Müller
Sorry, but it has the same effect.

Thanks

Stephan

 Try
 
 It has been a while since I touched jk2 but try
 
 group=lb:balanced
 
 PJ
 
 Stephan Müller wrote:
 
 Hallo!
 
 My Enviroment:
 
 Suse Linux 9.1
 Tomcat 5.0.28
 JK2 Connector 2.0.4
 Apache2 2.0.50
 
 I've configured the jk2-connctor to load balance. Here my
 worker2.properties:
 
 # Set a Logger
 [logger.apache2]
 file=/usr/local/apache2/logs/error.log
 level=DEBUG
 #debug=1
 
 # config settings
 [config]
 file=/usr/local/apache2/conf/workers2.properties
 debug=0
 
 # Shared Memory file settings
 [shm]
 file=/usr/local/apache2/conf/jk2.shm
 size=10
 
 # communication channel settings for our HDTTomcat1
 [channel.socket:192.168.120.148:8009]
 port=8009
 host=192.168.120.148
 tomcatId=myTomcat
 group=balanced
 lb_factor=1
 route=jvm1
 
 # communication channel settings for our HDTTomcat2
 [channel.socket:192.168.120.147:8009]
 port=8009
 host=192.168.120.147
 tomcatId=yourTomcat
 group=balanced
 lb_factor=1
 route=jvm2
 
 # Declare a Tomcat worker
 [ajp13:192.168.120.148:8009]
 channel=channel.socket:myTomcat
 
 [ajp13:192.168.120.147:8009]
 channel=channel.socket:yourTomcat
 
 #Load balanced worker
 [lb:balanced]
 worker=ajp13:192.168.120.148:8009
 worker=ajp13:192.168.120.147:8009
 timeout=30
 attempts=2
 recovery=90
 StickySession=1
 noWorkersMsg=Server Busy please retry after some time.
 noWorkerCodeMsg=503
 
 [uri:/jsp-examples/*]
 info= Mapping for examples of tomcat
 context=/jsp-examples
 group=balanced
 
 [uri:/manager/*]
 
 #uri:/HDTHTTPService/*]
 #nfo=HDT MZS.net
 
 [status:]
 
 [uri:/jkstatus/*]
 group=status 
 
 
 After start apache2 I'll get these error messages in th error_log of
 apache2:
 
 :
 :
 [Mon Oct 25 16:41:35 2004] [notice] config.update(): done
 ajp13:192.168.120.148:8009
 [Mon Oct 25 16:41:35 2004] [notice] config.update(): done
 ajp13:192.168.120.147:8009
 [Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
 lb:balanced timeout 30
 [Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
 lb:balanced attempts 2
 [Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
 lb:balanced recovery 90
 [Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
 lb:balanced stickySession 1
 [Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
 lb:balanced noWorkersMsg Server Busy please retry after some time.
 [Mon Oct 25 16:41:35 2004] [notice] config.setAttribute() Error setting
 lb:balanced noWorkerCodeMsg 503
 [Mon Oct 25 16:41:35 2004] [notice] config.update(): done lb:balanced 
 :
 :
 
 Why cannot set apache2 these attributes? What is my mistake? Need I
 another
 module?
 
 Stephan Müller
 
   
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
Geschenkt: 3 Monate GMX ProMail + 3 Ausgaben der TV Movie mit DVD
 Jetzt anmelden und testen http://www.gmx.net/de/go/mail 


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



defining .war expanded directory ?

2004-10-26 Thread Nick Pellow
Hi, 

Is it possible to configure tomcat 5.0.28
to expand the wars it finds in the webapp directory, 
to another directory? 

By default, it expands them in the same directoy as the wars. 

Cheers, 
Nick.


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



Re: defining .war expanded directory ?

2004-10-26 Thread karjera

Laba diena.



Dkojame, kad mums parate.

Js atsista inut isaugota ms duomen bazje.

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



Sv: Sv: JNDI DataSource GlobalResources problem

2004-10-26 Thread Roland Carlsson
Hi!

It took a while before i found a way to put the ResourceLink in a context
where I felt it would be appropiate (using autoinstall so i don't have them
in my conf-files). In server.xml I created a default-context and viola! It
worked! :-)

Thanks for your help!

Regards
Roland


Den 04-10-26 13.39, skrev David Smith [EMAIL PROTECTED]:

 Any place within the Context.../Context tags for your webapp is
 fine.  I don't believe these are validated against a DTD, so order isn't
 an issue.  The rest of your config looks good and should work.  Oh yeah
 -- and name your resources consistently.  If your name attribute in
 Resource is jdbc/loginDb, then it should be the same (case as well as
 spelling) in Resource-Params, ResourceLink, and resource-ref.
 
 --David
 
 Roland Carlsson wrote:
 
 Hello!
 
 Thanks for your answer. I have no ResourceLink in my configuration. I
 understand that I should put it a Context-tag but not where.
 
 How does this affect the configuration I already have done? Is the use of
 resource-ref and Resource correct?
 
 Thanks in advance
 Roland Carlsson
 
 
 Den 04-10-26 11.25, skrev Shinobu Kawai [EMAIL PROTECTED]:
 
  
 
 Hi Roland,
 

 
 I'm trying to use the JNDI DataSource to administer my
 database-connections.
 But it seems like the DataSource doesn't get the properties I set. I get
 the
 following error:
 
 org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
 class '' for connect URL 'null' (Full stacktrace below)
 
 I have checked that the driver is there and I have re-read the
 configuration
 and documentation many times now but doesn't find anything wrong. What am I
 missing?
  
 
  from GlobalNamingResources element in server.xml 
  
 
 snip /
 

 
 - from web-app element in web.xml 
  
 
 snip /
 

 
 -- Full stacktrace of the exception -
  
 
 snip /
 
 Have you set the ResourceLink?
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html

 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/globalresources.html

 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html#Resource
 %2
 0Links
 
 Best regards,
 -- Shinobu Kawai
 
 --
 Shinobu Kawai [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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


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



RE: Adding user whitout manager

2004-10-26 Thread Shapira, Yoav

Hi,
No. If you edit tomcat-users.xml by hand, the changes are not reflected
automatically.

Consider switching to a database-driven Realm instead.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 8:23 AM
To: [EMAIL PROTECTED]
Subject: Adding user whitout manager

HI,
I want add user whitout manager of tomcat (writting lines in
stomcat-user.xml),
Is it possible that tomcat updates changes whitout restart tomcat?

sorry for my bad language...

-
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: AW: Session Definition Bug?

2004-10-26 Thread Shapira, Yoav

Hi,

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.

Such as?  These are covered in the Manager configuration reference.  The
rest (such as session-timeout) are part of the Servlet Spec.

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: defining .war expanded directory ?

2004-10-26 Thread Shapira, Yoav

Hi,
Not configurable at the moment.  Note that Tomcat unpacks WARs more than
once anyways (to the workDir as well) under many configurations.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Nick Pellow [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 8:26 AM
To: [EMAIL PROTECTED]
Subject: defining .war expanded directory ?

Hi,

Is it possible to configure tomcat 5.0.28
to expand the wars it finds in the webapp directory,
to another directory?

By default, it expands them in the same directoy as the wars.

Cheers,
Nick.


-
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: TOMCAT 5 Memory Trouble

2004-10-26 Thread Shapira, Yoav

Hi,

I've got some trouble with tomcat 5 :

It doesn't start with the parameters (It hangs) : CATALINA_OPTS=
-Xms512m
-Xmx1024m -server
Whithout those args, tomcat works properly.

Here is my configuration :
Tomcat 5.0.27
Java j2sdk 1.4.2_06

There is nothing in tomcat logs

any idea ?

Here's an idea: don't use those params ;)  There have been multiple
documents cases of stability reduction when using the -server parameter,
though none recently.

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: Sv: JNDI DataSource GlobalResources problem

2004-10-26 Thread Shapira, Yoav

Hi,

In server.xml I created a default-context and viola! It
worked! :-)

Ahh, I'd stay on tiptoes if I were you.  DefaultContext has a couple of
subtle bugs that affect a small subset of applications which rely on
binding order.

It's worth your time to dump DefaultContext and declare the resources in
your actual Context, with a ResourceLink if you're using
GlobalNamingResources as others have pointed out.  Either of those
options is superior to DefaultContext (which by the way is more or less
gone in Tomcat 5.5).

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: Why mail/session always being set to localhost even Context.xml says otherwise?

2004-10-26 Thread Shapira, Yoav

Hi,
mailto: shouldn't be used, it's not a valid RFC-822 address (although
it's a valid HTML directive, that's irrelevant here).

Yoav Shapira http://www.yoavshapira.com


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

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 mailto:[EMAIL PROTECTED]
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
 
  Resource name=mail/Session auth=Container
type=javax.mail.Session/
  ResourceParams name=mail/Session
parameter
  namemail.smtp.host/name
  valuecompany email server/value
/parameter
  /ResourceParams
 
  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
  mailto:[EMAIL PROTECTED] ));
  InternetAddress to[] = new InternetAddress[1];
  to[0] = new InternetAddress(to email
  mailto:[EMAIL PROTECTED] );
  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]




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: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk

This question illustrates (IMHO) probably the biggest issue of confusion
with regard to DBCP - that is, there are several XML elements that you can
potentially use, and several places that you can potentially put them.
Specifically, the Resource, ResourceParams and ResourceLink elements
can go in server.xml or your webapp's context config file, and
resource-ref can go in your web.xml file.  Most people that have DBCP
problems seem to have trouble working out elements to use, and where to put
them.  A quick search on the web shows that this issue is widely
misunderstood, and there is lots of misinformation out there.

There are actually several possibilities that work.  I have not chosen the
same possibility as you Roland, but hope I can help.  The how-to pages
linked earlier by Shinobu and me are also good points of reference, and if
you follow them _exactly_ it will work.  I belive that the simplest and
clearest page to follow is this one:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html -
I think the JDBC page contains at least one slightly misleading instruction.

To answer your question, yes you have used resource-ref correctly and your
Resource and ResourceParams elements seem OK.

However, note that you have not followed the recommended approach in the
how-to docs ;) because your Resource and ResourceParams are under
GlobalNamingResources rather than your webapp's Context tag.  However
that does not make it completely wrong.  Because they are under
GlobalNamingResources at the moment, they are not visible to your webapp.
To fix this, either they need to be moved under Context as recommended in
the how-to, or you need to add a ResourceLink under your webapp's
Context that refers to them.

The Context that I am referring to should be either under Host in
server.xml as described in the how-to docs, or in your webapp's context
config file (see my example below).

Strictly speaking, according to the JNDI how-to docs, I think your
Resource tag is not needed because you have a resource-ref, which is
equivalent, and you do not need both.  Having said that, I have tried it
both with and without the Resource tag, and both approaches work as long
as resource-ref is in web.xml.

For what it's worth, (but not wanting to confuse you!) below is the approach
that I have working.  I'm including this to illustrate that there is more
than one way to configure DBCP.  Note that this is a different approach to
yours, and also different to that described in the how-to docs on the TC
site.  I took this approach via trial and error because I did not find the
how-to docs until after I'd got pooling working.

1. I have a resource-ref like yours in my
CATALINA_HOME\webapps\webapp\WEB-INF\web.xml

2. I created a context config file at
CATALINA_HOME\conf\Catalina\localhost\mywebapp.xml, where mywebapp is the
name of the webapp, which contains just my webapp's  Context element,
which in turn contains Resource and ResourceParams very similar to
yours.  That this Context tag is more usually included in server.xml,
under the default localhost Host tag.  (By default your server.xml will
not include a Context tag for your webapp, you have to add it inside the
Context element for your webapp, or inside a DefaultContext element for the
surrounding Host or Engine element, as described in the JNDI how-to
page. The entire contents of my context config file are below:

?xml version='1.0' encoding='utf-8'?
Context docBase=C:\jakarta-tomcat-5.0.27\webapps\mywebapp
path=/mywebapp reloadable=true
ResourceParams name=jdbc/mywebapp
parameter
namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
... more parameters like yours ...
/ResourceParams
/Context

3. I have no ResourceLink anywhere - I don't need it because I have not
used GlobalNamingResources

I know that this is a long-winded reply, but this is a tricky area and easy
to get confused.  I've also been meaning to post this to the list for a few
months, having spent days learning it.  Hope this helps you and others :)

 -Original Message-
 From: Roland Carlsson [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 26 October 2004 12:09
 To: TomcatUsers
 Subject: Sv: JNDI DataSource GlobalResources problem
 
 
 Hello!
 
 Thanks for your answer. I have no ResourceLink in my configuration. I
 understand that I should put it a Context-tag but not where.
 
 How does this affect the configuration I already have done? 
 Is the use of
 resource-ref and Resource correct?
 



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



Suggestion for how-to docs

2004-10-26 Thread Steve Kirk

I have a suggestion for an improvement to the how-to docs (a slightly
misleading instruction which I think needs correcting).  Where should I send
that?  Bugzilla?

Also I have a suggestion for a new how-to document that I would be prepared
to write, or contribute to, if these are written by an established team.
I've never done one before.  Where do I suggest that?



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



Re: why the ThreadPool is empty if traffic is so low? (block with Tomcat 4.1.24-LE on linux)

2004-10-26 Thread Piergiuliano Bossi
Shapira, Yoav wrote:
Hi,
It seems like connections aren't being closed properly.  Some RedHat
users have reported a need to set the LD_ASSUME_KERNEL parameter such
that NPTL is not used and threading problems go away.  I myself don't
have experience with that, but if you search this list's archives for
LD_ASSUME_KERNEL you'll see what I'm talking about.
Thanks a lot, I'll take a look.
I'm sorry to bother again but I was wondering whether any of you has
some feedback about the following problem.
   

Don't worry/apologize, you're not bothering anyone.  Ask away.  If
someone doesn't feel like answering, they won't ;)
:-)
Examining the application log I only see a few exceptions caused by an
RDBMS shutdown. I am asking myself if this can be the cause of zombie
threads, but it seems strange to me.
   

It could be, depending on your driver.  If you're using connection
pooling such as via DBCP, try adding a validation query to the pool's
configuration.
We are using our own Connection Pooling mechanism built upon Jakarta 
Commons Pool. Basically the jdbc connection is never really released; 
nevertheless we do have a validation query.

Do you have any ideas? I may increase ThreadPool dimension, but when
   

the
 

block occurred traffic was low and it doesn't seem to justify any
   

change
 

on the configuration side. Is it a Tomcat issue? We are planning to
upgrade to 4.1.30 very soon, but could it be worth to go towards 4.1.31
or 5.x.y (not really planned yet)?
   

The block did not occur because traffic was high: I bet the hung
connections accumulated over a long period: possibly even the six months
you mentioned.
My guess too.
It's definitely worth your time to test with Tomcat 5.0.28.
:) One day I'll do it, thanks.
Cheers, Giuliano


RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Shapira, Yoav

Hi,
Steve's post is excellent, and I hope that in the future people search
the archives and read it.  Of course I've been hoping that would happen
with other such posts for years now ;)

Tomcat offers great flexibility in this area.  I think the docs now are
at a point where they really cover the vast majority of cases and work
for the vast majority of people.  That wasn't always the case, and we've
worked diligently to improve them.  But with flexibility comes
responsibility: we expect Tomcat users to be able to read, understand,
and follow the docs.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Steve Kirk [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 8:58 AM
To: 'Tomcat Users List'
Subject: RE: JNDI DataSource GlobalResources problem


This question illustrates (IMHO) probably the biggest issue of
confusion
with regard to DBCP - that is, there are several XML elements that you
can
potentially use, and several places that you can potentially put them.
Specifically, the Resource, ResourceParams and ResourceLink
elements
can go in server.xml or your webapp's context config file, and
resource-ref can go in your web.xml file.  Most people that have DBCP
problems seem to have trouble working out elements to use, and where to
put
them.  A quick search on the web shows that this issue is widely
misunderstood, and there is lots of misinformation out there.

There are actually several possibilities that work.  I have not chosen
the
same possibility as you Roland, but hope I can help.  The how-to pages
linked earlier by Shinobu and me are also good points of reference, and
if
you follow them _exactly_ it will work.  I belive that the simplest and
clearest page to follow is this one:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.ht
ml -
I think the JDBC page contains at least one slightly misleading
instruction.

To answer your question, yes you have used resource-ref correctly and
your
Resource and ResourceParams elements seem OK.

However, note that you have not followed the recommended approach in
the
how-to docs ;) because your Resource and ResourceParams are under
GlobalNamingResources rather than your webapp's Context tag.
However
that does not make it completely wrong.  Because they are under
GlobalNamingResources at the moment, they are not visible to your
webapp.
To fix this, either they need to be moved under Context as
recommended in
the how-to, or you need to add a ResourceLink under your webapp's
Context that refers to them.

The Context that I am referring to should be either under Host in
server.xml as described in the how-to docs, or in your webapp's context
config file (see my example below).

Strictly speaking, according to the JNDI how-to docs, I think your
Resource tag is not needed because you have a resource-ref, which
is
equivalent, and you do not need both.  Having said that, I have tried
it
both with and without the Resource tag, and both approaches work as
long
as resource-ref is in web.xml.

For what it's worth, (but not wanting to confuse you!) below is the
approach
that I have working.  I'm including this to illustrate that there is
more
than one way to configure DBCP.  Note that this is a different approach
to
yours, and also different to that described in the how-to docs on the
TC
site.  I took this approach via trial and error because I did not find
the
how-to docs until after I'd got pooling working.

1. I have a resource-ref like yours in my
CATALINA_HOME\webapps\webapp\WEB-INF\web.xml

2. I created a context config file at
CATALINA_HOME\conf\Catalina\localhost\mywebapp.xml, where mywebapp is
the
name of the webapp, which contains just my webapp's  Context element,
which in turn contains Resource and ResourceParams very similar to
yours.  That this Context tag is more usually included in server.xml,
under the default localhost Host tag.  (By default your server.xml
will
not include a Context tag for your webapp, you have to add it inside
the
Context element for your webapp, or inside a DefaultContext element for
the
surrounding Host or Engine element, as described in the JNDI how-to
page. The entire contents of my context config file are below:

?xml version='1.0' encoding='utf-8'?
Context docBase=C:\jakarta-tomcat-5.0.27\webapps\mywebapp
path=/mywebapp reloadable=true
   ResourceParams name=jdbc/mywebapp
   parameter
   namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   ... more parameters like yours ...
   /ResourceParams
/Context

3. I have no ResourceLink anywhere - I don't need it because I have
not
used GlobalNamingResources

I know that this is a long-winded reply, but this is a tricky area and
easy
to get confused.  I've also been meaning to post this to the list for a
few
months, having spent days learning it.  Hope this helps you and others
:)

 -Original Message-
 From: Roland Carlsson 

RE: Suggestion for how-to docs

2004-10-26 Thread Shapira, Yoav

Hi,
Submit your suggestions as .diff patches to Bugzilla.  Please mark your
issues as enhancements.  Thanks,

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Steve Kirk [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 9:00 AM
To: 'Tomcat Users List'
Subject: Suggestion for how-to docs


I have a suggestion for an improvement to the how-to docs (a slightly
misleading instruction which I think needs correcting).  Where should I
send
that?  Bugzilla?

Also I have a suggestion for a new how-to document that I would be
prepared
to write, or contribute to, if these are written by an established
team.
I've never done one before.  Where do I suggest that?



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



which Linux Platform is best for Tomcat?

2004-10-26 Thread sudip shrestha
Hi!
We are going to use Tomcat as our J2EE Server for the next project.  I was 
wondering if anybody knows of some sort of comparative study of performance 
of Tomcat on different Linux Distributions.  Recently I have seen that 
people were posting problems about Debian (woody).  We are thinking of 
Fedora Core 2.  Any suggestions/comments are welcome.

Regards,
Sudip

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


RE: which Linux Platform is best for Tomcat?

2004-10-26 Thread Carl F. Hall
I'm currently running Tomcat 5.0.28 w/ JRockit 1.4.2_04 on Debian Sarge.
Tomcat is running great and I haven't had any problems at all (w/ Tomcat,
that is).


-Original Message-
From: sudip shrestha [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 26, 2004 9:28 AM
To: [EMAIL PROTECTED]
Subject: which Linux Platform is best for Tomcat?

Hi!

We are going to use Tomcat as our J2EE Server for the next project.  I was 
wondering if anybody knows of some sort of comparative study of performance 
of Tomcat on different Linux Distributions.  Recently I have seen that 
people were posting problems about Debian (woody).  We are thinking of 
Fedora Core 2.  Any suggestions/comments are welcome.

Regards,
Sudip



-
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: which Linux Platform is best for Tomcat?

2004-10-26 Thread Dale, Matt

If you go with core 2 you'll need to upgrade to a later kernel as there was problems 
running java on the shipped kernel. Core 3 should be out soon but that'll no doubt 
introduce it's own problems. Might be worth a shot though.

-Original Message-
From: sudip shrestha [mailto:[EMAIL PROTECTED]
Sent: 26 October 2004 14:28
To: [EMAIL PROTECTED]
Subject: which Linux Platform is best for Tomcat?


Hi!

We are going to use Tomcat as our J2EE Server for the next project.  I was 
wondering if anybody knows of some sort of comparative study of performance 
of Tomcat on different Linux Distributions.  Recently I have seen that 
people were posting problems about Debian (woody).  We are thinking of 
Fedora Core 2.  Any suggestions/comments are welcome.

Regards,
Sudip



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

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not the 
intended recipient or the person responsible for delivering to the intended recipient, 
be advised that you have received this E-mail in error and that any use or copying is 
strictly prohibited. If you have received this E-mail in error please notify the 
beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual sender and 
not beCogent Ltd. You must take full responsibility for virus checking this email and 
any attachments.
Please note that the content of this email or any of its attachments may contain data 
that falls within the scope of the Data Protection Acts and that you must ensure that 
any handling or processing of such data by you is fully compliant with the terms and 
provisions of the Data Protection Act 1984 and 1998.


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

RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread sven morales
 Stever Kirk:  Did I read that right, Resource
nested inside GlobaNamingResource is not visible to
the webapp?  I thought that was the whole purpose to
make it visible globally naming resources under
GlobalNamingResource noh?  If Im wrong I stand
corrected.




__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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



RE: RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Shapira, Yoav

Hi,
A Resource nested inside GlobalNamingResources requires a
ResourceLink element in your Context to be visible to your webapp.
This is explained in the documentation.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: sven morales [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 9:54 AM
To: [EMAIL PROTECTED]
Subject: RE: JNDI DataSource GlobalResources problem

 Stever Kirk:  Did I read that right, Resource
nested inside GlobaNamingResource is not visible to
the webapp?  I thought that was the whole purpose to
make it visible globally naming resources under
GlobalNamingResource noh?  If Im wrong I stand
corrected.




__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

-
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: which Linux Platform is best for Tomcat?

2004-10-26 Thread A Leg
Hi
I use fedora 2, and I have no problem with java, nor tomcat.
But tomcat deliver with fedora is an old one. You would have to download 
some up to date release.
I have also some mandrake and it works good.

Best regards
Andre
Dale, Matt wrote:
If you go with core 2 you'll need to upgrade to a later kernel as there was problems 
running java on the shipped kernel. Core 3 should be out soon but that'll no doubt 
introduce it's own problems. Might be worth a shot though.
-Original Message-
From: sudip shrestha [mailto:[EMAIL PROTECTED]
Sent: 26 October 2004 14:28
To: [EMAIL PROTECTED]
Subject: which Linux Platform is best for Tomcat?
Hi!
We are going to use Tomcat as our J2EE Server for the next project.  I was 
wondering if anybody knows of some sort of comparative study of performance 
of Tomcat on different Linux Distributions.  Recently I have seen that 
people were posting problems about Debian (woody).  We are thinking of 
Fedora Core 2.  Any suggestions/comments are welcome.

Regards,
Sudip

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


Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not the 
intended recipient or the person responsible for delivering to the intended recipient, 
be advised that you have received this E-mail in error and that any use or copying is 
strictly prohibited. If you have received this E-mail in error please notify the 
beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual sender and 
not beCogent Ltd. You must take full responsibility for virus checking this email and 
any attachments.
Please note that the content of this email or any of its attachments may contain data 
that falls within the scope of the Data Protection Acts and that you must ensure that 
any handling or processing of such data by you is fully compliant with the terms and 
provisions of the Data Protection Act 1984 and 1998.
 


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



RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk

I agree that you might expect GlobalNamingResources to be accessible
globally.  But I think what the name is intended to mean is that the
resources under GlobalNamingResources are _potentially_ available to any
webapp -subject to you configuring the ResourceLink.  Contrast this with
placing the Resource under a webapp Context, in which case is not not even
potentially available to other webapps.

I'm basing my comment on my own experiences in failing to get DBCP to work
when using Resource under GlobalNamingResources, plus what it says here:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html#Resource
%20Links 

 -Original Message-
 From: sven morales [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 26 October 2004 14:54
 To: [EMAIL PROTECTED]
 Subject: RE: JNDI DataSource GlobalResources problem
 
 
  Stever Kirk:  Did I read that right, Resource
 nested inside GlobaNamingResource is not visible to
 the webapp?  I thought that was the whole purpose to
 make it visible globally naming resources under
 GlobalNamingResource noh?  If Im wrong I stand
 corrected.
 
 
 
   
 __
 Do you Yahoo!?
 Yahoo! Mail Address AutoComplete - You start. We finish.
 http://promotions.yahoo.com/new_mail 
 
 -
 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: Suggestion for how-to docs

2004-10-26 Thread Steve Kirk

Do I just view page source from the HTML in my browser then base a diff on
that, or is there a separate source repository I need to get it from?  I
just browsed through the how to contribute and CVS pages but couldn't see
quickly how to get the page source.  The how-to page in question is 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-how
to.html

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 26 October 2004 14:06
 To: Tomcat Users List
 Subject: RE: Suggestion for how-to docs
 
 
 
 Hi,
 Submit your suggestions as .diff patches to Bugzilla.  Please 
 mark your
 issues as enhancements.  Thanks,
 
 Yoav Shapira http://www.yoavshapira.com
  
 
 -Original Message-
 From: Steve Kirk [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, October 26, 2004 9:00 AM
 To: 'Tomcat Users List'
 Subject: Suggestion for how-to docs
 
 
 I have a suggestion for an improvement to the how-to docs (a slightly
 misleading instruction which I think needs correcting).  
 Where should I
 send
 that?  Bugzilla?
 
 Also I have a suggestion for a new how-to document that I would be
 prepared
 to write, or contribute to, if these are written by an established
 team.
 I've never done one before.  Where do I suggest that?
 
 
 
 -
 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: which Linux Platform is best for Tomcat?

2004-10-26 Thread Evgeny Gesin
Tomcat 4.x works very well on production servers with
RedHat 9 and Fedora 2. The new Java 1.5 adds better
memory management.

Evgeny Gesin
http://www.javadesk.com
http://www.alltelescopes.com



__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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



RE: which Linux Platform is best for Tomcat?

2004-10-26 Thread Filip Hanik \(lists\)
redhat 9 is pretty crummy with java, you might need to add in the
LD_ASSUME_KERNEL parameter for stability

Filip

-Original Message-
From: Evgeny Gesin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 9:11 AM
To: Tomcat Users List
Subject: Re: which Linux Platform is best for Tomcat?


Tomcat 4.x works very well on production servers with
RedHat 9 and Fedora 2. The new Java 1.5 adds better
memory management.

Evgeny Gesin
http://www.javadesk.com
http://www.alltelescopes.com



__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

-
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: Suggestion for how-to docs

2004-10-26 Thread Shapira, Yoav

Hi,
The diff patches are against the XML source of the docs, so yes you do
need to go to the source repository (or download a Tomcat source
distro).  For online access to the source of the how-to's, see
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-catalina/webapps/docs/.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Steve Kirk [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 10:08 AM
To: 'Tomcat Users List'
Subject: RE: Suggestion for how-to docs


Do I just view page source from the HTML in my browser then base a diff
on
that, or is there a separate source repository I need to get it from?
I
just browsed through the how to contribute and CVS pages but couldn't
see
quickly how to get the page source.  The how-to page in question is
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-example
s-
how
to.html

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: Tuesday 26 October 2004 14:06
 To: Tomcat Users List
 Subject: RE: Suggestion for how-to docs



 Hi,
 Submit your suggestions as .diff patches to Bugzilla.  Please
 mark your
 issues as enhancements.  Thanks,

 Yoav Shapira http://www.yoavshapira.com


 -Original Message-
 From: Steve Kirk [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, October 26, 2004 9:00 AM
 To: 'Tomcat Users List'
 Subject: Suggestion for how-to docs
 
 
 I have a suggestion for an improvement to the how-to docs (a
slightly
 misleading instruction which I think needs correcting).
 Where should I
 send
 that?  Bugzilla?
 
 Also I have a suggestion for a new how-to document that I would be
 prepared
 to write, or contribute to, if these are written by an established
 team.
 I've never done one before.  Where do I suggest that?
 
 
 

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




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: which Linux Platform is best for Tomcat?

2004-10-26 Thread Giuseppe Briotti
I use both Suse 9.1 and Mandrake 10 and all works great! :-)

G




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



Sv: JNDI DataSource GlobalResources problem

2004-10-26 Thread Roland Carlsson
Thank you very much for your help. I appreciate it very much.

I feel that the GlobalNamingResources is the place to put my
DataSource-definition since there I can do it one time for all web-apps that
are going to come and go. If there are any change is our databases it is one
place to change. Thats why I ran for that alternative.

I'm looking forward to see the new documentation about DBCP in Tomcat.

Regards
Roland Carlsson


Den 04-10-26 14.58, skrev Steve Kirk [EMAIL PROTECTED]:

 
 This question illustrates (IMHO) probably the biggest issue of confusion
 with regard to DBCP - that is, there are several XML elements that you can
 potentially use, and several places that you can potentially put them.
 Specifically, the Resource, ResourceParams and ResourceLink elements
 can go in server.xml or your webapp's context config file, and
 resource-ref can go in your web.xml file.  Most people that have DBCP
 problems seem to have trouble working out elements to use, and where to put
 them.  A quick search on the web shows that this issue is widely
 misunderstood, and there is lots of misinformation out there.
 
 There are actually several possibilities that work.  I have not chosen the
 same possibility as you Roland, but hope I can help.  The how-to pages
 linked earlier by Shinobu and me are also good points of reference, and if
 you follow them _exactly_ it will work.  I belive that the simplest and
 clearest page to follow is this one:
 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html -
 I think the JDBC page contains at least one slightly misleading instruction.
 
 To answer your question, yes you have used resource-ref correctly and your
 Resource and ResourceParams elements seem OK.
 
 However, note that you have not followed the recommended approach in the
 how-to docs ;) because your Resource and ResourceParams are under
 GlobalNamingResources rather than your webapp's Context tag.  However
 that does not make it completely wrong.  Because they are under
 GlobalNamingResources at the moment, they are not visible to your webapp.
 To fix this, either they need to be moved under Context as recommended in
 the how-to, or you need to add a ResourceLink under your webapp's
 Context that refers to them.
 
 The Context that I am referring to should be either under Host in
 server.xml as described in the how-to docs, or in your webapp's context
 config file (see my example below).
 
 Strictly speaking, according to the JNDI how-to docs, I think your
 Resource tag is not needed because you have a resource-ref, which is
 equivalent, and you do not need both.  Having said that, I have tried it
 both with and without the Resource tag, and both approaches work as long
 as resource-ref is in web.xml.
 
 For what it's worth, (but not wanting to confuse you!) below is the approach
 that I have working.  I'm including this to illustrate that there is more
 than one way to configure DBCP.  Note that this is a different approach to
 yours, and also different to that described in the how-to docs on the TC
 site.  I took this approach via trial and error because I did not find the
 how-to docs until after I'd got pooling working.
 
 1. I have a resource-ref like yours in my
 CATALINA_HOME\webapps\webapp\WEB-INF\web.xml
 
 2. I created a context config file at
 CATALINA_HOME\conf\Catalina\localhost\mywebapp.xml, where mywebapp is the
 name of the webapp, which contains just my webapp's  Context element,
 which in turn contains Resource and ResourceParams very similar to
 yours.  That this Context tag is more usually included in server.xml,
 under the default localhost Host tag.  (By default your server.xml will
 not include a Context tag for your webapp, you have to add it inside the
 Context element for your webapp, or inside a DefaultContext element for the
 surrounding Host or Engine element, as described in the JNDI how-to
 page. The entire contents of my context config file are below:
 
 ?xml version='1.0' encoding='utf-8'?
 Context docBase=C:\jakarta-tomcat-5.0.27\webapps\mywebapp
 path=/mywebapp reloadable=true
 ResourceParams name=jdbc/mywebapp
 parameter
 namefactory/name
 
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 ... more parameters like yours ...
 /ResourceParams
 /Context
 
 3. I have no ResourceLink anywhere - I don't need it because I have not
 used GlobalNamingResources
 
 I know that this is a long-winded reply, but this is a tricky area and easy
 to get confused.  I've also been meaning to post this to the list for a few
 months, having spent days learning it.  Hope this helps you and others :)
 
 -Original Message-
 From: Roland Carlsson [mailto:[EMAIL PROTECTED]
 Sent: Tuesday 26 October 2004 12:09
 To: TomcatUsers
 Subject: Sv: JNDI DataSource GlobalResources problem
 
 
 Hello!
 
 Thanks for your answer. I have no ResourceLink in my configuration. I
 understand that I should put it a Context-tag but not where.
 
 How does this affect the 

Re: which Linux Platform is best for Tomcat?

2004-10-26 Thread Ronald Klop
My company is running a 2-node cluster of Tomcat 5.0.25 on Debian Woody (custom 
upgraded kernel 2.4 and 2.6) with about 70 requests/sec.
Recently we started upgrading some test machines to Debian Sarge, which still runs 
very well.
Ronald.
On Tue Oct 26 15:27:44 CEST 2004 sudip shrestha [EMAIL PROTECTED] wrote:
Hi!
We are going to use Tomcat as our J2EE Server for the next project. I was 
wondering if anybody knows of some sort of comparative study of performance 
of Tomcat on different Linux Distributions. Recently I have seen that 
people were posting problems about Debian (woody). We are thinking of 
Fedora Core 2. Any suggestions/comments are welcome.

Regards,
Sudip

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



RE: which Linux Platform is best for Tomcat?

2004-10-26 Thread Mike Curwen
What the heck.. haven't heard mine yet.

Slack 9, no problems at all. :)


 -Original Message-
 From: Giuseppe Briotti [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, October 26, 2004 9:18 AM
 To: [EMAIL PROTECTED]
 Subject: Re: which Linux Platform is best for Tomcat?
 
 
 I use both Suse 9.1 and Mandrake 10 and all works great! :-)
 
 G
 
 
 
 
 -
 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]



MySQL upgrade Problem

2004-10-26 Thread e-Denton Subscriber
Hi,

I just upgraded from MySql 3.x to 4.0 and now I can't make connections work
from Tomcat. I have read a bunch of stuff on the Web about this or similar
problems, but, even though it worked before,  I can't make it work now.

I specify my connection info in server.xml and context.xml just like I used
to (below). The only difference is (?) the new MySql, and the fact that I am
trying to use a new, different password (with a dollar sign in it). (Oh,
and, I set appBase outside the Tomcat home directory.)  On Tomcat startup, I
get:

JDBCRealm[Catalina]:
Exception opening database connection
java.sql.SQLException: Invalid authorization specification: Access denied
for user: '[EMAIL PROTECTED]' (Using password: YES)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:659)...

I can login manually to MySql using the same user and password.
I can access the database directly from Java programs which make their own
connection.

Any ideas what's going wrong?

web.xml:
-
 Realm className=org.apache.catalina.realm.JDBCRealm
debug=99
driverName=com.mysql.jdbc.Driver
connectionURL=jdbc:mysql://127.0.0.1:3306/xxx
connectionName=yyy
connectionPassword=$zzz
userTable=portal_user
 userNameCol=clientName
 userCredCol=clientPassword
userRoleTable=portal_role
 roleNameCol=clientRole
digest=md5 /

conext.xml:
---
   Resource name=jdbc/portal auth=Container
type=javax.sql.DataSource/

ResourceParams name=jdbc/portal
  parameter
   namefactory/name
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
parameter
nameusername/name
valueyyy/value
/parameter
parameter
namepassword/name
value$zzz/value
/parameter
parameter
namedriverClassName/name
valuecom.mysql.jdbc.Driver/value
/parameter
parameter
nameurl/name

valuejdbc:mysql://127.0.0.1:3306/xxx?autoReconnect=true/value
/parameter
parameter
namemaxActive/name
value10/value
/parameter
parameter
namemaxIdle/name
value5/value
/parameter
  parameter
   namemaxWait/name
   value1/value
  /parameter
/ResourceParams




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



Running Tomcat from jsvc

2004-10-26 Thread [EMAIL PROTECTED]
Hi Folks,
I'm having problems starting Tomcat 5.0.28 using jsvc.
My system is SuSE Linux 9.1 with j2sdk1.4.2_05.
When I start Tomcat using $CATALINA_HOME/bin/startup.sh everything works 
fine. But now I want to run Tomcat as a daemon under a non-root user.

I followed the instructions on[1] for Unix daemon and built jsvc that I 
succeeded to start using the Tomcat5.sh script[2]. But actually, Tomcat 
didn't really start. So I added the options -verbose and -debug to 
the script[2] and saved the catalina.out log[3].

According to the log (line 1367), the daemon startet successfully, but 
when my browsers request http://localhost:8080/ , then there is no 
connection.

The log (line 626)[3] is telling me that server.xml couldn't be 
loaded, but it didn't tell why.

Could please somebody give me a hint what might be wrong and what I have 
to change to get it running?

[1]http://jakarta.apache.org/tomcat/tomcat-5.0-doc/setup.html#Unix%20daemon
[2]http://home.arcor.de/plsdontreply/tomcat/Tomcat5.sh.txt
[3]http://home.arcor.de/plsdontreply/tomcat/catalina.out.txt
--
Thanks in advance
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: MySQL upgrade Problem

2004-10-26 Thread Allistair Crossley
i don't know much about this but you mention the things that are different like dollar 
in password .. but have you tried setting the password to how it was when you used to 
use it? and putting appBase back as it was. You say you changed nothing but you've 
changed several things. Did you also upgrade your driver JAR?

Allistair 

 -Original Message-
 From: e-Denton Subscriber [mailto:[EMAIL PROTECTED]
 Sent: 26 October 2004 16:04
 To: Tomcat Users List
 Subject: MySQL upgrade Problem
 
 
 Hi,
 
 I just upgraded from MySql 3.x to 4.0 and now I can't make 
 connections work
 from Tomcat. I have read a bunch of stuff on the Web about 
 this or similar
 problems, but, even though it worked before,  I can't make it 
 work now.
 
 I specify my connection info in server.xml and context.xml 
 just like I used
 to (below). The only difference is (?) the new MySql, and the 
 fact that I am
 trying to use a new, different password (with a dollar sign 
 in it). (Oh,
 and, I set appBase outside the Tomcat home directory.)  On 
 Tomcat startup, I
 get:
 
 JDBCRealm[Catalina]:
 Exception opening database connection
 java.sql.SQLException: Invalid authorization specification: 
 Access denied
 for user: '[EMAIL PROTECTED]' (Using password: YES)
 at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:659)...
 
 I can login manually to MySql using the same user and password.
 I can access the database directly from Java programs which 
 make their own
 connection.
 
 Any ideas what's going wrong?
 
 web.xml:
 -
  Realm className=org.apache.catalina.realm.JDBCRealm
 debug=99
 driverName=com.mysql.jdbc.Driver
 connectionURL=jdbc:mysql://127.0.0.1:3306/xxx
 connectionName=yyy
 connectionPassword=$zzz
 userTable=portal_user
  userNameCol=clientName
  userCredCol=clientPassword
 userRoleTable=portal_role
  roleNameCol=clientRole
 digest=md5 /
 
 conext.xml:
 ---
Resource name=jdbc/portal auth=Container
 type=javax.sql.DataSource/
 
 ResourceParams name=jdbc/portal
   parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
 parameter
 nameusername/name
 valueyyy/value
 /parameter
 parameter
 namepassword/name
 value$zzz/value
 /parameter
 parameter
 namedriverClassName/name
 valuecom.mysql.jdbc.Driver/value
 /parameter
 parameter
 nameurl/name
 
 valuejdbc:mysql://127.0.0.1:3306/xxx?autoReconnect=true/value
 /parameter
 parameter
 namemaxActive/name
 value10/value
 /parameter
 parameter
 namemaxIdle/name
 value5/value
 /parameter
   parameter
namemaxWait/name
value1/value
   /parameter
 /ResourceParams
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE 
---
QAS Ltd.
Developers of QuickAddress Software
a href=http://www.qas.com;www.qas.com/a
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT


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



RE: Running Tomcat from jsvc

2004-10-26 Thread Shapira, Yoav

Hi,
You have to start the jsvc as root, then it changes the effective user
ID to non-root.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 11:07 AM
To: [EMAIL PROTECTED]
Subject: Running Tomcat from jsvc

Hi Folks,
I'm having problems starting Tomcat 5.0.28 using jsvc.

My system is SuSE Linux 9.1 with j2sdk1.4.2_05.

When I start Tomcat using $CATALINA_HOME/bin/startup.sh everything
works
fine. But now I want to run Tomcat as a daemon under a non-root user.

I followed the instructions on[1] for Unix daemon and built jsvc that I
succeeded to start using the Tomcat5.sh script[2]. But actually, Tomcat
didn't really start. So I added the options -verbose and -debug to
the script[2] and saved the catalina.out log[3].

According to the log (line 1367), the daemon startet successfully, but
when my browsers request http://localhost:8080/ , then there is no
connection.

The log (line 626)[3] is telling me that server.xml couldn't be
loaded, but it didn't tell why.

Could please somebody give me a hint what might be wrong and what I
have
to change to get it running?

[1]http://jakarta.apache.org/tomcat/tomcat-5.0-
doc/setup.html#Unix%20daemon
[2]http://home.arcor.de/plsdontreply/tomcat/Tomcat5.sh.txt
[3]http://home.arcor.de/plsdontreply/tomcat/catalina.out.txt
--
Thanks in advance
[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: MySQL upgrade Problem

2004-10-26 Thread Mike Curwen
is it a new username?  Are you connecting to mysql from a different host?

The problem is clear in the stacktrace:
Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)

login to mysql and setup your user's access.



 -Original Message-
 From: e-Denton Subscriber [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, October 26, 2004 10:04 AM
 To: Tomcat Users List
 Subject: MySQL upgrade Problem
 
 
 Hi,
 
 I just upgraded from MySql 3.x to 4.0 and now I can't make 
 connections work from Tomcat. I have read a bunch of stuff on 
 the Web about this or similar problems, but, even though it 
 worked before,  I can't make it work now.
 
 I specify my connection info in server.xml and context.xml 
 just like I used to (below). The only difference is (?) the 
 new MySql, and the fact that I am trying to use a new, 
 different password (with a dollar sign in it). (Oh, and, I 
 set appBase outside the Tomcat home directory.)  On Tomcat startup, I
 get:
 
 JDBCRealm[Catalina]:
 Exception opening database connection
 java.sql.SQLException: Invalid authorization specification: 
 Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) 
 at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:659)...
 
 I can login manually to MySql using the same user and 
 password. I can access the database directly from Java 
 programs which make their own connection.
 
 Any ideas what's going wrong?
 
 web.xml:
 -
  Realm className=org.apache.catalina.realm.JDBCRealm
 debug=99
 driverName=com.mysql.jdbc.Driver
 connectionURL=jdbc:mysql://127.0.0.1:3306/xxx
 connectionName=yyy
 connectionPassword=$zzz
 userTable=portal_user
  userNameCol=clientName
  userCredCol=clientPassword
 userRoleTable=portal_role
  roleNameCol=clientRole
 digest=md5 /
 
 conext.xml:
 ---
Resource name=jdbc/portal auth=Container 
 type=javax.sql.DataSource/
 
 ResourceParams name=jdbc/portal
   parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
 parameter
 nameusername/name
 valueyyy/value
 /parameter
 parameter
 namepassword/name
 value$zzz/value
 /parameter
 parameter
 namedriverClassName/name
 valuecom.mysql.jdbc.Driver/value
 /parameter
 parameter
 nameurl/name
 
 valuejdbc:mysql://127.0.0.1:3306/xxx?autoReconnect=true/value
 /parameter
 parameter
 namemaxActive/name
 value10/value
 /parameter
 parameter
 namemaxIdle/name
 value5/value
 /parameter
   parameter
namemaxWait/name
value1/value
   /parameter
 /ResourceParams
 
 
 
 
 -
 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: MySQL upgrade Problem

2004-10-26 Thread Shapira, Yoav

Hi,
Dollar sign in password is a no-no right now.  It gets escaped.  It's a
PITA to fix, so I (and apparently others) haven't done it yet.  If you
really want a dollar sign in your password, submit a patch ;)

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: e-Denton Subscriber [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 11:04 AM
To: Tomcat Users List
Subject: MySQL upgrade Problem

Hi,

I just upgraded from MySql 3.x to 4.0 and now I can't make connections
work
from Tomcat. I have read a bunch of stuff on the Web about this or
similar
problems, but, even though it worked before,  I can't make it work now.

I specify my connection info in server.xml and context.xml just like I
used
to (below). The only difference is (?) the new MySql, and the fact that
I
am
trying to use a new, different password (with a dollar sign in it).
(Oh,
and, I set appBase outside the Tomcat home directory.)  On Tomcat
startup,
I
get:

JDBCRealm[Catalina]:
Exception opening database connection
java.sql.SQLException: Invalid authorization specification: Access
denied
for user: '[EMAIL PROTECTED]' (Using password: YES)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:659)...

I can login manually to MySql using the same user and password.
I can access the database directly from Java programs which make their
own
connection.

Any ideas what's going wrong?

web.xml:
-
 Realm className=org.apache.catalina.realm.JDBCRealm
debug=99
driverName=com.mysql.jdbc.Driver
connectionURL=jdbc:mysql://127.0.0.1:3306/xxx
connectionName=yyy
connectionPassword=$zzz
userTable=portal_user
 userNameCol=clientName
 userCredCol=clientPassword
userRoleTable=portal_role
 roleNameCol=clientRole
digest=md5 /

conext.xml:
---
   Resource name=jdbc/portal auth=Container
type=javax.sql.DataSource/

ResourceParams name=jdbc/portal
  parameter
   namefactory/name
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
parameter
nameusername/name
valueyyy/value
/parameter
parameter
namepassword/name
value$zzz/value
/parameter
parameter
namedriverClassName/name
valuecom.mysql.jdbc.Driver/value
/parameter
parameter
nameurl/name

valuejdbc:mysql://127.0.0.1:3306/xxx?autoReconnect=true/value
/parameter
parameter
namemaxActive/name
value10/value
/parameter
parameter
namemaxIdle/name
value5/value
/parameter
  parameter
   namemaxWait/name
   value1/value
  /parameter
/ResourceParams




-
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: JNDI DataSource GlobalResources problem

2004-10-26 Thread Viorel Dragomir
Hi

Review current docs from jakarta project regarding jndi config.
I personally disagree with your conclusion, setting server.xml is not such a good idea.

So here what I've done, maybe it will help you.

First set the webapp/[your-app]/META-INF/context.xml

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

 ResourceParams name=jdbc/postgres

 parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

 parameter
namedriverClassName/name
valueorg.postgresql.Driver/value
/parameter

 parameter
nameurl/name
valuejdbc:postgresql://localhost/database/value
/parameter

 parameter
nameusername/name
valuepostgres/value
/parameter

 parameter
namepassword/name
value/
/parameter

 parameter
namemaxActive/name
value20/value
/parameter

 parameter
namemaxIdle/name
value10/value
/parameter

 parameter
namemaxWait/name
value-1/value
/parameter

 parameter
nameremoveAbandoned/name
valuetrue/value
/parameter

 parameter
nameremoveAbandonedTimeout/name
value60/value
/parameter

 parameter
namelogAbandoned/name
valuetrue/value
/parameter
/ResourceParams

/context

Now add to webapp/[web-app]/WEB-INF/web.xml

web-app

resource-ref
descriptionpostgreSQL Datasource example/description
res-ref-namejdbc/postgres/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
...
/web-app

I use pg74.215.jdbc2ee.jar located in webapp/[web-app]/WEB-INF/lib/

You can get a connection through Tomcat [don't use main() to test this because it 
won't work] using this kind of code:


Context initContext = new InitialContext();
Context envContext  = (Context)initContext.lookup(java:/comp/env);
DataSource ds = (DataSource)envContext.lookup(jdbc/postgres);
conn = ds.getConnection();


I actually think is not so hard to implement it.
Hope you can use some of this..
As you can see it was for postgresql and localhost, but you can change as you need.




Viorel Dragomir




- Original Message - 
From: Roland Carlsson 
To: TomcatUsers 
Sent: Tuesday, October 26, 2004 17:55
Subject: Sv: JNDI DataSource GlobalResources problem


Thank you very much for your help. I appreciate it very much.

I feel that the GlobalNamingResources is the place to put my
DataSource-definition since there I can do it one time for all web-apps that
are going to come and go. If there are any change is our databases it is one
place to change. Thats why I ran for that alternative.

I'm looking forward to see the new documentation about DBCP in Tomcat.

Regards
Roland Carlsson


Den 04-10-26 14.58, skrev Steve Kirk [EMAIL PROTECTED]:

 
 This question illustrates (IMHO) probably the biggest issue of confusion
 with regard to DBCP - that is, there are several XML elements that you can
 potentially use, and several places that you can potentially put them.
 Specifically, the Resource, ResourceParams and ResourceLink elements
 can go in server.xml or your webapp's context config file, and
 resource-ref can go in your web.xml file.  Most people that have DBCP
 problems seem to have trouble working out elements to use, and where to put
 them.  A quick search on the web shows that this issue is widely
 misunderstood, and there is lots of misinformation out there.
 
 There are actually several possibilities that work.  I have not chosen the
 same possibility as you Roland, but hope I can help.  The how-to pages
 linked earlier by Shinobu and me are also good points of reference, and if
 you follow them _exactly_ it will work.  I belive that the simplest and
 clearest page to follow is this one:
 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html -
 I think the JDBC page contains at least one slightly misleading instruction.
 
 To answer your question, yes you have used resource-ref correctly and your
 Resource and ResourceParams elements seem OK.
 
 However, note that you have not followed the recommended approach in the
 how-to docs ;) because your Resource and ResourceParams are under
 GlobalNamingResources rather than your webapp's Context tag.  However
 that does not make it completely wrong.  Because they are under
 GlobalNamingResources at the moment, they are not visible to your webapp.
 To fix this, either they need to be moved under Context as recommended in
 the how-to, or you need to add a ResourceLink under your webapp's
 Context that refers to them.
 
 The Context that I am referring to should be either under Host in
 server.xml as described in the how-to docs, or in your webapp's context
 config file (see my example below).
 
 Strictly speaking, according to the JNDI how-to docs, I think your
 Resource tag is not needed because you have a resource-ref, which is
 equivalent, and you do not need both.  Having said that, I have tried it
 both with and without the Resource tag, and both approaches work as long
 as resource-ref is in web.xml.
 
 For what it's worth, (but not 

Re: Running Tomcat from jsvc

2004-10-26 Thread [EMAIL PROTECTED]
Shapira, Yoav wrote:
Hi,
You have to start the jsvc as root, then it changes the effective user
ID to non-root.
Hi,
That's exactly what I did, and according to the log (line 1, line 685), 
the user has been changed. Did I misunderstand something?

Of course, before that, I had tried to start that script as non-root and 
ran into a lot more of errors. But that's a different story.
--
[EMAIL PROTECTED]

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


Re: which Linux Platform is best for Tomcat?

2004-10-26 Thread David Goodenough
Likewise Debian Sid.  Works well, but no .deb file to install it
so had to use the tar file.

On Tuesday 26 October 2004 16:02, Mike Curwen wrote:
 What the heck.. haven't heard mine yet.

 Slack 9, no problems at all. :)

  -Original Message-
  From: Giuseppe Briotti [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, October 26, 2004 9:18 AM
  To: [EMAIL PROTECTED]
  Subject: Re: which Linux Platform is best for Tomcat?
 
 
  I use both Suse 9.1 and Mandrake 10 and all works great! :-)
 
  G
 
 
 
 
  -
  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: which Linux Platform is best for Tomcat?

2004-10-26 Thread Larry Meadors
..nor mine - gentoo!

 [EMAIL PROTECTED] 10/26/04 9:02 AM 
What the heck.. haven't heard mine yet.

Slack 9, no problems at all. :)


 -Original Message-
 From: Giuseppe Briotti [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, October 26, 2004 9:18 AM
 To: [EMAIL PROTECTED]
 Subject: Re: which Linux Platform is best for Tomcat?
 
 
 I use both Suse 9.1 and Mandrake 10 and all works great! :-)
 
 G
 
 
 
 
 -
 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: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk

Viorel,  Your approach is interesting.  It's only different from mine in one
way: you put your Context in 
webapp/[your-app]/META-INF/context.xml
but I put mine in
conf/Catalina/localhost/[your-app].xml

Actually I would like your approach better than mine if I could get it to
work, because it would mean that the context config is located in a
predictable sub-path within the webapp folder, rather than an unpredictable
sub-path within the conf folder.  Unfortunately though, your approach does
not work on my installation.  Can you point me to a page that explains how
to get this to work?  I understood that context.xml is used to deploy
webapps using the deployer, rather than configure them once installed.  I
have uninstalled all the standard webapps including manager, so the deploy
option is unavailable - do I need it to use context.xml?

I agree that DBCP is pretty easy to configure once you know how.  It's just
that I think a lot of people get confused by all the different articles on
the web (and in books, I guess), because the different articles use
different approaches to configuration.

IMHO, whether it is better to configure resources within a webapp Context
in server.xml (as described in the how-to docs) or not depends on your
circumstances.  I think that putting them under GlobalNamingResources can be
useful, if the server needs to share resources with several webapps, without
each webapp having to configure them separately.  I do agree though that if
you want a Resource to belong just to one webapp, it's better NOT to put it
within server.xml at all - its better maintained within the webapp's own
config file.  That's just my opinion though :)

 -Original Message-
 From: Viorel Dragomir [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 26 October 2004 16:18
 To: Tomcat Users List
 Subject: Re: JNDI DataSource GlobalResources problem
 
 
 Hi
 
 Review current docs from jakarta project regarding jndi config.
 I personally disagree with your conclusion, setting 
 server.xml is not such a good idea.
 
 So here what I've done, maybe it will help you.
 
 First set the webapp/[your-app]/META-INF/context.xml
 
 context  
 Resource name=jdbc/postgres auth=Container 
 type=javax.sql.DataSource/
 
  ResourceParams name=jdbc/postgres
 
  parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 
  parameter
 namedriverClassName/name
 valueorg.postgresql.Driver/value
 /parameter
 
  parameter
 nameurl/name
 valuejdbc:postgresql://localhost/database/value
 /parameter
 
  parameter
 nameusername/name
 valuepostgres/value
 /parameter
 
  parameter
 namepassword/name
 value/
 /parameter
 
  parameter
 namemaxActive/name
 value20/value
 /parameter
 
  parameter
 namemaxIdle/name
 value10/value
 /parameter
 
  parameter
 namemaxWait/name
 value-1/value
 /parameter
 
  parameter
 nameremoveAbandoned/name
 valuetrue/value
 /parameter
 
  parameter
 nameremoveAbandonedTimeout/name
 value60/value
 /parameter
 
  parameter
 namelogAbandoned/name
 valuetrue/value
 /parameter
 /ResourceParams
 
 /context
 
 Now add to webapp/[web-app]/WEB-INF/web.xml
 
 web-app
 
 resource-ref
 descriptionpostgreSQL Datasource example/description
 res-ref-namejdbc/postgres/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
 /resource-ref
 ...
 /web-app
 
 I use pg74.215.jdbc2ee.jar located in webapp/[web-app]/WEB-INF/lib/
 
 You can get a connection through Tomcat [don't use main() to 
 test this because it won't work] using this kind of code:
 
 
 Context initContext = new InitialContext();
 Context envContext  = 
 (Context)initContext.lookup(java:/comp/env);
 DataSource ds = 
 (DataSource)envContext.lookup(jdbc/postgres);
 conn = ds.getConnection();
 
 
 I actually think is not so hard to implement it.
 Hope you can use some of this..
 As you can see it was for postgresql and localhost, but you 
 can change as you need.
 
 
 
 
 Viorel Dragomir
 
 
 
 
 - Original Message - 
 From: Roland Carlsson 
 To: TomcatUsers 
 Sent: Tuesday, October 26, 2004 17:55
 Subject: Sv: JNDI DataSource GlobalResources problem
 
 
 Thank you very much for your help. I appreciate it very much.
 
 I feel that the GlobalNamingResources is the place to put my
 DataSource-definition since there I can do it one time for 
 all web-apps that
 are going to come and go. If there are any change is our 
 databases it is one
 place to change. Thats why I ran for that alternative.
 
 I'm looking forward to see the new documentation about DBCP in Tomcat.
 
 Regards
 Roland Carlsson
 
 
 Den 04-10-26 14.58, skrev Steve Kirk 
 [EMAIL PROTECTED]:
 
  
  This question illustrates (IMHO) probably the biggest issue 
 of confusion
  with regard to DBCP - that is, there are several XML 
 elements that you can
  potentially use, and several places that you can 
 potentially put them.
  Specifically, the Resource, 

Fixed: MySQL upgrade Problem

2004-10-26 Thread e-Denton Subscriber
That was my problem--thank goodness. Wish I had asked earlier, before I
tried all that futile cr*p and before I read all that MySQL stuff I didn't
really need to know ;)

PITA to fix? (Does that mean it takes a lot of bread to fix?)

Thx to all for their interest and help.

$ee you $oon!

- Original Message - 
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]; e-Denton
Subscriber [EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 10:09 AM
Subject: RE: MySQL upgrade Problem



Hi,
Dollar sign in password is a no-no right now.  It gets escaped.  It's a
PITA to fix, so I (and apparently others) haven't done it yet.  If you
really want a dollar sign in your password, submit a patch ;)

Yoav Shapira http://www.yoavshapira.com



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



RE: Fixed: MySQL upgrade Problem

2004-10-26 Thread Shapira, Yoav

Hi,

PITA to fix? (Does that mean it takes a lot of bread to fix?)

Pain In The ... Just means the effort to reward ratio for fixing this
item is high.  Most OSS developers (not just Tomcat) tend to gravitate
towards either low-effort/high-reward fixes, or exciting new stuff.
That leaves high-effort/low-reward fixes like this one lingering in the
queue.  Unless they're high-reward for someone, who then contributes a
patch.

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: JNDI DataSource GlobalResources problem

2004-10-26 Thread Shapira, Yoav

Hi,

Actually I would like your approach better than mine if I could get it
to
work, because it would mean that the context config is located in a

META-INF/context.xml only works on later versions of Tomcat.  He might
be using a later version than yours.  Try 5.0.19 or later.

I understood that context.xml is used to deploy
webapps using the deployer, rather than configure them once installed.

No, this is not well-stated.  The context XML files are used to define
and configure applications, not just to deploy them nor just to
configure them once installed.

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]



custom 500 in tomcat 5

2004-10-26 Thread Didier McGillis
error-page
   error-code404/error-code
   location/errorpages/404.html/location
   /error-page
   error-page
   error-code500/error-code
   location/errorpages/500.jsp/location
   /error-page
   error-page
   exception-typejavax.ServletException/exception-type
   location/errorpages/500.jsp/location
   /error-page
Is what i have setup for error pages.  404 seems to work fine, 500 keeps 
going to the default Tomcat error page.

Help
_
Take advantage of powerful junk e-mail filters built on patented Microsoft® 
SmartScreen Technology. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines 
 Start enjoying all the benefits of MSN® Premium right now and get the 
first two months FREE*.

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


RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk

I'm using 5.0.28 - which I've been running for several months - but no joy.
I'm getting the same SQLNestedException that Roland first reported at the
start of this thread !!

All I did was move my context config file from
conf/Catalina/localhost/mywebapp.xml
to
webapps/mywebapp/META-INF/context.xml

is there something I've missed?

Yoav said
 META-INF/context.xml only works on later versions of Tomcat.  He might
 be using a later version than yours.  Try 5.0.19 or later.



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



RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Shapira, Yoav

Hi,

All I did was move my context config file from
   conf/Catalina/localhost/mywebapp.xml
to
   webapps/mywebapp/META-INF/context.xml

is there something I've missed?

Yeah.  The META-INF/context.xml is consulted when deploying a WAR.  Just
putting it there for an already deployed and expanded WAR won't do much
of anything.

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: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk

 All I did was move my context config file from
  conf/Catalina/localhost/mywebapp.xml
 to
  webapps/mywebapp/META-INF/context.xml
 
 is there something I've missed?
 
 Yeah.  The META-INF/context.xml is consulted when deploying a 
 WAR.  Just
 putting it there for an already deployed and expanded WAR 
 won't do much
 of anything.

OK thanks.

I should have said, I don't use war files, I just store files under
webapps/mywebapp in the file system.  Will my context.xml ever be read, e.g.
when TC is restarted?  This is what I meant above when I said that I thought
that context.xml is only useful when using the deploy feature (which I
don't use).



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



RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Shapira, Yoav

Hi,
Nope, if you just use the unpacked directory structures to deploy,
META-INF/context.xml will not be read.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Steve Kirk [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 12:46 PM
To: 'Tomcat Users List'
Subject: RE: JNDI DataSource GlobalResources problem


 All I did was move my context config file from
 conf/Catalina/localhost/mywebapp.xml
 to
 webapps/mywebapp/META-INF/context.xml
 
 is there something I've missed?

 Yeah.  The META-INF/context.xml is consulted when deploying a
 WAR.  Just
 putting it there for an already deployed and expanded WAR
 won't do much
 of anything.

OK thanks.

I should have said, I don't use war files, I just store files under
webapps/mywebapp in the file system.  Will my context.xml ever be read,
e.g.
when TC is restarted?  This is what I meant above when I said that I
thought
that context.xml is only useful when using the deploy feature (which
I
don't use).



-
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: custom 500 in tomcat 5

2004-10-26 Thread Steve Kirk

Error in package name:
javax.servlet.ServletException
  ^^^   
(By the way I configure mine for java.lang.Throwable just in case something
bizarre happens.)

If that doesn't fix it, check that you don't have an error in your 500.jsp
- if you do, then an exception will be thrown when tomcat tries to process
it, and it will give up on your page and use its own.  Check your logs very
carefully to see where the error is first caused, and also check very
carefully what error is reported in the default tomcat error page.  In the
log, you might see the original exception logged, then further down, a
second exception logged as TC encounters the error in 500.jsp.

Another way to double-check that your 500.jsp is correct is to temporarily
replace it with a very simple 500.html page that uses no JSP:

html
headtitleCustomer error/title/head
body
pMy custom error 500 page/p
/body
/html

Restart TC, trigger a 500 error, then if this page displays, you know that
500.jsp is broken

 -Original Message-
 From: Didier McGillis [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 26 October 2004 17:32
 To: [EMAIL PROTECTED]
 Subject: custom 500 in tomcat 5
 
 
 error-page
 error-code404/error-code
 location/errorpages/404.html/location
 /error-page
 error-page
 error-code500/error-code
 location/errorpages/500.jsp/location
 /error-page
 error-page
 exception-typejavax.ServletException/exception-type
 location/errorpages/500.jsp/location
 /error-page
 
 Is what i have setup for error pages.  404 seems to work 
 fine, 500 keeps 
 going to the default Tomcat error page.
 
 Help




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



RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk
Interesting.  It's actually what I meant earlier, although I expressed it
badly.

So, I am currently including my webapp's Context in
conf/Catalina/localhost/mywebapp.xml, which is sub-optimal for 2 reasons:
1. it's outside the webapp directory
2. the path depends on the server configuration - not predictable

It seems that it would be neater if the context xml file were within the
webapp directory.  Is there a reason why it is in fact read from
conf/Catalina/localhost at atartup?  Why not from within a defined location
in each webapp?

PS the reason I don't use wars is that while developing, I can't see the
point in packaging a war up after every change, only then to unpack it when
I restart TC.  Might as well change the files directly.

PS what does TC do with the context.xml file when it reads it from a war,
does it copy it somewhere?

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 26 October 2004 17:48
 To: Tomcat Users List
 Subject: RE: JNDI DataSource GlobalResources problem
 
 
 
 Hi,
 Nope, if you just use the unpacked directory structures to deploy,
 META-INF/context.xml will not be read.
 
 Yoav Shapira http://www.yoavshapira.com
  
 
 -Original Message-
 From: Steve Kirk [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, October 26, 2004 12:46 PM
 To: 'Tomcat Users List'
 Subject: RE: JNDI DataSource GlobalResources problem
 
 
  All I did was move my context config file from
conf/Catalina/localhost/mywebapp.xml
  to
webapps/mywebapp/META-INF/context.xml
  
  is there something I've missed?
 
  Yeah.  The META-INF/context.xml is consulted when deploying a
  WAR.  Just
  putting it there for an already deployed and expanded WAR
  won't do much
  of anything.
 
 OK thanks.
 
 I should have said, I don't use war files, I just store files under
 webapps/mywebapp in the file system.  Will my context.xml 
 ever be read,
 e.g.
 when TC is restarted?  This is what I meant above when I said that I
 thought
 that context.xml is only useful when using the deploy 
 feature (which
 I
 don't use).
 
 
 
 -
 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: JNDI DataSource GlobalResources problem

2004-10-26 Thread Branko Peteh
I tried the same and looking at the source code, it seems to work ONLY if you
war deploy your application. In another post I asked if this can be extended
to all deployments, but got no answer or comment. 

Branko

-Original Message-
From: Steve Kirk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 26, 2004 9:36 AM
To: 'Tomcat Users List'
Subject: RE: JNDI DataSource GlobalResources problem



I'm using 5.0.28 - which I've been running for several months - but no joy.
I'm getting the same SQLNestedException that Roland first reported at the
start of this thread !!

All I did was move my context config file from
conf/Catalina/localhost/mywebapp.xml
to
webapps/mywebapp/META-INF/context.xml

is there something I've missed?

Yoav said
 META-INF/context.xml only works on later versions of Tomcat.  He might 
 be using a later version than yours.  Try 5.0.19 or later.



-
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-26 Thread Bill Winspur
Shapira, Yoav wrote:
Hi,
 

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.
   

Such as?  These are covered in the Manager configuration reference.  The
rest (such as session-timeout) are part of the Servlet Spec.
Yoav
 

Thanks Yoav, and all other responders.. I also found the cookies 
attribute in the context element.
None of this seems relevant to my problem, so I'm going to move on with 
my project, using the
workaround of an off-server browser for debugging, (I'll be at 
[EMAIL PROTECTED])

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


RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Shapira, Yoav

Hi,

So, I am currently including my webapp's Context in
conf/Catalina/localhost/mywebapp.xml, which is sub-optimal for 2
reasons:
1. it's outside the webapp directory
2. the path depends on the server configuration - not predictable

These server-specific configuration files, unlike web.xml, are not yours
to control from the J2EE/Servlet Spec point of view.  They belong to the
server admin.  So their location, contents, and handling need not be
predictable for the application developer.  They're server-specific,
implementation-dependent, not portable.

It seems that it would be neater if the context xml file were within
the
webapp directory.  Is there a reason why it is in fact read from
conf/Catalina/localhost at atartup?  Why not from within a defined
location
in each webapp?

We like to keep Tomcat's configuration info inside the conf directory.
The reason it's nested in conf/[engine]/[host] is to allow webapps with
the same names within different engines or hosts on the same server.

PS the reason I don't use wars is that while developing, I can't see
the
point in packaging a war up after every change, only then to unpack it
when
I restart TC.  Might as well change the files directly.

Whether you can see the point or not is irrelevant, as Tomcat offers you
the choice of deploying and developing in both packed and unpacked WAR
formats.  The Servlet Spec only requires us to support deploying and
running packed WAR archives, so again this is an example of something
we've provided by request of the user community to ease *some* people's
lives.

The point in always deploying and running from a packed WAR is to ensure
portability.  If you don't see that point, disagree with it, or find it
inefficient, that's fine, you're obviously free to do as you want.  But
the point is there and it's important to those of us who have to deal
with heterogeneous server environments all the time.

PS what does TC do with the context.xml file when it reads it from a
war,
does it copy it somewhere?

Yes, into the conf/[engine]/[host]/appname.xml file.

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: custom 500 in tomcat 5

2004-10-26 Thread Didier McGillis
I noticed that error about 5 minutes after sending the email. :( ... Anyway 
I am pretty sure that the jsp isnt causing an error because the page that I 
am forcing the 500 on is giving the error result I am used to seeing and is 
consistent with that page.

Off to try and see if its the jsp page.
From: Steve Kirk [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Subject: RE: custom 500 in tomcat 5
Date: Tue, 26 Oct 2004 18:00:40 +0100
Error in package name:
javax.servlet.ServletException
  ^^^
(By the way I configure mine for java.lang.Throwable just in case something
bizarre happens.)
If that doesn't fix it, check that you don't have an error in your 
500.jsp
- if you do, then an exception will be thrown when tomcat tries to process
it, and it will give up on your page and use its own.  Check your logs very
carefully to see where the error is first caused, and also check very
carefully what error is reported in the default tomcat error page.  In the
log, you might see the original exception logged, then further down, a
second exception logged as TC encounters the error in 500.jsp.

Another way to double-check that your 500.jsp is correct is to temporarily
replace it with a very simple 500.html page that uses no JSP:
html
headtitleCustomer error/title/head
body
pMy custom error 500 page/p
/body
/html
Restart TC, trigger a 500 error, then if this page displays, you know that
500.jsp is broken
 -Original Message-
 From: Didier McGillis [mailto:[EMAIL PROTECTED]
 Sent: Tuesday 26 October 2004 17:32
 To: [EMAIL PROTECTED]
 Subject: custom 500 in tomcat 5


 error-page
 error-code404/error-code
 location/errorpages/404.html/location
 /error-page
 error-page
 error-code500/error-code
 location/errorpages/500.jsp/location
 /error-page
 error-page
 exception-typejavax.ServletException/exception-type
 location/errorpages/500.jsp/location
 /error-page

 Is what i have setup for error pages.  404 seems to work
 fine, 500 keeps
 going to the default Tomcat error page.

 Help


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Powerful Parental Controls Let your child discover the best the Internet has 
to offer. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines 
 Start enjoying all the benefits of MSN® Premium right now and get the 
first two months FREE*.

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


RE: custom 500 in tomcat 5

2004-10-26 Thread Didier McGillis
Guess What?
Looks like it was the JSP, I should know every single time I rule out 
something by taking for granted that I did something right the first time, I 
end up finding that was the problem.

Oh well :)
Off to fix that
From: Steve Kirk [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Subject: RE: custom 500 in tomcat 5
Date: Tue, 26 Oct 2004 18:00:40 +0100
Error in package name:
javax.servlet.ServletException
  ^^^
(By the way I configure mine for java.lang.Throwable just in case something
bizarre happens.)
If that doesn't fix it, check that you don't have an error in your 
500.jsp
- if you do, then an exception will be thrown when tomcat tries to process
it, and it will give up on your page and use its own.  Check your logs very
carefully to see where the error is first caused, and also check very
carefully what error is reported in the default tomcat error page.  In the
log, you might see the original exception logged, then further down, a
second exception logged as TC encounters the error in 500.jsp.

Another way to double-check that your 500.jsp is correct is to temporarily
replace it with a very simple 500.html page that uses no JSP:
html
headtitleCustomer error/title/head
body
pMy custom error 500 page/p
/body
/html
Restart TC, trigger a 500 error, then if this page displays, you know that
500.jsp is broken
 -Original Message-
 From: Didier McGillis [mailto:[EMAIL PROTECTED]
 Sent: Tuesday 26 October 2004 17:32
 To: [EMAIL PROTECTED]
 Subject: custom 500 in tomcat 5


 error-page
 error-code404/error-code
 location/errorpages/404.html/location
 /error-page
 error-page
 error-code500/error-code
 location/errorpages/500.jsp/location
 /error-page
 error-page
 exception-typejavax.ServletException/exception-type
 location/errorpages/500.jsp/location
 /error-page

 Is what i have setup for error pages.  404 seems to work
 fine, 500 keeps
 going to the default Tomcat error page.

 Help


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
MSN® Calendar keeps you organized and takes the effort out of scheduling 
get-togethers. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines 
 Start enjoying all the benefits of MSN® Premium right now and get the 
first two months FREE*.

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


Re: which Linux Platform is best for Tomcat?

2004-10-26 Thread Eric Weidner
To expand on this, RedHat backported the NPTL (New Posix Threading Library) 
from the 2.6 kernel into the 2.4.x kernels used in RH8 and RH9.  Java has 
problems with this backport and it can cause hangs, particularly in 
System.exec() type calls.

Setting the environment variable LD_ASSUME_KERNEL=2.4.1 will turn off the new 
threading and alleviate the problem.

Regardless, these distributions are old and end of life anyway.

My server is Debian Sid, kernel 2.6.7 currently, with JDK 1.4.2_04 and runs 
Tomcat fine.

Eric Weidner
BlueGlue Project Lead
OpenLogic, Inc.
http://www.openlogic.com

On Tuesday 26 October 2004 08:14 am, Filip Hanik (lists) wrote:
 redhat 9 is pretty crummy with java, you might need to add in the
 LD_ASSUME_KERNEL parameter for stability

 Filip

 -Original Message-
 From: Evgeny Gesin [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, October 26, 2004 9:11 AM
 To: Tomcat Users List
 Subject: Re: which Linux Platform is best for Tomcat?


 Tomcat 4.x works very well on production servers with
 RedHat 9 and Fedora 2. The new Java 1.5 adds better
 memory management.

 Evgeny Gesin
 http://www.javadesk.com
 http://www.alltelescopes.com



 __
 Do you Yahoo!?
 Yahoo! Mail Address AutoComplete - You start. We finish.
 http://promotions.yahoo.com/new_mail

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



SecurityManager and catalina.policy

2004-10-26 Thread Thomas Zumbrunn
Hello list

Sorry for coming up with this question again, but I still couldn't find any 
detailed documentation about what the entries in conf/catalina.policy 
actually do. On line 86 it says:

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 as described in the tomcat documentation. But I 
have to add a couple of other lines to catalina.policy to make this 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.

Best wishes
Thomas Zumbrunn

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



RE: SecurityManager and catalina.policy

2004-10-26 Thread Shapira, Yoav

Hi,
Your approach is not inelegant, it's fine.  I think the comments above the lines you 
quote explain exactly what they do: without them, when running with a SecurityManager, 
System.getProperty(...) would return null.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Thomas Zumbrunn [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 1:48 PM
To: [EMAIL PROTECTED]
Subject: SecurityManager and catalina.policy

Hello list

Sorry for coming up with this question again, but I still couldn't find any
detailed documentation about what the entries in conf/catalina.policy
actually do. On line 86 it says:

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 as described in the tomcat documentation. But I
have to add a couple of other lines to catalina.policy to make this 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.

Best wishes
Thomas Zumbrunn

-
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 put context.xml into ant war target

2004-10-26 Thread David Lee
I used ant war task to create the deployable war file, I just want to
know how to put the context.xml into the meta-inf directory using war
target.
 
Thanks


RE: How to put context.xml into ant war target

2004-10-26 Thread Phillip Qin
zipfileset dir=${basedir}/conf includes=**/context.xml
prefix=META-INF/

${basedir}/conf is where my context.xml is stored.


-Original Message-
From: David Lee [mailto:[EMAIL PROTECTED] 
Sent: October 26, 2004 2:24 PM
To: [EMAIL PROTECTED]
Subject: How to put context.xml into ant war target


I used ant war task to create the deployable war file, I just want to know
how to put the context.xml into the meta-inf directory using war target.
 
Thanks


!DSPAM:417e98dd32511535019051!


Re: Running Tomcat from jsvc

2004-10-26 Thread Wolfgang Hackl
[EMAIL PROTECTED] wrote:
When I start Tomcat using $CATALINA_HOME/bin/startup.sh everything works 
fine. But now I want to run Tomcat as a daemon under a non-root user.
[...]
The log (line 626)[3] is telling me that server.xml couldn't be 
loaded, but it didn't tell why.
Hi Volkmar,
did you check the file system permissions of your $CATALINA_HOME 
directory? As I can see from my installations, server.xml has read and 
write permissions exclusively for its owner. My conclusion is that the 
directory must belong to the user, will run the service (wwwrun says 
your Tomcat5.sh).

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


Server.xml configuration question.

2004-10-26 Thread Mufaddal Khumri
Hi,
I am using Tomcat 5.0.27. I want to configure my server.xml such that:
1. all system.outs from my webapp
2. all error and exceptions due to my webapp
get written to logs/mywebapp.log under CATALINA_HOME
This is the except from my server.xml file that I have written:
...
...
Engine name=Catalina defaultHost=localhost
  !-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps
   unpackWARs=true autoDeploy=true
Logger className=org.apache.catalina.logger.FileLogger
directory=logs  prefix=mywebapp. suffix=.log
	   timestamp=true/
Logger className=org.apache.catalina.logger.SystemErrLogger/
Logger className=org.apache.catalina.logger.SystemOutLogger/
Context path=/mywebapp docBase=mywebapp debug=0
 reloadable=true crossContext=true/
  /Host
   /Engine
   ...
   ...
On running tomcat, I still get all my system.outs and error messages in 
catalina.out. How do I
configure my server.xml to get these messages in mywebapp.log ?

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


RE: Server.xml configuration question.

2004-10-26 Thread Shapira, Yoav

Hi,
Add swallowOutput=true to your Context element.  It also makes the
SystemOutLogger/SystemErrLogger definitions redundant IIRC.

Then when you have a chance switch to using a real logging toolkit like
log4j.

Yoav Shapira http://www.yoavshapira.com


-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 3:02 PM
To: Tomcat Users List
Subject: Server.xml configuration question.

Hi,

I am using Tomcat 5.0.27. I want to configure my server.xml such that:
1. all system.outs from my webapp
2. all error and exceptions due to my webapp
get written to logs/mywebapp.log under CATALINA_HOME

This is the except from my server.xml file that I have written:
 ...
 ...
 Engine name=Catalina defaultHost=localhost
   !-- Define the default virtual host --
   Host name=localhost debug=0 appBase=webapps
unpackWARs=true autoDeploy=true
 Logger className=org.apache.catalina.logger.FileLogger
 directory=logs  prefix=mywebapp. suffix=.log
  timestamp=true/
 Logger
className=org.apache.catalina.logger.SystemErrLogger/
 Logger
className=org.apache.catalina.logger.SystemOutLogger/
 Context path=/mywebapp docBase=mywebapp debug=0
  reloadable=true crossContext=true/
   /Host
/Engine
...
...
On running tomcat, I still get all my system.outs and error messages in
catalina.out. How do I
configure my server.xml to get these messages in mywebapp.log ?

Thanks.


-
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: JNDI DataSource GlobalResources problem

2004-10-26 Thread Steve Kirk

OK thanks Yoav.  Interesting insights.

PS I hope my comments on warfiles didn't come across as saying that there is
no point in them.  That certainly wasn't what I meant.  I very much see the
point of warfiles, I just meant to explain why I haven't used them so far:
for me personally, webapp portability has never been a big issue, so it has
been easier not to use warfiles when making lots of changes during
development.

I hadn't appreciated that there were subtle functional differences between
using a warfile and just storing the files in the open/unpacked
directory tree, such as the ability to include a context.xml in the webapp.
I also hadn't realised that the servlet spec does not require support for
the unpacked mode that I have been using, and that only packed war files
need to be supported.  Where does the spec say this - I've looked at it
again just now, but can't find it.

From previous readings of the servlet spec, I thought that whether packed
into a warfile or deployed in an open directory tree, the webapp would
work the same, so both of the points in my last paragraph were surprises.
I've just been through the spec again quickly, but the only bits that I can
find which seem relevant are section SRV.9.6 (Web Application Archive
File) and the web application glossary entry, which both seem to imply
that using warfiles is optional...?

Also, the servlet spec doc does not seem to refer to context.xml files at
all, which seems odd given that they seem to be designed to increase
portability.  Are they spec'd/recommended somewhere else than in the jsr154
docs, or are they in fact a TC feature?

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 26 October 2004 18:11
 To: Tomcat Users List
 Subject: RE: JNDI DataSource GlobalResources problem
 
 
 
 Hi,
 
 So, I am currently including my webapp's Context in
 conf/Catalina/localhost/mywebapp.xml, which is sub-optimal for 2
 reasons:
 1. it's outside the webapp directory
 2. the path depends on the server configuration - not predictable
 
 These server-specific configuration files, unlike web.xml, 
 are not yours
 to control from the J2EE/Servlet Spec point of view.  They 
 belong to the
 server admin.  So their location, contents, and handling need not be
 predictable for the application developer.  They're server-specific,
 implementation-dependent, not portable.
 
 It seems that it would be neater if the context xml file were within
 the
 webapp directory.  Is there a reason why it is in fact read from
 conf/Catalina/localhost at atartup?  Why not from within a defined
 location
 in each webapp?
 
 We like to keep Tomcat's configuration info inside the conf directory.
 The reason it's nested in conf/[engine]/[host] is to allow 
 webapps with
 the same names within different engines or hosts on the same server.
 
 PS the reason I don't use wars is that while developing, I can't see
 the
 point in packaging a war up after every change, only then to 
 unpack it
 when
 I restart TC.  Might as well change the files directly.
 
 Whether you can see the point or not is irrelevant, as Tomcat 
 offers you
 the choice of deploying and developing in both packed and unpacked WAR
 formats.  The Servlet Spec only requires us to support deploying and
 running packed WAR archives, so again this is an example of something
 we've provided by request of the user community to ease 
 *some* people's
 lives.
 
 The point in always deploying and running from a packed WAR 
 is to ensure
 portability.  If you don't see that point, disagree with it, 
 or find it
 inefficient, that's fine, you're obviously free to do as you 
 want.  But
 the point is there and it's important to those of us who have to deal
 with heterogeneous server environments all the time.
 
 PS what does TC do with the context.xml file when it reads it from a
 war,
 does it copy it somewhere?
 
 Yes, into the conf/[engine]/[host]/appname.xml file.
 
 Yoav
 



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



Re: Server.xml configuration question.

2004-10-26 Thread Mufaddal Khumri
Yes at some point I do need to switch to log4j. I set the 
swallowOutput=true
...
...
Engine name=Catalina defaultHost=localhost
  !-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps
   unpackWARs=true autoDeploy=true
Context path=/mywebapp docBase=mywebapp debug=0
  	   swallowOutput=true
 reloadable=true crossContext=true
	Logger className=org.apache.catalina.logger.FileLogger
 		 directory=logs  prefix=mywebapp. suffix=.log
	   		timestamp=true/
	Context/
  /Host
   /Engine
   ...
   ...
When i start tomcat now, I still get some of the system.out from my 
webapp written to catalina.out.
My webapp implements ServletContextListener and HttpSessionListener, 
the output of the implementation class for ServletContextListener gets 
written to catalina.out.

Que 1. Is there a way to write this output also to the file I am 
specifying?

Que 2. Also I notice that when I use FileLogger, it creates a new file 
each day, is there a way to tell it to create only one big huge file 
and keep appending to it (like catalina.out) ?

Thanks,
On Oct 26, 2004, at 12:02 PM, Shapira, Yoav wrote:
Hi,
Add swallowOutput=true to your Context element.  It also makes the
SystemOutLogger/SystemErrLogger definitions redundant IIRC.
Then when you have a chance switch to using a real logging toolkit like
log4j.
Yoav Shapira http://www.yoavshapira.com

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 3:02 PM
To: Tomcat Users List
Subject: Server.xml configuration question.
Hi,
I am using Tomcat 5.0.27. I want to configure my server.xml such that:
1. all system.outs from my webapp
2. all error and exceptions due to my webapp
get written to logs/mywebapp.log under CATALINA_HOME
This is the except from my server.xml file that I have written:
...
...
Engine name=Catalina defaultHost=localhost
  !-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps
   unpackWARs=true autoDeploy=true
Logger className=org.apache.catalina.logger.FileLogger
directory=logs  prefix=mywebapp. suffix=.log
   timestamp=true/
Logger
className=org.apache.catalina.logger.SystemErrLogger/
Logger
className=org.apache.catalina.logger.SystemOutLogger/
Context path=/mywebapp docBase=mywebapp debug=0
 reloadable=true crossContext=true/
  /Host
   /Engine
   ...
   ...
On running tomcat, I still get all my system.outs and error messages 
in
catalina.out. How do I
configure my server.xml to get these messages in mywebapp.log ?

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

Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: JNDI DataSource GlobalResources problem

2004-10-26 Thread Shapira, Yoav

Hola,

I also hadn't realised that the servlet spec does not require support
for
the unpacked mode that I have been using, and that only packed war
files
need to be supported.  Where does the spec say this - I've looked at it
again just now, but can't find it.

It says it implicitly by only discussing packed WAR files as the only
deployment method.  The reason the Spec doesn't mandate containers to
support running unpacked WARs is that the authors don't want to restrict
servlet containers such that implementations require filesystems.  This
might seem abstract and/or pointless, but there have been servlet
containers (including one bundled with a version of Oracle iAS, so not
just marginal/experimental ones) that run completely inside a DB for
example, so the notion of a filesystem is non-existant.  A lot of the
things that seem weird, abstract, or annoying with the Servlet Spec go
back to this need for supporting a no-filesystem scenario.

From previous readings of the servlet spec, I thought that whether
packed
into a warfile or deployed in an open directory tree, the webapp
would
work the same

A well-designed webapp would work the same.  One that's not
well-designed wouldn't: for example if you use getRealPath, you'll get
different results depending on whether you're packed or not.

Also, the servlet spec doc does not seem to refer to context.xml
files at
all, which seems odd given that they seem to be designed to increase
portability.  Are they spec'd/recommended somewhere else than in the
jsr154
docs, or are they in fact a TC feature?

They're a TC-only feature.  Other containers go about it different ways.
This has been covered a zillion times on this list before -- the
archives have more (or rather, a repeat of these) details ;)

Context.xml files are NOT designed to increase portability at all.
They're a convenience feature.  In fact, they're a sinkhole for
beginners to REDUCE their portability in favor of short-term
convenience.  That's why I don't like them.  That's why I don't like
DefaultContext and GlobalNamingResources either.

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: Server.xml configuration question.

2004-10-26 Thread Shapira, Yoav

Hi,

When i start tomcat now, I still get some of the system.out from my
webapp written to catalina.out.

No.  That can't be right.  The output you're seeing is coming from
somewhere else, or your configuration is otherwise messed up.

My webapp implements ServletContextListener and HttpSessionListener,
the output of the implementation class for ServletContextListener gets
written to catalina.out.

Que 1. Is there a way to write this output also to the file I am
specifying?

I have the same use-case, and it goes to my Logger.

Que 2. Also I notice that when I use FileLogger, it creates a new file
each day, is there a way to tell it to create only one big huge file
and keep appending to it (like catalina.out) ?

You don't have fine-grained control over the log file rotation.  This is
yet another reason why you shouldn't delay in moving to log4j.

Have I mentioned that the Logger elements are gone altogether in Tomcat
5.5, so this is largely a waste of your time?

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: Server.xml configuration question.

2004-10-26 Thread Mufaddal Khumri
Yes, most definitely I have to use the log4j library.
I just rechecked my server.xml and I am still baffled as to why the 
output is going to catalina.out ?

Heres the entire server.xml:
---START
Server port=8005 shutdown=SHUTDOWN
  Service name=Catalina
Connector port=9090
   maxThreads=150 minSpareThreads=25 
maxSpareThreads=75
   enableLookups=false redirectPort=8443 
acceptCount=100
   debug=0 connectionTimeout=2
   disableUploadTimeout=true /

!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 --
Connector port=8009
   enableLookups=false redirectPort=8443 debug=0
   protocol=AJP/1.3 /
!-- This is here for compatibility only, not required --
!--Connector port=8009 protocol=AJP/1.3 /--
Engine name=Catalina defaultHost=localhost
  !-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps
   unpackWARs=true autoDeploy=true
Context path=/mywebapp docBase=mywebapp debug=0
 swallowOutput=true
 reloadable=true crossContext=false
Logger className=org.apache.catalina.logger.FileLogger
directory=logs  prefix=mywebapp. 
suffix=.log
timestamp=false/
/Context
  /Host
/Engine
  /Service
/Server
Any Ideas?
---FINISH
On Oct 26, 2004, at 12:35 PM, Shapira, Yoav wrote:
Hi,
When i start tomcat now, I still get some of the system.out from my
webapp written to catalina.out.
No.  That can't be right.  The output you're seeing is coming from
somewhere else, or your configuration is otherwise messed up.
My webapp implements ServletContextListener and HttpSessionListener,
the output of the implementation class for ServletContextListener gets
written to catalina.out.
Que 1. Is there a way to write this output also to the file I am
specifying?
I have the same use-case, and it goes to my Logger.
Que 2. Also I notice that when I use FileLogger, it creates a new file
each day, is there a way to tell it to create only one big huge file
and keep appending to it (like catalina.out) ?
You don't have fine-grained control over the log file rotation.  This 
is
yet another reason why you shouldn't delay in moving to log4j.

Have I mentioned that the Logger elements are gone altogether in Tomcat
5.5, so this is largely a waste of your time?
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]

Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [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-26 Thread Lars George
Hi Christoph,
I would recommend to upgrade to Apache 2 and mod_jk2 as soon as 
possible. With the old Apache 1 and mod_jk we had a whole set of other 
problems when it came to load related instabilities. The new version is 
heaps better.

Lars
Christoph Fischer wrote:
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

Re: Problems wth Apache, mod_jk2 and Tomcat

2004-10-26 Thread Lars George
David,
Checking my log files, I can see that I get many of thoe lines in the 
generic apache error log:

[...timestamp...] [error] child process xyzabc still did not exit, 
sending a SIGKILL

I get at least 40 of these just after it starts running full. That does 
not look ok, does it?

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


Interesting discoveries about catalina GUI manager deploy (5.0.28 and 5.0.29)

2004-10-26 Thread David Lee
Phillip, thanks
the context.xml file works. I finally got the JNDI mail/Session to work.
 
But I found one thing interesting about the GUI manager deploy (upload
the ant generated war file)
 
After I uploaded the war file, I found that this action not only
uppacked war into the myapp directory with the
context.xml in mata-inf directory, ALSO, it generated myapp.xml in
C:\jakarta-tomcat-5.0.29\conf\Catalina\localhost
 
This discovery is inconsistent with the JNDI doc says: either myapp.xml
in C:\jakarta-tomcat-5.0.29\conf\Catalina\localhost 
or in meta-inf/context.xml.
 
Another question is: how do I get the JNDI enviroment variable value
from the java program? still using ctx.lookup or other way.
 
Any idea.
 
Again thanks for the help!!
 
david


RE: Server.xml configuration question.

2004-10-26 Thread Shapira, Yoav

Hi,

I just rechecked my server.xml and I am still baffled as to why the
output is going to catalina.out ?

Because the Logger is inside your Context, it applies only to that
Context.  It does not apply to other Contexts within your Host, such as
those created by autoDeploy.  Try moving Logger from the Context to
the Host.

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]



  1   2   >