delete session in valve (TC 4.1.29)

2004-08-31 Thread Oliver Wulff




Hi all

I'm looking for a solution to delete the current session in a Valve im
Tomcat 4.1.29.
I hope you can help me.

Oliver







*** BITTE BEACHTEN ***
Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet
möglicherweise vertrauliche oder gesetzlich geschützte Daten oder
Informationen. Zum Empfang derselben ist (sind) ausschliesslich die
genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht
irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter
Ausschluss jeder Reproduktion zu zerstören und die absendende Person
umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe.


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



Re: RAM usage of Linux-based Tomcat server

2004-08-31 Thread Jacob Kjome
At 10:57 PM 8/30/2004 -0700, you wrote:
I'm not worried about the transient memory used by the
Tomcat instance for it to serve servlets.
But I'm worried about the memory permanently allocated
for a Tomcat instance. Eg. A servlet in a particular
Tomcat instance, may load the entire database into the
memory for efficiency reasons. Now this Tomcat
instance requires X amount of memory to keep the
database and all the stuff related to that Tomcat
instance (except transient memory) to keep them in
memory. And it requires additional variable amount of
transient memory to serve it, that depends on the
demand for that Tomcat instance.
What I need to know is can I restrict the size of X?
If the memory allocated permanently to a particular
Tomcat instance cannot be restricted, Can I restrict
the total memory allocation (ie. permanent + transient
memory) for that Tomcat instance?
The VM starts up with a default of 64 meg of RAM Max regardless of physical 
memory.  You can increase this using -Xmx (with the Sun VM).  For 
example...  java -Xmx 256m

Any out of memory errors you get are because the amount of memory needed by 
the application exceeds the maximum memory barrier of the VM.  The only way 
around this is to get rid of memory leaks and/or increase the maximum 
memory for the VM.

look up -Xmx on Google for more info
Jake 

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


Tomcat 5 Crystal Reports

2004-08-31 Thread POLO ARAUJO, JAVIER

Hi! I'm triying to configure Tomcat 5 and Crystal Reports. What I want to do is 
reading from a database to a report made with CR using a Tomcat datasource. The 
problem is that CR can't find it (using jndi); i get a message saying that CR is 
unable to find the resource. The datasource is well defined (i think so because a jsp 
can use it correctly).

Does anybody know if is there problem between Tomcat 5 and Crystal Reports? Is there 
any one that have configured it yet?

Thanks in advance, 

Javier Polo.


RAM usage of Linux-based Tomcat server PART2

2004-08-31 Thread pete
Adding a question to this note:

I have a maximum heap size of 768mb, and for a freshly started server, it
sits at 65mb. Throughout the day, it works itself near the max. Users
finish at 7pm, and first thing in the morning the server has not reclaimed
*any* memory - i.e. if I want to stop Tomcat running out of memory and
crashing, I need to restart the server every morning.
Is this solely down to the app or what? I am running Tomcat 5.0.18,
(shortly to be upgraded to 5.0.27) could issues with Tomcat .18 be causing
this (there are some memory related notes in the Tomcat CHANGELOG).
Thanks,
Pete.



 At 10:57 PM 8/30/2004 -0700, you wrote:
I'm not worried about the transient memory used by the
Tomcat instance for it to serve servlets.

But I'm worried about the memory permanently allocated
for a Tomcat instance. Eg. A servlet in a particular
Tomcat instance, may load the entire database into the
memory for efficiency reasons. Now this Tomcat
instance requires X amount of memory to keep the
database and all the stuff related to that Tomcat
instance (except transient memory) to keep them in
memory. And it requires additional variable amount of
transient memory to serve it, that depends on the
demand for that Tomcat instance.

What I need to know is can I restrict the size of X?

If the memory allocated permanently to a particular
Tomcat instance cannot be restricted, Can I restrict
the total memory allocation (ie. permanent + transient
memory) for that Tomcat instance?

 The VM starts up with a default of 64 meg of RAM Max regardless of
 physical  memory.  You can increase this using -Xmx (with the Sun VM).
 For  example...  java -Xmx 256m

 Any out of memory errors you get are because the amount of memory
 needed by  the application exceeds the maximum memory barrier of the
 VM.  The only way  around this is to get rid of memory leaks and/or
 increase the maximum  memory for the VM.

 look up -Xmx on Google for more info

 Jake


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


==
This email was sent by Ethicalwebsites.co.uk.
   Ethicalwebsites.co.uk - Internet Solutions for the UK
http://www.ethicalwebsites.co.uk/



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



Re: Tomcat 5 Crystal Reports

2004-08-31 Thread Antony Paul
Is it possible to install Crystal Reports in Tomcat as  a web application ?.
Which version of Crystal Reports supports this ?.

Antony Paul

- Original Message -
From: POLO ARAUJO, JAVIER [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 12:32 PM
Subject: Tomcat 5  Crystal Reports



 Hi! I'm triying to configure Tomcat 5 and Crystal Reports. What I want to
do is reading from a database to a report made with CR using a Tomcat
datasource. The problem is that CR can't find it (using jndi); i get a
message saying that CR is unable to find the resource. The datasource is
well defined (i think so because a jsp can use it correctly).

 Does anybody know if is there problem between Tomcat 5 and Crystal
Reports? Is there any one that have configured it yet?

 Thanks in advance,

 Javier Polo.


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



How jsp assigns the variable type for c:set /

2004-08-31 Thread Starting out
i fetched an int type from mysql and assign to variable

c:set var=eid value=${rs.rows[0].eid} scope=session /

it seems that its assigning type int since if i

String test = (String) pageContext.getAttribute(eid);

i get a cast error

but if i 

c:set var=eid value=1 scope=session /

the ff
String test = (String) pageContext.getAttribute(eid);

would work

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



Tomcat Admin Tools Page

2004-08-31 Thread Kashif Siddiqui
Hi all,

I have sucessfully installed and running Tomcat
server, it is working fine. But I want to know a
thing:

Here is a Admin page and I want to login to this page,
plz tell me that what username and password I should
use to login to this page.

http://localhost:/admin/login.jsp

Thanks in advance, for your guidance...





__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

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



RE: Tomcat Admin Tools Page

2004-08-31 Thread Nitschke Michael
At the install routine you should be asked about an admin password. This
should work together with name admin.

If not, look in the tomcat/conf directory and there should be a file
called tomcat_users.xml it contains all user/role/passwords for your
installation

mike
-Original Message-
From: Kashif Siddiqui [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 10:55 AM
To: [EMAIL PROTECTED]
Subject: Tomcat Admin Tools Page

Hi all,

I have sucessfully installed and running Tomcat
server, it is working fine. But I want to know a
thing:

Here is a Admin page and I want to login to this page,
plz tell me that what username and password I should
use to login to this page.

http://localhost:/admin/login.jsp

Thanks in advance, for your guidance...





__
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
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: Tomcat Admin Tools Page

2004-08-31 Thread pete
setup a user in conf/tomcat-users.xml, having a role as admin to connect
to admin page. To connect to the manager page, you need a role as
manager, or simply combine the roles for a user as manager,admin.
Look at the file and create you own user / modify one in the above respect.

Pete.


 Hi all,

 I have sucessfully installed and running Tomcat
 server, it is working fine. But I want to know a
 thing:

 Here is a Admin page and I want to login to this page,
 plz tell me that what username and password I should
 use to login to this page.

 http://localhost:/admin/login.jsp

 Thanks in advance, for your guidance...





 __
 Do you Yahoo!?
 New and Improved Yahoo! Mail - 100MB free storage!
 http://promotions.yahoo.com/new_mail

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


==
This email was sent by Ethicalwebsites.co.uk.
   Ethicalwebsites.co.uk - Internet Solutions for the UK
http://www.ethicalwebsites.co.uk/



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



AW: Problem with session counting

2004-08-31 Thread Michael Südkamp
Hm, the API doc for HttpSessionListener states that sessionDestroyed() should be 
called when a session is invalidated not when the session object will be destroyed. I 
can wait eternally, for the orphan sessions the sessionDestroyed() method will never 
be called.

I think I am close to the solution now.
In our app for a new session there is a thread started that inserts some 
session-specific data into a database. If I replace that thread by synchronous code, 
the problem does not occur.
So the solution should be to stop this thread before invalidating a session.

Does it sound OK to you that a running thread causes this behaviour?

Michael


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



JSTL 11 with Tomcat 5.0.27

2004-08-31 Thread Chris Ward

Hi,

I've upgraded from Tomcat 4.1.24 to Tomcat 5.0.27, most of my JSPs that
use
JSTL (1.0) work with the new setup, but none of the XML tags work.
Pages just
bomb out - nothing in the browser, nothing in the console, nothing in
the logs.
Even just using x:parse

Since the core and sql tags do work I believe I am picking things up
okay  
(I copied jstl.jar and standard.jar into my /lib dir and I notice the
.tld files
are in the standard.jar file).

Does this smell like a parser jar file problem?

Any ideas?  This is sucking up all my time and delaying a release.


Best regards
Chris

p.s. I notice in some docs that the url for JSTL 1.1 tags are like this
%@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml; %
rather than
%@ taglib prefix=x uri=http://java.sun.com/jstl/xml; %
- the new one doesn't seem to work for me.

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



Tomcat default encoding

2004-08-31 Thread Ng How Sce, Robin
Hi,
Anyone encountered tomcat default encoding being changed from ISO8859_1 to
ASCII by jsp or servlets? How to change the encoding back to ISO8859_1 while
tomcat is still running? Thanks.



Robin Ng

[EMAIL PROTECTED]


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



Is it possible to force Tomcat to drop a servlet?

2004-08-31 Thread Varley, Roger
Hi

I'm experiencing odd failures when a servlets init procedure is called for a second 
time. What I *think* is happening is that Tomcat is deactivating the servlet (as it is 
allowed to do) but some of the singleton objects created by the servlet initialisation 
routine are not being culled at the same time. As a result, when Tomcat receives a 
request for this servlet and starts to re-load it, my servlet is falling over when it 
tries to create objects that already exist. Obviously this is a logic problem with my 
servlet rather than with Tomcat but so that I can test my theory (and soloution), how 
can I force tomcat to drop my servlet and reload it under controlled conditions 
without re-loading the entire web-app? Reloading the entire application through the 
manager doesn't appear to exhibit the problem.

Regards
Roger


__
This e-mail and the documents attached are confidential and intended 
solely for the addressee; it may also be privileged. If you receive this 
e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group 
liability cannot be triggered for the message content. Although the 
sender endeavours to maintain a computer virus-free network, the sender 
does not warrant that this transmission is virus-free and will not be 
liable for any damages resulting from any virus transmitted.
__

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



Re: Getting 404 error deploying my servlet

2004-08-31 Thread Shaun Campbell

 In your web.xml, you might want to try add the following

 web-app
  ...
  !-- must add the following servlet mapping after tomcat v.4.12 --
  servlet-mapping
   servlet-nameinvoker/servlet-name
   url-pattern/servlet/*/url-pattern
  /servlet-mapping
 /web-app


I take it that's apt/WEB-INF/web.xml?  Anyway I seem to have that set in my
web.xml file.  Here's the contents of my web.xml file. I don't suppose you
can see anything missing or incorrect?

?xml version=1.0 encoding=ISO-8859-1?

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

web-app

  servlet
servlet-nameapt/servlet-name
servlet-classorg.apache.turbine.Turbine/servlet-class
init-param
  param-nameapplicationRoot/param-name
  param-valuewebContext/param-value
/init-param
init-param
  param-nameproperties/param-name
  param-value/WEB-INF/conf/TurbineResources.properties/param-value
/init-param
load-on-startup1/load-on-startup
  /servlet

display-nameTomcat Examples/display-name
description
  Tomcat Example servlets and JSP pages.
/description


!-- Define servlet-mapped and path-mapped example filters --
filter
filter-nameServlet Mapped Filter/filter-name
filter-classfilters.ExampleFilter/filter-class
 init-param
 param-nameattribute/param-name
 param-valuefilters.ExampleFilter.SERVLET_MAPPED/param-value
 /init-param
/filter
filter
filter-namePath Mapped Filter/filter-name
filter-classfilters.ExampleFilter/filter-class
 init-param
 param-nameattribute/param-name
 param-valuefilters.ExampleFilter.PATH_MAPPED/param-value
 /init-param
/filter
filter
filter-nameRequest Dumper Filter/filter-name
filter-classfilters.RequestDumperFilter/filter-class
/filter

!-- Example filter to set character encoding on each request --
filter
filter-nameSet Character Encoding/filter-name
filter-classfilters.SetCharacterEncodingFilter/filter-class
init-param
param-nameencoding/param-name
param-valueEUC_JP/param-value
/init-param
/filter

filter
filter-nameCompression Filter/filter-name
filter-classcompressionFilters.CompressionFilter/filter-class

init-param
  param-namecompressionThreshold/param-name
  param-value10/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value0/param-value
/init-param
/filter

!-- Define filter mappings for the defined filters --
filter-mapping
filter-nameServlet Mapped Filter/filter-name
 servlet-nameinvoker/servlet-name
/filter-mapping
filter-mapping
filter-namePath Mapped Filter/filter-name
 url-pattern/servlet/*/url-pattern
/filter-mapping


!-- Example filter mapping to apply the Set Character Encoding filter
 to *all* requests processed by this web application --
!--
filter-mapping
filter-nameSet Character Encoding/filter-name
url-pattern/*/url-pattern
/filter-mapping
--

!--
filter-mapping
  filter-nameCompression Filter/filter-name
  url-pattern/CompressionTest/url-pattern
/filter-mapping
--

!--
filter-mapping
filter-nameRequest Dumper Filter/filter-name
url-pattern/*/url-pattern
/filter-mapping
--

!-- Define example application events listeners --
listener
listener-classlisteners.ContextListener/listener-class
/listener
listener
listener-classlisteners.SessionListener/listener-class
/listener

!-- Define servlets that are included in the example application --

servlet
servlet-nameSendMailServlet/servlet-name
servlet-classSendMailServlet/servlet-class
/servlet

servlet
servlet-name
snoop
/servlet-name
servlet-class
SnoopServlet
/servlet-class
!--
init-param
param-namefoo/param-name
param-valuebar/param-value
/init-param
--
run-as
descriptionSecurity role for anonymous access/description
role-nametomcat/role-name
/run-as
/servlet

servlet
  servlet-name
  servletToJsp
  /servlet-name
  servlet-class
  servletToJsp
  /servlet-class
/servlet
servlet
servlet-name
CompressionFilterTestServlet
/servlet-name
servlet-class
compressionFilters.CompressionFilterTestServlet
/servlet-class

/servlet

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

servlet-mapping
servlet-name
CompressionFilterTestServlet
/servlet-name
url-pattern
/CompressionTest
/url-pattern

RE: Is it possible to force Tomcat to drop a servlet?

2004-08-31 Thread Nitschke Michael
I know now way to do it.
You should do your clean-up in a method called destroy(), its called at
the time tomcat unloads the servlet.

mfg
Michael Nitschke

-Original Message-
From: Varley, Roger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 11:53 AM
To: [EMAIL PROTECTED]
Subject: Is it possible to force Tomcat to drop a servlet?

Hi

I'm experiencing odd failures when a servlets init procedure is called
for a second time. What I *think* is happening is that Tomcat is
deactivating the servlet (as it is allowed to do) but some of the
singleton objects created by the servlet initialisation routine are not
being culled at the same time. As a result, when Tomcat receives a
request for this servlet and starts to re-load it, my servlet is falling
over when it tries to create objects that already exist. Obviously this
is a logic problem with my servlet rather than with Tomcat but so that I
can test my theory (and soloution), how can I force tomcat to drop my
servlet and reload it under controlled conditions without re-loading the
entire web-app? Reloading the entire application through the manager
doesn't appear to exhibit the problem.

Regards
Roger



__
This e-mail and the documents attached are confidential and intended 
solely for the addressee; it may also be privileged. If you receive this

e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin
group 
liability cannot be triggered for the message content. Although the 
sender endeavours to maintain a computer virus-free network, the sender 
does not warrant that this transmission is virus-free and will not be 
liable for any damages resulting from any virus transmitted.

__

-
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: Is it possible to force Tomcat to drop a servlet?

2004-08-31 Thread Nitschke Michael
Excange the now to no in the last mail from me.

mfg
Michael Nitschke

-Original Message-
From: Nitschke Michael 
Sent: Tuesday, August 31, 2004 12:41 PM
To: Tomcat Users List
Subject: RE: Is it possible to force Tomcat to drop a servlet?

I know now way to do it.
You should do your clean-up in a method called destroy(), its called at
the time tomcat unloads the servlet.

mfg
Michael Nitschke

-Original Message-
From: Varley, Roger [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 11:53 AM
To: [EMAIL PROTECTED]
Subject: Is it possible to force Tomcat to drop a servlet?

Hi

I'm experiencing odd failures when a servlets init procedure is called
for a second time. What I *think* is happening is that Tomcat is
deactivating the servlet (as it is allowed to do) but some of the
singleton objects created by the servlet initialisation routine are not
being culled at the same time. As a result, when Tomcat receives a
request for this servlet and starts to re-load it, my servlet is falling
over when it tries to create objects that already exist. Obviously this
is a logic problem with my servlet rather than with Tomcat but so that I
can test my theory (and soloution), how can I force tomcat to drop my
servlet and reload it under controlled conditions without re-loading the
entire web-app? Reloading the entire application through the manager
doesn't appear to exhibit the problem.

Regards
Roger



__
This e-mail and the documents attached are confidential and intended 
solely for the addressee; it may also be privileged. If you receive this

e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin
group 
liability cannot be triggered for the message content. Although the 
sender endeavours to maintain a computer virus-free network, the sender 
does not warrant that this transmission is virus-free and will not be 
liable for any damages resulting from any virus transmitted.

__

-
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: JSTL 11 with Tomcat 5.0.27

2004-08-31 Thread Big Chiz
make sure u modify your web.xml with something like

web-app xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
version=2.4

also, for jstl 1.1 no need to copy the .tld for standard and jstl

On Tue, 31 Aug 2004 10:16:29 +0100, Chris Ward
[EMAIL PROTECTED] wrote:
 
 Hi,
 
 I've upgraded from Tomcat 4.1.24 to Tomcat 5.0.27, most of my JSPs that
 use
 JSTL (1.0) work with the new setup, but none of the XML tags work.
 Pages just
 bomb out - nothing in the browser, nothing in the console, nothing in
 the logs.
 Even just using x:parse
 
 Since the core and sql tags do work I believe I am picking things up
 okay
 (I copied jstl.jar and standard.jar into my /lib dir and I notice the
 .tld files
 are in the standard.jar file).
 
 Does this smell like a parser jar file problem?
 
 Any ideas?  This is sucking up all my time and delaying a release.
 
 Best regards
 Chris
 
 p.s. I notice in some docs that the url for JSTL 1.1 tags are like this
 %@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml; %
 rather than
 %@ taglib prefix=x uri=http://java.sun.com/jstl/xml; %
 - the new one doesn't seem to work for me.
 
 -
 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]



Tomcat Server Status

2004-08-31 Thread Kashif Siddiqui
Hi all, 

I am sucessfully running Tomcat server, now I want to
know that is there any way to get Tomcat server's

1. Server's Status
2. Start Time 
3. Server uptime
4. Current requests on server

Thanks in advance...



__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



Re: Tomcat Server Status

2004-08-31 Thread Ronald Klop
Look at the http://your-hostname/manager/html webapp.
See also: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html
Ronald.
On Tue Aug 31 12:54:51 CEST 2004 Kashif Siddiqui [EMAIL PROTECTED] wrote:
Hi all, 

I am sucessfully running Tomcat server, now I want to
know that is there any way to get Tomcat server's
1. Server's Status
2. Start Time 
3. Server uptime
4. Current requests on server

Thanks in advance...

__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



Re: Tomcat Server Status

2004-08-31 Thread Kashif Siddiqui
Thank you very much for guidance,

but this page don't show StartTime/UpTime of Tomcat
Server...

http://localhost:/manager/html

Is there any way to get it.


--- Ronald Klop [EMAIL PROTECTED] wrote:

 Look at the http://your-hostname/manager/html
 webapp.
 
 See also:

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html
 
 Ronald.
 
 On Tue Aug 31 12:54:51 CEST 2004 Kashif Siddiqui
 [EMAIL PROTECTED] wrote:
  Hi all, 
  
  I am sucessfully running Tomcat server, now I want
 to
  know that is there any way to get Tomcat server's
  
  1. Server's Status
  2. Start Time 
  3. Server uptime
  4. Current requests on server
  
  Thanks in advance...
  
  
  
  __
  Do you Yahoo!?
  New and Improved Yahoo! Mail - Send 10MB messages!
  http://promotions.yahoo.com/new_mail 
  
 

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




__
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo 

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



Re: Tomcat Server Status

2004-08-31 Thread Tim Funk
We actually wrote a JSP to do this. Since we utilize the CATALINA_PID 
environment variable, on startup - a file with tomcat's pid is written.

Then we have a JSP which queries the last modify time of this file.
-Tim
Kashif Siddiqui wrote:
Thank you very much for guidance,
but this page don't show StartTime/UpTime of Tomcat
Server...
http://localhost:/manager/html
Is there any way to get it.
--- Ronald Klop [EMAIL PROTECTED] wrote:

Look at the http://your-hostname/manager/html
webapp.
See also:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html
Ronald.
On Tue Aug 31 12:54:51 CEST 2004 Kashif Siddiqui
[EMAIL PROTECTED] wrote:
Hi all, 

I am sucessfully running Tomcat server, now I want
to
know that is there any way to get Tomcat server's
1. Server's Status
2. Start Time 
3. Server uptime
4. Current requests on server

Thanks in advance...

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


RE: Tomcat Server Status

2004-08-31 Thread Shakeel Ahmad
How to set CATALINA_PID for this purpose, I mean can you give some details
and correct settings.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 4:23 PM
To: Tomcat Users List
Subject: Re: Tomcat Server Status


We actually wrote a JSP to do this. Since we utilize the CATALINA_PID
environment variable, on startup - a file with tomcat's pid is written.

Then we have a JSP which queries the last modify time of this file.

-Tim

Kashif Siddiqui wrote:

 Thank you very much for guidance,

 but this page don't show StartTime/UpTime of Tomcat
 Server...

 http://localhost:/manager/html

 Is there any way to get it.


 --- Ronald Klop [EMAIL PROTECTED] wrote:


Look at the http://your-hostname/manager/html
webapp.

See also:


 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html

Ronald.

On Tue Aug 31 12:54:51 CEST 2004 Kashif Siddiqui
[EMAIL PROTECTED] wrote:

Hi all,

I am sucessfully running Tomcat server, now I want

to

know that is there any way to get Tomcat server's

1. Server's Status
2. Start Time
3. Server uptime
4. Current requests on server

Thanks in advance...



-
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: RAM usage of Linux-based Tomcat server

2004-08-31 Thread Sagara Wijetunga

--- Jacob Kjome [EMAIL PROTECTED] wrote:

 At 10:57 PM 8/30/2004 -0700, you wrote:
 I'm not worried about the transient memory used by
 the
 Tomcat instance for it to serve servlets.
 
 But I'm worried about the memory permanently
 allocated
 for a Tomcat instance. Eg. A servlet in a
 particular
 Tomcat instance, may load the entire database into
 the
 memory for efficiency reasons. Now this Tomcat
 instance requires X amount of memory to keep the
 database and all the stuff related to that Tomcat
 instance (except transient memory) to keep them in
 memory. And it requires additional variable amount
 of
 transient memory to serve it, that depends on the
 demand for that Tomcat instance.
 
 What I need to know is can I restrict the size of
 X?
 
 If the memory allocated permanently to a particular
 Tomcat instance cannot be restricted, Can I
 restrict
 the total memory allocation (ie. permanent +
 transient
 memory) for that Tomcat instance?
 
 The VM starts up with a default of 64 meg of RAM Max
 regardless of physical 
 memory.  You can increase this using -Xmx (with the
 Sun VM).  For 
 example...  java -Xmx 256m
 
 Any out of memory errors you get are because the
 amount of memory needed by 
 the application exceeds the maximum memory barrier
 of the VM.  The only way 
 around this is to get rid of memory leaks and/or
 increase the maximum 
 memory for the VM.
 
 look up -Xmx on Google for more info
 
 Jake 
 

Limiting memory for the JVM looks like solves my
issue. Can I run different JVM per Tomcat instance on
a single server?

Sagara



___
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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



RE: JSTL 11 with Tomcat 5.0.27

2004-08-31 Thread Chris Ward



 make sure u modify your web.xml with something like
 
 web-app xmlns=http://java.sun.com/xml/ns/j2ee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
 version=2.4

Thanks for the pointer.  I'm not really sure what this 
entry is supposed to do though.  I'll add it web.xml to
see if magic happens.



 also, for jstl 1.1 no need to copy the .tld for standard and jstl

I assumed I was picking these up since they are in the
jar files I copied from the jsp-examples webapp into my
webapp/WEB-INF/lib dir.


Chris

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



Re: Problem with session counting

2004-08-31 Thread QM
On Tue, Aug 31, 2004 at 11:14:29AM +0200, Michael S?dkamp wrote:
: In our app for a new session there is a thread started that inserts some
: session-specific data into a database. If I replace that thread by synchronous
: code, the problem does not occur.
: So the solution should be to stop this thread before invalidating a session.
: 
: Does it sound OK to you that a running thread causes this behaviour?

I would say, doing any sort of thread work inside the container is
asking for odd behavior.

As for stopping the thread before invalidating a session, how will you
control that?  You could perform this action as part of the general
logout page, but what about people who simply let the sessions time
out?

-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: how to get user login?

2004-08-31 Thread John Villar
The Active Directory is (Simplifying, off course) an LDAP directory. You 
could use a LDAP binding to get the user names from it.

QM escribió:
On Tue, Aug 31, 2004 at 10:37:58AM +0800, Aris Javier wrote:
: when i use request.getRemoteUser(), it returns null value.
: 
: what i want to do is get first the login username then verify it in
: active directory if it exists...

Does JNDIRealm work with AD?
If so, you could setup your auth scheme that way.
(getRemoteUser() won't work unless the user has logged in somehow)
-QM
 

--
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com

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

Re: Tomcat 5 Crystal Reports

2004-08-31 Thread John Villar
My recomendation... use JasperReports is WAAAY Powerfull, is open 
source, and is platform independent.

POLO ARAUJO, JAVIER escribi:
Hi! I'm triying to configure Tomcat 5 and Crystal Reports. What I want to do is 
reading from a database to a report made with CR using a Tomcat datasource. The 
problem is that CR can't find it (using jndi); i get a message saying that CR is 
unable to find the resource. The datasource is well defined (i think so because a jsp 
can use it correctly).
Does anybody know if is there problem between Tomcat 5 and Crystal Reports? Is there 
any one that have configured it yet?
Thanks in advance, 

Javier Polo.
 

--
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com

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

Re: Tomcat Server Status

2004-08-31 Thread Tim Funk
1) must be using unix
2) export CATALINA_PID=/some_dir/tomcat.pid
3) run startup.sh (in the tomcat installation to start tomcat)
Done. There should be a file called /some_dir/tomcat.pid that contains the 
process id of the JVM that is running tomcat.

-Tim
Shakeel Ahmad wrote:
How to set CATALINA_PID for this purpose, I mean can you give some details
and correct settings.
-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 4:23 PM
To: Tomcat Users List
Subject: Re: Tomcat Server Status
We actually wrote a JSP to do this. Since we utilize the CATALINA_PID
environment variable, on startup - a file with tomcat's pid is written.
Then we have a JSP which queries the last modify time of this file.
-Tim
Kashif Siddiqui wrote:

Thank you very much for guidance,
but this page don't show StartTime/UpTime of Tomcat
Server...
http://localhost:/manager/html
Is there any way to get it.
--- Ronald Klop [EMAIL PROTECTED] wrote:

Look at the http://your-hostname/manager/html
webapp.
See also:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html

Ronald.
On Tue Aug 31 12:54:51 CEST 2004 Kashif Siddiqui
[EMAIL PROTECTED] wrote:

Hi all,
I am sucessfully running Tomcat server, now I want
to

know that is there any way to get Tomcat server's
1. Server's Status
2. Start Time
3. Server uptime
4. Current requests on server
Thanks in advance...

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


Tomcat Holding Database Open??????

2004-08-31 Thread Michael McQuade
Hi folks,  I have alreadysent a similar request,  here I am going to try and explain 
it better. First, my system setup
Tomcat  5.0.27
JVM  1.4.2_05-b04 from Sun
Windows 2000 and Windows 2000 Server
MySql   4.1.3b-beta-nt
JDBCMysql-connector-java-3.0.11-stable-bin.jar

I have written an application,   that works fine running under CGI (in another Web 
Server)  Only problem is, its far too slow in CGI.
I installed Tomcat using the Windows Installer version,  apeears to have installed 
fine  I loaded my application. the first page of my app,   the HTML calling 
page has 2 options,  a Company Login and a User Login
I go to the company login screen, enter the info, the database opens, updates, and 
closes all with SQLSTATE = 0.
I then try to go to my USER Login screen and my database opens with an SQLSTATE = 
08002 (connection name in use) and any subsequent attept to access the database reults 
in an SQLSTATE = 08000   
NOW, if I back out to Tomcat App Manager,   stop the application, and restart it, I 
can go back in and get the onetime connection stated above,   then the 08002 scenario 
repeats.
It appears to me, and god knows Im REAL knew to this world,  that Tomcat is somehow 
holding my database open..  not releasing it on DISCONNECT.

DOES anyone have any idea, I have been at this for a week, day and night, to no 
avail..  Im desperate for some sound guidance.
Thank you for anyone who can help me,  and all those that have patience with me.

Mike

Re: Tomcat Server Status

2004-08-31 Thread Remy Maucherat
If you also want the StartTime/UpTime, you could contribute a patch.
This doesn't sound terribly useful overall, but I suppose it wouldn't
hurt.

-- 
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x

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



RE: Getting 404 error deploying my servlet

2004-08-31 Thread Shapira, Yoav

Hi,
Validate your web.xml before you deploy it to production ;)  It's not
valid, not even close.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shaun Campbell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 6:12 AM
To: Tomcat Users List
Subject: Re: Getting 404 error deploying my servlet


 In your web.xml, you might want to try add the following

 web-app
  ...
  !-- must add the following servlet mapping after tomcat v.4.12 --
  servlet-mapping
   servlet-nameinvoker/servlet-name
   url-pattern/servlet/*/url-pattern
  /servlet-mapping
 /web-app


I take it that's apt/WEB-INF/web.xml?  Anyway I seem to have that set
in my
web.xml file.  Here's the contents of my web.xml file. I don't suppose
you
can see anything missing or incorrect?

?xml version=1.0 encoding=ISO-8859-1?

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

web-app

  servlet
servlet-nameapt/servlet-name
servlet-classorg.apache.turbine.Turbine/servlet-class
init-param
  param-nameapplicationRoot/param-name
  param-valuewebContext/param-value
/init-param
init-param
  param-nameproperties/param-name

param-value/WEB-INF/conf/TurbineResources.properties/param-value
/init-param
load-on-startup1/load-on-startup
  /servlet

display-nameTomcat Examples/display-name
description
  Tomcat Example servlets and JSP pages.
/description


!-- Define servlet-mapped and path-mapped example filters --
filter
filter-nameServlet Mapped Filter/filter-name
filter-classfilters.ExampleFilter/filter-class
 init-param
 param-nameattribute/param-name
 param-valuefilters.ExampleFilter.SERVLET_MAPPED/param-value
 /init-param
/filter
filter
filter-namePath Mapped Filter/filter-name
filter-classfilters.ExampleFilter/filter-class
 init-param
 param-nameattribute/param-name
 param-valuefilters.ExampleFilter.PATH_MAPPED/param-value
 /init-param
/filter
filter
filter-nameRequest Dumper Filter/filter-name
filter-classfilters.RequestDumperFilter/filter-class
/filter

!-- Example filter to set character encoding on each request --
filter
filter-nameSet Character Encoding/filter-name
filter-classfilters.SetCharacterEncodingFilter/filter-class
init-param
param-nameencoding/param-name
param-valueEUC_JP/param-value
/init-param
/filter

filter
filter-nameCompression Filter/filter-name

filter-classcompressionFilters.CompressionFilter/filter-class

init-param
  param-namecompressionThreshold/param-name
  param-value10/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value0/param-value
/init-param
/filter

!-- Define filter mappings for the defined filters --
filter-mapping
filter-nameServlet Mapped Filter/filter-name
 servlet-nameinvoker/servlet-name
/filter-mapping
filter-mapping
filter-namePath Mapped Filter/filter-name
 url-pattern/servlet/*/url-pattern
/filter-mapping


!-- Example filter mapping to apply the Set Character Encoding
filter
 to *all* requests processed by this web application --
!--
filter-mapping
filter-nameSet Character Encoding/filter-name
url-pattern/*/url-pattern
/filter-mapping
--

!--
filter-mapping
  filter-nameCompression Filter/filter-name
  url-pattern/CompressionTest/url-pattern
/filter-mapping
--

!--
filter-mapping
filter-nameRequest Dumper Filter/filter-name
url-pattern/*/url-pattern
/filter-mapping
--

!-- Define example application events listeners --
listener
listener-classlisteners.ContextListener/listener-class
/listener
listener
listener-classlisteners.SessionListener/listener-class
/listener

!-- Define servlets that are included in the example application
--

servlet
servlet-nameSendMailServlet/servlet-name
servlet-classSendMailServlet/servlet-class
/servlet

servlet
servlet-name
snoop
/servlet-name
servlet-class
SnoopServlet
/servlet-class
!--
init-param
param-namefoo/param-name
param-valuebar/param-value
/init-param
--
run-as
descriptionSecurity role for anonymous
access/description
role-nametomcat/role-name
/run-as
/servlet

servlet
  servlet-name
  servletToJsp
  /servlet-name
  servlet-class
  servletToJsp
  /servlet-class
/servlet
servlet
servlet-name
CompressionFilterTestServlet
/servlet-name
servlet-class
compressionFilters.CompressionFilterTestServlet
/servlet-class


Re: Tomcat Holding Database Open??????

2004-08-31 Thread QM
On Tue, Aug 31, 2004 at 08:43:00AM -0400, Michael McQuade wrote:
: It appears to me, and god knows Im REAL knew to this world,  that Tomcat is somehow 
holding my database open..  not releasing it on DISCONNECT.
: 
: DOES anyone have any idea, I have been at this for a week, day and night, to no 
avail..  Im desperate for some sound guidance.

A couple of questions:
are you explicitly closing those DB connections?
are you pooling your connections?

-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: JSTL 11 with Tomcat 5.0.27

2004-08-31 Thread Big Chiz
If you have a 2.4 XSD in web.xml, the EL is turned on by default. Also
for jstl 1.1, tlds are already included in the jars, so no need to
copy them to your web-inf

On Tue, 31 Aug 2004 12:56:56 +0100, Chris Ward
[EMAIL PROTECTED] wrote:
 
 
  make sure u modify your web.xml with something like
 
  web-app xmlns=http://java.sun.com/xml/ns/j2ee;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
  version=2.4
 
 Thanks for the pointer.  I'm not really sure what this
 entry is supposed to do though.  I'll add it web.xml to
 see if magic happens.
 
 
  also, for jstl 1.1 no need to copy the .tld for standard and jstl
 
 I assumed I was picking these up since they are in the
 jar files I copied from the jsp-examples webapp into my
 webapp/WEB-INF/lib dir.
 
 
 Chris


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



RE: Tomcat 5 Crystal Reports

2004-08-31 Thread Shapira, Yoav

Hola,
My guess - http://jakarta.apache.org/tomcat/faq/misc.html#externalJndi.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: POLO ARAUJO, JAVIER [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 3:02 AM
To: [EMAIL PROTECTED]
Subject: Tomcat 5  Crystal Reports


Hi! I'm triying to configure Tomcat 5 and Crystal Reports. What I want
to
do is reading from a database to a report made with CR using a Tomcat
datasource. The problem is that CR can't find it (using jndi); i get a
message saying that CR is unable to find the resource. The datasource
is
well defined (i think so because a jsp can use it correctly).

Does anybody know if is there problem between Tomcat 5 and Crystal
Reports?
Is there any one that have configured it yet?

Thanks in advance,

Javier Polo.



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: Getting 404 error deploying my servlet

2004-08-31 Thread John Villar
also, try to tidy up it a bit. elegant XML doesn't hurt anyone :-D
Shapira, Yoav escribió:
Hi,
Validate your web.xml before you deploy it to production ;)  It's not
valid, not even close.
Yoav Shapira
Millennium Research Informatics
 

-Original Message-
From: Shaun Campbell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 6:12 AM
To: Tomcat Users List
Subject: Re: Getting 404 error deploying my servlet
   

In your web.xml, you might want to try add the following
web-app
...
!-- must add the following servlet mapping after tomcat v.4.12 --
servlet-mapping
 servlet-nameinvoker/servlet-name
 url-pattern/servlet/*/url-pattern
/servlet-mapping
/web-app
 

I take it that's apt/WEB-INF/web.xml?  Anyway I seem to have that set
   

in my
 

web.xml file.  Here's the contents of my web.xml file. I don't suppose
   

you
 

can see anything missing or incorrect?
?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app
  PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
servlet
  servlet-nameapt/servlet-name
  servlet-classorg.apache.turbine.Turbine/servlet-class
  init-param
param-nameapplicationRoot/param-name
param-valuewebContext/param-value
  /init-param
  init-param
param-nameproperties/param-name
   

param-value/WEB-INF/conf/TurbineResources.properties/param-value
 

  /init-param
  load-on-startup1/load-on-startup
/servlet
  display-nameTomcat Examples/display-name
  description
Tomcat Example servlets and JSP pages.
  /description
  !-- Define servlet-mapped and path-mapped example filters --
  filter
  filter-nameServlet Mapped Filter/filter-name
  filter-classfilters.ExampleFilter/filter-class
init-param
   param-nameattribute/param-name
   param-valuefilters.ExampleFilter.SERVLET_MAPPED/param-value
/init-param
  /filter
  filter
  filter-namePath Mapped Filter/filter-name
  filter-classfilters.ExampleFilter/filter-class
init-param
   param-nameattribute/param-name
   param-valuefilters.ExampleFilter.PATH_MAPPED/param-value
/init-param
  /filter
  filter
  filter-nameRequest Dumper Filter/filter-name
  filter-classfilters.RequestDumperFilter/filter-class
  /filter
  !-- Example filter to set character encoding on each request --
  filter
  filter-nameSet Character Encoding/filter-name
  filter-classfilters.SetCharacterEncodingFilter/filter-class
  init-param
  param-nameencoding/param-name
  param-valueEUC_JP/param-value
  /init-param
  /filter
  filter
  filter-nameCompression Filter/filter-name
   

filter-classcompressionFilters.CompressionFilter/filter-class
 

  init-param
param-namecompressionThreshold/param-name
param-value10/param-value
  /init-param
  init-param
param-namedebug/param-name
param-value0/param-value
  /init-param
  /filter
  !-- Define filter mappings for the defined filters --
  filter-mapping
  filter-nameServlet Mapped Filter/filter-name
servlet-nameinvoker/servlet-name
  /filter-mapping
  filter-mapping
  filter-namePath Mapped Filter/filter-name
url-pattern/servlet/*/url-pattern
  /filter-mapping
!-- Example filter mapping to apply the Set Character Encoding
   

filter
 

   to *all* requests processed by this web application --
!--
  filter-mapping
  filter-nameSet Character Encoding/filter-name
  url-pattern/*/url-pattern
  /filter-mapping
--
!--
  filter-mapping
filter-nameCompression Filter/filter-name
url-pattern/CompressionTest/url-pattern
  /filter-mapping
--
!--
  filter-mapping
  filter-nameRequest Dumper Filter/filter-name
  url-pattern/*/url-pattern
  /filter-mapping
--
  !-- Define example application events listeners --
  listener
  listener-classlisteners.ContextListener/listener-class
  /listener
  listener
  listener-classlisteners.SessionListener/listener-class
  /listener
  !-- Define servlets that are included in the example application
   

--
 

  servlet
  servlet-nameSendMailServlet/servlet-name
  servlet-classSendMailServlet/servlet-class
  /servlet
  servlet
  servlet-name
  snoop
  /servlet-name
  servlet-class
  SnoopServlet
  /servlet-class
!--
  init-param
  param-namefoo/param-name
  param-valuebar/param-value
  /init-param
--
  run-as
  descriptionSecurity role for anonymous
   

access/description
 

  role-nametomcat/role-name
  /run-as
  /servlet
  servlet
servlet-name
servletToJsp
/servlet-name
servlet-class
servletToJsp
/servlet-class
  /servlet
  servlet
  servlet-name
  CompressionFilterTestServlet
  /servlet-name
  servlet-class
  compressionFilters.CompressionFilterTestServlet
  /servlet-class
  /servlet
  servlet-mapping
  servlet-nameinvoker/servlet-name
  url-pattern/servlet/*/url-pattern
  /servlet-mapping
  

RE: Tomcat Installation Script

2004-08-31 Thread Shapira, Yoav

Hi,
Yeah: http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-5/tomcat.nsi.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Kimmy Lin [mailto:[EMAIL PROTECTED]
Sent: Monday, August 30, 2004 5:09 PM
To: Tomcat Users List
Subject: Tomcat Installation Script

Hi,

I am trying to put Tomcat as part of my program installation on
a Windows system and would like to change the script a little bit.

I understand that Apache Tomcat uses NSIS (Nullsoft Scriptable
Install System) for their Windows installer. Can anyone tell me
whether, where, and how I can get this script?

Thanks a lot!

Kimmy

-
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 Holding Database Open??????

2004-08-31 Thread Ralph Einfeldt

How are you acessing the database ?
- dbcp
- direct jdbc
- taglib
- ???

What makes you think it has anything to do with tomcat?
If you are using direct jdbc you may try to extract
your code to a stand alone application.

 -Original Message-
 From: Michael McQuade [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 31, 2004 2:43 PM
 To: Tomcat Users List
 Subject: Tomcat Holding Database Open??
 
 
 I then try to go to my USER Login screen and my database 
 opens with an SQLSTATE = 08002 (connection name in use) and 
 any subsequent attept to access the database reults in an 
 SQLSTATE = 08000   
 NOW, if I back out to Tomcat App Manager,   stop the 
 application, and restart it, I can go back in and get the 
 onetime connection stated above,   then the 08002 scenario 
 repeats.
 It appears to me, and god knows Im REAL knew to this world,  
 that Tomcat is somehow holding my database open..  not 
 releasing it on DISCONNECT.
 
 DOES anyone have any idea, I have been at this for a week, 
 day and night, to no avail..  Im desperate for some sound 
 guidance.
 Thank you for anyone who can help me,  and all those that 
 have patience with me.
 
 Mike
 

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



Access zu an jdbc Datasource

2004-08-31 Thread Robert Einsle
Hello List,
I'm trying zu connect to an JDBC Datasource connecting to an Postgres 
Database. But it will not work.

I tryed it link the Documentation, adding the Datasource under 
GlobalNamingResources, and add the another in web.xml.

In ProgrammSource:
--- cut ---
Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup(java:/comp/env);
DataSource ds = (DataSource)envContext.lookup(jdbc/postgres);
Connection conn = ds.getConnection();
--- cut ---
The another is link the description in the JDBC Howto.
While ds.getConnection() i recieved an Exception, cannot connect to 
Datasource name ''.

Searchin a little bit, i cannot find the Environment for the 
Postgresdatabasesource.

Does anyone has an Idea / Howto i can lokk about my Problem??
Thanks for Help
\Robby
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Access zu an jdbc Datasource

2004-08-31 Thread D'Alessandro, Arthur
Try a resourcelink in your context for the webapp.

Eg.
Context cachingAllowed=true docBase=yourwebappname.war debug=99
path=/yourwebappname privileged=false reloadable=true
swallowOutput=true
  ResourceLink name=jdbc/globalname global=jdbc/globalname
type=javax.sql.DataSource/
/Context 

-Original Message-
From: Robert Einsle [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 9:02 AM
To: Tomcat Users List
Subject: Access zu an jdbc Datasource

Hello List,

I'm trying zu connect to an JDBC Datasource connecting to an Postgres 
Database. But it will not work.

I tryed it link the Documentation, adding the Datasource under 
GlobalNamingResources, and add the another in web.xml.

In ProgrammSource:

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

The another is link the description in the JDBC Howto.

While ds.getConnection() i recieved an Exception, cannot connect to 
Datasource name ''.

Searchin a little bit, i cannot find the Environment for the 
Postgresdatabasesource.

Does anyone has an Idea / Howto i can lokk about my Problem??

Thanks for Help

\Robby


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



exception listed over and over again in the logs

2004-08-31 Thread Didier McGillis
StandardWrapperValve[view]: Servlet.service() for servlet view threw 
exception
javax.servlet.ServletException: java.io.IOException: reading encoded JPEG 
Stream
	at com.dynamic.servlet.ImageViewer.sendJpeg(ImageViewer.java:304)
	at com.dynamic.servlet.ImageViewer.doGet(ImageViewer.java:100)
...

StandardWrapperValve[view]: Servlet.service() for servlet view threw 
exception
java.lang.NullPointerException
   at 
org.apache.coyote.tomcat4.CoyoteOutputStream.write(CoyoteOutputStream.java:102)
   at com.dynamic.servlet.ImageViewer.doGet(ImageViewer.java:114)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

...
- Root Cause -
java.lang.OutOfMemoryError
normally starts with this.
what is it?  anyone know?
_
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: exception listed over and over again in the logs

2004-08-31 Thread Shapira, Yoav

Howdy,
STFA on OutOfMemoryErrors.  The exception will keep happening every with
JVM operation until you fix your configuration and restart the server.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Didier McGillis [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 9:14 AM
To: [EMAIL PROTECTED]
Subject: exception listed over and over again in the logs

StandardWrapperValve[view]: Servlet.service() for servlet view threw
exception
javax.servlet.ServletException: java.io.IOException: reading encoded
JPEG
Stream
   at
com.dynamic.servlet.ImageViewer.sendJpeg(ImageViewer.java:304)
   at com.dynamic.servlet.ImageViewer.doGet(ImageViewer.java:100)
...

StandardWrapperValve[view]: Servlet.service() for servlet view threw
exception
java.lang.NullPointerException
at
org.apache.coyote.tomcat4.CoyoteOutputStream.write(CoyoteOutputStream.j
ava:
102)
at com.dynamic.servlet.ImageViewer.doGet(ImageViewer.java:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

...

- Root Cause -
java.lang.OutOfMemoryError


normally starts with this.

what is it?  anyone know?

_
MSN(r) 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=Mark
et_M
SNIS_Taglines
  Start enjoying all the benefits of MSN(r) Premium right now and get
the
first two months FREE*.


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



AW: Problem with session counting

2004-08-31 Thread Michael Sudkamp
Before calling session.invalidate() I now interrupt the thread which causes a database 
rollback. Now my JMeter-Tests run fine.

 
 As for stopping the thread before invalidating a session, 
 how will you
 control that?  You could perform this action as part of the general
 logout page, but what about people who simply let the sessions time
 out?

When the session times out, the DB cleanup is done in a valueUnbound() method of an 
appropriate session object. 

Michael


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



Re: Tomcat Server Status

2004-08-31 Thread Ronald Klop
On Tue Aug 31 13:14:22 CEST 2004 Kashif Siddiqui [EMAIL PROTECTED] wrote:
Thank you very much for guidance,
but this page don't show StartTime/UpTime of Tomcat
Server...
http://localhost:/manager/html
Is there any way to get it.

I use a ServletContextListener for this. It has a 'static long startTime = 
System.currentTimeMillis();' or something like that. I can query this from a jsp or 
servlet.
Ronald.



Re: Tomcat Holding Database Open??????

2004-08-31 Thread Michael McQuade
Please forgive me,  I dont even understand a lot of these responses,   Im a
mainframe Cobol coder here,   not a Java person,  but Im using a Converter
that converts Cobol to Java Anyways,  I am pretty sure it has to be
Tomcat doing this,  because my Application ran just fine,   using MySQL,
and JDBC driver in a Web Server called OmniCron  in CGI format.
The only thing different now is,  Im trying to run SERVLETS using
Apache/Tomcat.  At the Start of  each Servlet I do  a connect to
database
CONNECT TO 'jdbc:mysql://127.0.0.1:3306/Imagescan'

DRIVER 'com.mysql.jdbc.Driver'

Then do my processing and then do a DISCONNECT ALL..

It just does not make sense I can connect ONE TIME only when running a
Servlet and have to back out of app,  STOP,  START,  and go back in,   to
get another one time connection.the 08002, connection name in use,
to me,   points to Tomcat ..

But as I said,  Im just a baby in diapers to this world..  I believe its
something in one of the .xml files,   but I have no idea.

As for Connection Pooling,is that for a system taking large numbers of
hits on it?  Right now, Im just one guy trying to make one connection
work.

Thank you for being patient.

Mike





 [EMAIL PROTECTED]

To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 8:55 AM
Subject: Re: Tomcat Holding Database Open??


 On Tue, Aug 31, 2004 at 08:43:00AM -0400, Michael McQuade wrote:
 : It appears to me, and god knows Im REAL knew to this world,  that Tomcat
is somehow holding my database open..  not releasing it on
DISCONNECT.
 :
 : DOES anyone have any idea, I have been at this for a week, day and
night, to no avail..  Im desperate for some sound guidance.

 A couple of questions:
 are you explicitly closing those DB connections?
 are you pooling your connections?

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



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



Problem setting custom Policy object in ServletContextListener

2004-08-31 Thread william
Basically, I am trying to install a custom Policy class on a web app running
within a Tomcat 4.1.27 container.
To do so, I have registered a ServletContextListener in the web.xml and I am
calling Policy.setPolicy(new rbac.MyPolicy()) from within the
contextInitialized method. Later I use the standard JAAS calls to check
permissions.

Everything works well on an XP tomcat installation. However, as soon as I
deploy to Solaris 2.8, strange behavior appears. It seems that the Policy
class is being modified so that the following calls made from a jsp

% Policy.getPolicy() instanceof rbac.MyPolicy % %
Policy.getPolicy().getClass().getName().equals(rbac.MyPolicy) %

return inconsistent values. The first returns false while the second returns
true!

If I delay the policy installation to a later point in the application
lifecycle (i.e. call setPolicy from within a servlet filter instead of
setting the Policy, the problem disappears. However, I would like to avoid
the extra overhead of filtering each request.

I am not running tomcat with the security manager. 
I would be grateful to anyone offering a remedy or suggestions.

Thanks,
// William.

[EMAIL PROTECTED]
ncubeAIT Development


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



Re: Tomcat Holding Database Open??????

2004-08-31 Thread QM
On Tue, Aug 31, 2004 at 09:23:56AM -0400, Michael McQuade wrote:
: Please forgive me,  I dont even understand a lot of these responses,   Im a
: mainframe Cobol coder here,   not a Java person,  but Im using a Converter
: that converts Cobol to Java

Code-generation tools come with their own quirks and headaches.

Aside from that, you'd do well to get some serious Java study time or,
barring that, work with an experienced Java architect/developer who can
guide you through a project or two.



-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 Installation Script

2004-08-31 Thread Kimmy Lin
Many thanks Yoav!

- Original Message - 
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 8:59 AM
Subject: RE: Tomcat Installation Script



 Hi,
 Yeah: http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-5/tomcat.nsi.

 Yoav Shapira
 Millennium Research Informatics


 -Original Message-
 From: Kimmy Lin [mailto:[EMAIL PROTECTED]
 Sent: Monday, August 30, 2004 5:09 PM
 To: Tomcat Users List
 Subject: Tomcat Installation Script
 
 Hi,
 
 I am trying to put Tomcat as part of my program installation on
 a Windows system and would like to change the script a little bit.
 
 I understand that Apache Tomcat uses NSIS (Nullsoft Scriptable
 Install System) for their Windows installer. Can anyone tell me
 whether, where, and how I can get this script?
 
 Thanks a lot!
 
 Kimmy
 
 -
 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: Tomcat Holding Database Open??????

2004-08-31 Thread Chris Ward

Hi Mike,

Some thoughts.  If anyone sees errors please let me know - 
it may save me time in the long run!


 Tomcat doing this,  because my Application ran just fine,   
 using MySQL,
 and JDBC driver in a Web Server called OmniCron  in CGI 

If I recall correctly, the CGI approach throws everything
away after each request.  I moved from Perl CGI to Java 
Servlets a few years back partly to make use of the
load-once-then
-reuse aspect.  I think there was Mod Perl or something 
that sort of did this with Perl.

Any road up, you may find that that is why the CGI version
worked.  Maybe it was freeing/releasing things when the 
CGI script/prog finished each request.  You got a virgin
state every time.

 format. The only thing different now is,  Im trying to 
 run SERVLETS using Apache/Tomcat.  At the Start of  each 
 Servlet I do  a connect to database CONNECT TO 
 'jdbc:mysql://127.0.0.1:3306/Imagescan'
 
 DRIVER 'com.mysql.jdbc.Driver'
 
 Then do my processing and then do a DISCONNECT ALL..


Are you sure the disconnect all is being fired when
you think it is?

Also, is there any chance the the disconnect all is
freeing something you later depend on in subsequent 
requests?  For example, do you have an init() method
in your servlet that (initially) creates/connects,
and the doGet/doPost then uses the connection?

If this is the case, check the disconnect all is not
closing/nullifying the connections since the init()
won't get fired again.  This might explain why the CGI
implementation did make it through.


 It just does not make sense I can connect ONE TIME only when running a
 Servlet and have to back out of app,  STOP,  START,  and go 
 back in,   to
 get another one time connection.the 08002, connection 
 name in use,
 to me,   points to Tomcat ..

 But as I said,  Im just a baby in diapers to this world.. 
  I believe its
 something in one of the .xml files,   but I have no idea.

I don't know for sure - but it sounds like the sort
of right-of-passage problem most of us have had when
first starting with servlets.

I'd recommend gratuitous use of;

System.err.println( Now executing {your method name}
);

then stare at the console window for Tomcat to see what's being
executed.  It's always my last port of call for this sort of
thing.

 As for Connection Pooling,is that for a system taking 
 large numbers of
 hits on it?  Right now, Im just one guy trying to make 
 one connection work.

I use connection pooling on my intranet site which has 
low traffic but large/complex applications on the server.

I use it for two reasons;

a) It shifts some of the work to a thirdparty 
   bunch of code that I didn't have to write
b) Saves time on the creation/connection cycle
   for DB-centric applications.

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



Re: Tomcat Holding Database Open??????

2004-08-31 Thread John Villar

: Please forgive me,  I dont even understand a lot of these responses,   Im a
: mainframe Cobol coder here,   not a Java person,  but Im using a Converter
: that converts Cobol to Java
 

LOL that's the proof that someone still writes on COBOL. 
seriously, using Converters or interpreters is a risky business when 
you're trying to implement something so tightly tied to a language like 
JSP or Servlets, factor that magnifies when you're writing mission 
critical apps (as i can guess from you writing on cobol, you're trying 
to develop some financial app). Search Amazon or O'Reilly for java 
books, they have lots and most of them can help you... also, tutorials 
at http://java.sun.com may help you

--
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com

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

Re: Tomcat Admin Tools Page

2004-08-31 Thread sergio ulloa
add these two lines in tomcat-users.xml file
  role rolename=admin/

  user username=admin password=admin roles=admin/


- Original Message - 
From: Kashif Siddiqui [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 4:54 AM
Subject: Tomcat Admin Tools Page


 Hi all,
 
 I have sucessfully installed and running Tomcat
 server, it is working fine. But I want to know a
 thing:
 
 Here is a Admin page and I want to login to this page,
 plz tell me that what username and password I should
 use to login to this page.
 
 http://localhost:/admin/login.jsp
 
 Thanks in advance, for your guidance...
 
 
 
 
 
 __
 Do you Yahoo!?
 New and Improved Yahoo! Mail - 100MB free storage!
 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]



Tomcat 4.1.29 - Special chars in a file name

2004-08-31 Thread Surendra Kumar
Hi
   I am using Tomcat 4.1.29 + Apache 1.3.31.  In one of my webapp i have a file named 
test+.gif
   When i try to access this gif file, tomcat throws resource not available message. 
All other gif files in the same
   dir are accessible. Even the directory listing shows the file is available. But 
when i select that file it's failing.
   I have tried encoding the url also, but it not working .

Does any one know how to access this file ?

Thanks
Surendra

Re: Tomcat Server Status

2004-08-31 Thread sergio ulloa
On tomcat index.jsp click on status.  To login you must create a user with
manager rol. After this is done you will see the status of your server
- Original Message - 
From: Kashif Siddiqui [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 6:54 AM
Subject: Tomcat Server Status


 Hi all,

 I am sucessfully running Tomcat server, now I want to
 know that is there any way to get Tomcat server's

 1. Server's Status
 2. Start Time
 3. Server uptime
 4. Current requests on server

 Thanks in advance...



 __
 Do you Yahoo!?
 New and Improved Yahoo! Mail - Send 10MB messages!
 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]



Access Log Valve

2004-08-31 Thread Sinkinson,Andrew [NCR]

   Hi,
  I have enabled access logging by uncomment the Access Log Valve in the
server.xml file.  I have added the resolveHosts attribute and set it to
true.  I have also changed the pattern attribute to %h so that I can
just get the  Remote host name in the log file.  In the access log file
I only get an ip address per request.  Any ideas on why I am not able to
resolve host names?
Thanks,
Andrew





Re: Access Log Valve

2004-08-31 Thread QM
On Tue, Aug 31, 2004 at 10:29:09AM -0400, Sinkinson,Andrew [NCR] wrote:
: Reply-To: Tomcat Users List [EMAIL PROTECTED]
:   I have enabled access logging by uncomment the Access Log Valve in the
: server.xml file.  I have added the resolveHosts attribute and set it to
: true.  I have also changed the pattern attribute to %h so that I can
: just get the  Remote host name in the log file.  In the access log file
: I only get an ip address per request.  Any ideas on why I am not able to
: resolve host names?

Just one -- perhaps the IPs in question do not resolve to hostnames.

Put another way, those IPs may not be resolvable from the Tomcat host.

-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 4.1.29 - Special chars in a file name

2004-08-31 Thread Greg Ward
On 31 August 2004, Surendra Kumar said:
 Hi
I am using Tomcat 4.1.29 + Apache 1.3.31.  In one of my webapp i have a file 
 named test+.gif

Probably a URL encoding problem -- if a web page includes

  a href=test+.gif

then the browser will ask for test .gif, because test+.gif is one of
the ways to encode test .gif so it's a legal URL.  (The other is
test%20.gif.)

Whatever code is generating 

  a href=test+.gif

is wrong -- it should be

  a href=test%2B.gif

which the browser will decode to test+.gif.

Greg

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



RE: Access Log Valve

2004-08-31 Thread Sinkinson,Andrew [NCR]
If I log onto the server running my tomcat installation and perform an
nslookup on the ip that is sending the request it resolves.  Running
tomcat 5.0.27 as a service.

-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: August 31, 2004 10:31 AM
To: Tomcat Users List
Subject: Re: Access Log Valve


On Tue, Aug 31, 2004 at 10:29:09AM -0400, Sinkinson,Andrew [NCR] wrote:
: Reply-To: Tomcat Users List [EMAIL PROTECTED]
:   I have enabled access logging by uncomment the Access Log Valve in
the
: server.xml file.  I have added the resolveHosts attribute and set it
to
: true.  I have also changed the pattern attribute to %h so that I can
: just get the  Remote host name in the log file.  In the access log
file
: I only get an ip address per request.  Any ideas on why I am not able
to
: resolve host names?

Just one -- perhaps the IPs in question do not resolve to hostnames.

Put another way, those IPs may not be resolvable from the Tomcat host.

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


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



Re: Tomcat 4.1.29 - Special chars in a file name

2004-08-31 Thread Surendra Kumar
Hi Greg
I tried with test%2B.gif also.  If the file is located in Apache, it
docodes properly.
But if the file is in Tomcat, it throws resource not available
error.

-Surendra

- Original Message -
From: Greg Ward [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 8:02 PM
Subject: Re: Tomcat 4.1.29 - Special chars in a file name


 On 31 August 2004, Surendra Kumar said:
  Hi
 I am using Tomcat 4.1.29 + Apache 1.3.31.  In one of my webapp i have
a file named test+.gif

 Probably a URL encoding problem -- if a web page includes

   a href=test+.gif

 then the browser will ask for test .gif, because test+.gif is one of
 the ways to encode test .gif so it's a legal URL.  (The other is
 test%20.gif.)

 Whatever code is generating

   a href=test+.gif

 is wrong -- it should be

   a href=test%2B.gif

 which the browser will decode to test+.gif.

 Greg

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



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



Re: Tomcat 5 Crystal Reports

2004-08-31 Thread Brent Sims
Use CR version 9+ -- it provides a tag library and supporting files that allow you to 
include your report in a jsp or servlet.  You'll still need an ODBC definition to 
create the report against but this should not be a problem as long as the ODBC def and 
the JNDI resource share the same name.
 
Now, if someone has a fix/answer to the problem I've been banging my head against of 
only being able to run the report once (subsequent attempts cause something along the 
lines of a ZipExtraction exception), I'd certainly appreciate a clue or three
 
Brent Sims
Systems Analyst 2
KC Human Services
-
Road rage, air rage.  Why should I be forced to divide my rage into separate 
categories?  To me, it's just one big, all-round, everyday rage.  I don't have time 
for fine distinctions.  I'm too busy screaming at people.
 - George Carlin

 [EMAIL PROTECTED] 8/31/2004 12:02:09 AM 


Hi! I'm triying to configure Tomcat 5 and Crystal Reports. What I want to do is 
reading from a database to a report made with CR using a Tomcat datasource. The 
problem is that CR can't find it (using jndi); i get a message saying that CR is 
unable to find the resource. The datasource is well defined (i think so because a jsp 
can use it correctly).

Does anybody know if is there problem between Tomcat 5 and Crystal Reports? Is there 
any one that have configured it yet?

Thanks in advance, 

Javier Polo.




How to view what is sent to the browser

2004-08-31 Thread James Sherwood
I am looking for a way to view what is being sent to the browser in the
servlet.

Lets say I want to create a bad word filter(and cannot use an actual filter)

once I get the response, is there a way to manipulate it before it is sent
to the browser?

Thanks,
James



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



RE: How to view what is sent to the browser

2004-08-31 Thread Shapira, Yoav

Hi,
You can do this easily with an HttpServletResponseWrapper and a Filter.
But if you can modify the servlet, you can do this in a very easy (but
somewhat crude way): instead of writing to the Writer you get from the
response, write to a StringWriter, and at the end of your servlet
processing write the contents of this StringWriter both to a log and to
the response's output writer.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: James Sherwood [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 11:08 AM
To: Tomcat Users List
Subject: How to view what is sent to the browser

I am looking for a way to view what is being sent to the browser in the
servlet.

Lets say I want to create a bad word filter(and cannot use an actual
filter)

once I get the response, is there a way to manipulate it before it is
sent
to the browser?

Thanks,
James



-
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: How to view what is sent to the browser

2004-08-31 Thread John Villar
well you could get the request object and search all the parameters 
sent by the client to filter them

James Sherwood escribió:
I am looking for a way to view what is being sent to the browser in the
servlet.
Lets say I want to create a bad word filter(and cannot use an actual filter)
once I get the response, is there a way to manipulate it before it is sent
to the browser?
Thanks,
James

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

--
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com

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

JSP/HTML Encoding

2004-08-31 Thread Ben Bookey


Dear List,

I am having unexpected results when setting the encoding of my
inputForm.jsp, to iso-8859-15 (changing from
iso-8859-15 to iso-8859-1 will allow me to use the Euro symbol and a few
others). When i give a Euro symbol into a form input control, the client
ends up saving a question-mark instead, which is exactly what happens then I
leave the standard iso-8859-1 encoding(the jsp default). I am using Tomcat 5
and Internet Explorer 6.x which supports charset=iso-8859-15.

Here is my jsp page header attributes.

%@ page language=java errorPage=myErrorPage.jsp
pageEncoding=iso-8859-15 contentType=text/html; charset=iso-8859-15%

If by setting the above jsp attributes, do I still need to set (inside the
htmlhead tag) like this ?

meta http-equiv=Content-Type content=text/html; charset=iso-8859-15/

Another factor which might be affecting the encoding of my input form, is
that its a page within a frameset, and it could be that the parent frame
HTML page might be incorrectly pre-determining the encoding of the whole
frameset overriding the child frame settings.


kind regards,
Ben Bookey



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



Re: How to view what is sent to the browser

2004-08-31 Thread John Villar
you could also use pageContext.pushBody(new BadWordsFilterWriter())
Shapira, Yoav escribió:
Hi,
You can do this easily with an HttpServletResponseWrapper and a Filter.
But if you can modify the servlet, you can do this in a very easy (but
somewhat crude way): instead of writing to the Writer you get from the
response, write to a StringWriter, and at the end of your servlet
processing write the contents of this StringWriter both to a log and to
the response's output writer.
Yoav Shapira
Millennium Research Informatics
 

-Original Message-
From: James Sherwood [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 11:08 AM
To: Tomcat Users List
Subject: How to view what is sent to the browser
I am looking for a way to view what is being sent to the browser in the
servlet.
Lets say I want to create a bad word filter(and cannot use an actual
filter)
once I get the response, is there a way to manipulate it before it is
   

sent
 

to the browser?
Thanks,
James

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

 

--
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com

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

RE: JSP/HTML Encoding

2004-08-31 Thread Allistair Crossley
we've got euro working using utf-8 page/char encoding. You can also use Cp1252 on 
Windows.

ADC

 -Original Message-
 From: Ben Bookey [mailto:[EMAIL PROTECTED]
 Sent: 31 August 2004 16:00
 To: Tomcat User List
 Subject: JSP/HTML Encoding
 
 
 
 
 Dear List,
 
 I am having unexpected results when setting the encoding of my
 inputForm.jsp, to iso-8859-15 (changing from
 iso-8859-15 to iso-8859-1 will allow me to use the Euro 
 symbol and a few
 others). When i give a Euro symbol into a form input control, 
 the client
 ends up saving a question-mark instead, which is exactly what 
 happens then I
 leave the standard iso-8859-1 encoding(the jsp default). I am 
 using Tomcat 5
 and Internet Explorer 6.x which supports charset=iso-8859-15.
 
 Here is my jsp page header attributes.
 
 %@ page language=java errorPage=myErrorPage.jsp
 pageEncoding=iso-8859-15 contentType=text/html; 
 charset=iso-8859-15%
 
 If by setting the above jsp attributes, do I still need to 
 set (inside the
 htmlhead tag) like this ?
 
 meta http-equiv=Content-Type content=text/html; 
 charset=iso-8859-15/
 
 Another factor which might be affecting the encoding of my 
 input form, is
 that its a page within a frameset, and it could be that the 
 parent frame
 HTML page might be incorrectly pre-determining the encoding 
 of the whole
 frameset overriding the child frame settings.
 
 
 kind regards,
 Ben Bookey
 
 
 
 -
 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]



IllegalStateException from java.nio.charset.CharsetEncoder

2004-08-31 Thread Greg Ward
On one of our servers, we're using Tomcat 4.1.29 under Java 1.4.2_02,
connecting to Apache 2.0.48 with mod_jk 1.2.4, all running on Red Hat
Linux 6.2.  (Wow, what a zoo of version numbers!)

Recently we got a support call because some (all?) HTTP requests were
failing with Internal Server Error.  The support tech who took the
call noticed this in mod_jk's log file:

[Sat Aug 28 15:59:39 2004] [jk_ajp_common.c (1309)]: sending request to tomcat failed 
in send loop. err=2
[Sat Aug 28 15:59:39 2004] [jk_ajp_common.c (1318)]: Error connecting to tomcat. 
Tomcat is probably not started or is listening on the wrong port. Failed errno = 104 

(Errno 104, for the curious, is ECONNRESET -- Connection reset by
peer.)

He tried restarting Tomcat, which sounds like the right thing to me.
That didn't help, so then he tried restarting Apache.  Still nothing, so
he rebooted the server, after which things started working again.
H.

Looking in catalina.out after the reboot, I saw this stack trace:

  java.lang.IllegalStateException: Current state = FLUSHED, new state = CODING_END
  at 
java.nio.charset.CharsetEncoder.throwIllegalStateException(CharsetEncoder.java:933)
  at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:529)
  at sun.nio.cs.StreamEncoder$CharsetSE.flushLeftoverChar(StreamEncoder.java:358)
  at sun.nio.cs.StreamEncoder$CharsetSE.implClose(StreamEncoder.java:414)
  at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:160)
  at java.io.OutputStreamWriter.close(OutputStreamWriter.java:222)
  at java.io.PrintWriter.close(PrintWriter.java:137)
  at org.apache.catalina.connector.ResponseBase.finishResponse(ResponseBase.java:483)
  at 
org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpResponseBase.java:253)
  at org.apache.ajp.tomcat4.Ajp13Response.finishResponse(Ajp13Response.java:191)
  at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:479)
  at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:576)
  at java.lang.Thread.run(Thread.java:534) 

Of course, catalina.out is clobbered with every Tomcat restart, so
there's no way of knowing if this exception is actually the cause of the
problem, i.e. if it was happening before the first Tomcat restart.
Nevertheless, I poked around a bit and stumbled across these two entries
in Tomcat's bug database:

  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7725
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6519

Both of these have a *nearly* identical stack trace (the connector is
different -- org.apache.catalina.connector.http.HttpProcessor vs
org.apache.ajp.tomcat4.Ajp13Processor in my example) that ends with the
same IllegalStateException.  Both are about 2 years old, around the time
that Tomcat 4.0 and Java 1.4 were in beta.  And it sorta-kinda-vaguely
sounded like the bug(s), whatever they were, have been fixed.

First of all, from those two bug reports, it's not clear if this is a
Tomcat bug or a Java bug.  Second of all, has anyone else seen this on
stable, mature versions of Tomcat 4.0 and Java 1.4 (ie. 4.0.29 and
1.4.2_02)?

Thanks --

Greg

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



RE: JSP/HTML Encoding

2004-08-31 Thread Allistair Crossley
make sure also that you set file.encoding=utf8 in tomcat's startup options so that the 
jvm also operates in that mode.

ADC

 -Original Message-
 From: Ben Bookey [mailto:[EMAIL PROTECTED]
 Sent: 31 August 2004 16:00
 To: Tomcat User List
 Subject: JSP/HTML Encoding
 
 
 
 
 Dear List,
 
 I am having unexpected results when setting the encoding of my
 inputForm.jsp, to iso-8859-15 (changing from
 iso-8859-15 to iso-8859-1 will allow me to use the Euro 
 symbol and a few
 others). When i give a Euro symbol into a form input control, 
 the client
 ends up saving a question-mark instead, which is exactly what 
 happens then I
 leave the standard iso-8859-1 encoding(the jsp default). I am 
 using Tomcat 5
 and Internet Explorer 6.x which supports charset=iso-8859-15.
 
 Here is my jsp page header attributes.
 
 %@ page language=java errorPage=myErrorPage.jsp
 pageEncoding=iso-8859-15 contentType=text/html; 
 charset=iso-8859-15%
 
 If by setting the above jsp attributes, do I still need to 
 set (inside the
 htmlhead tag) like this ?
 
 meta http-equiv=Content-Type content=text/html; 
 charset=iso-8859-15/
 
 Another factor which might be affecting the encoding of my 
 input form, is
 that its a page within a frameset, and it could be that the 
 parent frame
 HTML page might be incorrectly pre-determining the encoding 
 of the whole
 frameset overriding the child frame settings.
 
 
 kind regards,
 Ben Bookey
 
 
 
 -
 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: JAVA_OPT with service

2004-08-31 Thread David Morris
Sloan, 

You should find what you need here:

http://jakarta.apache.org/commons/daemon/procrun.html

Look in the registry for the parameter keys:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Apache Service
Name\Parameters

JVM Option Number 0 to the first parameter.
JVM Option Number 1 to the second parameter.
JVM Option Count (DWORD) is the number of parameters.

David Morris

-Original Message-
From: Seaman, Sloan [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 30, 2004 1:04 PM
To: 'Tomcat Users List'
Subject: JAVA_OPT with service


How do I set the JAVA_OPT when I'm running tomcat 5 as a service?

I need to set: JAVA_OPTS=-Djava.security.auth.login.config=etc

--
Sloan


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



Reading Servlet OutputStream

2004-08-31 Thread Nitin Mulimani
This question is is more on the Servlet API. 

 

I want to read the servlet output stream and save in some buffer or
file, and then forward it to the client. I use filters to play with the
Request and Response objects. 

 

These are some of the things I have tried.

1)   I have a Wrapper which extends HttpServletResponseWrapper

2)   Constructed a PrintWriter writer = new PrintWriter(new
OutputStreamWriter(origResponse.getOutputStream(), charEnc));

Reader reader = new StringReader(printWriter.toString());

BufferedReader bufferedReader = new BufferedReader(reader);

String line;

while ((line = bufferedReader.readLine()) != null) {

  System.out.println(line :  + line);

}

3) bufferedReader.close();

 

Still am not able to read the response. I can write to the response, but
am stuck at reading the response. 

 

Any pointers.

 

-- Nitin



AW: JSP/HTML Encoding

2004-08-31 Thread Ben Bookey
Hi Allistair,

Where can I set this JVM property exactly ?
Thanks in advance.
Ben
p.s. I am beginning to think that my problem is associated with working with
HTML framesets(with possible mixtures of html encoding).

-Ursprüngliche Nachricht-
Von: Allistair Crossley [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 31. August 2004 17:08
An: Tomcat Users List; [EMAIL PROTECTED]
Betreff: RE: JSP/HTML Encoding


make sure also that you set file.encoding=utf8 in tomcat's startup options
so that the jvm also operates in that mode.

ADC

 -Original Message-
 From: Ben Bookey [mailto:[EMAIL PROTECTED]
 Sent: 31 August 2004 16:00
 To: Tomcat User List
 Subject: JSP/HTML Encoding




 Dear List,

 I am having unexpected results when setting the encoding of my
 inputForm.jsp, to iso-8859-15 (changing from
 iso-8859-15 to iso-8859-1 will allow me to use the Euro
 symbol and a few
 others). When i give a Euro symbol into a form input control,
 the client
 ends up saving a question-mark instead, which is exactly what
 happens then I
 leave the standard iso-8859-1 encoding(the jsp default). I am
 using Tomcat 5
 and Internet Explorer 6.x which supports charset=iso-8859-15.

 Here is my jsp page header attributes.

 %@ page language=java errorPage=myErrorPage.jsp
 pageEncoding=iso-8859-15 contentType=text/html;
 charset=iso-8859-15%

 If by setting the above jsp attributes, do I still need to
 set (inside the
 htmlhead tag) like this ?

 meta http-equiv=Content-Type content=text/html;
 charset=iso-8859-15/

 Another factor which might be affecting the encoding of my
 input form, is
 that its a page within a frameset, and it could be that the
 parent frame
 HTML page might be incorrectly pre-determining the encoding
 of the whole
 frameset overriding the child frame settings.


 kind regards,
 Ben Bookey



 -
 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: Tomcat Holding Database Open??????

2004-08-31 Thread Parsons Technical Services
Mike,

You may want to post some code and let us take a look. May be the simplest
solution to get you going. There is a chance that you are not closing the
connection properly and it is being held open. There can also be database
issues as well (I think someone mentioned this).

Doug
www.parsonstechnical.com


- Original Message - 
From: Michael McQuade [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 9:23 AM
Subject: Re: Tomcat Holding Database Open??


 Please forgive me,  I dont even understand a lot of these responses,   Im
a
 mainframe Cobol coder here,   not a Java person,  but Im using a Converter
 that converts Cobol to Java Anyways,  I am pretty sure it has to be
 Tomcat doing this,  because my Application ran just fine,   using MySQL,
 and JDBC driver in a Web Server called OmniCron  in CGI format.
 The only thing different now is,  Im trying to run SERVLETS using
 Apache/Tomcat.  At the Start of  each Servlet I do  a connect to
 database
 CONNECT TO 'jdbc:mysql://127.0.0.1:3306/Imagescan'

 DRIVER 'com.mysql.jdbc.Driver'

 Then do my processing and then do a DISCONNECT ALL..

 It just does not make sense I can connect ONE TIME only when running a
 Servlet and have to back out of app,  STOP,  START,  and go back in,   to
 get another one time connection.the 08002, connection name in use,
 to me,   points to Tomcat ..

 But as I said,  Im just a baby in diapers to this world..  I believe
its
 something in one of the .xml files,   but I have no idea.

 As for Connection Pooling,is that for a system taking large numbers of
 hits on it?  Right now, Im just one guy trying to make one connection
 work.

 Thank you for being patient.

 Mike





  [EMAIL PROTECTED]

 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Tuesday, August 31, 2004 8:55 AM
 Subject: Re: Tomcat Holding Database Open??


  On Tue, Aug 31, 2004 at 08:43:00AM -0400, Michael McQuade wrote:
  : It appears to me, and god knows Im REAL knew to this world,  that
Tomcat
 is somehow holding my database open..  not releasing it on
 DISCONNECT.
  :
  : DOES anyone have any idea, I have been at this for a week, day and
 night, to no avail..  Im desperate for some sound guidance.
 
  A couple of questions:
  are you explicitly closing those DB connections?
  are you pooling your connections?
 
  -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]
 


 -
 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: Reading Servlet OutputStream

2004-08-31 Thread John Villar
Look at the pushBody method of the response class 
(HttpServletResponse) that's all you need

Nitin Mulimani escribió:
This question is is more on the Servlet API. 


I want to read the servlet output stream and save in some buffer or
file, and then forward it to the client. I use filters to play with the
Request and Response objects. 


These are some of the things I have tried.
1)   I have a Wrapper which extends HttpServletResponseWrapper
2)   Constructed a PrintWriter writer = new PrintWriter(new
OutputStreamWriter(origResponse.getOutputStream(), charEnc));
Reader reader = new StringReader(printWriter.toString());
   BufferedReader bufferedReader = new BufferedReader(reader);
   String line;
   while ((line = bufferedReader.readLine()) != null) {
 System.out.println(line :  + line);
   }
3) bufferedReader.close();

Still am not able to read the response. I can write to the response, but
am stuck at reading the response. 


Any pointers.

-- Nitin
 

--
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com

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

AW: Access Log Valve

2004-08-31 Thread Sinkinson,Andrew [NCR]

Forgot to enableLookups=true on the Connector.  By default it is set
to false :)
-Original Message-
From: QM [mailto:[EMAIL PROTECTED] 
Sent: August 31, 2004 10:31 AM
To: Tomcat Users List
Subject: Re: Access Log Valve


On Tue, Aug 31, 2004 at 10:29:09AM -0400, Sinkinson,Andrew [NCR] wrote:
: Reply-To: Tomcat Users List [EMAIL PROTECTED]
:   I have enabled access logging by uncomment the Access Log Valve in
the
: server.xml file.  I have added the resolveHosts attribute and set it
to
: true.  I have also changed the pattern attribute to %h so that I can
: just get the  Remote host name in the log file.  In the access log
file
: I only get an ip address per request.  Any ideas on why I am not able
to
: resolve host names?

Just one -- perhaps the IPs in question do not resolve to hostnames.

Put another way, those IPs may not be resolvable from the Tomcat host.

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


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



Functionality of run-as for Servlets

2004-08-31 Thread Gunnar Brading
I have been in need of using the run-as tag in a Tomcat-only 
environment... Is this possible? Reading the source indicates that it 
wouldn't be possible to get the information about the role the context 
currently is in. Using the requests in-role methods of course tells me about
the user, and not the context.

Have I come to the right conclusion?
Reading the specs tells me that the functionality is meant for 
transferring roles to EJB's. Some documentation I found at Sun indicates 
though that even web-applications should be able to use this.

Anyone got more information about this?
Cheers,
-- gunnar
--
Gunnar Brading, Astrogator AB - High Performance Networks  Interactive Media
 Email; [EMAIL PROTECTED]  Address; Rorstrandsgatan 30A, 113 40 STOCKHOLM
   Office: +46 8 5456 0010 Fax: +46 8 5456 0011 Cellular: +46 70 778 2 877
The scientist describes what is; the engineer creates what never was
- Theodore von Karman


smime.p7s
Description: S/MIME Cryptographic Signature


SSL Discoveries

2004-08-31 Thread Bill Barrington
  If you are using SSL with Tomcat, you should probably read this. I got no responses 
to my earlier postings, but it's possible this could save you some time in the future. 
Or it could be that my experience is totally unique (but that is hard for me to 
believe).

  I finally got SSL working with Tomcat by blowing away my keystore and starting over 
from scratch. I discovered some things along the way. Tomcat doesn't actually care if 
you have a key with an alias of 'tomcat'. I created a key (the only entry in the 
keystore) with an alias of 'woof' and Tomcat was quite happy with that. The SSL 
connector initialized fine.

  If you enter 'https://localhost:8443' (or whatever your SSL port is) in a browser 
and view the certificate, it will show the certificate with the alias of 'woof'.

  Now add another key with an alias of 'tomcat' and bring up the browser again and 
view the certificate.  It will show the one with the alias of 'tomcat'.

  If you then delete all entries from the keystore and restart Tomcat, it will go into 
an infinite loop trying to initialize the SSL connector.  Now add a key (any key) and 
it will come up, no problem.

  Tomcat appears to only care that you do have a keystore with at least one key in it. 
Doesn't really care what that key is, just a non-empty keystore to make it happy.
  
  I did save all of my existing keys before I blew away my keystore and started over. 
I imported them back into the new keystore and everything was fine. At first I thought 
that maybe a key was corrupted, but that does appear to be the case.

  I'm running Tomcat 5.0.27  JDK 1.4.2_03.





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



RE: JSTL 11 with Tomcat 5.0.27

2004-08-31 Thread Chris Ward


Thanks again.

I'm showing my ignorance now but I don't know what a 2.4 XSD
is let alone if I should have one or not!  I did Google it 
but don't have time to reas all that came back!  It's sitting on the
printer now.

I see mention of XMLSchema in there - which is something I'm not
currently making use of in my code.


 
 If you have a 2.4 XSD in web.xml, the EL is turned on by
 default. Also for jstl 1.1, tlds are already included in the 
 jars, so no need to copy them to your web-inf
 
 On Tue, 31 Aug 2004 12:56:56 +0100, Chris Ward
 [EMAIL PROTECTED] wrote:
  
  
   make sure u modify your web.xml with something like
  
   web-app xmlns=http://java.sun.com/xml/ns/j2ee;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
   version=2.4
  

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



AW: JSP/HTML Encoding

2004-08-31 Thread Ben Bookey
Hi Allistair

+++ Many thanks for your help. +++

I apologise when I ask some stupid questions...
:)

1) I am not exactly sure what the benefit is, of seeing if the client is
posting a utf8 encoded response ? Surely, the server controls anyway what
encoding the html pages are in so if i post with Latin9 then the client can
either read it or not. I guess this filter is useful in the case that the
client browser doesnt support the character encoding (something hopefully
similar) and posts the request in another character-code. The filter can
then be used to see if this is happening or not ?


2) I would assume that Tomcat( being java) would always use either utf8 or
utf16 so making the necessity of setting a jvm tomcat property unnecessary ?



regards
Ben



-Ursprüngliche Nachricht-
Von: Allistair Crossley [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 31. August 2004 17:32
An: [EMAIL PROTECTED]
Betreff: RE: JSP/HTML Encoding


Hm, tell a lie Ben...I've just checked our startup options and we don't seem
to do that anymore ... however if you were to do it ..
add -Dfile.encoding=utf8

rem Set extra parameters
%EXECUTABLE% //US//%SERVICE_NAME% --JvmOptions
-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endo
rsed.dirs=%CATALINA_HOME%\common\endorsed;-Xrs;-Xms128m;-Xmx384m;-Duser.dir
=%CATALINA_HOME%;-Dfile.encoding=utf8 --StartMode jvm --StopMode jvm

I think you just need to make sure you use utf8 at the UI. Our databases are
all Windows Cp1252 which also include the euro symbol.

I also forgot to mention we put an explicit filter on all inbound requests
that set the inbound encoding to utf-8. Try adding this filter to web.xml

filter
filter-nameSet Character Encoding/filter-name

filter-classcom.qas.newmedia.common.filters.SetCharacterEncodingFilter/fi
lter-class
init-param
param-nameencoding/param-name
param-valueUTF-8/param-value
/init-param
/filter

with the code ...

/*
 * $Header:
/home/cvs/jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/filters/SetCha
racterEncodingFilter.java,v 1.1 2001/07/24 00:26:55 craigmcc Exp $
 * $Revision: 1.1 $
 * $Date: 2001/07/24 00:26:55 $
 *
 * 
 *
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *notice, this list of conditions and the following disclaimer in
 *the documentation and/or other materials provided with the
 *distribution.
 *
 * 3. The end-user documentation included with the redistribution, if
 *any, must include the following acknowlegement:
 *   This product includes software developed by the
 *Apache Software Foundation (http://www.apache.org/).
 *Alternately, this acknowlegement may appear in the software itself,
 *if and wherever such third-party acknowlegements normally appear.
 *
 * 4. The names The Jakarta Project, Tomcat, and Apache Software
 *Foundation must not be used to endorse or promote products derived
 *from this software without prior written permission. For written
 *permission, please contact [EMAIL PROTECTED]
 *
 * 5. Products derived from this software may not be called Apache
 *nor may Apache appear in their names without prior written
 *permission of the Apache Group.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * 
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * http://www.apache.org/.
 *
 * [Additional notices, if required by prior licensing conditions]
 *
 */


package 

-- Tomcat, filesystem

2004-08-31 Thread J.Ph DEGLETAGNE
Hello Somebody,
 
Under Windows XP,
 
How to customize webapps Tomcat to access directory filesystem which are
outside Tomcat ?
like this :
D:\Program Files\Apache Software Foundation\Tomcat 5.0\..
 
Thank's a lot
 
JPhD


-- TomCat/Lucene, filesystem

2004-08-31 Thread J.Ph DEGLETAGNE
Hello Somebody, 
 
..I beg your pardon... 
 
Under Windows XP / TomCat, 
 
How to customize  Webapp Lucene to access directory filesystem which are
outside TomCat ?
like this :
D:\Program Files\Apache Software Foundation\Tomcat 5.0\..
to access
E:\Data
 
Thank's a lot
 
JPhD


Java process growth under Linux...leak?

2004-08-31 Thread Mark Maigatter
We have a Tomcat 5.0.25 based web site for uploading images and assorted
files and managing them.
 
We have found that the Java process that Tomcat is running under is
gradually growing when repetitively processing files uploaded and stripped
out of the form submissions by the Apache FileUpload component.  All signs
point to a memory leak?
 
Upon the submission of about 500 files we had a 31MB growth in the size of
the java process using top.  
 
However, the Sun Java jvmstat shows that the Java heap is staying relatively
constant.  The -gc numbers fluctuate in a manner that shows reasonable
garbage collection activity and the total used across the s0/s1/eden/old
stay with the range for the initial numbers.
 
My question is what would you recommend to isolate the process growth?
 
Is there a way within Java to see the underlying process growth to help
isolate it in the processing cycle?
 
--mark


Re: Reading Servlet OutputStream

2004-08-31 Thread James Sherwood
I am in roughly the same boat as you John as I need to manipulate the
response.

I cannot find a pushBody method for HttpServletResponse:(

James

- Original Message - 
From: John Villar [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 12:32 PM
Subject: Re: Reading Servlet OutputStream


 Look at the pushBody method of the response class
 (HttpServletResponse) that's all you need

 Nitin Mulimani escribió:

 This question is is more on the Servlet API.
 
 
 
 I want to read the servlet output stream and save in some buffer or
 file, and then forward it to the client. I use filters to play with the
 Request and Response objects.
 
 
 
 These are some of the things I have tried.
 
 1)   I have a Wrapper which extends HttpServletResponseWrapper
 
 2)   Constructed a PrintWriter writer = new PrintWriter(new
 OutputStreamWriter(origResponse.getOutputStream(), charEnc));
 
 Reader reader = new StringReader(printWriter.toString());
 
 BufferedReader bufferedReader = new BufferedReader(reader);
 
 String line;
 
 while ((line = bufferedReader.readLine()) != null) {
 
   System.out.println(line :  + line);
 
 }
 
 3) bufferedReader.close();
 
 
 
 Still am not able to read the response. I can write to the response, but
 am stuck at reading the response.
 
 
 
 Any pointers.
 
 
 
 -- Nitin
 
 
 
 

 -- 
 John Villar
 Gerente de Proyectos
 Computadores Flor Hard Soft 2058 C.A.
 www.florhard.com









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



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



RE: Reading Servlet OutputStream

2004-08-31 Thread Nitin Mulimani

Hi John,

I am checking the Servlet2.3 api, and do not find a pushBody() method in 
HttpServletResponse.

-- Nitin
-Original Message-
From: John Villar [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 8:32 AM
To: Tomcat Users List
Subject: Re: Reading Servlet OutputStream

Look at the pushBody method of the response class 
(HttpServletResponse) that's all you need

Nitin Mulimani escribió:

This question is is more on the Servlet API. 

 

I want to read the servlet output stream and save in some buffer or
file, and then forward it to the client. I use filters to play with the
Request and Response objects. 

 

These are some of the things I have tried.

1)   I have a Wrapper which extends HttpServletResponseWrapper

2)   Constructed a PrintWriter writer = new PrintWriter(new
OutputStreamWriter(origResponse.getOutputStream(), charEnc));

Reader reader = new StringReader(printWriter.toString());

BufferedReader bufferedReader = new BufferedReader(reader);

String line;

while ((line = bufferedReader.readLine()) != null) {

  System.out.println(line :  + line);

}

3) bufferedReader.close();

 

Still am not able to read the response. I can write to the response, but
am stuck at reading the response. 

 

Any pointers.

 

-- Nitin


  


-- 
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com




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



Re: Reading Servlet OutputStream

2004-08-31 Thread John Villar
certainly my error the method is from the JSP API JspContext 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jspapi/index.html
I ran into a problem that needed writing a zip file from the JSP page

sorry for that one, however, with that method you could do what you're 
trying

Nitin Mulimani escribió:
Hi John,
I am checking the Servlet2.3 api, and do not find a pushBody() method in 
HttpServletResponse.
-- Nitin
-Original Message-
From: John Villar [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 8:32 AM
To: Tomcat Users List
Subject: Re: Reading Servlet OutputStream

Look at the pushBody method of the response class 
(HttpServletResponse) that's all you need

Nitin Mulimani escribió:
 

This question is is more on the Servlet API. 


I want to read the servlet output stream and save in some buffer or
file, and then forward it to the client. I use filters to play with the
Request and Response objects. 


These are some of the things I have tried.
1)   I have a Wrapper which extends HttpServletResponseWrapper
2)   Constructed a PrintWriter writer = new PrintWriter(new
OutputStreamWriter(origResponse.getOutputStream(), charEnc));
Reader reader = new StringReader(printWriter.toString());
  BufferedReader bufferedReader = new BufferedReader(reader);
  String line;
  while ((line = bufferedReader.readLine()) != null) {
System.out.println(line :  + line);
  }
3) bufferedReader.close();

Still am not able to read the response. I can write to the response, but
am stuck at reading the response. 


Any pointers.

-- Nitin

   

 

--
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com

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

Re: Reading Servlet OutputStream

2004-08-31 Thread James Sherwood
I am not using JSP, I am using Tapestry, any other ideas on how to
accomplish this?

James

- Original Message - 
From: John Villar [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 1:31 PM
Subject: Re: Reading Servlet OutputStream


 certainly my error the method is from the JSP API JspContext
 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jspapi/index.html
 I ran into a problem that needed writing a zip file from the JSP page

 sorry for that one, however, with that method you could do what you're
 trying

 Nitin Mulimani escribió:

 Hi John,
 
 I am checking the Servlet2.3 api, and do not find a pushBody() method in
HttpServletResponse.
 
 -- Nitin
 -Original Message-
 From: John Villar [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 31, 2004 8:32 AM
 To: Tomcat Users List
 Subject: Re: Reading Servlet OutputStream
 
 Look at the pushBody method of the response class
 (HttpServletResponse) that's all you need
 
 Nitin Mulimani escribió:
 
 
 
 This question is is more on the Servlet API.
 
 
 
 I want to read the servlet output stream and save in some buffer or
 file, and then forward it to the client. I use filters to play with the
 Request and Response objects.
 
 
 
 These are some of the things I have tried.
 
 1)   I have a Wrapper which extends HttpServletResponseWrapper
 
 2)   Constructed a PrintWriter writer = new PrintWriter(new
 OutputStreamWriter(origResponse.getOutputStream(), charEnc));
 
 Reader reader = new StringReader(printWriter.toString());
 
BufferedReader bufferedReader = new BufferedReader(reader);
 
String line;
 
while ((line = bufferedReader.readLine()) != null) {
 
  System.out.println(line :  + line);
 
}
 
 3) bufferedReader.close();
 
 
 
 Still am not able to read the response. I can write to the response, but
 am stuck at reading the response.
 
 
 
 Any pointers.
 
 
 
 -- Nitin
 
 
 
 
 
 
 
 
 

 -- 
 John Villar
 Gerente de Proyectos
 Computadores Flor Hard Soft 2058 C.A.
 www.florhard.com









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



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



RE: Path Problem when Porting Hibernate/Struts App from Tomcat 4 to 5

2004-08-31 Thread Emmerich, Martin
On Wed, Aug 25, 2004 at 6:31 PM, QM wrote

 What about renaming the .jar file with the Hibernate mappings .zip?
and
 You may want to hold off, then, till the developer gets back.  

We did both and it worked!

Thanks for the help!

Best regards,
..
Martin Emmerich
Leitung IT

Oestreicher + Wagner
Medientechnik GmbH
Frankenthaler Straße 20
D-81539 München

Fon   +49 (0)89-68961 0 
Fax   +49 (0)89-68961 200
Web   http://www.oew.de/

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



RE: Reading Servlet OutputStream

2004-08-31 Thread Nandish Rudra
Here is something u guys can do.

PipedOutputStream and PipedInputStream to redirect the output stream and
read the data into a buffer and then do with it what u please.

regards
NR


-Original Message-
From: James Sherwood [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 12:48 PM
To: Tomcat Users List
Subject: Re: Reading Servlet OutputStream


I am not using JSP, I am using Tapestry, any other ideas on how to
accomplish this?

James

- Original Message - 
From: John Villar [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 1:31 PM
Subject: Re: Reading Servlet OutputStream


 certainly my error the method is from the JSP API JspContext
 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jspapi/index.html
 I ran into a problem that needed writing a zip file from the JSP page

 sorry for that one, however, with that method you could do what you're
 trying

 Nitin Mulimani escribió:

 Hi John,
 
 I am checking the Servlet2.3 api, and do not find a pushBody() method in
HttpServletResponse.
 
 -- Nitin
 -Original Message-
 From: John Villar [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 31, 2004 8:32 AM
 To: Tomcat Users List
 Subject: Re: Reading Servlet OutputStream
 
 Look at the pushBody method of the response class
 (HttpServletResponse) that's all you need
 
 Nitin Mulimani escribió:
 
 
 
 This question is is more on the Servlet API.
 
 
 
 I want to read the servlet output stream and save in some buffer or
 file, and then forward it to the client. I use filters to play with the
 Request and Response objects.
 
 
 
 These are some of the things I have tried.
 
 1)   I have a Wrapper which extends HttpServletResponseWrapper
 
 2)   Constructed a PrintWriter writer = new PrintWriter(new
 OutputStreamWriter(origResponse.getOutputStream(), charEnc));
 
 Reader reader = new StringReader(printWriter.toString());
 
BufferedReader bufferedReader = new BufferedReader(reader);
 
String line;
 
while ((line = bufferedReader.readLine()) != null) {
 
  System.out.println(line :  + line);
 
}
 
 3) bufferedReader.close();
 
 
 
 Still am not able to read the response. I can write to the response, but
 am stuck at reading the response.
 
 
 
 Any pointers.
 
 
 
 -- Nitin
 
 
 
 
 
 
 
 
 

 -- 
 John Villar
 Gerente de Proyectos
 Computadores Flor Hard Soft 2058 C.A.
 www.florhard.com









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



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

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



Re: -- TomCat/Lucene, filesystem

2004-08-31 Thread QM
On Tue, Aug 31, 2004 at 06:11:53PM +0200, J.Ph DEGLETAGNE wrote:
: How to customize  Webapp Lucene to access directory filesystem which are
: outside TomCat ?
: like this :
: D:\Program Files\Apache Software Foundation\Tomcat 5.0\..
: to access
: E:\Data

You'll have to clarify what you mean by access -- open a file, write a
file, what?  

Whatever the case, barring any SecurityManager problems or issues with
file ownership/permissions it should be a standard java.io.* issue.

-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: Java process growth under Linux...leak?

2004-08-31 Thread Wade Chandler
Mark Maigatter wrote:
We have a Tomcat 5.0.25 based web site for uploading images and assorted
files and managing them.
 
We have found that the Java process that Tomcat is running under is
gradually growing when repetitively processing files uploaded and stripped
out of the form submissions by the Apache FileUpload component.  All signs
point to a memory leak?
 
Upon the submission of about 500 files we had a 31MB growth in the size of
the java process using top.  
 
However, the Sun Java jvmstat shows that the Java heap is staying relatively
constant.  The -gc numbers fluctuate in a manner that shows reasonable
garbage collection activity and the total used across the s0/s1/eden/old
stay with the range for the initial numbers.
 
My question is what would you recommend to isolate the process growth?
 
Is there a way within Java to see the underlying process growth to help
isolate it in the processing cycle?
 
--mark

How large were the files you were uploading?  I mean  you just said you 
uploaded 500 files.  You should expect to see process memory growth. 
The JVM has it's own object heap where it manages it's internal 
memory.  Then there is the process and it's memory which is a C heap.

I see that you uploaded 500 files.  Were these one right after the 
other, or were they close to simultaneous?  Also, how are you uploading 
the files?  Are you using some type of a parser?  Are you using the 
commons file upload control?  If the JVM reports good memory collection, 
then there is no memory leak in Tomcat.  31MB of growth for a process 
uploading 500 files shouldn't be that bad depending on how they were 
uploaded and file sizes.

Think about it. If the files were between 100kb and 60kb then you have a 
total of 30mb to 50mb of memory just in that data alone not including 
your application and other buffers you may or may not be creating while 
uploading.

For perforamnce reasons the VM isn't going to suddenly resize the heap 
as soon as it frees a group of java objects because as far as it knows 
you may come along and upload 50mb worth of data immediately after the 
first.  This is a performance thing.  Resizing the heap takes time and 
cpu resources and affects performance.  The VM will reuse this memory 
over and over again.

I would look at any loops I might have reading from the stream.  Do you 
create a bunch of small byte array's while uploading the files?  Maybe 
you could increase the buffer size, be sure to null them out after you 
perform a read to tell them VM you are done with the variable now (for 
when the vm collects), and then see if that affects the memory growth. 
  This should help speed the file upload a bit and get rid of some 
buffers in loops a little quicker if you aren't nulling the array.  If 
however you are simultaneously uploading much of this data, then a 31mb 
spike in memory usage shouldn't be a suprise no matter what.

Basically you can impose limits on the VM and you can use switches to do 
this.  You can also devote more memory to eden or survivor objects so 
that the VM can make better use of the most commonly used memory.  You 
can find more info on this topic and others at this url:
http://java.sun.com/docs/performance/
Many docs.  One for you might be:
http://java.sun.com/docs/hotspot/VMOptions.html
scroll down to the bottom and check out options:
-XX:NewRatio
-XX:NewSize
-XX:SurvivorRatio

Basically the defaults for the -server VM are to allow the best 
performance for a multi user multi threaded application such as tomcat. 
 So, unless you are running out of memory or you need to cripple the 
app servers performance by limiting it's growth because you have a bunch 
of other applications running on the same server, then I suggest 
sticking with the defaults.

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


Re: Java process growth under Linux...leak?

2004-08-31 Thread Wade Chandler
Wade Chandler wrote:
Mark Maigatter wrote:
We have a Tomcat 5.0.25 based web site for uploading images and assorted
files and managing them.
 
We have found that the Java process that Tomcat is running under is
gradually growing when repetitively processing files uploaded and 
stripped
out of the form submissions by the Apache FileUpload component.  All 
signs
point to a memory leak?
 
Upon the submission of about 500 files we had a 31MB growth in the 
size of
the java process using top.   
However, the Sun Java jvmstat shows that the Java heap is staying 
relatively
constant.  The -gc numbers fluctuate in a manner that shows reasonable
garbage collection activity and the total used across the s0/s1/eden/old
stay with the range for the initial numbers.
 
My question is what would you recommend to isolate the process growth?
 
Is there a way within Java to see the underlying process growth to help
isolate it in the processing cycle?
 
--mark

How large were the files you were uploading?  I mean  you just said you 
uploaded 500 files.  You should expect to see process memory growth. The 
JVM has it's own object heap where it manages it's internal memory.  
Then there is the process and it's memory which is a C heap.

I see that you uploaded 500 files.  Were these one right after the 
other, or were they close to simultaneous?  Also, how are you uploading 
the files?  Are you using some type of a parser?  Are you using the 
commons file upload control?  If the JVM reports good memory collection, 
then there is no memory leak in Tomcat.  31MB of growth for a process 
uploading 500 files shouldn't be that bad depending on how they were 
uploaded and file sizes.

Think about it. If the files were between 100kb and 60kb then you have a 
total of 30mb to 50mb of memory just in that data alone not including 
your application and other buffers you may or may not be creating while 
uploading.

For perforamnce reasons the VM isn't going to suddenly resize the heap 
as soon as it frees a group of java objects because as far as it knows 
you may come along and upload 50mb worth of data immediately after the 
first.  This is a performance thing.  Resizing the heap takes time and 
cpu resources and affects performance.  The VM will reuse this memory 
over and over again.

I would look at any loops I might have reading from the stream.  Do you 
create a bunch of small byte array's while uploading the files?  Maybe 
you could increase the buffer size, be sure to null them out after you 
perform a read to tell them VM you are done with the variable now (for 
when the vm collects), and then see if that affects the memory growth.   
This should help speed the file upload a bit and get rid of some buffers 
in loops a little quicker if you aren't nulling the array.  If however 
you are simultaneously uploading much of this data, then a 31mb spike in 
memory usage shouldn't be a suprise no matter what.

Basically you can impose limits on the VM and you can use switches to do 
this.  You can also devote more memory to eden or survivor objects so 
that the VM can make better use of the most commonly used memory.  You 
can find more info on this topic and others at this url:
http://java.sun.com/docs/performance/
Many docs.  One for you might be:
http://java.sun.com/docs/hotspot/VMOptions.html
scroll down to the bottom and check out options:
-XX:NewRatio
-XX:NewSize
-XX:SurvivorRatio

Basically the defaults for the -server VM are to allow the best 
performance for a multi user multi threaded application such as tomcat. 
 So, unless you are running out of memory or you need to cripple the app 
servers performance by limiting it's growth because you have a bunch of 
other applications running on the same server, then I suggest sticking 
with the defaults.

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

Just noticed you wrote about the upload component.  I haven't looked at 
that code's parse to see how it is handling reading bytes from the 
stream, but I'm sure there have been many eyes on it.  I would say this 
is probably just a memory usage over time issue (short period of time). 
 Use those links I gave you and play with the memory switches a bit to 
see if you can get some kind of a situation that works best for you. 
The switches:
-XX:MaxHeapFreeRatio
and
-XX:MinHeapFreeRatio

Can make the vm resize the heap differently, but you will want to be 
careful.  You may make things very slow by messing with the defaults for 
those switches.

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


RE: Tomcat 5.0.27 Set Up Problem

2004-08-31 Thread Nelson, Jerry W, Contractor 146CF, SCB
With your suggestion in item 3, how do you run tomcat as a service?

//SIGNED//
 
Jerry Nelson


-Original Message-
From: John Villar [mailto:[EMAIL PROTECTED]
Sent: Monday, August 30, 2004 9:49 AM
To: Tomcat Users List
Subject: Re: Tomcat 5.0.27 Set Up Problem


Probably, your problem isn't tomcat configuration are you sure 
you're starting it up? (at least, ran the batch file you modified, 
however, the service approach is much better)
Reread my previous email, it seems like you haven't read all the bits i 
did include lemme include them here, separately

1) Your freshly installed tomcat 5.0.27 (Update to 5.0.28) is prepared 
to function right out-of-the-box
2) Why do you want to enable the invoker servlet? tomcat can 
function properly without it.
3) It's much better to run Tomcat as a service on WindowsXP/W2K
4) If you haven't a proxy server configured, you don't have to check 
that box.

Caroline Jen escribió:

 But, the Tomcat is not configured properly!! I was
 able to start the server. Nonetheless, when I typed
 http://localhost:8080 in the Windows XP browser's
 address bar, I got HTTP Status 404!!!


-- 
John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com



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



RE: Java process growth under Linux...leak?

2004-08-31 Thread Nandish Rudra
Hi,

Search for Java HotSpot on Google and look for the following java options
ParallelGC and maxHeapRation. Set the JAVA_OPTS with these and solve the
problems. 

Regards,
NR


-Original Message-
From: Mark Maigatter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 12:21 PM
To: '[EMAIL PROTECTED]'
Subject: Java process growth under Linux...leak?


We have a Tomcat 5.0.25 based web site for uploading images and assorted
files and managing them.
 
We have found that the Java process that Tomcat is running under is
gradually growing when repetitively processing files uploaded and stripped
out of the form submissions by the Apache FileUpload component.  All signs
point to a memory leak?
 
Upon the submission of about 500 files we had a 31MB growth in the size of
the java process using top.  
 
However, the Sun Java jvmstat shows that the Java heap is staying relatively
constant.  The -gc numbers fluctuate in a manner that shows reasonable
garbage collection activity and the total used across the s0/s1/eden/old
stay with the range for the initial numbers.
 
My question is what would you recommend to isolate the process growth?
 
Is there a way within Java to see the underlying process growth to help
isolate it in the processing cycle?
 
--mark

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



Re: tag file encoding problem

2004-08-31 Thread Sebastian Ryszard Kruk
Dnia 08/30/2004 07:01 PM, Uytkownik John Villar napisa:
i don't know much about the .tag format however, if it is an XML 
based one, you must define the charset of your xml in the ?xml? tag

Sebastian Ryszard Kruk escribi:
Hi,
I have a strange problem - I use tomcat 5.0.14.
When I try to put some strings with polish letters like ciga in 
tag file - it results that during the translation to *.java file - 
this text is being replaced by ciga - just as it would treat the 
*.tag file as encoded in Latin1 rather than in UTF-8. Polish letters 
in *.jsp files are ok, though.

Any ideas ??
Thanks,
skruk



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
it is not - it is rather a part of JSP page ;-(
--
-
--   Sebastian Ryszard Kruk, M.Sc.
--   mailto: [EMAIL PROTECTED]
--   GG: 335067, Jabber: [EMAIL PROTECTED]
-
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


How do I get an intermediary proxy from caching?

2004-08-31 Thread yem
Hello all,
I have taken a cursory look at the documentation for tomcat 5.x and I
could not see how to get intermediary proxy's from caching my web page.  I
have the tags:
meta http-equiv=pragma content=no-cache
meta http-equiv=cache-control content=no-cache
META HTTP-EQUIV=Expires CONTENT=Wed, 01 Sep 2004 17:52:51 GMT

in my head section, but the proxy still caches my page.  I read somewhere
to put the cache-control:no-cache in the http header of the request, but I
could not find how to do this in tomcat.  Any help would be appreciated.

-- 
Christopher Cullum
[EMAIL PROTECTED]





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



Help, URI mapping problem with JK2

2004-08-31 Thread John Gentilin
I am running Apache 2.0.50,  mod_Jk2 and Tomcat 4.1.30. 
In my workers2.properties  I have the mapping

[uri:/WebClassifieds/*]
group=lb
where this URL works
http://4wallsinde.rapidxsl.com/WebClassifieds/web/cmd/
and this one too
http://4wallsinde.rapidxsl.com/WebClassifieds/fourwalls/V20/assets/ext/logos/NJlogo.gif
but this one DOES NOT work
http://4wallsinde.rapidxsl.com/WebClassifieds/web/cmd/4walls/Apartment/Search/Listing/Guide/For-/DE/LocationPath/%2FDE%2FNorthern+DE%2FBear/encoding/cyacaakef_enc_GetLocation.xsl
Apache reports a 404 error but nothing else
[31/Aug/2004:10:43:25 -0700] GET 
/WebClassifieds/web/cmd/4walls/Apartment/Search/Listing/Guide/For-/DE/LocationPath/%2FDE%2FNorthern+DE%2FBear/encoding/cyacaakef_enc_GetLocation.xsl 
HTTP/1.1 404 442

It almost seems as if mod_jk passed up on the redirect. My problem now 
is that I can't get any debug information to be produced
so I am stuck...

I added this block of  confog to my jk.conf file
JkSet2 logger level debug
JkSet2 logger.file:0 file /usr/local/apache2/logs/jk2.log
JkSet2 logger.file:0 level debug
but all that did was create a log with 3 entries saying that logging was 
enabled and that was that...

Thansk you in advance.
John G

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


Re: How do I get an intermediary proxy from caching?

2004-08-31 Thread QM
On Tue, Aug 31, 2004 at 10:47:27AM -0700, [EMAIL PROTECTED] wrote:
: in my head section, but the proxy still caches my page.  I read somewhere
: to put the cache-control:no-cache in the http header of the request, but I
: could not find how to do this in tomcat.  Any help would be appreciated.

Response.setHeader()

-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: How do I get an intermediary proxy from caching?

2004-08-31 Thread yem
Thanks, I will give this a try.

-- 
Christopher Cullum
[EMAIL PROTECTED]

QM said:
 On Tue, Aug 31, 2004 at 10:47:27AM -0700, [EMAIL PROTECTED] wrote:
 : in my head section, but the proxy still caches my page.  I read
 somewhere : to put the cache-control:no-cache in the http header of the
 request, but I : could not find how to do this in tomcat.  Any help
 would be appreciated.

 Response.setHeader()

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




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



Re: How do I get an intermediary proxy from caching?

2004-08-31 Thread John Gentilin
When I am battling against IE caching or proxy caching, I add the 
following lines
to my response header. A bit brute force but it seems to work, althought 
I think
it cause some issues when backing up on a form, forcing a reload.

   response.setHeader(Cache-Control, 
no-cache,max-age=0,must-revalidate);
   response.setHeader(Pragma, no-cache);
   response.setHeader(Expires, -1d);

[EMAIL PROTECTED] wrote:
Hello all,
I have taken a cursory look at the documentation for tomcat 5.x and I
could not see how to get intermediary proxy's from caching my web page.  I
have the tags:
meta http-equiv=pragma content=no-cache
meta http-equiv=cache-control content=no-cache
META HTTP-EQUIV=Expires CONTENT=Wed, 01 Sep 2004 17:52:51 GMT
in my head section, but the proxy still caches my page.  I read somewhere
to put the cache-control:no-cache in the http header of the request, but I
could not find how to do this in tomcat.  Any help would be appreciated.
 


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


Re: How do I get an intermediary proxy from caching?

2004-08-31 Thread yem
Must you do this as one of the first things you do, before you output any
html?

-- 
Christopher Cullum
[EMAIL PROTECTED]

John Gentilin said:
 When I am battling against IE caching or proxy caching, I add the
 following lines
 to my response header. A bit brute force but it seems to work, althought
  I think
 it cause some issues when backing up on a form, forcing a reload.

 response.setHeader(Cache-Control,
 no-cache,max-age=0,must-revalidate);
 response.setHeader(Pragma, no-cache);
 response.setHeader(Expires, -1d);

 [EMAIL PROTECTED] wrote:

Hello all,
I have taken a cursory look at the documentation for tomcat 5.x and I
 could not see how to get intermediary proxy's from caching my web page.
  I have the tags:
  meta http-equiv=pragma content=no-cache
  meta http-equiv=cache-control content=no-cache
  META HTTP-EQUIV=Expires CONTENT=Wed, 01 Sep 2004 17:52:51 GMT

in my head section, but the proxy still caches my page.  I read
 somewhere to put the cache-control:no-cache in the http header of the
 request, but I could not find how to do this in tomcat.  Any help would
 be appreciated.






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




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



Re: How do I get an intermediary proxy from caching?

2004-08-31 Thread John Gentilin
Not sure if order matters but in my code, I set the headers first then 
process the request.
-JG

[EMAIL PROTECTED] wrote:
Must you do this as one of the first things you do, before you output any
html?
 


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


Re: Functionality of run-as for Servlets

2004-08-31 Thread Jeanfrancois Arcand

Gunnar Brading wrote:
I have been in need of using the run-as tag in a Tomcat-only 
environment... Is this possible? Reading the source indicates that it 
wouldn't be possible to get the information about the role the context 
currently is in. Using the requests in-role methods of course tells me 
about
the user, and not the context.

Have I come to the right conclusion?
No ;-)
You can get access to the Subject by doing 
Subject.getSubject(AccessController.getContext())

Reading the specs tells me that the functionality is meant for 
transferring roles to EJB's. Some documentation I found at Sun 
indicates though that even web-applications should be able to use this.
The way SJSAS 8.x is doing that is by using the Subject and then the 
principal(s) associated with the Subject.

-- Jeanfrancois
Anyone got more information about this?
Cheers,
-- gunnar

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


Hi!

2004-08-31 Thread V. Karthik Kumar
Hi,

I'm reporting this some sort of unusual behavior in the manager...  (WRT
Tomcat 5.0.27) ... 

When a user tries to start a web-app that has been started already, and
then stop it, it becomes unusable again... The current way to solve such
a thing is:

1. Shutdown the server
2. Clean up in the work/Catalina and work/Standalone directories
3. Re-start the server

Regards,
Karthik.



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



  1   2   >