RE: tomcat jitters, then hangs - please help

2003-10-21 Thread Francois JEANMOUGIN


 -Message d'origine-
 De : Zhao Hui [mailto:[EMAIL PROTECTED]
 Envoyé : mardi 21 octobre 2003 01:35
 À : Tomcat Users List
 Objet : Re: tomcat jitters, then hangs - please help
 
 Hi folks,
 
 We encountered the same problem where tomcat on our linux box will
 hang
 occasionally after several days, and we have yet to find the cause of
 the
 problem. Looks like this might solve our problem :). Here is our
 configuration :
 
 OS : Redhat
 Tomcat : 4
 JVM : IBM JDK1.4

We use the same, but didn't find how to solve all the bugs. So, with such 
configuration, you will encounter 3 problems :

IBM Jvm crunching all available memory
Tomcat 4.1.27 is sometimes unable to free some threads (and so you go out of 
maxProcessors
IBM 1.4.1 runs more or less well with the libpthread. You could have tomcat freezing, 
or JITC doing SIG11, or... Well, nothing really clear about that.
 
 I would like to know more about how should we go about configuring the
 LD_ASSUME_KERNEL. Please correct me if I am wrong.
 
  setenv LD_ASSUME_KERNEL 2.2.5

I use bash as a shell, and because our final architecture (not finished) will be of 
several tomcat instances running on several nodes of a linux virtual server, I use a 
script like  that :

#!/bin/bash
#
# Add your own comments
#
# Java related stuff
# We will ask GC to report problems and try to limit memory usage
#
JAVA_HOME=/opt/IBMJava2-141/
JAVA_OPTS=-verbose:gc -Xmx256m -Xms256m
#
# You can add the LD thing here :
LD_ASSUME_KERNEL=2.2.5
#
# Catalina related stuff :
#
CATALINA_HOME=/usr/tomcat
#
# Catalina base is on an NFS server (note that this require a 
# modification of bin/catalina.sh to fix the hard coded log path
#
CATALINA_BASE=/usr/tomcat
#
# PID is usefull to get good javacore when stopping Java
# You can the use kill -3 `cat $CATALINA_BASE/logs/pid` to
# have javacore in the CATALINA_BASE directory.
#
CATALINA_PID=$CATALINA_BASE/logs/pid
#
# Never forget to export ALL of it
#
export JAVA_HOME JAVA_OPTS LD_ASSUME_KERNEL CATALINA_HOME CATALINA_BASE CATALINA_PID 
#
#run the startup script from Tomcat installation
#
/usr/tomcat/bin/startup.sh

 and that will do the trick? Does it depends on any kernel version?

This could, even if IBM documentation is not clear about it.

 


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



Can i use the same code in linux---sat

2003-10-21 Thread kgsat
Hi folks,
(B
(BI have been into a development for a video download site using jsp and
(Bservlets. And it  was intended to run on windows 2000 with apache and
(Btomcat.
(Bnow the OS has been changed to linux9.0
(BCan i run the same code in linux also.Or i need to do any changes in  order
(Bto run the windows java code in linux.
(B
(BAny tips on this.Pl advise
(B
(Bthanks and regards
(Bsat

Re: tomcat jitters, then hangs - please help

2003-10-21 Thread Daniel Gibby
Do you see errors in your catalina.out when this happens?
I believe that I am having the same problem with IBMJava, tomcat 4.1.27, 
mod_jk2.0.2 unixSocket connectors and apache 2.0.40...
I'm hoping that setting LD_ASSUME_KERNEL will solve the issue.

My catalina.out has errors as follows:
[Mon Oct 20 23:10:02 2003] (error ) [jk_channel_un.c (422)]  
channelUn.receive(): error receiving -1 86
Oct 20, 2003 11:10:02 PM org.apache.jk.common.JniHandler nativeDispatch
SEVERE: nativeDispatch: error 21000
Oct 20, 2003 11:10:02 PM org.apache.jk.common.ChannelUn receive
SEVERE: receive error:   21000

Daniel Gibby

-Message d'origine-
De : Zhao Hui [mailto:[EMAIL PROTECTED]
Envoyé : mardi 21 octobre 2003 01:35
À : Tomcat Users List
Objet : Re: tomcat jitters, then hangs - please help
Hi folks,

We encountered the same problem where tomcat on our linux box will
hang
occasionally after several days, and we have yet to find the cause of
the
problem. Looks like this might solve our problem :). Here is our
configuration :
OS : Redhat
Tomcat : 4
JVM : IBM JDK1.4
   

We use the same, but didn't find how to solve all the bugs. So, with such configuration, you will encounter 3 problems :

IBM Jvm crunching all available memory
Tomcat 4.1.27 is sometimes unable to free some threads (and so you go out of 
maxProcessors
IBM 1.4.1 runs more or less well with the libpthread. You could have tomcat freezing, 
or JITC doing SIG11, or... Well, nothing really clear about that.
 

I would like to know more about how should we go about configuring the
LD_ASSUME_KERNEL. Please correct me if I am wrong.
   

setenv LD_ASSUME_KERNEL 2.2.5
 

I use bash as a shell, and because our final architecture (not finished) will be of several tomcat instances running on several nodes of a linux virtual server, I use a script like  that :

#!/bin/bash
#
# Add your own comments
#
# Java related stuff
# We will ask GC to report problems and try to limit memory usage
#
JAVA_HOME=/opt/IBMJava2-141/
JAVA_OPTS=-verbose:gc -Xmx256m -Xms256m
#
# You can add the LD thing here :
LD_ASSUME_KERNEL=2.2.5
#
# Catalina related stuff :
#
CATALINA_HOME=/usr/tomcat
#
# Catalina base is on an NFS server (note that this require a 
# modification of bin/catalina.sh to fix the hard coded log path
#
CATALINA_BASE=/usr/tomcat
#
# PID is usefull to get good javacore when stopping Java
# You can the use kill -3 `cat $CATALINA_BASE/logs/pid` to
# have javacore in the CATALINA_BASE directory.
#
CATALINA_PID=$CATALINA_BASE/logs/pid
#
# Never forget to export ALL of it
#
export JAVA_HOME JAVA_OPTS LD_ASSUME_KERNEL CATALINA_HOME CATALINA_BASE CATALINA_PID 
#
#run the startup script from Tomcat installation
#
/usr/tomcat/bin/startup.sh

 

and that will do the trick? Does it depends on any kernel version?
   

This could, even if IBM documentation is not clear about it.



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



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


Re: Can i use the same code in linux---sat

2003-10-21 Thread Daniel Gibby
The Java code should be the same, the only issue I know of is
configuration of your server. Environment variables are handled
differently, and paths to resources and configuration files are of
course different..

Daniel Gibby

kgsat wrote:

Hi folks,

I have been into a development for a video download site using jsp and
servlets. And it  was intended to run on windows 2000 with apache and
tomcat.
now the OS has been changed to linux9.0
Can i run the same code in linux also.Or i need to do any changes in  order
to run the windows java code in linux.

Any tips on this.Pl advise

thanks and regards
sat

  




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



Re: Can i use the same code in linux---sat

2003-10-21 Thread kgsat
Hi Gibby,

Thanks for your response.Does the configuration mean that there are changes
in web.xml and server.xml files based on the OS?
regards
sat
- Original Message - 
From: Daniel Gibby [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 3:35 PM
Subject: Re: Can i use the same code in linux---sat


 The Java code should be the same, the only issue I know of is
 configuration of your server. Environment variables are handled
 differently, and paths to resources and configuration files are of
 course different..

 Daniel Gibby

 kgsat wrote:

 Hi folks,
 
 I have been into a development for a video download site using jsp and
 servlets. And it  was intended to run on windows 2000 with apache and
 tomcat.
 now the OS has been changed to linux9.0
 Can i run the same code in linux also.Or i need to do any changes in
order
 to run the windows java code in linux.
 
 Any tips on this.Pl advise
 
 thanks and regards
 sat
 
 
 



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



Count Number of Users Logged in

2003-10-21 Thread N.B.Bopanna
Hi All,
I have a web application running.
I want to find the number of users currently logged in.
How do i do this?
I have a session value(userid) for all  the users.
Is there a way to count them?
Bopanna



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



RE: tomcat jitters, then hangs - please help

2003-10-21 Thread Francois JEANMOUGIN


 I believe that I am having the same problem with IBMJava,

Be careful that, according to IBM documentation, 1.4.0 and 1.4.1 do NOT handle the 
libpthread so-called optimizations the same way. Please give your version of the Jvm, 
thanks.

François.


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



LDAP and org.apache.tomcat.request.SecurityCheck class (Professional JSP)

2003-10-21 Thread Michiel Bakker
Hi there,

I'm trying some examples in the book Professional JSP from Wrox. In latter
version of Tomcat (I'm using 4.1.12) several classes or packages are not
available anymore. I downloaded version 3.3.1a and there the class
org.apache.tomcat.request.SecurityCheck is missing. The whole
org.apache.tomcat.request isn't there. Does anyone know where I can'tind
the jar file containing this class.

Thanks.

Michiel.


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



Error Page Configuration

2003-10-21 Thread N.B.Bopanna
Hi all,
Is there a way to configure an error page for the full application using 
the deployment descriptor?
Thanks
Bopanna



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



Multiple virtual hosts at root context

2003-10-21 Thread Andy Hutchinson
I am using Tomcat 4.1.27 under Linux for a project where the machine is 
embedded into a pumping machine, i.e. limited memory and resources.

The 'services' are all identified by sub domains so that you would get a 
master domain of the pump site, a sub domain for each pump unit and a 
further subdomain for each reading.

For example,

http://finham - gives an overview of the site called finham
http://top-bearing.finham gives an overview of the pump called top-bearing
http://power.top-bearing.finham gives a power reading for the pump
etc.
Everything was developed with Apache fronting Tomcat and all is well. We've 
now arrived at the factory tests and I think I've shot myself in the foot. 
I had always intended to remove the Apache front end as it just will not 
fit onto the hardware.

The problem seems to be that you cannot have a standalone Tomcat supporting 
many virtual hosts where the context paths are the same. You can in Apache.

I appreciate that there are other ways to do this but this 'design' has now 
been used by other systems so any changes are bad news at this stage.

My question is, am I correct that this cannot be done using a standalone 
Tomcat and, if not, does anyone have any ideas?

Thanks.

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

RE: tomcat jitters, then hangs - please help

2003-10-21 Thread Euan Guttridge
Excellent news Noam.. Our testing (LD_ASSUME_KERNEL=2.4.1) is in progress
but too early to confirm anything. Another option is to stick with the NTPL,
using an updated glibc.

Check out RH errata ;
A bug in pthread_cond_wait() which could cause programs hangs in some
cases

https://rhn.redhat.com/errata/RHBA-2003-136.html


If anyone tests this please drop the list a mail..

Cheers
Euan




-Original Message-
From: Remy Maucherat [mailto:[EMAIL PROTECTED] 
Sent: 20 October 2003 14:32
To: Tomcat Users List
Subject: Re: tomcat jitters, then hangs - please help


Noam Camiel wrote:

 Hi folks,
 A week's gone by and all seems fine.  Server is stable and working 
 properly. Thanks for all who helped out! Ryan, Remi Yoav and Arthur, 
 many thanks. It may be a good idea to document this for others who may 
 stumble over this problem. All the best
 Noam Camiel
 
 Details:
 Problem: Tomcat Server becomes unresponsive to new requests after 
 several hours, regardless of load. OS RH9; Tomcat 4 or 5; VM Sun or 
 IBM (JDK 1.4)
 Solve: (tcsh): setenv LD_ASSUME_KERNEL 2.2.5

Thanks :)
Very good news :)

I think I'll need to add that in the release notes (and putting it in 
the FAQ would be good as well). Very weird symptoms, though. The only 
explanation for the bug is if the thread waiting on the socket just 
vanishes (there's no way it can go out of the blocking accept loop 
otherwise - I reviewed that quite extensively ;-)).

Q: would the assume kernel 2.4 work as well ? I believe it would, but it 
could be worth confirming it eventually. This is not critical, obviously.

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


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



jk2 connector with apache 1.3 ?

2003-10-21 Thread Javier Sanchez Monzon
Hi there, 

i have only one question, 
do you know if the jk2 connector can also be connected with apache 1.3 ? 


regards, 
tino





-
This mail sent through IMP: http://horde.org/imp/


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



Re: tomcat jitters, then hangs - please help

2003-10-21 Thread Noam Camiel
Very interesting bug report
I will currently stick with my current configuration, but if this confirms
to solve the prolem, it could explain some oddities Remy wondered upon
Cheers,
Noam


- Original Message -
From: Euan Guttridge [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:54 AM
Subject: RE: tomcat jitters, then hangs - please help


Excellent news Noam.. Our testing (LD_ASSUME_KERNEL=2.4.1) is in progress
but too early to confirm anything. Another option is to stick with the NTPL,
using an updated glibc.

Check out RH errata ;
A bug in pthread_cond_wait() which could cause programs hangs in some
cases

https://rhn.redhat.com/errata/RHBA-2003-136.html


If anyone tests this please drop the list a mail..

Cheers
Euan




-Original Message-
From: Remy Maucherat [mailto:[EMAIL PROTECTED]
Sent: 20 October 2003 14:32
To: Tomcat Users List
Subject: Re: tomcat jitters, then hangs - please help


Noam Camiel wrote:

 Hi folks,
 A week's gone by and all seems fine.  Server is stable and working
 properly. Thanks for all who helped out! Ryan, Remi Yoav and Arthur,
 many thanks. It may be a good idea to document this for others who may
 stumble over this problem. All the best
 Noam Camiel

 Details:
 Problem: Tomcat Server becomes unresponsive to new requests after
 several hours, regardless of load. OS RH9; Tomcat 4 or 5; VM Sun or
 IBM (JDK 1.4)
 Solve: (tcsh): setenv LD_ASSUME_KERNEL 2.2.5

Thanks :)
Very good news :)

I think I'll need to add that in the release notes (and putting it in
the FAQ would be good as well). Very weird symptoms, though. The only
explanation for the bug is if the thread waiting on the socket just
vanishes (there's no way it can go out of the blocking accept loop
otherwise - I reviewed that quite extensively ;-)).

Q: would the assume kernel 2.4 work as well ? I believe it would, but it
could be worth confirming it eventually. This is not critical, obviously.

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


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



Bug: RequestDumperValve - Tomcat 4.0.4 - UTF-8

2003-10-21 Thread Andoni
Hello,

I have recently started using the RequestDumperValve with my Tomcat 4.0.4 for windows.
Now when I go to write applications that accept foreign character sets in UTF-8 I find 
that they come out as rubbish because they have been translated into ISO-8859-1.  When 
I add a URLDecoder.decode(); statement in my servlet where the request.getParameter() 
comes in all works fine again.  Unfortunately if I don't remove the URLDecoder when 
putting the application Live (my live site has no dumper valve) I get a string of 
question marks for the foreign characters.

So: The RequestDumperValve in Tomcat 4.0.4 is translating the characters received into 
ISO-8859-1.  Now what I need is the source code for the valve to fix this problem but 
I can't find the source code on the jakarta.apache.org site any more, can someone help 
me?

Thanks,

Andoni.

Re: Where is org.apache.tomcat.util.log.* for Tomcat 4.1.27?

2003-10-21 Thread Tim Funk
jakarata-tomcat-connectors

-Tim

Ted Weatherly wrote:
I get this compile-time error:

/tmp/jakarta-tomcat/src/catalina/src/share/org/apache/catalina/core/ApplicationFilterConfig.java:79: 
package org.apache.tomcat.util.log does not exist
import org.apache.tomcat.util.log.SystemLogHandler;
  ^
Where can I find the org.apache.tomcat.util.log files for Tomcat 4.1.27? 
 They don't seem to be under tomcat/catalina nor tomcat/jasper.


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


Re: JSP pages and interfaces

2003-10-21 Thread Tim Funk
A JSP page ultimately becomes a java file (then a class). The spec dictates 
the java file must somehow implement JspPage. The JSP engine has the job to 
create a class which implements JspPage. But you may also choose to have your 
JSP page inherit from another class for some reason as long as the resulting 
class implements JspPage. (Or whatever the spec says, I don't have it open 
right now)

-Tim

Josh G wrote:

I know I can use the [EMAIL PROTECTED] extends= % to set the base class of a 
jsp page, but is there a similar thing for interfaces?

I'm just rambling at the moment, trying to think up an easily 
implementable security scheme for our system.



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


Re: Error Page Configuration

2003-10-21 Thread Tim Funk
http://jakarta.apache.org/tomcat/faq/misc.html#error

N.B.Bopanna wrote:

Hi all,
Is there a way to configure an error page for the full application using 
the deployment descriptor?
Thanks
Bopanna
 


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


Fwd: Multiple virtual hosts at root context

2003-10-21 Thread Andy Hutchinson
Oops. In the panic of thinking it wasn't possible I somehow proved to 
myself that it wasn't possible |-(

I inadvertently loaded all the contexts for all the hosts into all the hosts.

I think the previous post is what used to be known as a structured walk 
through. So thanks for that all the same.

Date: Tue, 21 Oct 2003 09:55:24 +0100
To: Tomcat Users List [EMAIL PROTECTED]
From: Andy Hutchinson [EMAIL PROTECTED]
Subject: Multiple virtual hosts at root context
I am using Tomcat 4.1.27 under Linux for a project where the machine is 
embedded into a pumping machine, i.e. limited memory and resources.

The 'services' are all identified by sub domains so that you would get a 
master domain of the pump site, a sub domain for each pump unit and a 
further subdomain for each reading.

For example,

http://finham - gives an overview of the site called finham
http://top-bearing.finham gives an overview of the pump called 
top-bearing
http://power.top-bearing.finham gives a power reading for the pump
etc.

Everything was developed with Apache fronting Tomcat and all is well. 
We've now arrived at the factory tests and I think I've shot myself in the 
foot. I had always intended to remove the Apache front end as it just will 
not fit onto the hardware.

The problem seems to be that you cannot have a standalone Tomcat 
supporting many virtual hosts where the context paths are the same. You 
can in Apache.

I appreciate that there are other ways to do this but this 'design' has 
now been used by other systems so any changes are bad news at this stage.

My question is, am I correct that this cannot be done using a standalone 
Tomcat and, if not, does anyone have any ideas?

Thanks.

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

WebDAV servlet configuration problem

2003-10-21 Thread Andreas F. Wehowsky
Hi there,

I am using the WebDAV servlet in Tomcat 4.1.24 and have a problem with
the configuration. I only want files and folders at a specified
subfolder workset and all its subfolders of the web-app dir to be
WebDAV-enabled. I have used the WebDAV configuration from
tomcat-x/webapps/webdav/WEB-INF/web.xml, and my servlet mapping in my
own web.xml is as follows:

servlet-mapping
 servlet-namewebdav/servlet-name
 url-pattern/workset/*/url-pattern 
/servlet-mapping

So all content in the subfolder (and URL) 'workset' should be WebDAV
enabled. The problem is that the subfolders of 'workset' are not
accessible via WebDAV. When I browse the 'workset' folder using IE,
everything works fine, but when I try to open a subfolder in 'workset',
IE complains that the folder is not accessible.

What could be the problem?

Thank you in advance!

Andreas Wehowsky


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



RE: Count Number of Users Logged in

2003-10-21 Thread Shapira, Yoav

Howdy,
You could use the tomcat manager webapp (read its page).  Or you could
write your own session listener which will keep a count of sessions.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: N.B.Bopanna [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 2:43 AM
To: [EMAIL PROTECTED]
Subject: Count Number of Users Logged in

Hi All,
I have a web application running.
I want to find the number of users currently logged in.
How do i do this?
I have a session value(userid) for all  the users.
Is there a way to count them?
Bopanna



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



application eats up memory

2003-10-21 Thread Bill Tantzen
Hi All!

I'm having a problem with a particular application that grows and grows 
in size until the jvm runs out of memory, and tomcat shuts down.  I am 
on a box with 1GB of memory and 350MB+ of swap.  I have tried various 
settings in my catalina.sh, which just seem to make the app crash even 
quicker.  I suspect that the problem lies in my code, but I don't know 
exactly where to start looking.

Of course, I don't expect anyone to debug my code, but I'm hoping 
someone can give me some general hints about things to look for, 
problems that a relatively new java programmer may be overlooking.  For 
instance, as a c programmer, I am highly (too highly) familiar with 
memory leaks, and I have seen references to leaking memory in java 
apps, but in my naivete, I can't really understand what this means, 
since I neither allocate or free memory anymore.  What kind of code 
constructs cause memory to leak in java?  I have some listener classes 
in my app.  Are they a problem?  Sessions?  Database connections (no 
pooling)?  Any  of these things red flags?

Thanks in advance for anything you may have to offer!

tomcat 4.1.18, classes12.jar (from oracle), and xmlparserv2.jar (also 
oracle)
java version 1.4.0_00
solaris 9 (SunOS 5.9)

Cheers!

Bill

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


RE: application eats up memory

2003-10-21 Thread Angus Mezick
Completely turn off all auto-reload features of tomcat.  That helped me.

 -Original Message-
 From: Bill Tantzen [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, October 21, 2003 9:01 AM
 To: Tomcat Users List
 Subject: application eats up memory
 
 
 Hi All!
 
 I'm having a problem with a particular application that grows 
 and grows 
 in size until the jvm runs out of memory, and tomcat shuts 
 down.  I am 
 on a box with 1GB of memory and 350MB+ of swap.  I have tried various 
 settings in my catalina.sh, which just seem to make the app 
 crash even 
 quicker.  I suspect that the problem lies in my code, but I 
 don't know 
 exactly where to start looking.
 
 Of course, I don't expect anyone to debug my code, but I'm hoping 
 someone can give me some general hints about things to look for, 
 problems that a relatively new java programmer may be 
 overlooking.  For 
 instance, as a c programmer, I am highly (too highly) familiar with 
 memory leaks, and I have seen references to leaking memory in java 
 apps, but in my naivete, I can't really understand what this means, 
 since I neither allocate or free memory anymore.  What kind of code 
 constructs cause memory to leak in java?  I have some 
 listener classes 
 in my app.  Are they a problem?  Sessions?  Database connections (no 
 pooling)?  Any  of these things red flags?
 
 Thanks in advance for anything you may have to offer!
 
 tomcat 4.1.18, classes12.jar (from oracle), and xmlparserv2.jar (also 
 oracle)
 java version 1.4.0_00
 solaris 9 (SunOS 5.9)
 
 Cheers!
 
 Bill
 
 
 -
 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: application eats up memory

2003-10-21 Thread Shapira, Yoav

Howdy,

I'm having a problem with a particular application that grows and grows
in size until the jvm runs out of memory, and tomcat shuts down.  I am
on a box with 1GB of memory and 350MB+ of swap.  I have tried various
settings in my catalina.sh, which just seem to make the app crash even
quicker.  I suspect that the problem lies in my code, but I don't know
exactly where to start looking.

One possibility is to use a profiler, such as OptimizeIt or JProbe,
which shows you memory differences on the heap between two instances of
time.  You'll be able to see what has been allocated, and where it's
referenced.

As you know, it's not easy to create outright memory leaks in java.  The
garbage collector will collect objects that are no longer referenced by
anything, and return their memory to the heap.  So you should make sure
you're not keeping references to objects you don't need.  One likely
place for this to happen is in class (static) variables.

What JVM settings have you tried, and with what results?

constructs cause memory to leak in java?  I have some listener classes
in my app.  Are they a problem?  Sessions?  Database connections (no
pooling)?  Any  of these things red flags?

Be careful with listener classes to not hold on to unneeded references.
For example, if you have a session listener, and you add each session to
some map or list on the session's creation, make sure to remove it from
your map or list when it's destroyed.  You have to listen to both
events.  If you don't remove it, you keep a reference to it, it will
stay in memory, and that's a memory leak.

tomcat 4.1.18, classes12.jar (from oracle), and xmlparserv2.jar (also
oracle)
java version 1.4.0_00
solaris 9 (SunOS 5.9)

Upgrade to JDK 1.4.2 if you can.  Upgrade to tomcat 4.1.27 if you can.
And you should have a very strong reason to use xmlparserv2.jar from
Oracle -- what is it?  Why not xerces?

Yoav Shapira



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: application eats up memory

2003-10-21 Thread Bill Tantzen
On Tuesday, October 21, 2003, at 08:05 AM, Shapira, Yoav wrote:

Howdy,

I'm having a problem with a particular application that grows and 
grows
in size until the jvm runs out of memory, and tomcat shuts down.  I am
on a box with 1GB of memory and 350MB+ of swap.  I have tried various
settings in my catalina.sh, which just seem to make the app crash even
quicker.  I suspect that the problem lies in my code, but I don't know
exactly where to start looking.
One possibility is to use a profiler, such as OptimizeIt or JProbe,
which shows you memory differences on the heap between two instances of
time.  You'll be able to see what has been allocated, and where it's
referenced.
Any recommendations here?  They are a little pricy, and I would want to 
make sure I'm getting bang for my $$

As you know, it's not easy to create outright memory leaks in java.  
The
garbage collector will collect objects that are no longer referenced by
anything, and return their memory to the heap.  So you should make sure
you're not keeping references to objects you don't need.  One likely
place for this to happen is in class (static) variables.
I will check this out.  I do have some...

What JVM settings have you tried, and with what results?
various combinations (and numbers) of the following with the result 
that the tomcat shuts down rather quickly, or fails to start at all due 
to lack of memory. (tomcat and apache are the only things running on 
this box).

## CATALINA_OPTS=-Djava.awt.headless=true -Xmx256m
## CATALINA_OPTS=$CATALINA_OPTS -XX:NewSize=64m -XX:MaxNewSize=64m
## -Xms128m -Xmx256m -XX:NewSize=64m -XX:MaxNewSize=64m
## JAVA_OPTS=-server


constructs cause memory to leak in java?  I have some listener classes
in my app.  Are they a problem?  Sessions?  Database connections (no
pooling)?  Any  of these things red flags?
Be careful with listener classes to not hold on to unneeded references.
For example, if you have a session listener, and you add each session 
to
some map or list on the session's creation, make sure to remove it from
your map or list when it's destroyed.  You have to listen to both
events.  If you don't remove it, you keep a reference to it, it will
stay in memory, and that's a memory leak.

tomcat 4.1.18, classes12.jar (from oracle), and xmlparserv2.jar (also
oracle)
java version 1.4.0_00
solaris 9 (SunOS 5.9)
Upgrade to JDK 1.4.2 if you can.  Upgrade to tomcat 4.1.27 if you can.
And you should have a very strong reason to use xmlparserv2.jar from
Oracle -- what is it?  Why not xerces?
I can, and will!!  You guessed it, xmlparserv is a set of xml parsing 
(sax and dom) tools.

thanks much!

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


RE: application eats up memory

2003-10-21 Thread Shapira, Yoav

Howdy,

Any recommendations here?  They are a little pricy, and I would want to
make sure I'm getting bang for my $$

I like OptimizeIt, found it WELL worth its price.  I think every
developer should have a profiler, be comfortable using it.

various combinations (and numbers) of the following with the result
that the tomcat shuts down rather quickly, or fails to start at all due
to lack of memory. (tomcat and apache are the only things running on
this box).

Whoa there... If tomcat can't start due to lack of memory, maybe the
problem is not in tomcat?  Maybe it's apache, or another process on your
server?

## CATALINA_OPTS=-Djava.awt.headless=true -Xmx256m
## CATALINA_OPTS=$CATALINA_OPTS -XX:NewSize=64m -XX:MaxNewSize=64m
## -Xms128m -Xmx256m -XX:NewSize=64m -XX:MaxNewSize=64m
## JAVA_OPTS=-server

Stick to JAVA_OPTS, rather than CATALINA_OPTS, for clarity.
JAVA_OPTS='-Djava.awt.headless=true -Xmx256m' is valid, and I would
think should work for you, unless your application is really
resource-demanding.

I can, and will!!  You guessed it, xmlparserv is a set of xml parsing
(sax and dom) tools.

If you can, I suggest you use Xerces (free, ships with tomcat), as I bet
it's much more recent, better performing than xmlparserv2.

Yoav Shapira



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]



RES: application eats up memory

2003-10-21 Thread Jose Euclides da Silva Junior - DATAPREVRJ
Could you separate and send us the suspected code?
Euclides.

-Mensagem original-
De: Bill Tantzen [mailto:[EMAIL PROTECTED]
Enviada em: terca-feira, 21 de outubro de 2003 10:01
Para: Tomcat Users List
Assunto: application eats up memory


Hi All!

I'm having a problem with a particular application that grows and grows 
in size until the jvm runs out of memory, and tomcat shuts down.  I am 
on a box with 1GB of memory and 350MB+ of swap.  I have tried various 
settings in my catalina.sh, which just seem to make the app crash even 
quicker.  I suspect that the problem lies in my code, but I don't know 
exactly where to start looking.

Of course, I don't expect anyone to debug my code, but I'm hoping 
someone can give me some general hints about things to look for, 
problems that a relatively new java programmer may be overlooking.  For 
instance, as a c programmer, I am highly (too highly) familiar with 
memory leaks, and I have seen references to leaking memory in java 
apps, but in my naivete, I can't really understand what this means, 
since I neither allocate or free memory anymore.  What kind of code 
constructs cause memory to leak in java?  I have some listener classes 
in my app.  Are they a problem?  Sessions?  Database connections (no 
pooling)?  Any  of these things red flags?

Thanks in advance for anything you may have to offer!

tomcat 4.1.18, classes12.jar (from oracle), and xmlparserv2.jar (also 
oracle)
java version 1.4.0_00
solaris 9 (SunOS 5.9)

Cheers!

Bill


-
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: application eats up memory

2003-10-21 Thread Wade Chandler
The Oracle Parsers can't handle certain schemas and things either.  I've
had them crash and die.  I had to even setup an Oracle 9i Server to use
Xerces because the 9i server could not handle some valid schemas I was
parsing.

Wade

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 21, 2003 9:27 AM
To: Tomcat Users List
Subject: RE: application eats up memory



Howdy,

Any recommendations here?  They are a little pricy, and I would want to

make sure I'm getting bang for my $$

I like OptimizeIt, found it WELL worth its price.  I think every
developer should have a profiler, be comfortable using it.

various combinations (and numbers) of the following with the result 
that the tomcat shuts down rather quickly, or fails to start at all due

to lack of memory. (tomcat and apache are the only things running on 
this box).

Whoa there... If tomcat can't start due to lack of memory, maybe the
problem is not in tomcat?  Maybe it's apache, or another process on your
server?

## CATALINA_OPTS=-Djava.awt.headless=true -Xmx256m
## CATALINA_OPTS=$CATALINA_OPTS -XX:NewSize=64m -XX:MaxNewSize=64m ##

-Xms128m -Xmx256m -XX:NewSize=64m -XX:MaxNewSize=64m ## 
JAVA_OPTS=-server

Stick to JAVA_OPTS, rather than CATALINA_OPTS, for clarity.  
JAVA_OPTS='-Djava.awt.headless=true -Xmx256m' is valid, and I would
think should work for you, unless your application is really
resource-demanding.

I can, and will!!  You guessed it, xmlparserv is a set of xml parsing 
(sax and dom) tools.

If you can, I suggest you use Xerces (free, ships with tomcat), as I bet
it's much more recent, better performing than xmlparserv2.

Yoav Shapira



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: application eats up memory

2003-10-21 Thread Wade Chandler
I've also had strange results when using -server with the VM with
different applications.  Also, you say you have an application which
eats up memory?  Is the application loading when Tomcat starts?  Is your
application loading tomcat?  How is your application loaded?  Is it a
JSP application using your classes or is it an application using
Servlets?  Do you have log statements, and do you even know if your code
is being ran before the crash (i.e. you are getting a logged result to
know that it made it to your starting points.)?

Wade

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 21, 2003 9:27 AM
To: Tomcat Users List
Subject: RE: application eats up memory



Howdy,

Any recommendations here?  They are a little pricy, and I would want to

make sure I'm getting bang for my $$

I like OptimizeIt, found it WELL worth its price.  I think every
developer should have a profiler, be comfortable using it.

various combinations (and numbers) of the following with the result 
that the tomcat shuts down rather quickly, or fails to start at all due

to lack of memory. (tomcat and apache are the only things running on 
this box).

Whoa there... If tomcat can't start due to lack of memory, maybe the
problem is not in tomcat?  Maybe it's apache, or another process on your
server?

## CATALINA_OPTS=-Djava.awt.headless=true -Xmx256m
## CATALINA_OPTS=$CATALINA_OPTS -XX:NewSize=64m -XX:MaxNewSize=64m ##

-Xms128m -Xmx256m -XX:NewSize=64m -XX:MaxNewSize=64m ## 
JAVA_OPTS=-server

Stick to JAVA_OPTS, rather than CATALINA_OPTS, for clarity.  
JAVA_OPTS='-Djava.awt.headless=true -Xmx256m' is valid, and I would
think should work for you, unless your application is really
resource-demanding.

I can, and will!!  You guessed it, xmlparserv is a set of xml parsing 
(sax and dom) tools.

If you can, I suggest you use Xerces (free, ships with tomcat), as I bet
it's much more recent, better performing than xmlparserv2.

Yoav Shapira



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: Count Number of Users Logged in

2003-10-21 Thread Sam Taylor
I've thought about doing a session listener for just this purpose... is
there much of an overhead expense associated with this?

I know that this is all going to be relative to the overall system
load/number of users/etc... but generally speaking, is writing a session
listener considered a good thing, a bad thing, or a neutral thing in
terms of system overhead?

Thanks,

Sam


 -Original Message-
From:   Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent:   Tuesday, October 21, 2003 8:42 AM
To: Tomcat Users List
Subject:RE: Count Number of Users Logged in


Howdy,
You could use the tomcat manager webapp (read its page).  Or you could
write your own session listener which will keep a count of sessions.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: N.B.Bopanna [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 2:43 AM
To: [EMAIL PROTECTED]
Subject: Count Number of Users Logged in

Hi All,
I have a web application running.
I want to find the number of users currently logged in.
How do i do this?
I have a session value(userid) for all  the users.
Is there a way to count them?
Bopanna



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



Profiler (was: RE: application eats up memory)

2003-10-21 Thread Cox, Charlie
Has anyone tried this new Eclipse plugin for profiling?
http://eclipsecolorer.sourceforge.net/index_profiler.html

I realize that it is still beta, but I was wondering how good it is.

Charlie

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, October 21, 2003 9:27 AM
 To: Tomcat Users List
 Subject: RE: application eats up memory
 
 
 
 Howdy,
 
 Any recommendations here?  They are a little pricy, and I 
 would want to
 make sure I'm getting bang for my $$
 
 I like OptimizeIt, found it WELL worth its price.  I think every
 developer should have a profiler, be comfortable using it.
 


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



RE: application eats up memory

2003-10-21 Thread Bill Tantzen

-- I've also had strange results when using -server with the VM with

I will avoid this one.

-- different applications.  Also, you say you have an application which
-- eats up memory?  Is the application loading when Tomcat 
-- starts? Is your

It loads with tomcat.

-- application loading tomcat?  How is your application 
-- loaded?  Is it a
-- JSP application using your classes or is it an application using
-- Servlets?  

Both jsp/servlet

Do you have log statements, and do you even know 
-- if your code
-- is being ran before the crash (i.e. you are getting a 
-- logged result to
-- know that it made it to your starting points.)?


Oh yes, it starts and runs just fine for a number of hours (or days
depending on the load).  But using pmap, I can see the amount of memory
the jvm is using grow and grow with time (and it *never* decreases!)


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



RE: Profiler (was: RE: application eats up memory)

2003-10-21 Thread Prabhat Kumar (IT)
has anyone used this -- http://www.khelekore.org/jmp/ ? 

-Original Message-
From: Cox, Charlie [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 9:53 AM
To: 'Tomcat Users List'
Subject: Profiler (was: RE: application eats up memory)


Has anyone tried this new Eclipse plugin for profiling?
http://eclipsecolorer.sourceforge.net/index_profiler.html

I realize that it is still beta, but I was wondering how good it is.

Charlie

 -Original Message-
 From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, October 21, 2003 9:27 AM
 To: Tomcat Users List
 Subject: RE: application eats up memory
 
 
 
 Howdy,
 
 Any recommendations here?  They are a little pricy, and I 
 would want to
 make sure I'm getting bang for my $$
 
 I like OptimizeIt, found it WELL worth its price.  I think every
 developer should have a profiler, be comfortable using it.
 


-
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: Count Number of Users Logged in

2003-10-21 Thread Shapira, Yoav

Howdy,
It's very low overhead unless you really go out of your way to do
something dumb in your listener.  As long as you make sure to properly
dereference sessions when they're destroyed, i.e. don't just listen for
their creation, you don't need to worry about performance impact.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Sam Taylor [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 9:48 AM
To: Tomcat Users List
Subject: RE: Count Number of Users Logged in

I've thought about doing a session listener for just this purpose... is
there much of an overhead expense associated with this?

I know that this is all going to be relative to the overall system
load/number of users/etc... but generally speaking, is writing a
session
listener considered a good thing, a bad thing, or a neutral thing
in
terms of system overhead?

Thanks,

Sam


 -Original Message-
From:  Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent:  Tuesday, October 21, 2003 8:42 AM
To:Tomcat Users List
Subject:   RE: Count Number of Users Logged in


Howdy,
You could use the tomcat manager webapp (read its page).  Or you could
write your own session listener which will keep a count of sessions.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: N.B.Bopanna [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 2:43 AM
To: [EMAIL PROTECTED]
Subject: Count Number of Users Logged in

Hi All,
I have a web application running.
I want to find the number of users currently logged in.
How do i do this?
I have a session value(userid) for all  the users.
Is there a way to count them?
Bopanna



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




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


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




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




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


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



Re: Can i use the same code in linux---sat

2003-10-21 Thread Daniel Gibby
You may want to change some settings because of that, but mostly just 
the paths to directories will be different to where things are located. 
Linux paths instead of Windows paths.

Daniel

kgsat wrote:

Hi Gibby,

Thanks for your response.Does the configuration mean that there are changes
in web.xml and server.xml files based on the OS?
regards
sat
- Original Message - 
From: Daniel Gibby [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 3:35 PM
Subject: Re: Can i use the same code in linux---sat

 

The Java code should be the same, the only issue I know of is
configuration of your server. Environment variables are handled
differently, and paths to resources and configuration files are of
course different..
Daniel Gibby

kgsat wrote:

   

Hi folks,

I have been into a development for a video download site using jsp and
servlets. And it  was intended to run on windows 2000 with apache and
tomcat.
now the OS has been changed to linux9.0
Can i run the same code in linux also.Or i need to do any changes in
 

order
 

to run the windows java code in linux.

Any tips on this.Pl advise

thanks and regards
sat


 

-
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: Multiple virtual hosts at root context

2003-10-21 Thread Daniel Gibby
You can have virtual hosts in tomcat. We are doing it, but I will need 
to look up the server.xml configuration:

 Host name=host1.com debug=0 appBase=webapps unpackWARs=true
etc...
   Context path= docBase=/usr/local/webapps/partners debug=0
reloadable=false crossContext=false
etc...
   /Context
 /Host
 Host name=host2.com debug=0 appBase=webapps unpackWARs=true
etc...
  Context path= docBase=/usr/local/webapps/rr debug=0
reloadable=false crossContext=false
etc...
   /Context
etc...
 /Host
It works fine for us.

Daniel Gibby

Andy Hutchinson wrote:

I am using Tomcat 4.1.27 under Linux for a project where the machine 
is embedded into a pumping machine, i.e. limited memory and resources.

The 'services' are all identified by sub domains so that you would get 
a master domain of the pump site, a sub domain for each pump unit and 
a further subdomain for each reading.

For example,

http://finham - gives an overview of the site called finham
http://top-bearing.finham gives an overview of the pump called 
top-bearing
http://power.top-bearing.finham gives a power reading for the pump
etc.

Everything was developed with Apache fronting Tomcat and all is well. 
We've now arrived at the factory tests and I think I've shot myself in 
the foot. I had always intended to remove the Apache front end as it 
just will not fit onto the hardware.

The problem seems to be that you cannot have a standalone Tomcat 
supporting many virtual hosts where the context paths are the same. 
You can in Apache.

I appreciate that there are other ways to do this but this 'design' 
has now been used by other systems so any changes are bad news at this 
stage.

My question is, am I correct that this cannot be done using a 
standalone Tomcat and, if not, does anyone have any ideas?

Thanks.



-
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: Bug: RequestDumperValve - Tomcat 4.0.4 - UTF-8

2003-10-21 Thread Daniel Gibby
It may also be that your environment is set with a LANG or LOCALE that 
is throwing java off. You may want to look into that.

Daniel Gibby

Andoni wrote:

Hello,

I have recently started using the RequestDumperValve with my Tomcat 4.0.4 for windows.
Now when I go to write applications that accept foreign character sets in UTF-8 I find 
that they come out as rubbish because they have been translated into ISO-8859-1.  When 
I add a URLDecoder.decode(); statement in my servlet where the request.getParameter() 
comes in all works fine again.  Unfortunately if I don't remove the URLDecoder when 
putting the application Live (my live site has no dumper valve) I get a string of 
question marks for the foreign characters.
So: The RequestDumperValve in Tomcat 4.0.4 is translating the characters received into ISO-8859-1.  Now what I need is the source code for the valve to fix this problem but I can't find the source code on the jakarta.apache.org site any more, can someone help me?

Thanks,

Andoni.
 



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


encrypting a form's action URL with HTTPS link

2003-10-21 Thread Adam Hardy


Hi All,

I am trying to work out whether my form submission is sent encrypted in 
SSL or not.

If I code my form like this:

form method=POST action=https://localhost:8443/sslform;

will it actually be encrypted?

When I click submit, the browser pops up a certificate dialog box (since 
I'm not using verisign) and then the message that I'm visiting a secure 
form.

This makes me think that the request has been sent unencrypted first to 
the server, which has responded in SSL with the certificate.

Is that so?

Thanks
Adam
PS is there a tool like wget or perhaps a way of using wget, where I can 
specify form elements in a request and see the contents  config of the 
server's response?

--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Windows service crashing

2003-10-21 Thread Ian Hunter
For some reason, a couple times a day, the Apache Tomcat 4.1 service
crashes under Windows 2000 with no message at all.  We have [EMAIL PROTECTED] 
configured
to restart after 1 minutes, but I'd still like to know why this happens.
Seems to only happen on our production box, not our test server.

Ian


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



RE: Windows service crashing

2003-10-21 Thread Robert Priest
What is being written to the log file?

-Original Message-
From: Ian Hunter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:49 AM
To: [EMAIL PROTECTED]
Subject: Windows service crashing


For some reason, a couple times a day, the Apache Tomcat 4.1 service
crashes under Windows 2000 with no message at all.  We have [EMAIL PROTECTED] 
configured
to restart after 1 minutes, but I'd still like to know why this happens.
Seems to only happen on our production box, not our test server.

Ian


-
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 Tomcat-declared Resource from outside Tomcat

2003-10-21 Thread Ian Hunter
I've got a database resource declared as part of Tomcat's resource pool
(JNDI?) -- I need a standalone Java app to access it.  How do I declare such
a thing in a standalone app?

I realize this is slightly off topic but I figured someone else out there
might try to do the same thing.

Literally, what I'm doing is creating an alert subsystem that at certain
times, the OS schedules a batch run, and it queries for certain conditions
occurring in database tables, and emails people alerts.

Thanks all!

Ian


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



Re: Windows service crashing

2003-10-21 Thread Ian Hunter
Absolutely nothing -- you only see the new instance starting.  That's the
odd thing about it.  The only evidence whatsoever that it went down is in
the Windows Event Viewer -- it says The Apache Tomcat 4.1 service
terminated unexpectedly.  It has done this 1 time(so).  The following
corrective action will be taken in 6 milliseconds: Restart the service.

Weird...

- Original Message - 
From: Robert Priest [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:55 AM
Subject: RE: Windows service crashing


 What is being written to the log file?

 -Original Message-
 From: Ian Hunter [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, October 21, 2003 10:49 AM
 To: [EMAIL PROTECTED]
 Subject: Windows service crashing


 For some reason, a couple times a day, the Apache Tomcat 4.1 service
 crashes under Windows 2000 with no message at all.  We have [EMAIL PROTECTED]
configured
 to restart after 1 minutes, but I'd still like to know why this happens.
 Seems to only happen on our production box, not our test server.

 Ian


 -
 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: Access Tomcat-declared Resource from outside Tomcat

2003-10-21 Thread Shapira, Yoav

Howdy,
Currently tomcat doesn't have an external JNDI provider, so you can't
really do what you're looking for.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Ian Hunter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:50 AM
To: [EMAIL PROTECTED]
Subject: Access Tomcat-declared Resource from outside Tomcat

I've got a database resource declared as part of Tomcat's resource pool
(JNDI?) -- I need a standalone Java app to access it.  How do I declare
such
a thing in a standalone app?

I realize this is slightly off topic but I figured someone else out
there
might try to do the same thing.

Literally, what I'm doing is creating an alert subsystem that at
certain
times, the OS schedules a batch run, and it queries for certain
conditions
occurring in database tables, and emails people alerts.

Thanks all!

Ian


-
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: application eats up memory

2003-10-21 Thread Nikolaos Giannopoulos
Bill,

Java 1.4.0 has a known StringBuffer memory leak.

Java 1.4.0 + XML parsing will eat memory because of heavy string
manipulation done in XML parsing (in conjunction with this memory leak of
course).

I would recommend that you at least use 1.4.2 (as we have found other
stability issues with 1.4.0 and 1.4.1 on Solaris).

If you do try this - please let us know if it works!

HTH,

--Nikolaos


 -Original Message-
 From: Bill Tantzen [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, October 21, 2003 9:18 AM
 To: Tomcat Users List
 Subject: Re: application eats up memory



 On Tuesday, October 21, 2003, at 08:05 AM, Shapira, Yoav wrote:

 
  Howdy,
 
  I'm having a problem with a particular application that grows and
  grows
  in size until the jvm runs out of memory, and tomcat shuts down.  I am
  on a box with 1GB of memory and 350MB+ of swap.  I have tried various
  settings in my catalina.sh, which just seem to make the app crash even
  quicker.  I suspect that the problem lies in my code, but I don't know
  exactly where to start looking.
 
  One possibility is to use a profiler, such as OptimizeIt or JProbe,
  which shows you memory differences on the heap between two instances of
  time.  You'll be able to see what has been allocated, and where it's
  referenced.

 Any recommendations here?  They are a little pricy, and I would want to
 make sure I'm getting bang for my $$

  As you know, it's not easy to create outright memory leaks in java.
  The
  garbage collector will collect objects that are no longer referenced by
  anything, and return their memory to the heap.  So you should make sure
  you're not keeping references to objects you don't need.  One likely
  place for this to happen is in class (static) variables.

 I will check this out.  I do have some...

  What JVM settings have you tried, and with what results?

 various combinations (and numbers) of the following with the result
 that the tomcat shuts down rather quickly, or fails to start at all due
 to lack of memory. (tomcat and apache are the only things running on
 this box).

 ## CATALINA_OPTS=-Djava.awt.headless=true -Xmx256m
 ## CATALINA_OPTS=$CATALINA_OPTS -XX:NewSize=64m -XX:MaxNewSize=64m
 ## -Xms128m -Xmx256m -XX:NewSize=64m -XX:MaxNewSize=64m
 ## JAVA_OPTS=-server


 
  constructs cause memory to leak in java?  I have some listener classes
  in my app.  Are they a problem?  Sessions?  Database connections (no
  pooling)?  Any  of these things red flags?
 
  Be careful with listener classes to not hold on to unneeded references.
  For example, if you have a session listener, and you add each session
  to
  some map or list on the session's creation, make sure to remove it from
  your map or list when it's destroyed.  You have to listen to both
  events.  If you don't remove it, you keep a reference to it, it will
  stay in memory, and that's a memory leak.
 
  tomcat 4.1.18, classes12.jar (from oracle), and xmlparserv2.jar (also
  oracle)
  java version 1.4.0_00
  solaris 9 (SunOS 5.9)
 
  Upgrade to JDK 1.4.2 if you can.  Upgrade to tomcat 4.1.27 if you can.
  And you should have a very strong reason to use xmlparserv2.jar from
  Oracle -- what is it?  Why not xerces?

 I can, and will!!  You guessed it, xmlparserv is a set of xml parsing
 (sax and dom) tools.

 thanks much!


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



Restrict Coyote/JK2 AJP 1.3 connector to local loopback interface

2003-10-21 Thread Sascha Hess
Hi there!
I couldn't figure out how to restrict Coyote/JK2 AJP 1.3 connector to
the local loopback interface.
Actually, I would expect the default settings in workers.properties
(worker.ajp13.host=localhost) to only bind to the local loopback device,
but a netstat -an indicates:

Proto Recv-Q Send-Q Local Address   Foreign Address
State  
tcp0  0 0.0.0.0:80000.0.0.0:*  
LISTEN  
tcp0  0 127.0.0.1:8005  0.0.0.0:*  
LISTEN  
tcp0  0 0.0.0.0:80090.0.0.0:*  
LISTEN  
[...]
(shutdown port 8005 ist doing a great job...)

Hmm, any suggestions?
Thanks,
-sascha


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



Re: Access Tomcat-declared Resource from outside Tomcat

2003-10-21 Thread Ian Hunter
I don't follow you -- shouldn't I be able to create an instance of a naming
context and populate it from within my App, then refer back to it?  For this
app, I don't mind hard coding the parameters, it's just that I have a class
called DataStore that contains all the access points to the persistence
layer of my web app.  The DataStore class knows nothing about Tomcat.

Surely I can use some other JNDI provider and fool the DataStore class
into talking to it... In fact, here is the single point of reference to the
database resource:

// Return DataSource via JNDI with object named in
Constants.DATABASE_KEY
public static javax.sql.DataSource getDs() throws java.sql.SQLException
{
javax.sql.DataSource ds = null;

try {
// Obtain our environment naming context
javax.naming.Context initCtx = new
javax.naming.InitialContext();
javax.naming.Context envCtx = (javax.naming.Context)
initCtx.lookup(java:comp/env);

// Look up our data source
String check = Constants.DATABASE_KEY;
ds = (javax.sql.DataSource)
envCtx.lookup(Constants.DATABASE_KEY);
} catch (javax.naming.NamingException e) {
e.printStackTrace();
return null;
}
return ds;
}

What else can I use as a JNDI provider?
- Original Message - 
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 11:01 AM
Subject: RE: Access Tomcat-declared Resource from outside Tomcat



Howdy,
Currently tomcat doesn't have an external JNDI provider, so you can't
really do what you're looking for.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Ian Hunter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:50 AM
To: [EMAIL PROTECTED]
Subject: Access Tomcat-declared Resource from outside Tomcat

I've got a database resource declared as part of Tomcat's resource pool
(JNDI?) -- I need a standalone Java app to access it.  How do I declare
such
a thing in a standalone app?

I realize this is slightly off topic but I figured someone else out
there
might try to do the same thing.

Literally, what I'm doing is creating an alert subsystem that at
certain
times, the OS schedules a batch run, and it queries for certain
conditions
occurring in database tables, and emails people alerts.

Thanks all!

Ian


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



ResulSet Question

2003-10-21 Thread salvador . bravo
All, 

I have the following code

rsSN = statement.executeQuery(Query);
while (rsSN.next()){
if (Frame.equals(E)){
rsFrame = statement.executeQuery(QueryFrameE);
if (rsFrame.next()){ js.append(trtd+
rsFrame.getString(ATTRIBUTE_VALUE) +/td/tr); }
} else{
rsFrame = statement.executeQuery(QueryFrameF);
if (rsFrame.next()){ js.append(trtd+
rsFrame.getString(ATTRIBUTE_VALUE) +/td/tr); }
}
}

Why it only do it once, if the ResulSet rsSN have 100 records

Thanks in advance
Salvador

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



JSP question

2003-10-21 Thread epyonne
Hello All,

I am pulling my hair on this problem, and since there are many Java experts
on this mailing list, I hope someone can help me on this.

I have a simple servlet that calls a JSP page where the user can enter a
search value.  When the user clicks on the submit button, the search value
will be passed back to the servlet for processing and display.  All these
are running on Tomcat 4.1.24.

Everything works fine until I added the form validation routine in the JSP
page.  Initially, my input button type was submit.  I changed it to
button and leave the submission to the form validation routine which is in
JavaScript.  Now, when I click on the button, I get the error message of:
Object doesn't support this property or method
at the line of code:
document.form1.submit();

Does anyone know why?  The following is code of the JSP page:
//code begin--
html
head
titleblah blah blah/title
link rel=stylesheet href=css/standard.css type=text/css
/head

body
form name=form1 method=POST action=
center
bPlease enter ANI for query:/bbrbr
table
tr
 tdANI/td
 tdinput type=text name=ani/TD
/tr
tr
 td/td
 td COLSPAN=2
 input type=button name=submit value=Submit
onclick=javascript:validateForm();
 input type=Reset name=cmdReset value=Reset/td
/tr
/table
/center

 script LANGUAGE=JavaScript
  function validateForm(){
   if(document.form1.ani.value == ){
alert(Please enter an ANI);
return;
   }
   document.form1.submit();//This line generated error.  The
.submit() method is not supported.
  }
 /script
/form
nbsp;
%@ include file=footer.jsp%
/body
/html
//code end

Any help will be very much appreciated.

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



RE: Access Tomcat-declared Resource from outside Tomcat

2003-10-21 Thread Shapira, Yoav

Howdy,

I don't follow you -- shouldn't I be able to create an instance of a
naming
context and populate it from within my App, then refer back to it?  For

No.  You need a JNDI provider to do this.  There is a lot going on in
the background when you create naming context and bind into them.

javax.sql.DataSource ds = null;

try {
// Obtain our environment naming context
javax.naming.Context initCtx = new
javax.naming.InitialContext();

This uses the default initial context factory, which is not tomcat.  To
use tomcat's initial context factory, you need to configure the initial
context above, e.g.
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
org.apache.naming.java.javaURLContextFactory);
ht.put(Context.PROVIDER_URL, http://mytomcatserver);
Context initCtx = new InitialContext(ht);

If you're not clear on the difference between your code (the default
initial context constructor) and the above, read up on JNDI.

The tomcat initial context factory implementation (the class named
above) is here:
http://cvs.apache.org/viewcvs/jakarta-tomcat-catalina/catalina/src/share
/org/apache/naming/java/

Now, if you tried the above, and had a tomcat server running, and had
the naming jar in your classpath (so your app does need to know about
tomcat, however implicitly, via classpath and class name above), it
STILL wouldn't work.  That's because tomcat doesn't support external
JNDI calls.

What else can I use as a JNDI provider?

Any full-featured J2EE server (e.g. JBoss), and some specific
non-full-J2EE servers that support external JNDI, e.g. OpenJMS.

Or you could enhance tomcat to support external JNDI ;)

Yoav Shapira



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: JSP question

2003-10-21 Thread Matt Raible
A better solution for what you're doing is to leave the button as
type=submit and remove its onclick event.  Instead, add an onsubmit
handler to form that calls return validateForm() - return false in your
function when validation fails.

HTH,

Matt

-Original Message-
From: epyonne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 9:35 AM
To: Tomcat Users List
Subject: JSP question


Hello All,

I am pulling my hair on this problem, and since there are many Java experts
on this mailing list, I hope someone can help me on this.

I have a simple servlet that calls a JSP page where the user can enter a
search value.  When the user clicks on the submit button, the search value
will be passed back to the servlet for processing and display.  All these
are running on Tomcat 4.1.24.

Everything works fine until I added the form validation routine in the JSP
page.  Initially, my input button type was submit.  I changed it to
button and leave the submission to the form validation routine which is in
JavaScript.  Now, when I click on the button, I get the error message of:
Object doesn't support this property or method
at the line of code:
document.form1.submit();

Does anyone know why?  The following is code of the JSP page:
//code begin--
html
head
titleblah blah blah/title
link rel=stylesheet href=css/standard.css type=text/css
/head

body
form name=form1 method=POST action=
center
bPlease enter ANI for query:/bbrbr
table
tr
 tdANI/td
 tdinput type=text name=ani/TD
/tr
tr
 td/td
 td COLSPAN=2
 input type=button name=submit value=Submit
onclick=javascript:validateForm();
 input type=Reset name=cmdReset value=Reset/td
/tr
/table
/center

 script LANGUAGE=JavaScript
  function validateForm(){
   if(document.form1.ani.value == ){
alert(Please enter an ANI);
return;
   }
   document.form1.submit();//This line generated error.  The
.submit() method is not supported.
  }
 /script
/form
nbsp;
%@ include file=footer.jsp%
/body
/html
//code end

Any help will be very much 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: ResulSet Question

2003-10-21 Thread Manolo Ramirez T.
Hi,

I think that rsSN is associated with statement, so we you do 
'statement.executeQuery()' that invalidates the current ResultSet. Try 
using other statement object for the internal querys.

Regards,

___
Manolo.
[EMAIL PROTECTED] wrote:
All, 

I have the following code

rsSN = statement.executeQuery(Query);
while (rsSN.next()){
if (Frame.equals(E)){
rsFrame = statement.executeQuery(QueryFrameE);
if (rsFrame.next()){ js.append(trtd+
rsFrame.getString(ATTRIBUTE_VALUE) +/td/tr); }
} else{
rsFrame = statement.executeQuery(QueryFrameF);
if (rsFrame.next()){ js.append(trtd+
rsFrame.getString(ATTRIBUTE_VALUE) +/td/tr); }
}
}
Why it only do it once, if the ResulSet rsSN have 100 records

Thanks in advance
Salvador
-
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: JSP question

2003-10-21 Thread Peter Guyatt
Hi There,

Why dont you change the button back to a submit and then add a
onSubmit='return validation();' to you form ?

Thats what we do

Eg.
Script
function valid () {
if (document.form.val.value.length  1) {
alert(Please enter a value);
return false;
}
return true;
}
/Script

form onSubmit=return valid();
table
tr
td
input type=text name=val
/td
td
input type=submit
/td
/tr
/table
/form

Thanks

Pete

-Original Message-
From: epyonne [mailto:[EMAIL PROTECTED]
Sent: 21 October 2003 16:35
To: Tomcat Users List
Subject: JSP question


Hello All,

I am pulling my hair on this problem, and since there are many Java experts
on this mailing list, I hope someone can help me on this.

I have a simple servlet that calls a JSP page where the user can enter a
search value.  When the user clicks on the submit button, the search value
will be passed back to the servlet for processing and display.  All these
are running on Tomcat 4.1.24.

Everything works fine until I added the form validation routine in the JSP
page.  Initially, my input button type was submit.  I changed it to
button and leave the submission to the form validation routine which is in
JavaScript.  Now, when I click on the button, I get the error message of:
Object doesn't support this property or method
at the line of code:
document.form1.submit();

Does anyone know why?  The following is code of the JSP page:
//code begin--
html
head
titleblah blah blah/title
link rel=stylesheet href=css/standard.css type=text/css
/head

body
form name=form1 method=POST action=
center
bPlease enter ANI for query:/bbrbr
table
tr
 tdANI/td
 tdinput type=text name=ani/TD
/tr
tr
 td/td
 td COLSPAN=2
 input type=button name=submit value=Submit
onclick=javascript:validateForm();
 input type=Reset name=cmdReset value=Reset/td
/tr
/table
/center

 script LANGUAGE=JavaScript
  function validateForm(){
   if(document.form1.ani.value == ){
alert(Please enter an ANI);
return;
   }
   document.form1.submit();//This line generated error.  The
.submit() method is not supported.
  }
 /script
/form
nbsp;
%@ include file=footer.jsp%
/body
/html
//code end

Any help will be very much 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: JSP question

2003-10-21 Thread Walker Chris
Most likely document.form1 is not visible in the browser object model.
There are various ways to address the form, but the most portable in this
case is probably document.forms[0].

Chris

-Original Message-
From: epyonne [mailto:[EMAIL PROTECTED]
Sent: 21 October 2003 16:35
To: Tomcat Users List
Subject: JSP question


Hello All,

I am pulling my hair on this problem, and since there are many Java experts
on this mailing list, I hope someone can help me on this.

I have a simple servlet that calls a JSP page where the user can enter a
search value.  When the user clicks on the submit button, the search value
will be passed back to the servlet for processing and display.  All these
are running on Tomcat 4.1.24.

Everything works fine until I added the form validation routine in the JSP
page.  Initially, my input button type was submit.  I changed it to
button and leave the submission to the form validation routine which is in
JavaScript.  Now, when I click on the button, I get the error message of:
Object doesn't support this property or method
at the line of code:
document.form1.submit();

Does anyone know why?  The following is code of the JSP page:
//code begin--
html
head
titleblah blah blah/title
link rel=stylesheet href=css/standard.css type=text/css
/head

body
form name=form1 method=POST action=
center
bPlease enter ANI for query:/bbrbr
table
tr
 tdANI/td
 tdinput type=text name=ani/TD
/tr
tr
 td/td
 td COLSPAN=2
 input type=button name=submit value=Submit
onclick=javascript:validateForm();
 input type=Reset name=cmdReset value=Reset/td
/tr
/table
/center

 script LANGUAGE=JavaScript
  function validateForm(){
   if(document.form1.ani.value == ){
alert(Please enter an ANI);
return;
   }
   document.form1.submit();//This line generated error.  The
.submit() method is not supported.
  }
 /script
/form
nbsp;
%@ include file=footer.jsp%
/body
/html
//code end

Any help will be very much appreciated.

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


The information in this e:mail and any attachments or any 
reproduction of this e:mail in whatever manner is confidential 
and for the use of the addressee(s) only.  If you are not the 
addressee then the distribution, use or reproduction of this 
e:mail or the information within it is strictly prohibited and 
may be unlawful.  If received in error please advise the 
sender and delete all record of it from your system.  
Although believed to be virus free, accurate and complete,  
responsibility for any loss or cost arising from its receipt or 
use or its incomplete or inaccurate transmission is hereby 
excluded to the fullest extent possible.


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



Re: ResulSet Question

2003-10-21 Thread epyonne
Shouldn't the evaluation statement, i.e. Frame.equals(E), be outside the
main while loop?  When inside a while loop of a ResultSet, you should be
evaluating the value in the ResultSet.


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:26 AM
Subject: ResulSet Question


 All,

 I have the following code

 rsSN = statement.executeQuery(Query);
 while (rsSN.next()){
 if (Frame.equals(E)){
 rsFrame = statement.executeQuery(QueryFrameE);
 if (rsFrame.next()){ js.append(trtd+
 rsFrame.getString(ATTRIBUTE_VALUE) +/td/tr); }
 } else{
 rsFrame = statement.executeQuery(QueryFrameF);
 if (rsFrame.next()){ js.append(trtd+
 rsFrame.getString(ATTRIBUTE_VALUE) +/td/tr); }
 }
 }

 Why it only do it once, if the ResulSet rsSN have 100 records

 Thanks in advance
 Salvador

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



Problems with Apache-Tomcat SSL

2003-10-21 Thread Low, Claudia
Hi,

  I have a problem working on apache-tomcat SSL.
  My set up is using apache server to talk to tomcat using mod_jk.
  When I access my site using non SSL, it works and can load up the page.
However, when i use SSL, it gives an 401 exception.
  The SSL works if I try https://localhost:443/ on my machine.
  I couldn't understand why it didn't work. Can anyone also help me to
explain what does sending to ajp13 #NN means?

  Here is the mod_jk.log.
  This is the one that works with port 80.
[Tue Oct 21 19:36:42 2003]  [mod_jk.c (497)]: agsp=80 agsn=clow
hostn=clow shostn=localhost cbsport=80 sport=80 
[Tue Oct 21 19:36:42 2003]  [jk_ajp_common.c (1546)]: Into
jk_worker_t::get_endpoint
[Tue Oct 21 19:36:42 2003]  [jk_ajp_common.c (1590)]: In
jk_endpoint_t::ajp_get_endpoint, time elapsed since last request = 0 seconds
[Tue Oct 21 19:36:42 2003]  [jk_ajp_common.c (1208)]: Into
jk_endpoint_t::service
[Tue Oct 21 19:36:42 2003]  [jk_ajp_common.c (295)]: Into
ajp_marshal_into_msgb
[Tue Oct 21 19:36:42 2003]  [jk_ajp_common.c (463)]:
ajp_marshal_into_msgb - Done
[Tue Oct 21 19:36:42 2003]  [jk_ajp_common.c (693)]: sending to
ajp13 #297
[Tue Oct 21 19:36:42 2003]  [jk_ajp_common.c (966)]:
ajp_send_request 2: request body to send 0 - request body to resend 0
[Tue Oct 21 19:36:42 2003]  [jk_ajp_common.c (804)]: received from
ajp13 #156
[Tue Oct 21 19:36:42 2003]  [jk_ajp_common.c (515)]:
ajp_unmarshal_response: status = 200
[Tue Oct 21 19:36:42 2003]  [jk_ajp_common.c (521)]:
ajp_unmarshal_response: Number of headers is = 4
[Tue Oct 21 19:36:42 2003]  [jk_ajp_common.c (575)]:
ajp_unmarshal_response: Header[0] [ETag] = [W/7102-1064919232265]
[Tue Oct 21 19:36:42 2003]  [jk_ajp_common.c (575)]:
ajp_unmarshal_response: Header[1] [Last-Modified] = [Tue, 30 Sep 2003
10:53:52 GMT]
[Tue Oct 21 19:36:42 2003]  [jk_ajp_common.c (575)]:
ajp_unmarshal_response: Header[2] [Content-Type] =
[application/x-javascript]
[Tue Oct 21 19:36:42 2003]  [jk_ajp_common.c (575)]:
ajp_unmarshal_response: Header[3] [Content-Length] = [7102]
[Tue Oct 21 19:36:42 2003]  [jk_ajp_common.c (804)]: received from
ajp13 #7106
[Tue Oct 21 19:36:42 2003]  [mod_jk.c (398)]: writing 4096 (4096)
out of 7102 
[Tue Oct 21 19:36:42 2003]  [mod_jk.c (398)]: writing 3006 (3006)
out of 3006 
[Tue Oct 21 19:36:42 2003]  [jk_ajp_common.c (804)]: received from
ajp13 #2
[Tue Oct 21 19:36:42 2003]  [jk_ajp_common.c (1521)]: Into
jk_endpoint_t::done, recycling connection
[Tue Oct 21 19:36:54 2003]  [jk_uri_worker_map.c (460)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Tue Oct 21 19:36:54 2003]  [jk_uri_worker_map.c (477)]: Attempting
to map URI '/webx/xfm/TLMS_W_Menu.xfm'
[Tue Oct 21 19:36:54 2003]  [jk_uri_worker_map.c (502)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 -
/webx/
[Tue Oct 21 19:36:54 2003]  [mod_jk.c (1708)]: Into handler
r-proxyreq=0 r-handler=jakarta-servlet r-notes=8950096 worker=ajp13
[Tue Oct 21 19:36:54 2003]  [jk_worker.c (132)]: Into
wc_get_worker_for_name ajp13

 This is the one that doesn't work with 433.
[Tue Oct 21 19:36:54 2003]  [jk_worker.c (136)]:
wc_get_worker_for_name, done  found a worker
[Tue Oct 21 19:36:54 2003]  [mod_jk.c (497)]: agsp=443 agsn=clow
hostn=clow shostn=localhost cbsport=443 sport=443 
[Tue Oct 21 19:36:54 2003]  [jk_ajp_common.c (1546)]: Into
jk_worker_t::get_endpoint
[Tue Oct 21 19:36:54 2003]  [jk_ajp_common.c (1590)]: In
jk_endpoint_t::ajp_get_endpoint, time elapsed since last request = 12
seconds
[Tue Oct 21 19:36:54 2003]  [jk_ajp_common.c (1208)]: Into
jk_endpoint_t::service
[Tue Oct 21 19:36:54 2003]  [jk_ajp_common.c (295)]: Into
ajp_marshal_into_msgb
[Tue Oct 21 19:36:54 2003]  [jk_ajp_common.c (463)]:
ajp_marshal_into_msgb - Done
[Tue Oct 21 19:36:54 2003]  [jk_ajp_common.c (693)]: sending to
ajp13 #406
[Tue Oct 21 19:36:54 2003]  [jk_ajp_common.c (966)]:
ajp_send_request 2: request body to send 0 - request body to resend 0
[Tue Oct 21 19:36:54 2003]  [jk_ajp_common.c (804)]: received from
ajp13 #105
[Tue Oct 21 19:36:54 2003]  [jk_ajp_common.c (515)]:
ajp_unmarshal_response: status = 401
[Tue Oct 21 19:36:54 2003]  [jk_ajp_common.c (521)]:
ajp_unmarshal_response: Number of headers is = 2
[Tue Oct 21 19:36:54 2003]  [jk_ajp_common.c (575)]:
ajp_unmarshal_response: Header[0] [WWW-Authenticate] = [BASIC relam=B2B]
[Tue Oct 21 19:36:54 2003]  [jk_ajp_common.c (575)]:
ajp_unmarshal_response: Header[1] [Content-Type] =
[text/html;charset=ISO-8859-1]
[Tue Oct 21 19:36:54 2003]  [jk_ajp_common.c (804)]: received from
ajp13 #94
[Tue Oct 21 19:36:54 2003]  [mod_jk.c (398)]: writing 90 (90) out of
90 
[Tue Oct 21 19:36:54 2003]  [jk_ajp_common.c (804)]: 

java.sql.SQLException: Cannot load JDBC driver class 'null'

2003-10-21 Thread vijaya prasad pala
Hi,

From one week i am trying to solve this problem.
Please any one help me.
if i am connection directly its ok. but if i am using
connection pooling this exception is comming.

my connection pooling syntax in server.xml is
--
   Resource name=jdbc/edmsCP auth=Container
type=javax.sql.DataSource/
   ResourceParams name=jdbc/edmsCP
 parameter
   namefactory/name
  
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 parameter
   namedriverClassName/name
  
valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
 /parameter
 parameter
   nameurl/name
  
valuejdbc:microsoft:sqlserver://vijay2k:1433;databasename=eDMS/value
 /parameter
 parameter
   nameusername/name
   valuesa/value
 /parameter
 parameter
   namepassword/name
   valuesa/value
 /parameter
 parameter
   namemaxActive/name
   value20/value
 /parameter
 parameter
   namemaxIdle/name
   value10/value
 /parameter
 parameter
   namemaxWait/name
   value-1/value
 /parameter
   /ResourceParams
-
  web.xml
---
?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
resource-ref
  res-ref-namejdbc/edmsCP/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref
/web-app
---
Here is my code.. 
---
 public Connection getConnection()
 {
  Connection conn = null;
  try
  {
   Context initCtx = new InitialContext();
   Context envCtx = (Context)
initCtx.lookup(java:comp/env);

   if(envCtx == null )
 throw new Exception(No Context);
   else
 System.out.println(Context Ok -  + envCtx);

   DataSource ds = (DataSource)
envCtx.lookup(jdbc/edmsCP);

   System.out.println(DataSource - + ds);

   if (ds != null)
conn = ds.getConnection();

  }
  catch(Exception ex)
  {
   System.out.println(ex.getMessage());
   //ex.printStackTrace();
  }finally
  {
   return conn;
  }
 }
---



__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



Unable to access shared network drives with Tomcat service

2003-10-21 Thread joeri




Hi,

I am running Tomcat 4.1.27 as a Windows service in the Windows XP operating
system. I have a problem accessing network shared drives from within my
servlets and JSP-pages.

For instance, if S is a mapped drive pointing to something like a shared
network drive \\shared_server\shared_drive, then this scriplet returns
false:

%
  java.io.File file = new java.io.File(S:/test.txt);
  boolean exists = file.exists();
  out.print(exists:  + exists);
%

The file test.txt does exist, but Tomcat does not see the shared drive.
Running Tomcat in command line mode (no service) does work!

I assume this has something to do with Windows network security?

Can anybody help me?

Thanks,

Joeri


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



Re: JSP question

2003-10-21 Thread epyonne
Thanks for the reply.  But this cannot be true.  If I leave the textbox
blank, I got the alert.  That means it is seeing the document.form1
object.  It just does not like the .submit() method which I can't understand
why.

Thanks.


- Original Message -
From: Walker Chris [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:45 AM
Subject: RE: JSP question


 Most likely document.form1 is not visible in the browser object model.
 There are various ways to address the form, but the most portable in this
 case is probably document.forms[0].

 Chris

 -Original Message-
 From: epyonne [mailto:[EMAIL PROTECTED]
 Sent: 21 October 2003 16:35
 To: Tomcat Users List
 Subject: JSP question


 Hello All,

 I am pulling my hair on this problem, and since there are many Java
experts
 on this mailing list, I hope someone can help me on this.

 I have a simple servlet that calls a JSP page where the user can enter a
 search value.  When the user clicks on the submit button, the search value
 will be passed back to the servlet for processing and display.  All these
 are running on Tomcat 4.1.24.

 Everything works fine until I added the form validation routine in the JSP
 page.  Initially, my input button type was submit.  I changed it to
 button and leave the submission to the form validation routine which is
in
 JavaScript.  Now, when I click on the button, I get the error message of:
 Object doesn't support this property or method
 at the line of code:
 document.form1.submit();

 Does anyone know why?  The following is code of the JSP page:
 //code begin--
 html
 head
 titleblah blah blah/title
 link rel=stylesheet href=css/standard.css type=text/css
 /head

 body
 form name=form1 method=POST action=
 center
 bPlease enter ANI for query:/bbrbr
 table
 tr
  tdANI/td
  tdinput type=text name=ani/TD
 /tr
 tr
  td/td
  td COLSPAN=2
  input type=button name=submit value=Submit
 onclick=javascript:validateForm();
  input type=Reset name=cmdReset value=Reset/td
 /tr
 /table
 /center

  script LANGUAGE=JavaScript
   function validateForm(){
if(document.form1.ani.value == ){
 alert(Please enter an ANI);
 return;
}
document.form1.submit();//This line generated error.  The
 .submit() method is not supported.
   }
  /script
 /form
 nbsp;
 %@ include file=footer.jsp%
 /body
 /html
 //code end

 Any help will be very much appreciated.


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



Using tomcat with IIS

2003-10-21 Thread Langenfeld, Jens
Hello Mr Helpman,

for an amount of time, I try to use IIS to serve my JBOSS/TOMCAT servlet -context. It 
is part of a commercial ERP, wich usually works with apache. Even, without any 
dedicated webserver, only tomcat/jboss it works ok. I did everything as described in 
your good and understandable IIS-Howto and so the samples are served perfectly. But my 
context is totally ignored (404-Error). 

the uriworkermap.properties looks like that:

default.worker=ajp13

/admin=$(default.worker)
/admin/*=$(default.worker)
/examples=$(default.worker)
/examples/*=$(default.worker)

if I add lines like:
/ROOT=$(default.worker)
/ROOT/*=$(default.worker)

I get IIS iis_redirect.log entries like the following (1):



the display of the tomcat.bat run jkconf is  attached at the end of the mail (2).

I work with jboss 2.2.2 tomcat 3.3.1 IIS 5

If you need any further information, tell me. I' ll be grateful for any kind of help.

so long, Jens

(1)


[Tue Oct 21 15:20:32 2003]  [jk_uri_worker_map.c (351)]: Into 
jk_uri_worker_map_t::map_uri_to_worker
[Tue Oct 21 15:20:32 2003]  [jk_uri_worker_map.c (368)]: Attempting to map URI 
'/localhost/ROOT/login.html'
[Tue Oct 21 15:20:32 2003]  [jk_uri_worker_map.c (456)]: 
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Tue Oct 21 15:20:32 2003]  [jk_isapi_plugin.c (678)]: In HttpFilterProc test Default 
redirection of /ROOT/login.html
[Tue Oct 21 15:20:32 2003]  [jk_uri_worker_map.c (351)]: Into 
jk_uri_worker_map_t::map_uri_to_worker
[Tue Oct 21 15:20:32 2003]  [jk_uri_worker_map.c (368)]: Attempting to map URI 
'/ROOT/login.html'
[Tue Oct 21 15:20:32 2003]  [jk_uri_worker_map.c (391)]: 
jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 - /ROOT/
[Tue Oct 21 15:20:32 2003]  [jk_isapi_plugin.c (688)]: HttpFilterProc 
[/ROOT/login.html] is a servlet url - should redirect to ajp13
[Tue Oct 21 15:20:32 2003]  [jk_isapi_plugin.c (737)]: HttpFilterProc check if 
[/ROOT/login.html] is points to the web-inf directory
[Tue Oct 21 15:20:32 2003]  [jk_isapi_plugin.c (777)]: HttpExtensionProc started
[Tue Oct 21 15:20:32 2003]  [jk_worker.c (123)]: Into wc_get_worker_for_name ajp13
[Tue Oct 21 15:20:32 2003]  [jk_worker.c (127)]: wc_get_worker_for_name, done  found a 
worker
[Tue Oct 21 15:20:32 2003]  [jk_isapi_plugin.c (799)]: HttpExtensionProc got a worker 
for name ajp13
[Tue Oct 21 15:20:32 2003]  [jk_ajp13_worker.c (865)]: Into jk_worker_t::get_endpoint
[Tue Oct 21 15:20:32 2003]  [jk_ajp13_worker.c (775)]: Into jk_endpoint_t::service
[Tue Oct 21 15:20:32 2003]  [jk_ajp13.c (403)]: Into ajp13_marshal_into_msgb
[Tue Oct 21 15:20:32 2003]  [jk_ajp13.c (537)]: ajp13_marshal_into_msgb - Done
[Tue Oct 21 15:20:32 2003]  [jk_ajp13_worker.c (206)]: sending to ajp13 #515
[Tue Oct 21 15:20:32 2003]  [jk_ajp13_worker.c (645)]: send_request 2: request body to 
send 0 - request body to resend 0
[Tue Oct 21 15:20:32 2003]  [jk_ajp13_worker.c (258)]: received from ajp13 #45
[Tue Oct 21 15:20:32 2003]  [jk_ajp13.c (584)]: ajp13_unmarshal_response: status = 404
[Tue Oct 21 15:20:32 2003]  [jk_ajp13.c (591)]: ajp13_unmarshal_response: Number of 
headers is = 2
[Tue Oct 21 15:20:32 2003]  [jk_ajp13.c (634)]: ajp13_unmarshal_response: Header[0] 
[Content-Type] = [text/html]
[Tue Oct 21 15:20:32 2003]  [jk_ajp13.c (634)]: ajp13_unmarshal_response: Header[1] 
[Content-Length] = [176]
[Tue Oct 21 15:20:32 2003]  [jk_isapi_plugin.c (415)]: Into 
jk_ws_service_t::start_response
[Tue Oct 21 15:20:32 2003]  [jk_ajp13_worker.c (258)]: received from ajp13 #180
[Tue Oct 21 15:20:32 2003]  [jk_isapi_plugin.c (549)]: Into jk_ws_service_t::write
[Tue Oct 21 15:20:32 2003]  [jk_ajp13_worker.c (258)]: received from ajp13 #2
[Tue Oct 21 15:20:32 2003]  [jk_isapi_plugin.c (811)]: HttpExtensionProc service() 
returned OK
[Tue Oct 21 15:20:32 2003]  [jk_ajp13_worker.c (549)]: Into jk_endpoint_t::done
[Tue Oct 21 15:23:03 2003]  [jk_isapi_plugin.c (626)]: HttpFilterProc started
[Tue Oct 21 15:23:03 2003]  [jk_isapi_plugin.c (672)]: In HttpFilterProc Virtual Host 
redirection of /localhost/index.html
[Tue Oct 21 15:23:03 2003]  [jk_uri_worker_map.c (351)]: Into 
jk_uri_worker_map_t::map_uri_to_worker
[Tue Oct 21 15:23:03 2003]  [jk_uri_worker_map.c (368)]: Attempting to map URI 
'/localhost/index.html'
[Tue Oct 21 15:23:03 2003]  [jk_uri_worker_map.c (456)]: 
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Tue Oct 21 15:23:03 2003]  [jk_isapi_plugin.c (678)]: In HttpFilterProc test Default 
redirection of /index.html
[Tue Oct 21 15:23:03 2003]  [jk_uri_worker_map.c (351)]: Into 
jk_uri_worker_map_t::map_uri_to_worker
[Tue Oct 21 15:23:03 2003]  [jk_uri_worker_map.c (368)]: Attempting to map URI 
'/index.html'
[Tue Oct 21 15:23:03 2003]  [jk_uri_worker_map.c (456)]: 
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Tue Oct 21 15:23:03 2003]  [jk_isapi_plugin.c (728)]: HttpFilterProc [/index.html] is 
not a servlet url
[Tue Oct 21 15:23:03 2003]  [jk_isapi_plugin.c 

Re: JSP question

2003-10-21 Thread epyonne
Thank you Matt and Peter for the suggestion.  It works!!!


- Original Message -
From: Peter Guyatt [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:42 AM
Subject: RE: JSP question


 Hi There,

 Why dont you change the button back to a submit and then add a
 onSubmit='return validation();' to you form ?

 Thats what we do

 Eg.
 Script
 function valid () {
 if (document.form.val.value.length  1) {
 alert(Please enter a value);
 return false;
 }
 return true;
 }
 /Script

 form onSubmit=return valid();
 table
 tr
 td
 input type=text name=val
 /td
 td
 input type=submit
 /td
 /tr
 /table
 /form

 Thanks

 Pete

 -Original Message-
 From: epyonne [mailto:[EMAIL PROTECTED]
 Sent: 21 October 2003 16:35
 To: Tomcat Users List
 Subject: JSP question


 Hello All,

 I am pulling my hair on this problem, and since there are many Java
experts
 on this mailing list, I hope someone can help me on this.

 I have a simple servlet that calls a JSP page where the user can enter a
 search value.  When the user clicks on the submit button, the search value
 will be passed back to the servlet for processing and display.  All these
 are running on Tomcat 4.1.24.

 Everything works fine until I added the form validation routine in the JSP
 page.  Initially, my input button type was submit.  I changed it to
 button and leave the submission to the form validation routine which is
in
 JavaScript.  Now, when I click on the button, I get the error message of:
 Object doesn't support this property or method
 at the line of code:
 document.form1.submit();

 Does anyone know why?  The following is code of the JSP page:
 //code begin--
 html
 head
 titleblah blah blah/title
 link rel=stylesheet href=css/standard.css type=text/css
 /head

 body
 form name=form1 method=POST action=
 center
 bPlease enter ANI for query:/bbrbr
 table
 tr
  tdANI/td
  tdinput type=text name=ani/TD
 /tr
 tr
  td/td
  td COLSPAN=2
  input type=button name=submit value=Submit
 onclick=javascript:validateForm();
  input type=Reset name=cmdReset value=Reset/td
 /tr
 /table
 /center

  script LANGUAGE=JavaScript
   function validateForm(){
if(document.form1.ani.value == ){
 alert(Please enter an ANI);
 return;
}
document.form1.submit();//This line generated error.  The
 .submit() method is not supported.
   }
  /script
 /form
 nbsp;
 %@ include file=footer.jsp%
 /body
 /html
 //code end

 Any help will be very much 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]



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



RE: Using tomcat with IIS

2003-10-21 Thread Dionne, Patrice
Your dll and worker seem well configured from what I can see in the log.

Did you try to access a ressource into the /examples or /admin webapp?

Is this working http://Tomcat-host:Tomcat-port/ROOT/login.html ?

-Original Message-
From: Langenfeld, Jens [mailto:[EMAIL PROTECTED]
Sent: 21 octobre, 2003 10:17
To: [EMAIL PROTECTED]
Subject: Using tomcat with IIS


Hello Mr Helpman,

for an amount of time, I try to use IIS to serve my JBOSS/TOMCAT servlet -context. It 
is part of a commercial ERP, wich usually works with apache. Even, without any 
dedicated webserver, only tomcat/jboss it works ok. I did everything as described in 
your good and understandable IIS-Howto and so the samples are served perfectly. But my 
context is totally ignored (404-Error). 

the uriworkermap.properties looks like that:

default.worker=ajp13

/admin=$(default.worker)
/admin/*=$(default.worker)
/examples=$(default.worker)
/examples/*=$(default.worker)

if I add lines like:
/ROOT=$(default.worker)
/ROOT/*=$(default.worker)

I get IIS iis_redirect.log entries like the following (1):



the display of the tomcat.bat run jkconf is  attached at the end of the mail (2).

I work with jboss 2.2.2 tomcat 3.3.1 IIS 5

If you need any further information, tell me. I' ll be grateful for any kind of help.

so long, Jens

(1)


[Tue Oct 21 15:20:32 2003]  [jk_uri_worker_map.c (351)]: Into 
jk_uri_worker_map_t::map_uri_to_worker
[Tue Oct 21 15:20:32 2003]  [jk_uri_worker_map.c (368)]: Attempting to map URI 
'/localhost/ROOT/login.html'
[Tue Oct 21 15:20:32 2003]  [jk_uri_worker_map.c (456)]: 
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Tue Oct 21 15:20:32 2003]  [jk_isapi_plugin.c (678)]: In HttpFilterProc test Default 
redirection of /ROOT/login.html
[Tue Oct 21 15:20:32 2003]  [jk_uri_worker_map.c (351)]: Into 
jk_uri_worker_map_t::map_uri_to_worker
[Tue Oct 21 15:20:32 2003]  [jk_uri_worker_map.c (368)]: Attempting to map URI 
'/ROOT/login.html'
[Tue Oct 21 15:20:32 2003]  [jk_uri_worker_map.c (391)]: 
jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 - /ROOT/
[Tue Oct 21 15:20:32 2003]  [jk_isapi_plugin.c (688)]: HttpFilterProc 
[/ROOT/login.html] is a servlet url - should redirect to ajp13
[Tue Oct 21 15:20:32 2003]  [jk_isapi_plugin.c (737)]: HttpFilterProc check if 
[/ROOT/login.html] is points to the web-inf directory
[Tue Oct 21 15:20:32 2003]  [jk_isapi_plugin.c (777)]: HttpExtensionProc started
[Tue Oct 21 15:20:32 2003]  [jk_worker.c (123)]: Into wc_get_worker_for_name ajp13
[Tue Oct 21 15:20:32 2003]  [jk_worker.c (127)]: wc_get_worker_for_name, done  found a 
worker
[Tue Oct 21 15:20:32 2003]  [jk_isapi_plugin.c (799)]: HttpExtensionProc got a worker 
for name ajp13
[Tue Oct 21 15:20:32 2003]  [jk_ajp13_worker.c (865)]: Into jk_worker_t::get_endpoint
[Tue Oct 21 15:20:32 2003]  [jk_ajp13_worker.c (775)]: Into jk_endpoint_t::service
[Tue Oct 21 15:20:32 2003]  [jk_ajp13.c (403)]: Into ajp13_marshal_into_msgb
[Tue Oct 21 15:20:32 2003]  [jk_ajp13.c (537)]: ajp13_marshal_into_msgb - Done
[Tue Oct 21 15:20:32 2003]  [jk_ajp13_worker.c (206)]: sending to ajp13 #515
[Tue Oct 21 15:20:32 2003]  [jk_ajp13_worker.c (645)]: send_request 2: request body to 
send 0 - request body to resend 0
[Tue Oct 21 15:20:32 2003]  [jk_ajp13_worker.c (258)]: received from ajp13 #45
[Tue Oct 21 15:20:32 2003]  [jk_ajp13.c (584)]: ajp13_unmarshal_response: status = 404
[Tue Oct 21 15:20:32 2003]  [jk_ajp13.c (591)]: ajp13_unmarshal_response: Number of 
headers is = 2
[Tue Oct 21 15:20:32 2003]  [jk_ajp13.c (634)]: ajp13_unmarshal_response: Header[0] 
[Content-Type] = [text/html]
[Tue Oct 21 15:20:32 2003]  [jk_ajp13.c (634)]: ajp13_unmarshal_response: Header[1] 
[Content-Length] = [176]
[Tue Oct 21 15:20:32 2003]  [jk_isapi_plugin.c (415)]: Into 
jk_ws_service_t::start_response
[Tue Oct 21 15:20:32 2003]  [jk_ajp13_worker.c (258)]: received from ajp13 #180
[Tue Oct 21 15:20:32 2003]  [jk_isapi_plugin.c (549)]: Into jk_ws_service_t::write
[Tue Oct 21 15:20:32 2003]  [jk_ajp13_worker.c (258)]: received from ajp13 #2
[Tue Oct 21 15:20:32 2003]  [jk_isapi_plugin.c (811)]: HttpExtensionProc service() 
returned OK
[Tue Oct 21 15:20:32 2003]  [jk_ajp13_worker.c (549)]: Into jk_endpoint_t::done
[Tue Oct 21 15:23:03 2003]  [jk_isapi_plugin.c (626)]: HttpFilterProc started
[Tue Oct 21 15:23:03 2003]  [jk_isapi_plugin.c (672)]: In HttpFilterProc Virtual Host 
redirection of /localhost/index.html
[Tue Oct 21 15:23:03 2003]  [jk_uri_worker_map.c (351)]: Into 
jk_uri_worker_map_t::map_uri_to_worker
[Tue Oct 21 15:23:03 2003]  [jk_uri_worker_map.c (368)]: Attempting to map URI 
'/localhost/index.html'
[Tue Oct 21 15:23:03 2003]  [jk_uri_worker_map.c (456)]: 
jk_uri_worker_map_t::map_uri_to_worker, done without a match
[Tue Oct 21 15:23:03 2003]  [jk_isapi_plugin.c (678)]: In HttpFilterProc test Default 
redirection of /index.html
[Tue Oct 21 15:23:03 2003]  [jk_uri_worker_map.c (351)]: Into 

RE: Unable to access shared network drives with Tomcat service

2003-10-21 Thread Goehring, Chuck Mr., RCI - San Diego
Joeri,

I haven't had to do this with Tomcat yet but am using it in Apache 1.x and 2.x on 
Windows 2000.  In Apache this works:

# Local Drive (old way)
#Alias /Documents e:/Documents
# Network Share (new way)
Alias /Documents //server/Documents

Couldn't find any documentation on it, but somehow I came up with this.  The Web 
Server service has to run as a domain account that is a member of a domain group that 
has access to the share.

Could be the same applies to Tomcat.  Let me know how you make out.

Chuck


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 5:31 AM
To: [EMAIL PROTECTED]
Subject: Unable to access shared network drives with Tomcat service


Hi,

I am running Tomcat 4.1.27 as a Windows service in the Windows XP operating
system. I have a problem accessing network shared drives from within my
servlets and JSP-pages.

For instance, if S is a mapped drive pointing to something like a shared
network drive \\shared_server\shared_drive, then this scriplet returns
false:

%
  java.io.File file = new java.io.File(S:/test.txt);
  boolean exists = file.exists();
  out.print(exists:  + exists);
%

The file test.txt does exist, but Tomcat does not see the shared drive.
Running Tomcat in command line mode (no service) does work!

I assume this has something to do with Windows network security?

Can anybody help me?

Thanks,

Joeri


-
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: Unable to access shared network drives with Tomcat service

2003-10-21 Thread John Corrigan
Tomcat needs to be logged in as a user with permission to use the S: drive.
You might also need to use UNC paths instead of drive mappings.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 5:31 AM
To: [EMAIL PROTECTED]
Subject: Unable to access shared network drives with Tomcat service






Hi,

I am running Tomcat 4.1.27 as a Windows service in the Windows XP operating
system. I have a problem accessing network shared drives from within my
servlets and JSP-pages.

For instance, if S is a mapped drive pointing to something like a shared
network drive \\shared_server\shared_drive, then this scriplet returns
false:

%
  java.io.File file = new java.io.File(S:/test.txt);
  boolean exists = file.exists();
  out.print(exists:  + exists);
%

The file test.txt does exist, but Tomcat does not see the shared drive.
Running Tomcat in command line mode (no service) does work!

I assume this has something to do with Windows network security?

Can anybody help me?

Thanks,

Joeri


-
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: java.sql.SQLException: Cannot load JDBC driver class 'null'

2003-10-21 Thread El Toro
Where are your jdbc for sql server jars?  Put all
three under /%TOMCAT_HOME%/common/lib.

Also, your factoryClassName should be:

factoryClassName=org.apache.naming.factory.ResourceFactory

I'm currently using connection pooling with sql server
and thats the only things i can see that might cause
you problems.  Also, make sure you don't have any
duplicate entries for the jdbc for sql server jars in
your classpath.

Hope That Helps,

Jason

--- vijaya prasad pala [EMAIL PROTECTED]
wrote:
 Hi,
 
 From one week i am trying to solve this problem.
 Please any one help me.
 if i am connection directly its ok. but if i am
 using
 connection pooling this exception is comming.
 
 my connection pooling syntax in server.xml is

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

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

valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
  /parameter
  parameter
nameurl/name
   

valuejdbc:microsoft:sqlserver://vijay2k:1433;databasename=eDMS/value
  /parameter
  parameter
nameusername/name
valuesa/value
  /parameter
  parameter
namepassword/name
valuesa/value
  /parameter
  parameter
namemaxActive/name
value20/value
  /parameter
  parameter
namemaxIdle/name
value10/value
  /parameter
  parameter
namemaxWait/name
value-1/value
  /parameter
/ResourceParams

-
   web.xml
 ---
 ?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
 resource-ref
   res-ref-namejdbc/edmsCP/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
 /resource-ref
 /web-app

---
 Here is my code.. 
 ---
  public Connection getConnection()
  {
   Connection conn = null;
   try
   {
Context initCtx = new InitialContext();
Context envCtx = (Context)
 initCtx.lookup(java:comp/env);
 
if(envCtx == null )
  throw new Exception(No Context);
else
  System.out.println(Context Ok -  + envCtx);
 
DataSource ds = (DataSource)
 envCtx.lookup(jdbc/edmsCP);
 
System.out.println(DataSource - + ds);
 
if (ds != null)
 conn = ds.getConnection();
 
   }
   catch(Exception ex)
   {
System.out.println(ex.getMessage());
//ex.printStackTrace();
   }finally
   {
return conn;
   }
  }
 ---
 
 
 
 __
 Do you Yahoo!?
 The New Yahoo! Shopping - with improved product
 search
 http://shopping.yahoo.com
 

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


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



JDBC Connection question

2003-10-21 Thread Carlos Pereira
Hi list,
my application currently uses ONE connection object to communicate with the database. 
The connection is set with an initializer servlet (load_on_stratup=0), and all users 
use that connection to retrieve data.

 Is this the best approach, or should i create a connection per user? Why? Where can i 
know more?

 The security system works on top of the database, so that's not a problem. I'm more 
concerned with performance and concurrency.

Regards and thanks,
Carlos Pereira

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



Re: JDBC Connection question

2003-10-21 Thread Caroline Jen
Please use a connection pool.  For Instruction:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
and
http://www.mysql.com/articles/connection_pooling_with_connectorj.html

--- Carlos Pereira [EMAIL PROTECTED] wrote:
 Hi list,
 my application currently uses ONE connection object
 to communicate with the database. The connection is
 set with an initializer servlet (load_on_stratup=0),
 and all users use that connection to retrieve data.
 
  Is this the best approach, or should i create a
 connection per user? Why? Where can i know more?
 
  The security system works on top of the database,
 so that's not a problem. I'm more concerned with
 performance and concurrency.
 
 Regards and thanks,
 Carlos Pereira
 

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


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



tomcat apache connection problem

2003-10-21 Thread kgsat
Hi folks,
(B
(BI am currently using apache2.0.40 and tomcat 4.1.27 with jk2 connector for
(Binter communication of apache tomcat servers on linux9.0
(B
(BI have a peculiar problem.
(BWhen i use the host name to get to the head page of the application it takes
(Bme to default page.But when i use the machine ip it takes me to the head
(Bpage of the application.
(B
(BThe problem is, i am not able to progress to other jsp pages in tomcat.
(B
(BOn the other hand, if i replace the IP with the host name, tomcat responds
(Bcorrectly.
(B
(Bi have checked the server.xml, workers.properties and httpd.conf to ensure i
(Bhave the host name entries only.
(B
(BWhat could be the problem is beyond my imagination.
(BCan any one suggest a better solution for this
(Bthanks and regards
(Bsat

RE: Restrict Coyote/JK2 AJP 1.3 connector to local loopbackinterface

2003-10-21 Thread Francois JEANMOUGIN


 I couldn't figure out how to restrict Coyote/JK2 AJP 1.3 connector to
 the local loopback interface.
 Actually, I would expect the default settings in workers.properties
 (worker.ajp13.host=localhost) to only bind to the local loopback
 device,

You should try the address attribute under the Connector section dedicated to your 
connector in the conf/server.xml file.

François


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



Bugs and weakness when Tomcat works a NT Service (tcservcfg)

2003-10-21 Thread Jose Euclides da Silva Junior - DATAPREVRJ
Hi all,
there have been a nightmare since i ve decided to make TomCat 4.1.18 be a
Windows NT 4.0's Service.First of all, i ve the stuped idea of looking for a
program which could make it for me. So,  i found the nightmare main actor
-- tcservcfg and the second one -- windows!!!
Thus, i made the following steps:
1 - ...runned the main actor ( tcservcfg ) - OK!
2 -  started up the service - OK!
3 - test the environment - FAILURE!
NOW, THE NIGHTMARE begins
4 - Only the static pages are availables, so whenever my app tries to use
Result Sets, I get this error message:  

HTTP Status 500 - 

type Exception report

message 

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception 

java.lang.NullPointerException
at BancoServlet.recuperaTopicoAssunto(BancoServlet.java:413)
at BancoServlet.service(BancoServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
FilterChain.java:247)

LINE 413 points to a  resultset statement, see below:

ring query = Select * FROM DICAS WHERE ID_TOPICO =  + topico2;
  pstmt = con.prepareStatement(query);
  rs = pstmt.executeQuery();
  if ( !rs.next() ) 
 {   // -- THIS IS LINE 413 --
fechaconection( pstmt,rs,con);
chamadevolta =
getServletContext().getRequestDispatcher(/semconteudo.jsp);
chamadevolta.forward(request,response);
 }

5 - I ve tried to find something about permission but i didnt find anything.
6 - THE WORST: I stopped the service and tried to work as before --
starting TomCat by running startup.bat file. Unfortunatelly, TomCat doesnt
starts up ANYMORE !!!
7- Then, i ve disabled all TomCat's services
8- Tried step 6 again - FAILURE AGAIN
9 - Finally, i ve removed the Registry key of TomCat service.
10 -  Tried step 6 again - FAILURE AGAIN - it is a loop, isnt it...

Really, any single help will be appreciated...
Euclides.





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



RE: Bugs and weakness when Tomcat works a NT Service (tcservcfg)

2003-10-21 Thread Goehring, Chuck Mr., RCI - San Diego
Jose,

I spent a long time trying to manually setup Tomcat to run as a service.  Finally 
ended up re-installing and checking the little checkbox that makes it usable as a 
service.  It is unchecked by default. Once it is installed, you can change the account 
it executes as in the services thingy in control panel.

Chuck

-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:11 AM
To: '[EMAIL PROTECTED]'
Subject: Bugs and weakness when Tomcat works a NT Service (tcservcfg)


Hi all,
there have been a nightmare since i ve decided to make TomCat 4.1.18 be a
Windows NT 4.0's Service.First of all, i ve the stuped idea of looking for a
program which could make it for me. So,  i found the nightmare main actor
-- tcservcfg and the second one -- windows!!!
Thus, i made the following steps:
1 - ...runned the main actor ( tcservcfg ) - OK!
2 -  started up the service - OK!
3 - test the environment - FAILURE!
NOW, THE NIGHTMARE begins
4 - Only the static pages are availables, so whenever my app tries to use
Result Sets, I get this error message:  

HTTP Status 500 - 

type Exception report

message 

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception 

java.lang.NullPointerException
at BancoServlet.recuperaTopicoAssunto(BancoServlet.java:413)
at BancoServlet.service(BancoServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
FilterChain.java:247)

LINE 413 points to a  resultset statement, see below:

ring query = Select * FROM DICAS WHERE ID_TOPICO =  + topico2;
  pstmt = con.prepareStatement(query);
  rs = pstmt.executeQuery();
  if ( !rs.next() ) 
 {   // -- THIS IS LINE 413 --
fechaconection( pstmt,rs,con);
chamadevolta =
getServletContext().getRequestDispatcher(/semconteudo.jsp);
chamadevolta.forward(request,response);
 }

5 - I ve tried to find something about permission but i didnt find anything.
6 - THE WORST: I stopped the service and tried to work as before --
starting TomCat by running startup.bat file. Unfortunatelly, TomCat doesnt
starts up ANYMORE !!!
7- Then, i ve disabled all TomCat's services
8- Tried step 6 again - FAILURE AGAIN
9 - Finally, i ve removed the Registry key of TomCat service.
10 -  Tried step 6 again - FAILURE AGAIN - it is a loop, isnt it...

Really, any single help will be appreciated...
Euclides.





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



RES: Bugs and weakness when Tomcat works a NT Service (tcservcfg)

2003-10-21 Thread Jose Euclides da Silva Junior - DATAPREVRJ
Where is this checkbox? How can i reach there? I am talking about TomCat
4.1.18...

-Mensagem original-
De: Goehring, Chuck Mr., RCI - San Diego
[mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 14:22
Para: Tomcat Users List
Assunto: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

I spent a long time trying to manually setup Tomcat to run as a service.
Finally ended up re-installing and checking the little checkbox that makes
it usable as a service.  It is unchecked by default. Once it is installed,
you can change the account it executes as in the services thingy in control
panel.

Chuck

-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:11 AM
To: '[EMAIL PROTECTED]'
Subject: Bugs and weakness when Tomcat works a NT Service (tcservcfg)


Hi all,
there have been a nightmare since i ve decided to make TomCat 4.1.18 be a
Windows NT 4.0's Service.First of all, i ve the stuped idea of looking for a
program which could make it for me. So,  i found the nightmare main actor
-- tcservcfg and the second one -- windows!!!
Thus, i made the following steps:
1 - ...runned the main actor ( tcservcfg ) - OK!
2 -  started up the service - OK!
3 - test the environment - FAILURE!
NOW, THE NIGHTMARE begins
4 - Only the static pages are availables, so whenever my app tries to use
Result Sets, I get this error message:  

HTTP Status 500 - 

type Exception report

message 

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception 

java.lang.NullPointerException
at BancoServlet.recuperaTopicoAssunto(BancoServlet.java:413)
at BancoServlet.service(BancoServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
FilterChain.java:247)

LINE 413 points to a  resultset statement, see below:

ring query = Select * FROM DICAS WHERE ID_TOPICO =  + topico2;
  pstmt = con.prepareStatement(query);
  rs = pstmt.executeQuery();
  if ( !rs.next() ) 
 {   // -- THIS IS LINE 413 --
fechaconection( pstmt,rs,con);
chamadevolta =
getServletContext().getRequestDispatcher(/semconteudo.jsp);
chamadevolta.forward(request,response);
 }

5 - I ve tried to find something about permission but i didnt find anything.
6 - THE WORST: I stopped the service and tried to work as before --
starting TomCat by running startup.bat file. Unfortunatelly, TomCat doesnt
starts up ANYMORE !!!
7- Then, i ve disabled all TomCat's services
8- Tried step 6 again - FAILURE AGAIN
9 - Finally, i ve removed the Registry key of TomCat service.
10 -  Tried step 6 again - FAILURE AGAIN - it is a loop, isnt it...

Really, any single help will be appreciated...
Euclides.





-
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: Bugs and weakness when Tomcat works a NT Service (tcservcfg)

2003-10-21 Thread Goehring, Chuck Mr., RCI - San Diego
Jose,

Uninstall Tomcat.
Start the installer and one of the screens has a list of products (Tomcat, Source etc) 
if you scroll down, there is and unchecked item that says to install it as a service.  
You must check this one to get it installed.  If you are re-installing you also need 
to make sure it installs in the same directory to prevent other problems.  

Once the installer completes you can run it as a service or disable the service and 
use the startup.bat in the bin directory to start it from a command prompt.  Sometimes 
this is desirable when debugging things that go wrong at startup.

Chuck


-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:28 AM
To: 'Tomcat Users List'; Goehring, Chuck Mr., RCI - San Diego
Subject: RES: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Where is this checkbox? How can i reach there? I am talking about TomCat
4.1.18...

-Mensagem original-
De: Goehring, Chuck Mr., RCI - San Diego
[mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 14:22
Para: Tomcat Users List
Assunto: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

I spent a long time trying to manually setup Tomcat to run as a service.
Finally ended up re-installing and checking the little checkbox that makes
it usable as a service.  It is unchecked by default. Once it is installed,
you can change the account it executes as in the services thingy in control
panel.

Chuck

-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:11 AM
To: '[EMAIL PROTECTED]'
Subject: Bugs and weakness when Tomcat works a NT Service (tcservcfg)


Hi all,
there have been a nightmare since i ve decided to make TomCat 4.1.18 be a
Windows NT 4.0's Service.First of all, i ve the stuped idea of looking for a
program which could make it for me. So,  i found the nightmare main actor
-- tcservcfg and the second one -- windows!!!
Thus, i made the following steps:
1 - ...runned the main actor ( tcservcfg ) - OK!
2 -  started up the service - OK!
3 - test the environment - FAILURE!
NOW, THE NIGHTMARE begins
4 - Only the static pages are availables, so whenever my app tries to use
Result Sets, I get this error message:  

HTTP Status 500 - 

type Exception report

message 

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception 

java.lang.NullPointerException
at BancoServlet.recuperaTopicoAssunto(BancoServlet.java:413)
at BancoServlet.service(BancoServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
FilterChain.java:247)

LINE 413 points to a  resultset statement, see below:

ring query = Select * FROM DICAS WHERE ID_TOPICO =  + topico2;
  pstmt = con.prepareStatement(query);
  rs = pstmt.executeQuery();
  if ( !rs.next() ) 
 {   // -- THIS IS LINE 413 --
fechaconection( pstmt,rs,con);
chamadevolta =
getServletContext().getRequestDispatcher(/semconteudo.jsp);
chamadevolta.forward(request,response);
 }

5 - I ve tried to find something about permission but i didnt find anything.
6 - THE WORST: I stopped the service and tried to work as before --
starting TomCat by running startup.bat file. Unfortunatelly, TomCat doesnt
starts up ANYMORE !!!
7- Then, i ve disabled all TomCat's services
8- Tried step 6 again - FAILURE AGAIN
9 - Finally, i ve removed the Registry key of TomCat service.
10 -  Tried step 6 again - FAILURE AGAIN - it is a loop, isnt it...

Really, any single help will be appreciated...
Euclides.





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


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

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


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



Tomcat 5 error when starting

2003-10-21 Thread David Liles
I just downloaded and installed version 5 and am getting the following error when I 
attempt to start it for the first time:
 
ERROR] Digester - -Begin event threw error java.lang.NoClassDefFoundError: 
javax/xml/transform/Sourcejava.lang.NoClassDefFoundError: javax/xml/transform/Source
 at 
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.execute(MbeansDescriptorsDOMSource.java:130)
 at 
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.loadDescriptors(MbeansDescriptorsDOMSource.java:120)
 at org.apache.commons.modeler.Registry.load(Registry.java:819)
 at org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:931)
 at org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:909)
 at org.apache.catalina.mbeans.MBeanUtils.createRegistry(MBeanUtils.java:1646)
 at org.apache.catalina.mbeans.MBeanUtils.clinit(MBeanUtils.java:154)
 at 
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.clinit(GlobalResourcesLifecycleListener.java:112)
 at java.lang.Class.newInstance0(Native Method)
 at java.lang.Class.newInstance(Class.java:237)
 at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:253)
 at org.apache.commons.digester.Rule.begin(Rule.java:200)
 at org.apache.commons.digester.Digester.startElement(Digester.java:1273)
 at 
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:459)
 at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractX
 
 
 


RE: Unable to access shared network drives with Tomcat service

2003-10-21 Thread Wade Chandler
Also remember that UNC in java should use forward slash(/) instead of
backward(\).  Use this or you'll get funny problems from UNC names and
file access.

Wade

-Original Message-
From: John Corrigan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 21, 2003 12:17 PM
To: Tomcat Users List
Subject: RE: Unable to access shared network drives with Tomcat service


Tomcat needs to be logged in as a user with permission to use the S:
drive. You might also need to use UNC paths instead of drive mappings.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 5:31 AM
To: [EMAIL PROTECTED]
Subject: Unable to access shared network drives with Tomcat service






Hi,

I am running Tomcat 4.1.27 as a Windows service in the Windows XP
operating system. I have a problem accessing network shared drives from
within my servlets and JSP-pages.

For instance, if S is a mapped drive pointing to something like a
shared network drive \\shared_server\shared_drive, then this scriplet
returns
false:

%
  java.io.File file = new java.io.File(S:/test.txt);
  boolean exists = file.exists();
  out.print(exists:  + exists);
%

The file test.txt does exist, but Tomcat does not see the shared
drive. Running Tomcat in command line mode (no service) does work!

I assume this has something to do with Windows network security?

Can anybody help me?

Thanks,

Joeri


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



RES: Bugs and weakness when Tomcat works a NT Service (tcservcfg)

2003-10-21 Thread Jose Euclides da Silva Junior - DATAPREVRJ
Thank you, Chuck. I will do it! So, i should keep saved the existing
server.xml and web.xml files before the new installation starts, i guess...
Isnt it?
Euclides

-Mensagem original-
De: Goehring, Chuck Mr., RCI - San Diego
[mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 14:37
Para: Tomcat Users List
Assunto: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

Uninstall Tomcat.
Start the installer and one of the screens has a list of products (Tomcat,
Source etc) if you scroll down, there is and unchecked item that says to
install it as a service.  You must check this one to get it installed.  If
you are re-installing you also need to make sure it installs in the same
directory to prevent other problems.  

Once the installer completes you can run it as a service or disable the
service and use the startup.bat in the bin directory to start it from a
command prompt.  Sometimes this is desirable when debugging things that go
wrong at startup.

Chuck


-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:28 AM
To: 'Tomcat Users List'; Goehring, Chuck Mr., RCI - San Diego
Subject: RES: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Where is this checkbox? How can i reach there? I am talking about TomCat
4.1.18...

-Mensagem original-
De: Goehring, Chuck Mr., RCI - San Diego
[mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 14:22
Para: Tomcat Users List
Assunto: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

I spent a long time trying to manually setup Tomcat to run as a service.
Finally ended up re-installing and checking the little checkbox that makes
it usable as a service.  It is unchecked by default. Once it is installed,
you can change the account it executes as in the services thingy in control
panel.

Chuck

-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:11 AM
To: '[EMAIL PROTECTED]'
Subject: Bugs and weakness when Tomcat works a NT Service (tcservcfg)


Hi all,
there have been a nightmare since i ve decided to make TomCat 4.1.18 be a
Windows NT 4.0's Service.First of all, i ve the stuped idea of looking for a
program which could make it for me. So,  i found the nightmare main actor
-- tcservcfg and the second one -- windows!!!
Thus, i made the following steps:
1 - ...runned the main actor ( tcservcfg ) - OK!
2 -  started up the service - OK!
3 - test the environment - FAILURE!
NOW, THE NIGHTMARE begins
4 - Only the static pages are availables, so whenever my app tries to use
Result Sets, I get this error message:  

HTTP Status 500 - 

type Exception report

message 

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception 

java.lang.NullPointerException
at BancoServlet.recuperaTopicoAssunto(BancoServlet.java:413)
at BancoServlet.service(BancoServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
FilterChain.java:247)

LINE 413 points to a  resultset statement, see below:

ring query = Select * FROM DICAS WHERE ID_TOPICO =  + topico2;
  pstmt = con.prepareStatement(query);
  rs = pstmt.executeQuery();
  if ( !rs.next() ) 
 {   // -- THIS IS LINE 413 --
fechaconection( pstmt,rs,con);
chamadevolta =
getServletContext().getRequestDispatcher(/semconteudo.jsp);
chamadevolta.forward(request,response);
 }

5 - I ve tried to find something about permission but i didnt find anything.
6 - THE WORST: I stopped the service and tried to work as before --
starting TomCat by running startup.bat file. Unfortunatelly, TomCat doesnt
starts up ANYMORE !!!
7- Then, i ve disabled all TomCat's services
8- Tried step 6 again - FAILURE AGAIN
9 - Finally, i ve removed the Registry key of TomCat service.
10 -  Tried step 6 again - FAILURE AGAIN - it is a loop, isnt it...

Really, any single help will be appreciated...
Euclides.





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


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

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


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

-
To unsubscribe, e-mail: 

RE: Tomcat 5 error when starting

2003-10-21 Thread Shapira, Yoav

Howdy,
What JDK version are you using?  What parsers?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: David Liles [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 2:11 PM
To: [EMAIL PROTECTED]
Subject: Tomcat 5 error when starting

I just downloaded and installed version 5 and am getting the following
error when I attempt to start it for the first time:

ERROR] Digester - -Begin event threw error
java.lang.NoClassDefFoundError:
javax/xml/transform/Sourcejava.lang.NoClassDefFoundError:
javax/xml/transform/Source
 at
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.execute(M
bean
sDescriptorsDOMSource.java:130)
 at
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.loadDescr
ipto
rs(MbeansDescriptorsDOMSource.java:120)
 at org.apache.commons.modeler.Registry.load(Registry.java:819)
 at
org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:931)
 at
org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:909)
 at
org.apache.catalina.mbeans.MBeanUtils.createRegistry(MBeanUtils.java:16
46)
 at org.apache.catalina.mbeans.MBeanUtils.clinit(MBeanUtils.java:154)
 at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.clinit(Gl
obal
ResourcesLifecycleListener.java:112)
 at java.lang.Class.newInstance0(Native Method)
 at java.lang.Class.newInstance(Class.java:237)
 at
org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.jav
a:25
3)
 at org.apache.commons.digester.Rule.begin(Rule.java:200)
 at
org.apache.commons.digester.Digester.startElement(Digester.java:1273)
 at
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXPar
ser.
java:459)
 at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Abstra
ctX






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: JDBC Connection question

2003-10-21 Thread Wade Chandler
You can only run one transaction per connection.  So if you depend on
rollbacks or things of this nature this will become an issue.  Also,
your DBMS may support a limited number of threads per connection.  You
should find this out.  Also, if  you disconnect and reconnect from one
thread and another is performing work, or threads change some
non-protected(non thread safe) variables, then you'll have issues.

Wade

-Original Message-
From: Carlos Pereira [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 21, 2003 12:46 PM
To: Tomcat Users List
Subject: JDBC Connection question


Hi list,
my application currently uses ONE connection object to communicate with
the database. The connection is set with an initializer servlet
(load_on_stratup=0), and all users use that connection to retrieve data.

 Is this the best approach, or should i create a connection per user?
Why? Where can i know more?

 The security system works on top of the database, so that's not a
problem. I'm more concerned with performance and concurrency.

Regards and thanks,
Carlos Pereira

-
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: JDBC Connection question

2003-10-21 Thread Wade Chandler
Best to use a connection pool.  Look at the Data Sources in Tomcat.

Wade

-Original Message-
From: Carlos Pereira [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 21, 2003 12:46 PM
To: Tomcat Users List
Subject: JDBC Connection question


Hi list,
my application currently uses ONE connection object to communicate with
the database. The connection is set with an initializer servlet
(load_on_stratup=0), and all users use that connection to retrieve data.

 Is this the best approach, or should i create a connection per user?
Why? Where can i know more?

 The security system works on top of the database, so that's not a
problem. I'm more concerned with performance and concurrency.

Regards and thanks,
Carlos Pereira

-
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 error when starting

2003-10-21 Thread David Liles
I have j2sdk1.4.2.. as for parsers uh... were would I look for this info?

-Original Message- 
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Tue 10/21/2003 12:44 PM 
To: Tomcat Users List 
Cc: 
Subject: RE: Tomcat 5 error when starting




Howdy,
What JDK version are you using?  What parsers?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: David Liles [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 2:11 PM
To: [EMAIL PROTECTED]
Subject: Tomcat 5 error when starting

I just downloaded and installed version 5 and am getting the following
error when I attempt to start it for the first time:

ERROR] Digester - -Begin event threw error
java.lang.NoClassDefFoundError:
javax/xml/transform/Sourcejava.lang.NoClassDefFoundError:
javax/xml/transform/Source
 at
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.execute(M
bean
sDescriptorsDOMSource.java:130)
 at
org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.loadDescr
ipto
rs(MbeansDescriptorsDOMSource.java:120)
 at org.apache.commons.modeler.Registry.load(Registry.java:819)
 at
org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:931)
 at
org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:909)
 at
org.apache.catalina.mbeans.MBeanUtils.createRegistry(MBeanUtils.java:16
46)
 at org.apache.catalina.mbeans.MBeanUtils.clinit(MBeanUtils.java:154)
 at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.clinit(Gl
obal
ResourcesLifecycleListener.java:112)
 at java.lang.Class.newInstance0(Native Method)
 at java.lang.Class.newInstance(Class.java:237)
 at
org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.jav
a:25
3)
 at org.apache.commons.digester.Rule.begin(Rule.java:200)
 at
org.apache.commons.digester.Digester.startElement(Digester.java:1273)
 at
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXPar
ser.
java:459)
 at
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Abstra
ctX






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: Bugs and weakness when Tomcat works a NT Service (tcservcfg)

2003-10-21 Thread Goehring, Chuck Mr., RCI - San Diego
Jose,

Yes.  I'd rename the top level dir so you have your servlets, jsps and images saved.  
Otherwise, I'd zip it and copy it somewhere.

Chuck

-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:45 AM
To: 'Tomcat Users List'; Goehring, Chuck Mr., RCI - San Diego
Subject: RES: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Thank you, Chuck. I will do it! So, i should keep saved the existing
server.xml and web.xml files before the new installation starts, i guess...
Isnt it?
Euclides

-Mensagem original-
De: Goehring, Chuck Mr., RCI - San Diego
[mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 14:37
Para: Tomcat Users List
Assunto: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

Uninstall Tomcat.
Start the installer and one of the screens has a list of products (Tomcat,
Source etc) if you scroll down, there is and unchecked item that says to
install it as a service.  You must check this one to get it installed.  If
you are re-installing you also need to make sure it installs in the same
directory to prevent other problems.  

Once the installer completes you can run it as a service or disable the
service and use the startup.bat in the bin directory to start it from a
command prompt.  Sometimes this is desirable when debugging things that go
wrong at startup.

Chuck


-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:28 AM
To: 'Tomcat Users List'; Goehring, Chuck Mr., RCI - San Diego
Subject: RES: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Where is this checkbox? How can i reach there? I am talking about TomCat
4.1.18...

-Mensagem original-
De: Goehring, Chuck Mr., RCI - San Diego
[mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 14:22
Para: Tomcat Users List
Assunto: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

I spent a long time trying to manually setup Tomcat to run as a service.
Finally ended up re-installing and checking the little checkbox that makes
it usable as a service.  It is unchecked by default. Once it is installed,
you can change the account it executes as in the services thingy in control
panel.

Chuck

-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:11 AM
To: '[EMAIL PROTECTED]'
Subject: Bugs and weakness when Tomcat works a NT Service (tcservcfg)


Hi all,
there have been a nightmare since i ve decided to make TomCat 4.1.18 be a
Windows NT 4.0's Service.First of all, i ve the stuped idea of looking for a
program which could make it for me. So,  i found the nightmare main actor
-- tcservcfg and the second one -- windows!!!
Thus, i made the following steps:
1 - ...runned the main actor ( tcservcfg ) - OK!
2 -  started up the service - OK!
3 - test the environment - FAILURE!
NOW, THE NIGHTMARE begins
4 - Only the static pages are availables, so whenever my app tries to use
Result Sets, I get this error message:  

HTTP Status 500 - 

type Exception report

message 

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception 

java.lang.NullPointerException
at BancoServlet.recuperaTopicoAssunto(BancoServlet.java:413)
at BancoServlet.service(BancoServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
FilterChain.java:247)

LINE 413 points to a  resultset statement, see below:

ring query = Select * FROM DICAS WHERE ID_TOPICO =  + topico2;
  pstmt = con.prepareStatement(query);
  rs = pstmt.executeQuery();
  if ( !rs.next() ) 
 {   // -- THIS IS LINE 413 --
fechaconection( pstmt,rs,con);
chamadevolta =
getServletContext().getRequestDispatcher(/semconteudo.jsp);
chamadevolta.forward(request,response);
 }

5 - I ve tried to find something about permission but i didnt find anything.
6 - THE WORST: I stopped the service and tried to work as before --
starting TomCat by running startup.bat file. Unfortunatelly, TomCat doesnt
starts up ANYMORE !!!
7- Then, i ve disabled all TomCat's services
8- Tried step 6 again - FAILURE AGAIN
9 - Finally, i ve removed the Registry key of TomCat service.
10 -  Tried step 6 again - FAILURE AGAIN - it is a loop, isnt it...

Really, any single help will be appreciated...
Euclides.





-
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 

Re: Bugs and weakness when Tomcat works a NT Service (tcservcfg)

2003-10-21 Thread Ian Hunter
Also note that you have to adjust the registry key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Apache Tomcat
4.1\Parameters\JVM Library -- you have to make sure that's pointing to a
real copy of jvm.dll -- the default is c:\program
files\Java\j2rex.x.x\bin\client\jvm.dll and if that's not where you have
Java installed, all kinds of weird things will happen.


- Original Message - 
From: Goehring, Chuck Mr., RCI - San Diego
[EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 1:37 PM
Subject: RE: Bugs and weakness when Tomcat works a NT Service (tcservcfg)


Jose,

Uninstall Tomcat.
Start the installer and one of the screens has a list of products (Tomcat,
Source etc) if you scroll down, there is and unchecked item that says to
install it as a service.  You must check this one to get it installed.  If
you are re-installing you also need to make sure it installs in the same
directory to prevent other problems.

Once the installer completes you can run it as a service or disable the
service and use the startup.bat in the bin directory to start it from a
command prompt.  Sometimes this is desirable when debugging things that go
wrong at startup.

Chuck


-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:28 AM
To: 'Tomcat Users List'; Goehring, Chuck Mr., RCI - San Diego
Subject: RES: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Where is this checkbox? How can i reach there? I am talking about TomCat
4.1.18...

-Mensagem original-
De: Goehring, Chuck Mr., RCI - San Diego
[mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 14:22
Para: Tomcat Users List
Assunto: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

I spent a long time trying to manually setup Tomcat to run as a service.
Finally ended up re-installing and checking the little checkbox that makes
it usable as a service.  It is unchecked by default. Once it is installed,
you can change the account it executes as in the services thingy in control
panel.

Chuck

-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:11 AM
To: '[EMAIL PROTECTED]'
Subject: Bugs and weakness when Tomcat works a NT Service (tcservcfg)


Hi all,
there have been a nightmare since i ve decided to make TomCat 4.1.18 be a
Windows NT 4.0's Service.First of all, i ve the stuped idea of looking for a
program which could make it for me. So,  i found the nightmare main actor
-- tcservcfg and the second one -- windows!!!
Thus, i made the following steps:
1 - ...runned the main actor ( tcservcfg ) - OK!
2 -  started up the service - OK!
3 - test the environment - FAILURE!
NOW, THE NIGHTMARE begins
4 - Only the static pages are availables, so whenever my app tries to use
Result Sets, I get this error message:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

java.lang.NullPointerException
at BancoServlet.recuperaTopicoAssunto(BancoServlet.java:413)
at BancoServlet.service(BancoServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
FilterChain.java:247)

LINE 413 points to a  resultset statement, see below:

ring query = Select * FROM DICAS WHERE ID_TOPICO =  + topico2;
  pstmt = con.prepareStatement(query);
  rs = pstmt.executeQuery();
  if ( !rs.next() )
 {   // -- THIS IS LINE 413 --
fechaconection( pstmt,rs,con);
chamadevolta =
getServletContext().getRequestDispatcher(/semconteudo.jsp);
chamadevolta.forward(request,response);
 }

5 - I ve tried to find something about permission but i didnt find anything.
6 - THE WORST: I stopped the service and tried to work as before --
starting TomCat by running startup.bat file. Unfortunatelly, TomCat doesnt
starts up ANYMORE !!!
7- Then, i ve disabled all TomCat's services
8- Tried step 6 again - FAILURE AGAIN
9 - Finally, i ve removed the Registry key of TomCat service.
10 -  Tried step 6 again - FAILURE AGAIN - it is a loop, isnt it...

Really, any single help will be appreciated...
Euclides.





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


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

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


-
To unsubscribe, 

RE: Bugs and weakness when Tomcat works a NT Service (tcservcfg)

2003-10-21 Thread Goehring, Chuck Mr., RCI - San Diego


I got a mail loop error??

-Original Message-
From: Goehring, Chuck Mr., RCI - San Diego 
Sent: Tuesday, October 21, 2003 10:49 AM
To: 'Jose Euclides da Silva Junior - DATAPREVRJ'; 'Tomcat Users List'
Subject: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

Yes.  I'd rename the top level dir so you have your servlets, jsps and images saved.  
Otherwise, I'd zip it and copy it somewhere.

Chuck

-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:45 AM
To: 'Tomcat Users List'; Goehring, Chuck Mr., RCI - San Diego
Subject: RES: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Thank you, Chuck. I will do it! So, i should keep saved the existing
server.xml and web.xml files before the new installation starts, i guess...
Isnt it?
Euclides

-Mensagem original-
De: Goehring, Chuck Mr., RCI - San Diego
[mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 14:37
Para: Tomcat Users List
Assunto: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

Uninstall Tomcat.
Start the installer and one of the screens has a list of products (Tomcat,
Source etc) if you scroll down, there is and unchecked item that says to
install it as a service.  You must check this one to get it installed.  If
you are re-installing you also need to make sure it installs in the same
directory to prevent other problems.  

Once the installer completes you can run it as a service or disable the
service and use the startup.bat in the bin directory to start it from a
command prompt.  Sometimes this is desirable when debugging things that go
wrong at startup.

Chuck


-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:28 AM
To: 'Tomcat Users List'; Goehring, Chuck Mr., RCI - San Diego
Subject: RES: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Where is this checkbox? How can i reach there? I am talking about TomCat
4.1.18...

-Mensagem original-
De: Goehring, Chuck Mr., RCI - San Diego
[mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 14:22
Para: Tomcat Users List
Assunto: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

I spent a long time trying to manually setup Tomcat to run as a service.
Finally ended up re-installing and checking the little checkbox that makes
it usable as a service.  It is unchecked by default. Once it is installed,
you can change the account it executes as in the services thingy in control
panel.

Chuck

-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:11 AM
To: '[EMAIL PROTECTED]'
Subject: Bugs and weakness when Tomcat works a NT Service (tcservcfg)


Hi all,
there have been a nightmare since i ve decided to make TomCat 4.1.18 be a
Windows NT 4.0's Service.First of all, i ve the stuped idea of looking for a
program which could make it for me. So,  i found the nightmare main actor
-- tcservcfg and the second one -- windows!!!
Thus, i made the following steps:
1 - ...runned the main actor ( tcservcfg ) - OK!
2 -  started up the service - OK!
3 - test the environment - FAILURE!
NOW, THE NIGHTMARE begins
4 - Only the static pages are availables, so whenever my app tries to use
Result Sets, I get this error message:  

HTTP Status 500 - 

type Exception report

message 

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception 

java.lang.NullPointerException
at BancoServlet.recuperaTopicoAssunto(BancoServlet.java:413)
at BancoServlet.service(BancoServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
FilterChain.java:247)

LINE 413 points to a  resultset statement, see below:

ring query = Select * FROM DICAS WHERE ID_TOPICO =  + topico2;
  pstmt = con.prepareStatement(query);
  rs = pstmt.executeQuery();
  if ( !rs.next() ) 
 {   // -- THIS IS LINE 413 --
fechaconection( pstmt,rs,con);
chamadevolta =
getServletContext().getRequestDispatcher(/semconteudo.jsp);
chamadevolta.forward(request,response);
 }

5 - I ve tried to find something about permission but i didnt find anything.
6 - THE WORST: I stopped the service and tried to work as before --
starting TomCat by running startup.bat file. Unfortunatelly, TomCat doesnt
starts up ANYMORE !!!
7- Then, i ve disabled all TomCat's services
8- Tried step 6 again - FAILURE AGAIN
9 - Finally, i ve removed the Registry key of TomCat service.
10 -  Tried step 6 again - FAILURE AGAIN - it is a loop, isnt it...

Really, any single help will be appreciated...
Euclides.






RE: Unable to access shared network drives with Tomcat service

2003-10-21 Thread Goehring, Chuck Mr., RCI - San Diego
Joeri,

I think, a mapped drive can't be used for running as a service.  The mappings aren't 
seen by services because noone is logged in so no login script runs.  

Chuck



-Original Message-
From: Wade Chandler [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:45 AM
To: 'Tomcat Users List'
Subject: RE: Unable to access shared network drives with Tomcat service


Also remember that UNC in java should use forward slash(/) instead of
backward(\).  Use this or you'll get funny problems from UNC names and
file access.

Wade

-Original Message-
From: John Corrigan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 21, 2003 12:17 PM
To: Tomcat Users List
Subject: RE: Unable to access shared network drives with Tomcat service


Tomcat needs to be logged in as a user with permission to use the S:
drive. You might also need to use UNC paths instead of drive mappings.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 5:31 AM
To: [EMAIL PROTECTED]
Subject: Unable to access shared network drives with Tomcat service






Hi,

I am running Tomcat 4.1.27 as a Windows service in the Windows XP
operating system. I have a problem accessing network shared drives from
within my servlets and JSP-pages.

For instance, if S is a mapped drive pointing to something like a
shared network drive \\shared_server\shared_drive, then this scriplet
returns
false:

%
  java.io.File file = new java.io.File(S:/test.txt);
  boolean exists = file.exists();
  out.print(exists:  + exists);
%

The file test.txt does exist, but Tomcat does not see the shared
drive. Running Tomcat in command line mode (no service) does work!

I assume this has something to do with Windows network security?

Can anybody help me?

Thanks,

Joeri


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




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




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


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



RE: Tomcat 5 error when starting

2003-10-21 Thread Shapira, Yoav

Howdy,
Since you ask, you probably didn't change the default XML parsers.

The NoClassDefFound error means the version of
javax.xml.transform.Source found by the JVM at runtime is not the same
as that found in compile time.  Compile time in this case refers to the
jakarta-commons-modeler component's compile time.

You should never get this error out of the box, especially not on JDK
1.4.  You would get this error if you replaced the parsers that ship
with tomcat (in $CATALINA_HOME/common/lib) or those with the JDK (in
$JAVA_HOME/jre/lib/ext) with older or incompatible versions.

Yoav Shapira

I have j2sdk1.4.2.. as for parsers uh... were would I look for
this
info?
   Howdy,
   What JDK version are you using?  What parsers?

   java.lang.NoClassDefFoundError:
   javax/xml/transform/Sourcejava.lang.NoClassDefFoundError:
   javax/xml/transform/Source
at

org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.execut
e(M
   bean
   sDescriptorsDOMSource.java:130)
at

org.apache.commons.modeler.modules.MbeansDescriptorsDOMSource.loadDe
scr
   ipto
   rs(MbeansDescriptorsDOMSource.java:120)
at org.apache.commons.modeler.Registry.load(Registry.java:819)
at

org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:931
)
at

org.apache.commons.modeler.Registry.loadDescriptors(Registry.java:909
)
at

org.apache.catalina.mbeans.MBeanUtils.createRegistry(MBeanUtils.java
:16
   46)
at
org.apache.catalina.mbeans.MBeanUtils.clinit(MBeanUtils.java:154)
at

org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.clinit
(Gl
   obal
   ResourcesLifecycleListener.java:112)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at

org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.
jav
   a:25
   3)
at org.apache.commons.digester.Rule.begin(Rule.java:200)
at

org.apache.commons.digester.Digester.startElement(Digester.java:1273)
at

org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAX
Par
   ser.
   java:459)
at

org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Abs
tra
   ctX
   
   
   



   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]






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: Bugs and weakness when Tomcat works a NT Service (tcservcfg)

2003-10-21 Thread epyonne
Just a thought.  You can reinstall Tomcat to a different port, with the NT
Service checked.  Or better yet, go ahead and install the Tomcat 4.1.2x to a
different port.  This is a great opportunity to upgrade.  Put some of your
apps there for test runs.  If there is no issue, then move everything over
to the new installation.  After that, you can change the port number back.


- Original Message -
From: Jose Euclides da Silva Junior - DATAPREVRJ
[EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 12:45 PM
Subject: RES: Bugs and weakness when Tomcat works a NT Service (tcservcfg)


Thank you, Chuck. I will do it! So, i should keep saved the existing
server.xml and web.xml files before the new installation starts, i guess...
Isnt it?
Euclides

-Mensagem original-
De: Goehring, Chuck Mr., RCI - San Diego
[mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 14:37
Para: Tomcat Users List
Assunto: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

Uninstall Tomcat.
Start the installer and one of the screens has a list of products (Tomcat,
Source etc) if you scroll down, there is and unchecked item that says to
install it as a service.  You must check this one to get it installed.  If
you are re-installing you also need to make sure it installs in the same
directory to prevent other problems.

Once the installer completes you can run it as a service or disable the
service and use the startup.bat in the bin directory to start it from a
command prompt.  Sometimes this is desirable when debugging things that go
wrong at startup.

Chuck


-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:28 AM
To: 'Tomcat Users List'; Goehring, Chuck Mr., RCI - San Diego
Subject: RES: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Where is this checkbox? How can i reach there? I am talking about TomCat
4.1.18...

-Mensagem original-
De: Goehring, Chuck Mr., RCI - San Diego
[mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 14:22
Para: Tomcat Users List
Assunto: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

I spent a long time trying to manually setup Tomcat to run as a service.
Finally ended up re-installing and checking the little checkbox that makes
it usable as a service.  It is unchecked by default. Once it is installed,
you can change the account it executes as in the services thingy in control
panel.

Chuck

-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:11 AM
To: '[EMAIL PROTECTED]'
Subject: Bugs and weakness when Tomcat works a NT Service (tcservcfg)


Hi all,
there have been a nightmare since i ve decided to make TomCat 4.1.18 be a
Windows NT 4.0's Service.First of all, i ve the stuped idea of looking for a
program which could make it for me. So,  i found the nightmare main actor
-- tcservcfg and the second one -- windows!!!
Thus, i made the following steps:
1 - ...runned the main actor ( tcservcfg ) - OK!
2 -  started up the service - OK!
3 - test the environment - FAILURE!
NOW, THE NIGHTMARE begins
4 - Only the static pages are availables, so whenever my app tries to use
Result Sets, I get this error message:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

java.lang.NullPointerException
at BancoServlet.recuperaTopicoAssunto(BancoServlet.java:413)
at BancoServlet.service(BancoServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
FilterChain.java:247)

LINE 413 points to a  resultset statement, see below:

ring query = Select * FROM DICAS WHERE ID_TOPICO =  + topico2;
  pstmt = con.prepareStatement(query);
  rs = pstmt.executeQuery();
  if ( !rs.next() )
 {   // -- THIS IS LINE 413 --
fechaconection( pstmt,rs,con);
chamadevolta =
getServletContext().getRequestDispatcher(/semconteudo.jsp);
chamadevolta.forward(request,response);
 }

5 - I ve tried to find something about permission but i didnt find anything.
6 - THE WORST: I stopped the service and tried to work as before --
starting TomCat by running startup.bat file. Unfortunatelly, TomCat doesnt
starts up ANYMORE !!!
7- Then, i ve disabled all TomCat's services
8- Tried step 6 again - FAILURE AGAIN
9 - Finally, i ve removed the Registry key of TomCat service.
10 -  Tried step 6 again - FAILURE AGAIN - it is a loop, isnt it...

Really, any single help will be appreciated...
Euclides.





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

embedded tomcat 5

2003-10-21 Thread Mark W. Webb
I want to used tomcat 5 in the embedded format.  Are there any 
docs/suggestions/hints to doing this?  I especially want the source for 
this.  Should I just use the standart tomcat 5 source tarball?

thanks.

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


deserialization

2003-10-21 Thread Alkesh Badshah
I have a question about deserialization in Tomcat 4.1.

I've added the session replication code to server.xml from 
http://cvs.apache.org/~fhanik/index.html.

When a session is replicated, when do the session attributes get deserialized on the 
second server? Immediately upon replication? Or when it becomes necessary to use the 
attributes - say when a server goes offline.

Alkesh
-- 
__
Sign-up for your own personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
http://corp.mail.com/careers


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



RE: jk2 connector with apache 1.3 ?

2003-10-21 Thread Greg_Cope
Yes it can!

Greg

 -Original Message-
 From: Javier Sanchez Monzon [mailto:[EMAIL PROTECTED]
 Sent: 21 October 2003 10:12
 To: Tomcat Users List
 Subject: jk2 connector with apache 1.3 ? 
 
 
 Hi there, 
 
 i have only one question, 
 do you know if the jk2 connector can also be connected with 
 apache 1.3 ? 
 
 
 regards, 
 tino
 
 
 
 
 
 -
 This mail sent through IMP: http://horde.org/imp/
 
 
 -
 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]



parameter null if an equal sign in the value of the jsp:param?

2003-10-21 Thread Vladimer Shioshvili
Hello all,

I haven't had much luck locating any information regarding this. And I am 
not even sure if this is a right place for this question.

I am using Tomcat 4.0.6 and when passing a parameter with jsp:include if 
the value of the parameter contains an equal sign (=) parameter is absent 
(or null?) from the request of the included page.

Has anyone seen such a behavior?

Thanks,
Vlad

Vladimer Shioshvili
QRC Division of Macro International Inc.
7315 Wisconsin Avenue, Suite 400W
Bethesda, MD 20814
Phone: (301) 657 3077 ext. 155 

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


RE: cannot build jk on solaris

2003-10-21 Thread Greg_Cope
You need to autoconf tools etc.. to make a configure script (it is not there
by default).

I think one of the README's or other files explain this.

Probably best to download a binary from the apache site.

Greg

 -Original Message-
 From: Javier Sanchez Monzon [mailto:[EMAIL PROTECTED]
 Sent: 20 October 2003 14:20
 To: [EMAIL PROTECTED]
 Subject: cannot build jk on solaris
 
 
 hi
 
 I want to build jk2 from source, but i only can run the 
 ./configure command.  
 when i type make nothing hapens.  I only can see the 
 mod_jk2.c and mod_jk2.dsp 
 on apache13.  But noting about mod_jk.so
 
 
 regards, 
 
 Tino
 
 -
 This mail sent through IMP: http://horde.org/imp/
 
 
 -
 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: embedded tomcat 5

2003-10-21 Thread Mark W. Webb
looking at the directory:

http://ftp.epix.net/apache/jakarta/tomcat-5/v5.0.12-beta/bin/

there is more than one binary distribution.  You have deployer, embed 
and standard.

thank you for the help

Shapira, Yoav wrote:

Howdy,
The docs are in the Embedded class' javadoc:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/catalina/docs/api/org/ap
ache/catalina/startup/Embedded.html
It's largely the same for tomcat 5 as tomcat 4.  There are several
articles, references, etc online for using embedded tomcat 4: google.
It's the same distribution (binary or source).

Yoav Shapira
Millennium ChemInformatics
 

-Original Message-
From: Mark W. Webb [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 2:22 PM
To: Tomcat Users List
Subject: embedded tomcat 5
I want to used tomcat 5 in the embedded format.  Are there any
docs/suggestions/hints to doing this?  I especially want the source for
this.  Should I just use the standart tomcat 5 source tarball?
thanks.

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





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

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



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


RES: Bugs and weakness when Tomcat works a NT Service (tcservcfg)

2003-10-21 Thread Jose Euclides da Silva Junior - DATAPREVRJ
I will tried it, but i am afraid of unknowed changes done by Tcservcfg on
Windows register.
Since Tomcat isnt running anyway, i will reinstall it to the same port. One
question: Do you know how could i remove the remained Tomcat service?
Euclides.
-Mensagem original-
De: epyonne [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 15:13
Para: Tomcat Users List; [EMAIL PROTECTED]
Assunto: Re: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Just a thought.  You can reinstall Tomcat to a different port, with the NT
Service checked.  Or better yet, go ahead and install the Tomcat 4.1.2x to a
different port.  This is a great opportunity to upgrade.  Put some of your
apps there for test runs.  If there is no issue, then move everything over
to the new installation.  After that, you can change the port number back.


- Original Message -
From: Jose Euclides da Silva Junior - DATAPREVRJ
[EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 12:45 PM
Subject: RES: Bugs and weakness when Tomcat works a NT Service (tcservcfg)


Thank you, Chuck. I will do it! So, i should keep saved the existing
server.xml and web.xml files before the new installation starts, i guess...
Isnt it?
Euclides

-Mensagem original-
De: Goehring, Chuck Mr., RCI - San Diego
[mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 14:37
Para: Tomcat Users List
Assunto: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

Uninstall Tomcat.
Start the installer and one of the screens has a list of products (Tomcat,
Source etc) if you scroll down, there is and unchecked item that says to
install it as a service.  You must check this one to get it installed.  If
you are re-installing you also need to make sure it installs in the same
directory to prevent other problems.

Once the installer completes you can run it as a service or disable the
service and use the startup.bat in the bin directory to start it from a
command prompt.  Sometimes this is desirable when debugging things that go
wrong at startup.

Chuck


-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:28 AM
To: 'Tomcat Users List'; Goehring, Chuck Mr., RCI - San Diego
Subject: RES: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Where is this checkbox? How can i reach there? I am talking about TomCat
4.1.18...

-Mensagem original-
De: Goehring, Chuck Mr., RCI - San Diego
[mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 14:22
Para: Tomcat Users List
Assunto: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

I spent a long time trying to manually setup Tomcat to run as a service.
Finally ended up re-installing and checking the little checkbox that makes
it usable as a service.  It is unchecked by default. Once it is installed,
you can change the account it executes as in the services thingy in control
panel.

Chuck

-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:11 AM
To: '[EMAIL PROTECTED]'
Subject: Bugs and weakness when Tomcat works a NT Service (tcservcfg)


Hi all,
there have been a nightmare since i ve decided to make TomCat 4.1.18 be a
Windows NT 4.0's Service.First of all, i ve the stuped idea of looking for a
program which could make it for me. So,  i found the nightmare main actor
-- tcservcfg and the second one -- windows!!!
Thus, i made the following steps:
1 - ...runned the main actor ( tcservcfg ) - OK!
2 -  started up the service - OK!
3 - test the environment - FAILURE!
NOW, THE NIGHTMARE begins
4 - Only the static pages are availables, so whenever my app tries to use
Result Sets, I get this error message:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

java.lang.NullPointerException
at BancoServlet.recuperaTopicoAssunto(BancoServlet.java:413)
at BancoServlet.service(BancoServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
FilterChain.java:247)

LINE 413 points to a  resultset statement, see below:

ring query = Select * FROM DICAS WHERE ID_TOPICO =  + topico2;
  pstmt = con.prepareStatement(query);
  rs = pstmt.executeQuery();
  if ( !rs.next() )
 {   // -- THIS IS LINE 413 --
fechaconection( pstmt,rs,con);
chamadevolta =
getServletContext().getRequestDispatcher(/semconteudo.jsp);
chamadevolta.forward(request,response);
 }

5 - I ve tried to find something about permission but i didnt find anything.
6 - THE WORST: I stopped the service and tried to work as before --
starting TomCat by 

RE: embedded tomcat 5

2003-10-21 Thread Shapira, Yoav

Howdy,
The standard distribution should be fine.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Mark W. Webb [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 2:50 PM
To: Tomcat Users List
Subject: Re: embedded tomcat 5

looking at the directory:

http://ftp.epix.net/apache/jakarta/tomcat-5/v5.0.12-beta/bin/

there is more than one binary distribution.  You have deployer, embed
and standard.

thank you for the help


Shapira, Yoav wrote:

Howdy,
The docs are in the Embedded class' javadoc:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/catalina/docs/api/org/
ap
ache/catalina/startup/Embedded.html

It's largely the same for tomcat 5 as tomcat 4.  There are several
articles, references, etc online for using embedded tomcat 4: google.

It's the same distribution (binary or source).

Yoav Shapira
Millennium ChemInformatics




-Original Message-
From: Mark W. Webb [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 2:22 PM
To: Tomcat Users List
Subject: embedded tomcat 5

I want to used tomcat 5 in the embedded format.  Are there any
docs/suggestions/hints to doing this?  I especially want the source
for
this.  Should I just use the standart tomcat 5 source tarball?


thanks.


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






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


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






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



RES: Bugs and weakness when Tomcat works a NT Service (tcservcfg)

2003-10-21 Thread Goehring, Chuck Mr., RCI - San Diego
Jose,

Yes.  I'd rename the top level dir so you have your servlets, jsps and images saved.  
Otherwise, I'd zip it and copy it somewhere.

Chuck

-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:45 AM
To: 'Tomcat Users List'; Goehring, Chuck Mr., RCI - San Diego
Subject: RES: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Thank you, Chuck. I will do it! So, i should keep saved the existing
server.xml and web.xml files before the new installation starts, i guess...
Isnt it?
Euclides

-Mensagem original-
De: Goehring, Chuck Mr., RCI - San Diego
[mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 14:37
Para: Tomcat Users List
Assunto: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

Uninstall Tomcat.
Start the installer and one of the screens has a list of products (Tomcat,
Source etc) if you scroll down, there is and unchecked item that says to
install it as a service.  You must check this one to get it installed.  If
you are re-installing you also need to make sure it installs in the same
directory to prevent other problems.  

Once the installer completes you can run it as a service or disable the
service and use the startup.bat in the bin directory to start it from a
command prompt.  Sometimes this is desirable when debugging things that go
wrong at startup.

Chuck


-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:28 AM
To: 'Tomcat Users List'; Goehring, Chuck Mr., RCI - San Diego
Subject: RES: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Where is this checkbox? How can i reach there? I am talking about TomCat
4.1.18...

-Mensagem original-
De: Goehring, Chuck Mr., RCI - San Diego
[mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 14:22
Para: Tomcat Users List
Assunto: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

I spent a long time trying to manually setup Tomcat to run as a service.
Finally ended up re-installing and checking the little checkbox that makes
it usable as a service.  It is unchecked by default. Once it is installed,
you can change the account it executes as in the services thingy in control
panel.

Chuck

-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:11 AM
To: '[EMAIL PROTECTED]'
Subject: Bugs and weakness when Tomcat works a NT Service (tcservcfg)


Hi all,
there have been a nightmare since i ve decided to make TomCat 4.1.18 be a
Windows NT 4.0's Service.First of all, i ve the stuped idea of looking for a
program which could make it for me. So,  i found the nightmare main actor
-- tcservcfg and the second one -- windows!!!
Thus, i made the following steps:
1 - ...runned the main actor ( tcservcfg ) - OK!
2 -  started up the service - OK!
3 - test the environment - FAILURE!
NOW, THE NIGHTMARE begins
4 - Only the static pages are availables, so whenever my app tries to use
Result Sets, I get this error message:  

HTTP Status 500 - 

type Exception report

message 

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception 

java.lang.NullPointerException
at BancoServlet.recuperaTopicoAssunto(BancoServlet.java:413)
at BancoServlet.service(BancoServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
FilterChain.java:247)

LINE 413 points to a  resultset statement, see below:

ring query = Select * FROM DICAS WHERE ID_TOPICO =  + topico2;
  pstmt = con.prepareStatement(query);
  rs = pstmt.executeQuery();
  if ( !rs.next() ) 
 {   // -- THIS IS LINE 413 --
fechaconection( pstmt,rs,con);
chamadevolta =
getServletContext().getRequestDispatcher(/semconteudo.jsp);
chamadevolta.forward(request,response);
 }

5 - I ve tried to find something about permission but i didnt find anything.
6 - THE WORST: I stopped the service and tried to work as before --
starting TomCat by running startup.bat file. Unfortunatelly, TomCat doesnt
starts up ANYMORE !!!
7- Then, i ve disabled all TomCat's services
8- Tried step 6 again - FAILURE AGAIN
9 - Finally, i ve removed the Registry key of TomCat service.
10 -  Tried step 6 again - FAILURE AGAIN - it is a loop, isnt it...

Really, any single help will be appreciated...
Euclides.


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



UNIX+Apache+Tomcat Situtation

2003-10-21 Thread earle . flynn
Hello,
I have a situation where if a developer owns Tomcat 3 and stops/starts
server the apps on that server all j2ee web-apps run fine. If I as root or
'tomcat_user' or su to developer id stop/start Tomcat 3 then all j2ee
web-apps run except modules that produce .jpegs dynamically. In the latter
case Tomcat was setup so that the user who stop/started Tomcat owned all
file/directories.

My first response was to make all files/directories world
read,write,execute. It must be a UNIX permission thing right. Also I umask'd
and source'd the UNIX personal env of each user to be world
read,write,execute on any directories/files created but still no difference,
the graphs are not displayed. The graph libs are using JFreechart, btw. 

This is a long running issue and I would appreciate any help as I am not
sure if this is a UNIX or Tomcat or JFreechart issue. Any suggestions? Why
would I not be able to remotely log into box, su - to developer id and
stop/start Tomcat with all apps functioning? Also, developer's personal UNIX
acct is basic stock settings with no extra frills.

Regards,
Earle

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



Re: embedded tomcat 5

2003-10-21 Thread Jean-Francois Arcand


Shapira, Yoav wrote:

Howdy,
The docs are in the Embedded class' javadoc:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/catalina/docs/api/org/ap
ache/catalina/startup/Embedded.html
It's largely the same for tomcat 5 as tomcat 4.  There are several
articles, references, etc online for using embedded tomcat 4: google.
Or use the JMX way (only in Tomcat 5). The Embedded interface still 
work, but the JMX way is more easy (IMO).

-- Jeanfrancois


It's the same distribution (binary or source).

Yoav Shapira
Millennium ChemInformatics
 

-Original Message-
From: Mark W. Webb [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 2:22 PM
To: Tomcat Users List
Subject: embedded tomcat 5
I want to used tomcat 5 in the embedded format.  Are there any
docs/suggestions/hints to doing this?  I especially want the source for
this.  Should I just use the standart tomcat 5 source tarball?
thanks.

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





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

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



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


File writing performance

2003-10-21 Thread Carlos Pereira
I want to make a servlet which catches all accesses to *.swf files (with a mapping) 
and only retrieves them if the permissions for the user allow it.
That can be done simply with:

code
// check user permissions and redirect to error page if needed
// else:
response.setContentType(application/x-shockwave-flash);
DataInputStream dis = new DataInputStream(
  getServletContext().getResourceAsStream(filename)
);
OutputStream out = response.getOutputStream();
int b = -1;
while((b = dis.read()) != -1) {
  out.write(b);
}
out.close();
/code

My question: is this approach more expensive than simply retrieving the file? If so, 
is it significative?

Best regards,
Carlos Pereira

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



Re: UNIX+Apache+Tomcat Situtation

2003-10-21 Thread Daniel Gibby
What do you mean the developer owns Tomcat 3? His permissions are the 
owner of the tomcat directory or what?

Daniel Gibby

[EMAIL PROTECTED] wrote:

Hello,
I have a situation where if a developer owns Tomcat 3 and stops/starts
server the apps on that server all j2ee web-apps run fine. If I as root or
'tomcat_user' or su to developer id stop/start Tomcat 3 then all j2ee
web-apps run except modules that produce .jpegs dynamically. In the latter
case Tomcat was setup so that the user who stop/started Tomcat owned all
file/directories.
My first response was to make all files/directories world
read,write,execute. It must be a UNIX permission thing right. Also I umask'd
and source'd the UNIX personal env of each user to be world
read,write,execute on any directories/files created but still no difference,
the graphs are not displayed. The graph libs are using JFreechart, btw. 

This is a long running issue and I would appreciate any help as I am not
sure if this is a UNIX or Tomcat or JFreechart issue. Any suggestions? Why
would I not be able to remotely log into box, su - to developer id and
stop/start Tomcat with all apps functioning? Also, developer's personal UNIX
acct is basic stock settings with no extra frills.
Regards,
Earle
-
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: File writing performance

2003-10-21 Thread Wade Chandler
The main problem with performance comes from your source code.  You are
reading 1 byte at a time then writing 1 byte at a time.  Use a buffered
input stream, and also use a buffered output stream.  Then read and
write a good number of bytes.  Maybe use a static section so you can
change the number of bytes for the buffers with a  properties file.

Wade

-Original Message-
From: Carlos Pereira [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 21, 2003 3:10 PM
To: Tomcat Users List
Subject: File writing performance


I want to make a servlet which catches all accesses to *.swf files (with
a mapping) and only retrieves them if the permissions for the user allow
it. That can be done simply with:

code
// check user permissions and redirect to error page if needed // else:
response.setContentType(application/x-shockwave-flash);
DataInputStream dis = new DataInputStream(
  getServletContext().getResourceAsStream(filename)
);
OutputStream out = response.getOutputStream();
int b = -1;
while((b = dis.read()) != -1) {
  out.write(b);
}
out.close();
/code

My question: is this approach more expensive than simply retrieving the
file? If so, is it significative?

Best regards,
Carlos Pereira

-
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: UNIX+Apache+Tomcat Situtation

2003-10-21 Thread earle . flynn
Daniel,
Yes, the developer_id is the owner of the Tomcat directory.

Earle

-Original Message-
From: Daniel Gibby [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 3:10 PM
To: Tomcat Users List
Subject: Re: UNIX+Apache+Tomcat Situtation


What do you mean the developer owns Tomcat 3? His permissions are the 
owner of the tomcat directory or what?

Daniel Gibby

[EMAIL PROTECTED] wrote:

Hello,
I have a situation where if a developer owns Tomcat 3 and stops/starts
server the apps on that server all j2ee web-apps run fine. If I as root or
'tomcat_user' or su to developer id stop/start Tomcat 3 then all j2ee
web-apps run except modules that produce .jpegs dynamically. In the latter
case Tomcat was setup so that the user who stop/started Tomcat owned all
file/directories.

My first response was to make all files/directories world
read,write,execute. It must be a UNIX permission thing right. Also I
umask'd
and source'd the UNIX personal env of each user to be world
read,write,execute on any directories/files created but still no
difference,
the graphs are not displayed. The graph libs are using JFreechart, btw. 

This is a long running issue and I would appreciate any help as I am not
sure if this is a UNIX or Tomcat or JFreechart issue. Any suggestions? Why
would I not be able to remotely log into box, su - to developer id and
stop/start Tomcat with all apps functioning? Also, developer's personal
UNIX
acct is basic stock settings with no extra frills.

Regards,
Earle

-
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: Bugs and weakness when Tomcat works a NT Service (tcservcfg)

2003-10-21 Thread epyonne
The Tomcat download site has an executable file which is built with
InstallShield.  If you install Tomcat using that executable file, you should
have an Uninstall Tomcat option on your Start|Programs menu.  Or you can
always go to the Add/Remove Programs to remove it.

Hope this helps.


- Original Message -
From: Jose Euclides da Silva Junior - DATAPREVRJ
[EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 01:55 PM
Subject: RES: Bugs and weakness when Tomcat works a NT Service (tcservcfg)


I will tried it, but i am afraid of unknowed changes done by Tcservcfg on
Windows register.
Since Tomcat isnt running anyway, i will reinstall it to the same port. One
question: Do you know how could i remove the remained Tomcat service?
Euclides.
-Mensagem original-
De: epyonne [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 15:13
Para: Tomcat Users List; [EMAIL PROTECTED]
Assunto: Re: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Just a thought.  You can reinstall Tomcat to a different port, with the NT
Service checked.  Or better yet, go ahead and install the Tomcat 4.1.2x to a
different port.  This is a great opportunity to upgrade.  Put some of your
apps there for test runs.  If there is no issue, then move everything over
to the new installation.  After that, you can change the port number back.


- Original Message -
From: Jose Euclides da Silva Junior - DATAPREVRJ
[EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 12:45 PM
Subject: RES: Bugs and weakness when Tomcat works a NT Service (tcservcfg)


Thank you, Chuck. I will do it! So, i should keep saved the existing
server.xml and web.xml files before the new installation starts, i guess...
Isnt it?
Euclides

-Mensagem original-
De: Goehring, Chuck Mr., RCI - San Diego
[mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 14:37
Para: Tomcat Users List
Assunto: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

Uninstall Tomcat.
Start the installer and one of the screens has a list of products (Tomcat,
Source etc) if you scroll down, there is and unchecked item that says to
install it as a service.  You must check this one to get it installed.  If
you are re-installing you also need to make sure it installs in the same
directory to prevent other problems.

Once the installer completes you can run it as a service or disable the
service and use the startup.bat in the bin directory to start it from a
command prompt.  Sometimes this is desirable when debugging things that go
wrong at startup.

Chuck


-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:28 AM
To: 'Tomcat Users List'; Goehring, Chuck Mr., RCI - San Diego
Subject: RES: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Where is this checkbox? How can i reach there? I am talking about TomCat
4.1.18...

-Mensagem original-
De: Goehring, Chuck Mr., RCI - San Diego
[mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 21 de outubro de 2003 14:22
Para: Tomcat Users List
Assunto: RE: Bugs and weakness when Tomcat works a NT Service
(tcservcfg)


Jose,

I spent a long time trying to manually setup Tomcat to run as a service.
Finally ended up re-installing and checking the little checkbox that makes
it usable as a service.  It is unchecked by default. Once it is installed,
you can change the account it executes as in the services thingy in control
panel.

Chuck

-Original Message-
From: Jose Euclides da Silva Junior - DATAPREVRJ
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 21, 2003 10:11 AM
To: '[EMAIL PROTECTED]'
Subject: Bugs and weakness when Tomcat works a NT Service (tcservcfg)


Hi all,
there have been a nightmare since i ve decided to make TomCat 4.1.18 be a
Windows NT 4.0's Service.First of all, i ve the stuped idea of looking for a
program which could make it for me. So,  i found the nightmare main actor
-- tcservcfg and the second one -- windows!!!
Thus, i made the following steps:
1 - ...runned the main actor ( tcservcfg ) - OK!
2 -  started up the service - OK!
3 - test the environment - FAILURE!
NOW, THE NIGHTMARE begins
4 - Only the static pages are availables, so whenever my app tries to use
Result Sets, I get this error message:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

java.lang.NullPointerException
at BancoServlet.recuperaTopicoAssunto(BancoServlet.java:413)
at BancoServlet.service(BancoServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tion
FilterChain.java:247)

LINE 413 points to a  resultset 

  1   2   >