Re: SSL/Verisign Confusion

2003-09-05 Thread Bill Barker

Dave Wood [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Thanks Bill.  I think this highlights something I'm really not
 understanding...

 Didn't I generate an important private key somewhere along the line that
I
 can't just regenerate if I blow away my keystore?  I assumed the
certificate
 I got back from verisign would only work if I still had the original
private
 key I generated before sending them my request.  Is that wrong?


Of course you need your original private key.  A lapse on my part, since I
always use openssl to generate the CSR for VS :(.  If you used keytool to
generate the PK, then you'll have to extract it first.

 (I'll take a look at the link you sent...at first glance, it looks a
little
 hard to follow, but hopefully not).

 Thanks again.

 Dave

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker
 Sent: Thursday, September 04, 2003 11:06 PM
 To: [EMAIL PROTECTED]
 Subject: Re: SSL/Verisign Confusion


 Firstly, it looks like you should wipe you keystore and start again.  To
use
 a VS cert with Tomcat, the two options I know are:
 1) Follow the instructions at http://www.comu.de/docs/tomcat_ssl.htm.
 2) Using openssl or otherwise, convert your cert+key to a pkcs12 file, and
 use that as your keystore (remember to set 'keystoreType=pkcs12' on the
 Factory in server.xml).


 Dave Wood [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  I'm having a problem getting an SSL certificate from Verisign working
  correctly.  I'm going to include everything I can think of that MIGHT be
a
  problem.  Unfortunately, there are a couple things I can't quite
remember
  for certain.  Here's the situation:
 
  1. I generated the initial key using an alias other than tomcat (we'll
  call it company)
  2. I generated the CSR and sent it to verisign.  I still have this file.
  3. Verisign changed the company name during the verification process
(from
  an acronym to the full spelling of the name)
  4. I now have the certificate that they sent back after the validation
  process.
  5. One thing I can't account for is why when I see this:
 
  $ keytool -list
 
  Keystore type: jks
  Keystore provider: SUN
 
  Your keystore contains 4 entries: (...others removed...)
 
  company, Fri Aug 22 08:47:04 MDT 2003, trustedCertEntry,
  Certificate fingerprint (MD5):
  00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 (the numbers aren't
really
  0's)
 
  ...I think I must have self-signed or something (I was doing a couple of
  these things and don't recall exactly), but I'm surprised to see
  trustedCertEntry here.
 
  The problem I'm having is this:
 
  $ keytool -import -trustcacerts -alias company -file public.crt
  Enter keystore password: xxx
  keytool error: java.lang.Exception: Certificate not imported, alias
  company already exists
 
  (but I'm thinking it should be REPLACING this entry, so the fact that it
  exists shouldn't be a problem???)
 
  So, I have several questions:
 
  1. Am I hosed completely because I didn't use tomcat as the alias?
  2. How does the private key get stored exactly?  I assume that if I
delete
  the current entry for the company alias, I'll be losing the private
key,
  right?
  3. Can someone provide steps I should take to get this working given
what
 I
  have said above.
 
  Thanks so much in advance.  Sorry to be so long-winded.
 
  -Dave
  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003




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

 ---
 Incoming mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003

 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003




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



RE: SSL/Verisign Confusion

2003-09-05 Thread Dave Wood
OK, good...glad I'm not as confused as I thought. :)

Problem is...I don't see any way to extract a private key using keytool.
Perhaps I just need to look at openssl...I haven't used this tool yet.

Thanks, -dave

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker
Sent: Friday, September 05, 2003 12:18 AM
To: [EMAIL PROTECTED]
Subject: Re: SSL/Verisign Confusion



Dave Wood [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Thanks Bill.  I think this highlights something I'm really not
 understanding...

 Didn't I generate an important private key somewhere along the line that
I
 can't just regenerate if I blow away my keystore?  I assumed the
certificate
 I got back from verisign would only work if I still had the original
private
 key I generated before sending them my request.  Is that wrong?


Of course you need your original private key.  A lapse on my part, since I
always use openssl to generate the CSR for VS :(.  If you used keytool to
generate the PK, then you'll have to extract it first.

 (I'll take a look at the link you sent...at first glance, it looks a
little
 hard to follow, but hopefully not).

 Thanks again.

 Dave

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker
 Sent: Thursday, September 04, 2003 11:06 PM
 To: [EMAIL PROTECTED]
 Subject: Re: SSL/Verisign Confusion


 Firstly, it looks like you should wipe you keystore and start again.  To
use
 a VS cert with Tomcat, the two options I know are:
 1) Follow the instructions at http://www.comu.de/docs/tomcat_ssl.htm.
 2) Using openssl or otherwise, convert your cert+key to a pkcs12 file, and
 use that as your keystore (remember to set 'keystoreType=pkcs12' on the
 Factory in server.xml).


 Dave Wood [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  I'm having a problem getting an SSL certificate from Verisign working
  correctly.  I'm going to include everything I can think of that MIGHT be
a
  problem.  Unfortunately, there are a couple things I can't quite
remember
  for certain.  Here's the situation:
 
  1. I generated the initial key using an alias other than tomcat (we'll
  call it company)
  2. I generated the CSR and sent it to verisign.  I still have this file.
  3. Verisign changed the company name during the verification process
(from
  an acronym to the full spelling of the name)
  4. I now have the certificate that they sent back after the validation
  process.
  5. One thing I can't account for is why when I see this:
 
  $ keytool -list
 
  Keystore type: jks
  Keystore provider: SUN
 
  Your keystore contains 4 entries: (...others removed...)
 
  company, Fri Aug 22 08:47:04 MDT 2003, trustedCertEntry,
  Certificate fingerprint (MD5):
  00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 (the numbers aren't
really
  0's)
 
  ...I think I must have self-signed or something (I was doing a couple of
  these things and don't recall exactly), but I'm surprised to see
  trustedCertEntry here.
 
  The problem I'm having is this:
 
  $ keytool -import -trustcacerts -alias company -file public.crt
  Enter keystore password: xxx
  keytool error: java.lang.Exception: Certificate not imported, alias
  company already exists
 
  (but I'm thinking it should be REPLACING this entry, so the fact that it
  exists shouldn't be a problem???)
 
  So, I have several questions:
 
  1. Am I hosed completely because I didn't use tomcat as the alias?
  2. How does the private key get stored exactly?  I assume that if I
delete
  the current entry for the company alias, I'll be losing the private
key,
  right?
  3. Can someone provide steps I should take to get this working given
what
 I
  have said above.
 
  Thanks so much in advance.  Sorry to be so long-winded.
 
  -Dave
  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003




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

 ---
 Incoming mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003

 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003




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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003



Re: Memory leaks?

2003-09-05 Thread Nikola Milutinovic
 But depending on the DB, it can cause problems from the DB with too many
 open ResultSets... I had an issue with performance testing where everything
 but ResultSets were being closed and the Oracle DB started throwing errors
 after about 500 queries.  Better safe than sorry.

Well, from what I know, in general (not Oracle specific). If you open a connection 
within some scope (Servlet, JSP, any other class), then create a statement and finally 
a result set, shouldn't deleting the most upper scope cause all these lower levels 
be closed and garbage collected?

With Servlets and JSP, of course, you have no control whatsoever as to when they will 
be put out of service. But suppose you are tidy and do a close on the connection - 
shouldn't that clean-up the underlying Statement(s) and ResultSet(s)? Even with 
connection pooling, this should work.

Nix.

Re: Tomcat and multiple processors

2003-09-05 Thread Marco Tedone
It would be nice :)

- Original Message - 
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, September 05, 2003 12:07 AM
Subject: Re: Tomcat and multiple processors


 (1) Install TC as many times as you need JVM instances;
 (2) for each instance, rename home before proceeding with another
 installation eg.
 CATALINA_HOME_tc1=/path/to/tc1
 CATALINA_HOME_tc2=/path/to/tc2
 etc
 (3) for each inctance rename respective startup scripts eg
 startup_tc1.sh or catalina_tc1.sh
 startup_tc2.sh
 etc
 (4) modify workers.properties to include the loadbalancer worker eg
 worker.loadbalancer.type=lb
 worker.loadbalancer.balanced_worker=myTC1, myTC2, myTC3,...
 etc
 (5) go through your configuratioo fles to ensure consisency in re-naming
 worker to loadbalancer
 (6) should you need to tie a vhost to a specific JVM or box then instead
 of loadbalancer, use a worker eg myTC1
 eg.
 (httpd.conf)
 VirtualHost 192.16.100.10:80
   ServerName dodgy.programmer.com.hk
   ...
   JkMount /goodClass loadbalancer
   JkMount /goodClass/* loadbalancer
   JkMount /dodgyClass myTC1
   JkMount /DodgyClass/* myTC1
 /VirtualHost
 (7) In server.xml, ensure you have the corresponding virtual host and
 docbase
 (8) In web.xml, likewise ensure you have the corresponding mappings.

 Yoav, John, tomcat-people, if this is correct, do you need someone to
 write a howto ?



 Pitre, Russell wrote:
 
  Hey people..
 
  Where can i find more information on the web about this subject,
  specifically setting up multiple jvm's tied to it's respective tomcat
  installation?  Doesn't have to include multiple processors
 
  I'm very interested in this subject, basically, just curious as to how
  it all works  :)
 
  Thanx in advance!
  Russ
 
  -Original Message-
  From: John Turner [mailto:[EMAIL PROTECTED]
  Sent: Thursday, September 04, 2003 4:16 PM
  To: Tomcat Users List
  Subject: Re: Tomcat and multiple processors
 
  Matt Raible wrote:
 
   1.  Does it support multiple processors?  We have a Tomcat instance in
 
   production on a NT box with 4 processors, but Tomcat only seems to use
 
   one. Does the 1.4.2 JVM support MP?
 
  Yes, at least on Sun hardware with Solaris 8, and Intel hardware with RH
  Linux 7.x (duals only...we don't have quads).  Don't know about Windows.
 
   2.  We have IIS on the front end, and we are currently not able to
   migrate to Apache.  We'd like to use the connectors (jk or jk2) to do
   load-balancing and failover.  Do these connectors provide the support
   we need?  Should be use a clustering architecture like JavaSpaces
   (http://www.onjava.com/lpt/a/2422) instead?
 
  The connectors can load balance, but unfortunately the IIS versions are
  sort of a crapshoot in my mind.
 
   3.  We plan on deploying 42+ applications to a number of Tomcat
   servers. Since each application will support 1 customer - I think it's
 
   a good idea to have 1 app - 1 tomcat - so if Tomcat crashes, it only
   affects that customer
   - rather than all customers.  I've heard of setting up a CATALINA_BASE
  to
   share Tomcat's core files, and then setup webapps directories for each
   customer.  Does this sound reasonable?  Have have others done
  something like
   this?
 
  I agree with Yoav. All the way back with Tomcat 3.1 we had ours setup
  this way:
 
  1 virtual host = 1 Tomcat instance = 1 VM = 1 application
 
  We've had a couple dozen set up like this for a long time, works like a
  charm.  I prefer this over using CATALINA_BASE, as I can treat each
  virtual host separately from any other, including giving each different
  JVM memory settings, etc.  Admittedly, we're an ASP, so we can dictate
  how many web apps go with each virtual host, but I would think having
  completely separate Tomcat instances would make sense in most real
  production environments.  The only thing you lose with multiple Tomcat
  instances is disk space, and disk is cheap.
 
  John
 
  -
  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]



Setting up front page servlet to not use a redirect like Slashdot.org.

2003-09-05 Thread A. Zazula
Hello all,

Suppose I'm running slashdot.org except coded with Java instead of
Perl. I want the main page served by a servlet named index but without
any redirects. So when the user types

   http://slashdot.org/

into their browser and goes there they won't be redirected to
http://slashdot.org/index. The real slashdot.org doesn't automatically
redirect you to index.pl. You just see http://slashdot.org/ in your
location bar. So, I tried to set this up with Tomcat and have only
found a partial-solution that isn't completely satisfactory.

My application's web.xml contains

  !-- ... --
  servlet-mapping
servlet-nameindex/servlet-name
url-pattern//url-pattern
  /servlet-mapping

  servlet-mapping
servlet-namearticle/servlet-name
url-pattern/article/url-pattern
  /servlet-mapping
  !-- ... --

Then, I edited the site-wide web.xml in conf/ so that the default
servlet is no longer mapped to / but instead to the various types my
site uses like:
!-- ... --
servlet-mapping
servlet-namedefault/servlet-name
url-pattern*.gif/url-pattern
/servlet-mapping

servlet-mapping
servlet-namedefault/servlet-name
url-pattern*.css/url-pattern
/servlet-mapping
!-- ... --

If I don't do that then my images and css will no longer load. I
thought just simply making the change I made to my application's
web.xml would be sufficient, but apparently the meaning of
servlet-mapping to / isn't the intuitive thing of just mapping
requests for / to index and nothing else; it maps all other request
URIs not given servlet-mappings in those 2 web.xml files to the index
servlet instead of to the default servlet. That's what servlet-mapping
to something broader like /* or /**/* or something should do;
mapping to just / shouldn't give the effect it does. So if I do
http://localhost:8080/foo then I'll get the index servlet unless
foo=article or blah.gif, etc. I'd rather get a NOT FOUND message for
random URIs.

I suppose editing org.apache.catalina.servlets.DefaultServlet is a
possibilty, but there HAS to be a better approach! For example, can I
set up a default servlet that checks if the request is for / and if
it is then pass the request and response to the doGet (or doPost, as
the case may be) index servlet method? (And if it's not for / then pass
the request and response to the usual DefaultServlet method.)

This is frustrating! Any and all replies really appreciated. Thanks a
bunch!
 A.Z.

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Mac/zip stream problem

2003-09-05 Thread Jan Agermose
I started posting this on java newsgroup, as im not really sure it has anything to do 
with tomcat... but as no one replied I will give it a go here :-)

I have this webapplication, that lets You pick a list of pictures to
download. At the en you click on a link that says download and this url is
mapped to a servlet. The servlet looks up the pictures you selected and
prepares to send the pictures as a zip file to you. This is done by setting
the response content type to application/zip and wrapping the response
stream to a zipoutputstream and then writing entries to the zipoutputstream.

This works very good when ever the client browser is a windows/IE, but
whenever the browser reads mac/IE the download fails.

The top of the exception stacktrace:
java.net.SocketException: Connection reset
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:96)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
org.apache.catalina.connector.ResponseBase.flushBuffer(ResponseBase.java:675
)
at
org.apache.catalina.connector.HttpResponseBase.doFlushBuffer(HttpResponseBas
e.java:795)
at
org.apache.catalina.connector.HttpResponseBase.flushBuffer(HttpResponseBase.
java:785)
at
org.apache.catalina.connector.ResponseBase.write(ResponseBase.java:648)
at
org.apache.catalina.connector.ResponseStream.write(ResponseStream.java:313)
at
org.apache.catalina.connector.http.HttpResponseStream.write(HttpResponseStre
am.java:183)
at
java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:156)
at
java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:114)
at java.util.zip.ZipOutputStream.write(ZipOutputStream.java:261)
at dk.topix.pixdb.servlet.Tiffziper.writeEntry(Tiffziper.java:165)


the application is runing on a tomcat4.1/java1.4/linux box.

Any hints/ideas?

Jan Agermose



Re: Using jdk1.4 logger problem

2003-09-05 Thread Adam Hardy
On 09/05/2003 05:16 AM Bill Barker wrote:
But, some how the logger manager can't find the handler classes. (Class
loader problem?)
Yup, it's a CL problem.  Unfortunately, it looks like the problem is in
Sun's implementation of 1.4 Logging.  Instead of using the
ContextClassLoader, it's looking for your class in the AppClassLoader
(which, of course, knows nothing about your class :).
At the moment, the only work-around I can see is to place your jar in
$CATALINA_HOME/common/endorsed.  Of course, if it will make you feel better,
you can also b*tch at Sun for not designing their Logging implementation in
a way that is friendly to app-servers ;-).
Hi Bill,
have a similar problem. Bug 
http://issues.apache.org/bugzilla/show_bug.cgi?id=22852

My logging formatter class is not being found. It was found in 4.1.24 
but after upgrading to 4.1.27, the formatter class seemed to disappear 
off the radar for tomcat/java.

I have it in the common/lib directory.

I followed your advice to Kam Yuen and put my jar in the 
common/endorsed, and the class was found. I'd be happy to file this as a 
bug with Sun but I don't understand why you are sure it is Sun, and not 
Tomcat. After all, 4.1.24 worked.

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


RE: Unable to compile class for JSP

2003-09-05 Thread Schalk
Dave

What is the request you send to Tomcat, i.e. what is this JSP supposed to
accomplish?

Kind Regards
Schalk Neethling
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
 

:: -Original Message-
:: From: Dave Stoker [mailto:[EMAIL PROTECTED]
:: Sent: Friday, September 05, 2003 6:22 AM
:: To: [EMAIL PROTECTED]
:: Subject: Unable to compile class for JSP
:: 
:: Hi, After reading the archives I see this is not an uncommon error. I've
tried a couple
:: suggestions (of removing java.exe from the winnt/system32 directory as
well as
:: changing the JDK version from 1.4.1_03 to 1.4.1_05), but no luck. Any
help in
:: resolving this issue is greatly appreciated. Dave
:: 
:: 
:: 
:: HTTP Status 500 -
:: 
::


:: 
:: type Exception report
:: 
:: message
:: 
:: description The server encountered an internal error () that prevented it
from
:: fulfilling this request.
:: 
:: exception
:: 
:: org.apache.jasper.JasperException: Unable to compile class for JSP
:: 
:: An error occurred at line: -1 in the jsp file: null
:: 
:: Generated servlet error:
:: [javac] Compiling 1 source file
:: 
:: C:\Tomcat 4.1\work\Standalone\localhost\fst\jsp\heading_jsp.java:57:
:: handlePageException(java.lang.Exception) in javax.servlet.jsp.PageContext
cannot
:: be applied to (java.lang.Throwable)
::   if (pageContext != null) pageContext.handlePageException(t);
::   ^
:: 1 error
:: 
:: 
::  at
::
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle
r.java:
:: 130)
::  at
::
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:2
93)
::  at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
::  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
::  at
::
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4
73)
::  at
::
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1
90)
::  at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
::  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
::  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
::  at
::
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain
:: .java:247)
::  at
::
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:1
:: 93)
::  at
::
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:
:: 256)
::  at
::
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext
:: (StandardPipeline.java:643)
::  at
::
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
::  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
::  at
::
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:1
:: 91)
::  at
::
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext
:: (StandardPipeline.java:643)
::  at
::
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
::  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
::  at
::
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
::  at
::
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
::  at
::
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext
:: (StandardPipeline.java:643)
::  at
::
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:1
:: 71)
::  at
::
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext
:: (StandardPipeline.java:641)
::  at
::
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
::  at
::
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext
:: (StandardPipeline.java:641)
::  at
::
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
::  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
::  at
::
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174
:: )
::  at
::
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext
:: (StandardPipeline.java:643)
::  at
::
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
::  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
::  at
:: org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
::  at
::
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
::  at
::

RE: Unable to compile class for JSP

2003-09-05 Thread John Corrigan
Are you running Tomcat as a service?  If so, edit the registry and change
the path of the jvm.dll to the one in the server directory of your jsdk
installation.

-Original Message-
From: Dave Stoker [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 9:22 PM
To: [EMAIL PROTECTED]
Subject: Unable to compile class for JSP


Hi, After reading the archives I see this is not an uncommon error. I've
tried a couple suggestions (of removing java.exe from the winnt/system32
directory as well as changing the JDK version from 1.4.1_03 to 1.4.1_05),
but no luck. Any help in resolving this issue is greatly appreciated. Dave



HTTP Status 500 -




type Exception report

message

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

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
[javac] Compiling 1 source file

C:\Tomcat 4.1\work\Standalone\localhost\fst\jsp\heading_jsp.java:57:
handlePageException(java.lang.Exception) in javax.servlet.jsp.PageContext
cannot be applied to (java.lang.Throwable)
  if (pageContext != null) pageContext.handlePageException(t);
  ^
1 error


at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle
r.java:130)
at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:2
93)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4
73)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1
90)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
at java.lang.Thread.run(Thread.java:536)




How to use classes from another webapp/context?

2003-09-05 Thread Ulrich Mayring
Hello,

I know that Tomcat has seperate classloaders for each webapp, but what I 
would like to do is have JSPs in one webapp and the classes they use in 
another. I tried enabling the crossContext feature for the relevant 
contexts, but that didn't work, the classes weren't found.

Background: we have editors, who write and deploy JSP files, and 
programmers, who write and deploy classes used by JSP files. I would 
like to have the editors manage their webapps with the JSP files via the 
HTML manager and the programmers to do the same for their webapps.

I know that I could put the classes under the shared directory, but then 
they would not be in a webapp anymore and thus management via the HTML 
manager would not work anymore. Tomcat would need to be restarted on 
every change.

I could also have the programmers give JAR files to the editors and have 
the editors deploy them with their webapps, but then the classes would 
be duplicated across many webapps and also I don't want the editors 
handling JAR files.

Is there any solution?

Thanks in advance for any pointers,

Ulrich



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


Cannot shutdown Tomcat gracefully

2003-09-05 Thread Krause Karin
Hello,

I saw that bug in the bug database
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20663

I also receive this exception with Tomcat 4.1.27 and Solaris.
I'm just wondering why this bug has the Severity Blocker.
Can someone tell me about the consequences of this bug?
Are there any severe consequences (I mean like the session
will not be serialized)

Thanks in advance
Regards Karin



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



IIS mod_jk and tomcat 4.1.18 issue

2003-09-05 Thread Tobias Kieninger
Hi,

i installed iis 5.0 with iis_redirect.dll and tomcat 4.1.18. This
configuration uses Coyote/JK2 AJP 1.3 Connector and works two times without
reasonable problems.

On a third server a _few_ Clients have Problems getting any results.
Partly JSP works but images aren´t displayed. On Refresh a few images are
shown but other are vanished.

With these Clients i get strange Messages in the isapi_redirect.log:

[Fri Sep 05 10:56:55 2003]  [jk_uri_worker_map.c (391)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 -
/context/
[Fri Sep 05 10:56:55 2003]  [jk_isapi_plugin.c (617)]: HttpFilterProc
[/context/configure.js] is a servlet url - should redirect to ajp13
[Fri Sep 05 10:56:55 2003]  [jk_isapi_plugin.c (639)]: HttpFilterProc check
if [/context/configure.js] is points to the web-inf directory
[Fri Sep 05 10:56:55 2003]  [jk_isapi_plugin.c (679)]: HttpExtensionProc
started
[Fri Sep 05 10:56:55 2003]  [jk_worker.c (123)]: Into wc_get_worker_for_name
ajp13
[Fri Sep 05 10:56:55 2003]  [jk_worker.c (127)]: wc_get_worker_for_name,
done  found a worker
[Fri Sep 05 10:56:55 2003]  [jk_isapi_plugin.c (701)]: HttpExtensionProc got
a worker for name ajp13
[Fri Sep 05 10:56:55 2003]  [jk_ajp13_worker.c (865)]: Into
jk_worker_t::get_endpoint
[Fri Sep 05 10:56:55 2003]  [jk_ajp13_worker.c (775)]: Into
jk_endpoint_t::service
[Fri Sep 05 10:56:55 2003]  [jk_ajp13.c (403)]: Into ajp13_marshal_into_msgb
[Fri Sep 05 10:56:55 2003]  [jk_ajp13.c (447)]: Error
ajp13_marshal_into_msgb - Error appending the header value
[Fri Sep 05 10:56:55 2003]  [jk_isapi_plugin.c (716)]: HttpExtensionProc
error, service() failed
[Fri Sep 05 10:56:55 2003]  [jk_ajp13_worker.c (549)]: Into
jk_endpoint_t::done
[Fri Sep 05 10:56:55 2003]  [jk_isapi_plugin.c (555)]: HttpFilterProc starte

Thanks in advance
Tobias


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



Re: Migrating from JServ to Tomcat 4.0

2003-09-05 Thread Tim Funk
You'll have the same problem moving to any other servlet compliant engine. 
Making the change now (as painful as it could be) will be well worth the effort.

-Tim

Pradeep Gummi wrote:

Thank you Filip, 
I can get the classes working in Tomcat if I place them in the WEB-INF 
Classes folder and set the mapping in the web.xml. But I do not want to 
change the directory structure of the classes that existed in the JServ 
Installation and make the Tomcat identify those classes which are not 
present in the CATALINA_HOME. 
Any solutions for this problem
thanks
pradeep gummi

- Original Message -
From: Filip Hanik [EMAIL PROTECTED]
Date: Thursday, September 4, 2003 5:18 pm
Subject: Re: Migrating from JServ to Tomcat 4.0

you have to choices:

1. Do a proper migration, ie convert your webapp to a real 
webapp with
WEB-INF so that you load your classes - this is the recommended 
method,because there is no other way to map servlets, other than 
web.xml
2. Put all your classes in TOMCAT_HOME/common/classes, the classes 
will now
be available to all webapps - not recommended
you will still need a web.xml if you have servlets

Filip

- Original Message -
From: Pradeep Gummi [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 1:51 PM
Subject: Migrating from JServ to Tomcat 4.0
Hello all,
I have a web application deployed in JServ. Now I would like to 
migratethe application to Tomcat 4.0 with out disturbing the existing
directory structure. Since JServ doesnt have web.xml and has the
following jserv.conf and jserv.properties files and also doesnt have
any WEB-INF as per the latest sun specs.
I dont want to change the existing directory structure of the classes
and would like to load classes in to the web application from this
directory structure that is outside CATALINA_HOME.
Any suggestions for this problem.
thanks
pradeep



---
--
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 and multiple processors

2003-09-05 Thread Fred Kreek
Just one TC is enough, just run it with different CATALINA_BASES.
each base needs the following directories:
$CATALINA_BASE/conf - configuration files
$CATALINA_BASE/work
$CATALINA_BASE/temp
$CATALINA_BASE/logs
i've made a little script like this: (bash script)

for DIR in * ; do
  SITE=`expr $SITES : $dirname'/\(.*\)-server.xml$'`
  $TOMCAT_SCRIPT -thread $SITE $@
done
At 08:40 05/09/03, you wrote:
It would be nice :)

- Original Message -
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, September 05, 2003 12:07 AM
Subject: Re: Tomcat and multiple processors
 (1) Install TC as many times as you need JVM instances;
 (2) for each instance, rename home before proceeding with another
 installation eg.
 CATALINA_HOME_tc1=/path/to/tc1
 CATALINA_HOME_tc2=/path/to/tc2
 etc
 (3) for each inctance rename respective startup scripts eg
 startup_tc1.sh or catalina_tc1.sh
 startup_tc2.sh
 etc
 (4) modify workers.properties to include the loadbalancer worker eg
 worker.loadbalancer.type=lb
 worker.loadbalancer.balanced_worker=myTC1, myTC2, myTC3,...
 etc
 (5) go through your configuratioo fles to ensure consisency in re-naming
 worker to loadbalancer
 (6) should you need to tie a vhost to a specific JVM or box then instead
 of loadbalancer, use a worker eg myTC1
 eg.
 (httpd.conf)
 VirtualHost 192.16.100.10:80
   ServerName dodgy.programmer.com.hk
   ...
   JkMount /goodClass loadbalancer
   JkMount /goodClass/* loadbalancer
   JkMount /dodgyClass myTC1
   JkMount /DodgyClass/* myTC1
 /VirtualHost
 (7) In server.xml, ensure you have the corresponding virtual host and
 docbase
 (8) In web.xml, likewise ensure you have the corresponding mappings.

 Yoav, John, tomcat-people, if this is correct, do you need someone to
 write a howto ?



 Pitre, Russell wrote:
 
  Hey people..
 
  Where can i find more information on the web about this subject,
  specifically setting up multiple jvm's tied to it's respective tomcat
  installation?  Doesn't have to include multiple processors
 
  I'm very interested in this subject, basically, just curious as to how
  it all works  :)
 
  Thanx in advance!
  Russ
 
  -Original Message-
  From: John Turner [mailto:[EMAIL PROTECTED]
  Sent: Thursday, September 04, 2003 4:16 PM
  To: Tomcat Users List
  Subject: Re: Tomcat and multiple processors
 
  Matt Raible wrote:
 
   1.  Does it support multiple processors?  We have a Tomcat instance in
 
   production on a NT box with 4 processors, but Tomcat only seems to use
 
   one. Does the 1.4.2 JVM support MP?
 
  Yes, at least on Sun hardware with Solaris 8, and Intel hardware with RH
  Linux 7.x (duals only...we don't have quads).  Don't know about Windows.
 
   2.  We have IIS on the front end, and we are currently not able to
   migrate to Apache.  We'd like to use the connectors (jk or jk2) to do
   load-balancing and failover.  Do these connectors provide the support
   we need?  Should be use a clustering architecture like JavaSpaces
   (http://www.onjava.com/lpt/a/2422) instead?
 
  The connectors can load balance, but unfortunately the IIS versions are
  sort of a crapshoot in my mind.
 
   3.  We plan on deploying 42+ applications to a number of Tomcat
   servers. Since each application will support 1 customer - I think it's
 
   a good idea to have 1 app - 1 tomcat - so if Tomcat crashes, it only
   affects that customer
   - rather than all customers.  I've heard of setting up a CATALINA_BASE
  to
   share Tomcat's core files, and then setup webapps directories for each
   customer.  Does this sound reasonable?  Have have others done
  something like
   this?
 
  I agree with Yoav. All the way back with Tomcat 3.1 we had ours setup
  this way:
 
  1 virtual host = 1 Tomcat instance = 1 VM = 1 application
 
  We've had a couple dozen set up like this for a long time, works like a
  charm.  I prefer this over using CATALINA_BASE, as I can treat each
  virtual host separately from any other, including giving each different
  JVM memory settings, etc.  Admittedly, we're an ASP, so we can dictate
  how many web apps go with each virtual host, but I would think having
  completely separate Tomcat instances would make sense in most real
  production environments.  The only thing you lose with multiple Tomcat
  instances is disk space, and disk is cheap.
 
  John
 
-There are 10 types of people when it comes to binary, those that 
understand it.. and those who don't.

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


Re: Sharing of JSP pages across multiple web apps

2003-09-05 Thread Tim Funk
Why? Thats one to complain to the spec people about.

You can use Bill's idea of symlinks.

My preference is to use the build process to make copies of the pages from a 
central repository.

Another alternative is to precompile those common jsps and place them into 
a JAR and alter web.xml with the jsp declarations as appropriate.

-Tim

Ashutosh Satyam wrote:

Is it possible to share JSP page across multiple web-application within tomcat 
servlet container? Something like the libraries, which we want to share across
multiple web application can be placed under the shared directory of tomcat.

If it's not possible, why it has been not designed like that?



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


Re: Tomcat and multiple processors

2003-09-05 Thread Fred Kreek
Sorry for that last mail, accidently sent the file. Here is the normal one

Just one TC is enough, just run it with different CATALINA_BASES.
each base needs the following directories:
$CATALINA_BASE/conf - configuration files
$CATALINA_BASE/work
$CATALINA_BASE/temp
$CATALINA_BASE/logs
i've made a little script something like this: (bash script)

for DIR in * ; do
  if [ -d $DIR ] ; then
CATALINA_BASE=$DIR
CATALINA_PRG start
  fi
done
(not exactly, because i have different versions running with different.)

fred

At 08:40 05/09/03, you wrote:
It would be nice :)

- Original Message -
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, September 05, 2003 12:07 AM
Subject: Re: Tomcat and multiple processors
 (1) Install TC as many times as you need JVM instances;
 (2) for each instance, rename home before proceeding with another
 installation eg.
 CATALINA_HOME_tc1=/path/to/tc1
 CATALINA_HOME_tc2=/path/to/tc2
 etc
 (3) for each inctance rename respective startup scripts eg
 startup_tc1.sh or catalina_tc1.sh
 startup_tc2.sh
 etc
 (4) modify workers.properties to include the loadbalancer worker eg
 worker.loadbalancer.type=lb
 worker.loadbalancer.balanced_worker=myTC1, myTC2, myTC3,...
 etc
 (5) go through your configuratioo fles to ensure consisency in re-naming
 worker to loadbalancer
 (6) should you need to tie a vhost to a specific JVM or box then instead
 of loadbalancer, use a worker eg myTC1
 eg.
 (httpd.conf)
 VirtualHost 192.16.100.10:80
   ServerName dodgy.programmer.com.hk
   ...
   JkMount /goodClass loadbalancer
   JkMount /goodClass/* loadbalancer
   JkMount /dodgyClass myTC1
   JkMount /DodgyClass/* myTC1
 /VirtualHost
 (7) In server.xml, ensure you have the corresponding virtual host and
 docbase
 (8) In web.xml, likewise ensure you have the corresponding mappings.

 Yoav, John, tomcat-people, if this is correct, do you need someone to
 write a howto ?



 Pitre, Russell wrote:
 
  Hey people..
 
  Where can i find more information on the web about this subject,
  specifically setting up multiple jvm's tied to it's respective tomcat
  installation?  Doesn't have to include multiple processors
 
  I'm very interested in this subject, basically, just curious as to how
  it all works  :)
 
  Thanx in advance!
  Russ
 
  -Original Message-
  From: John Turner [mailto:[EMAIL PROTECTED]
  Sent: Thursday, September 04, 2003 4:16 PM
  To: Tomcat Users List
  Subject: Re: Tomcat and multiple processors
 
  Matt Raible wrote:
 
   1.  Does it support multiple processors?  We have a Tomcat instance in
 
   production on a NT box with 4 processors, but Tomcat only seems to use
 
   one. Does the 1.4.2 JVM support MP?
 
  Yes, at least on Sun hardware with Solaris 8, and Intel hardware with RH
  Linux 7.x (duals only...we don't have quads).  Don't know about Windows.
 
   2.  We have IIS on the front end, and we are currently not able to
   migrate to Apache.  We'd like to use the connectors (jk or jk2) to do
   load-balancing and failover.  Do these connectors provide the support
   we need?  Should be use a clustering architecture like JavaSpaces
   (http://www.onjava.com/lpt/a/2422) instead?
 
  The connectors can load balance, but unfortunately the IIS versions are
  sort of a crapshoot in my mind.
 
   3.  We plan on deploying 42+ applications to a number of Tomcat
   servers. Since each application will support 1 customer - I think it's
 
   a good idea to have 1 app - 1 tomcat - so if Tomcat crashes, it only
   affects that customer
   - rather than all customers.  I've heard of setting up a CATALINA_BASE
  to
   share Tomcat's core files, and then setup webapps directories for each
   customer.  Does this sound reasonable?  Have have others done
  something like
   this?
 
  I agree with Yoav. All the way back with Tomcat 3.1 we had ours setup
  this way:
 
  1 virtual host = 1 Tomcat instance = 1 VM = 1 application
 
  We've had a couple dozen set up like this for a long time, works like a
  charm.  I prefer this over using CATALINA_BASE, as I can treat each
  virtual host separately from any other, including giving each different
  JVM memory settings, etc.  Admittedly, we're an ASP, so we can dictate
  how many web apps go with each virtual host, but I would think having
  completely separate Tomcat instances would make sense in most real
  production environments.  The only thing you lose with multiple Tomcat
  instances is disk space, and disk is cheap.
 
  John
 



There are 10 types of people when it comes to binary, those that 
understand it.. and those who don't.


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


Is server.xml a standard J2EE config file

2003-09-05 Thread Agarwal, Naresh
Hi 

Is server.xml file used by Tomcat a stanard configuration files used in J2EE App 
Servers or it is something specific to Tomcat?

thanks,
Naresh

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



Re: Memory leaks?

2003-09-05 Thread Tim Funk
The JDBC spec states that when a connection is closed, all dependent assets 
should also be closed. So if you are using a pool, make sure your pool is 
compliant since the connection is never closed until the pool closes it.

When garbage collection runs is a whole different story. But its just good 
coding to close your ResultSet, Statements as soon as your done with them.

-Tim

Nikola Milutinovic wrote:

But depending on the DB, it can cause problems from the DB with too many
open ResultSets... I had an issue with performance testing where everything
but ResultSets were being closed and the Oracle DB started throwing errors
after about 500 queries.  Better safe than sorry.


Well, from what I know, in general (not Oracle specific). If you open a connection within some scope (Servlet, JSP, any other class), then create a statement and finally a result set, shouldn't deleting the most upper scope cause all these lower levels be closed and garbage collected?

With Servlets and JSP, of course, you have no control whatsoever as to when they will be put out of service. But suppose you are tidy and do a close on the connection - shouldn't that clean-up the underlying Statement(s) and ResultSet(s)? Even with connection pooling, this should work.

Nix.




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


Re: Is server.xml a standard J2EE config file

2003-09-05 Thread Tim Funk
Its something specific to tomcat.

-Tim

Agarwal, Naresh wrote:

Hi 

Is server.xml file used by Tomcat a stanard configuration files used in J2EE App Servers or it is something specific to Tomcat?

thanks,
Naresh


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


AW: Memory leaks?

2003-09-05 Thread Rademacher Tobias
As far as I know the Oracle JDBC driver does not follow the specificiation.
You should close your all objects in the following order:

1) ResultSet
2) Statement
3) Connection

 -Ursprüngliche Nachricht-
 Von: Tim Funk [mailto:[EMAIL PROTECTED]
 Gesendet am: Freitag, 5. September 2003 13:02
 An: Tomcat Users List
 Betreff: Re: Memory leaks?
 
 The JDBC spec states that when a connection is closed, all 
 dependent assets 
 should also be closed. So if you are using a pool, make sure 
 your pool is 
 compliant since the connection is never closed until the pool 
 closes it.
 
 When garbage collection runs is a whole different story. But 
 its just good 
 coding to close your ResultSet, Statements as soon as your 
 done with them.
 
 -Tim
 
 Nikola Milutinovic wrote:
 
 But depending on the DB, it can cause problems from the DB 
 with too many
 open ResultSets... I had an issue with performance testing 
 where everything
 but ResultSets were being closed and the Oracle DB started 
 throwing errors
 after about 500 queries.  Better safe than sorry.
  
  
  Well, from what I know, in general (not Oracle specific). 
 If you open a connection within some scope (Servlet, JSP, any 
 other class), then create a statement and finally a result 
 set, shouldn't deleting the most upper scope cause all these 
 lower levels be closed and garbage collected?
  
  With Servlets and JSP, of course, you have no control 
 whatsoever as to when they will be put out of service. But 
 suppose you are tidy and do a close on the connection - 
 shouldn't that clean-up the underlying Statement(s) and 
 ResultSet(s)? Even with connection pooling, this should work.
  
  Nix.
  
  
 
 
 -
 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: [OT] Realizing a search functionality

2003-09-05 Thread John Turner
AFAIK, Lucene indexes files.  How then, do you index a dynamic site? 
The only files that exist on a dynamic site are source code files. 
Servlets would never be indexed...how then do you index the content 
returned from the servlet?  Can Lucene do this?

The Lucene site is pretty sparse in information.  Not having worked with 
it, and not knowing every option available when using it, I think there 
might be some other alternatives.  I've used Verity in the past, but 
that is a commercial product.  The other tool I've used in the past to 
great success is Atomz (http://www.atomz.com).  The trial is 
never-ending, so an index of up to 500 pages is free.  Pages also = 
URL.  The nice thing about Atomz is that it will spider your site and 
index the content returned, thus it works quite well for dynamic sites.

In other words, it will take a URL like 
http://your.domain.com/content.jsp?id=512view=full; and index the 
content returned from that, not the actual text string of the URL.

The only requirement is that you display the Atomz logo on the search 
results page.  You can pay a small annual fee to have that removed.  All 
indexes and collections are kept on the Atomz site, not yours, and you 
can define the stylesheet and template that is used to display the 
search results, as well as define the frequency of indexing.

John

Schalk wrote:
Marco

You may to have a look at Lucene (OpenSource Jakarata project) at:
http://jakarta.apache.org/lucene/docs/index.html
Kind Regards
Schalk Neethling
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
 

:: -Original Message-
:: From: Marco Tedone [mailto:[EMAIL PROTECTED]
:: Sent: Friday, September 05, 2003 12:32 AM
:: To: Tomcat Users List
:: Subject: [OT] Realizing a search functionality
:: 
:: Hi, I must admit that I don't know anything about how to realize a search
:: functionality. The only thing that I know is that most sites have a
search
:: functionality which, when searching for something, return a list of links
:: more or less involved in the search string.
:: 
:: The only things I know are:
:: 
:: 1) An index of the web site contents should be created somehow
:: 2) The search 'action' (I'm talking in Struts terms, but I think it could
be
:: anything) should interact with this index to match the required string
:: 3) A list (which form does it assume) containing all the links related to
:: the query string should be created, eventually read and displayed to the
:: client
:: 
:: Did anyone of you realized succesfully a search functionality in its
site?
:: Could you please address me towards some good software (possibly
:: open-source, possibly Jakarta, possibly java-oriented) and  patterns to
use
:: to realize  a search functionality?
:: 
:: Many thanks,
:: 
:: Marco
:: 
:: 
:: 
:: 
:: -
:: 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: [OT] Realizing a search functionality

2003-09-05 Thread Ulrich Mayring
John Turner wrote:
AFAIK, Lucene indexes files.  How then, do you index a dynamic site? The 
only files that exist on a dynamic site are source code files. Servlets 
would never be indexed...how then do you index the content returned from 
the servlet?  Can Lucene do this?
Lucene is not a search engine, but an API for writing a search engine, 
so it can do everything that you can write in Java. By itself it does 
nothing, like the JDK.

In my case I've implemented a search engine that gets local files and 
hands them to the Lucene Indexer, but that could also be implemented so 
that it retrieves files via HTTP.

I can only recommend Lucene, it is vastly superior to any pre-packaged 
search engine, because you do not depend on specific features or 
behavior, but can customize everything to your needs.

Ulrich



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


reloading web.xml

2003-09-05 Thread Jason Jesso
I have noticed that Tomcat will see any changes in web.xml for a 
particular webapp without restarting the server.

But I have seen a few times where it doesn't reload the update to 
web.xml for my webapp.

Is this normal?  Or is there a way to get Tomcat to reload web.xml on 
every change to it?

Thanks
Jason
--
jason/


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


Re: [OT] Realizing a search functionality

2003-09-05 Thread Tim Funk
Lucene indexes documents. A document is composed of fields and does not 
need (and it actuually is not) to be a physical file.

In the simplistic example of a site consisting of a single dynamic web page 
backed by a database. You would create documents based on the database data 
where the db data goes into named fields. Then when you construct your query, 
it will return a list of documents. When you iterate through each document, 
you need to pull the appropriate field out of the document to reconstruct the 
appropriate URL.

In a nutshell, it can do what you want, but there is a lot of setup work to 
construct documents and a lot of work to display results from documents from 
queries.

-Tim

John Turner wrote:

AFAIK, Lucene indexes files.  How then, do you index a dynamic site? The 
only files that exist on a dynamic site are source code files. Servlets 
would never be indexed...how then do you index the content returned from 
the servlet?  Can Lucene do this?

The Lucene site is pretty sparse in information.  Not having worked with 
it, and not knowing every option available when using it, I think there 
might be some other alternatives.  

John



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


Re: Apache Tomcat Performance Handbook

2003-09-05 Thread John Turner
That's why...they're no longer being printed.  Anything you see on 
shelves or in stores is backstock.  Peer Information Services, which 
owned Wrox and several other publishing houses (like Friends of Ed) 
liquidated in March, 2003.

Apress and Wiley picked up most of the assetsthe books that will be 
supported will be reprinted using Apress and Wiley covers and get a new 
ISBN.  A perfect example of this is Beginning Java Objects by Jacquie 
Barker...it was a very popular Wrox book, it is now available as an 
Apress book with a different cover, different typesetting, different 
editorial team, etc.  The content is the same, and the copyright is 
still 2000.

Soif you see a Wrox book at full price, you can probably deal with 
the seller to get a discount if one isn't already offered.  The sad 
thing is, the authors will never see any of that money, so if you really 
want to support the authors and encourage similar titles, buy the Apress 
or Wiley version instead.

John

Darryl L. Pierce wrote:

John Turner wrote:

The book was never published.  The original publisher (Wrox) went out 
of business and liquidated assets.


Was this recently? Just this past weekend I picked up a Wrox press book 
(Java Data) and it was 50% off. All of their books at Borders were 50% off.



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


RE: Using jndi to get a DBCP BasicDataSource give ClassCastException

2003-09-05 Thread Angus Mezick
I did an I got BasicDataSource.
--Angus

 -Original Message-
 From: Adam Hardy [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 05, 2003 4:19 AM
 To: Tomcat Users List
 Subject: Re: Using jndi to get a DBCP BasicDataSource give 
 ClassCastException
 
 
 Hi Angus,
 looked at your first mail and couldn't see anything wrong 
 with it. I can 
 only suggest that you do some debugging, like output the 
 .getClass().getName() from the datasource, to see what it 
 really thinks 
 it is.
 
 Adam
 
 On 09/04/2003 10:27 PM Angus Mezick wrote:
  Anyone have a clue as to whether or not this is a Real bug, 
 or am I just
  screwing something up?
  
  
 -Original Message-
 From: Angus Mezick 
 Sent: Wednesday, September 03, 2003 4:32 PM
 To: [EMAIL PROTECTED]
 Subject: Using jndi to get a DBCP BasicDataSource give 
 ClassCastException
 
 
 I am having problems with the GlobalNamingResources.  If I 
 put my two DB
 resource entries into the GlobalNamingResources section and just use
 Resource-Links to access them I cannot cast from DataSource to
 BasicDataSource.. I need to do this to use this line in my 
 monitoring
 app: (I can still use the Datasources to get talk to the 
 DB, just not
 recast it from the interface to the concrete class)
 
 pageContext.getOut().println( jdbc/CommerceDB:  Active:  +
 ((BasicDataSource)ds).getNumActive() +  Idle:  +
 ((BasicDataSource)ds).getNumIdle() + br);
 
 If I define the resources directly in the Context everything 
 works fine.
 ARGH!  Here is my server.xml snippets:
 
 GlobalNamingResources
 Resource name=jdbc/SessionDBGlobal auth=Container
 type=javax.sql.DataSource/
 Resource name=jdbc/CommerceDBGlobal auth=Container
 type=javax.sql.DataSource/
 ResourceParams name=jdbc/SessionDBGlobal
 parameter
 namefactory/name
 
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 parameter
 namemaxActive/name
 value100/value
 /parameter
 parameter
 namemaxIdle/name
 value5/value
 /parameter
 parameter
 namemaxWait/name
 value1/value
 /parameter
 parameter
 nameusername/name
 value/value
 /parameter
 parameter
 namepassword/name
 value/value
 /parameter
 parameter
 namedriverClassName/name
 valuecom.inet.tds.TdsDriver/value
 /parameter
 parameter
 nameurl/name
 valuejdbc:inetdae7a:IPADDR/value
 /parameter
 parameter
 namevalidationQuery/name
 valueselect top 1 name from
 syscolumns/value
 /parameter
 parameter
 nameremoveAbandoned/name
 valuetrue/value
 /parameter
 parameter
 nameremoveAbandonedTimeout/name
 value300/value
 /parameter
 parameter
 namelogAbandoned/name
 valuetrue/value
 /parameter
 parameter
 
 nametimeBetweenEvictionRunsMillis/name
 value6/value
 /parameter
 parameter
 nametestOnBorrow/name
 valuetrue/value
 /parameter
 parameter
 nametestWhileIdle/name
 valuetrue/value
 /parameter
 /ResourceParams
 ResourceParams name=jdbc/CommerceDBGlobal
 parameter
 namefactory/name
 
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 parameter
 namemaxActive/name
 value100/value
 /parameter
 parameter
 namemaxIdle/name
 value5/value
 /parameter
 parameter
 namemaxWait/name
 value1/value
 

Re: Memory leaks?

2003-09-05 Thread John Turner
Tim Funk wrote:

The JDBC spec states that when a connection is closed, all dependent 
assets should also be closed. So if you are using a pool, make sure your 
pool is compliant since the connection is never closed until the pool 
closes it.
So, that means that if you have a pool of ten connections, and you use 
each of those ten connections ten times with 2 ResultSets, you have 200 
ResultSets sitting in memory, assuming you don't close them yourself?

John



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


Re: How to use classes from another webapp/context?

2003-09-05 Thread Pradeep Gummi
Hi Ulrich,
I think you should get them working by placing the classes in the 
CATALINA_HOME/common/classes folder or the jars in the lib folder. This 
would share the classes in all web apps. There you would be giving the 
information of the catalina and system class loaders. 

grant codeBase file:${catalina.home}/common/- {
  permission java.security.AllPermission;
};
I am not sure if this is what you want. Actually I am trying to use 
classes from outside catalina.home and am trying to figure out if that 
is practically possible. Please update me if you have any solutions

thanks
pradeep 

- Original Message -
From: Ulrich Mayring [EMAIL PROTECTED]
Date: Friday, September 5, 2003 4:19 am
Subject: How to use classes from another webapp/context?

 Hello,
 
 I know that Tomcat has seperate classloaders for each webapp, but 
 what I 
 would like to do is have JSPs in one webapp and the classes they 
 use in 
 another. I tried enabling the crossContext feature for the 
 relevant 
 contexts, but that didn't work, the classes weren't found.
 
 Background: we have editors, who write and deploy JSP files, and 
 programmers, who write and deploy classes used by JSP files. I 
 would 
 like to have the editors manage their webapps with the JSP files 
 via the 
 HTML manager and the programmers to do the same for their webapps.
 
 I know that I could put the classes under the shared directory, 
 but then 
 they would not be in a webapp anymore and thus management via the 
 HTML 
 manager would not work anymore. Tomcat would need to be restarted 
 on 
 every change.
 
 I could also have the programmers give JAR files to the editors 
 and have 
 the editors deploy them with their webapps, but then the classes 
 would 
 be duplicated across many webapps and also I don't want the 
 editors 
 handling JAR files.
 
 Is there any solution?
 
 Thanks in advance for any pointers,
 
 Ulrich
 
 
 
 ---
 --
 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: [OT] Realizing a search functionality

2003-09-05 Thread John Turner
Thanks for the clarification.

John

Tim Funk wrote:

Lucene indexes documents. A document is composed of fields and does 
not need (and it actuually is not) to be a physical file.

In the simplistic example of a site consisting of a single dynamic web 
page backed by a database. You would create documents based on the 
database data where the db data goes into named fields. Then when you 
construct your query, it will return a list of documents. When you 
iterate through each document, you need to pull the appropriate field 
out of the document to reconstruct the appropriate URL.

In a nutshell, it can do what you want, but there is a lot of setup work 
to construct documents and a lot of work to display results from 
documents from queries.

-Tim

John Turner wrote:

AFAIK, Lucene indexes files.  How then, do you index a dynamic site? 
The only files that exist on a dynamic site are source code files. 
Servlets would never be indexed...how then do you index the content 
returned from the servlet?  Can Lucene do this?

The Lucene site is pretty sparse in information.  Not having worked 
with it, and not knowing every option available when using it, I think 
there might be some other alternatives. 
John



-
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: Memory leaks?

2003-09-05 Thread Tim Funk
It depends. If your webapp calls connection.close(), then the result sets 
*should* be closed.

But that is based one of the following assumptions:
- Your connection is the actual db connection and the driver is JDBC compliant
- The connection is a facade to the actual connection for the sake of using a 
database connection pool. And the facade is smart enough to close all 
dependent assets on that connection for you.

I *try* to make my programmers only have one statement and result set open at 
a time per connection. If a second statement or result set needs opened, they 
should either close the existing resources or open another connection. They 
must always close ANYTHING they open.

-Tim

John Turner wrote:

Tim Funk wrote:

The JDBC spec states that when a connection is closed, all dependent 
assets should also be closed. So if you are using a pool, make sure 
your pool is compliant since the connection is never closed until the 
pool closes it.


So, that means that if you have a pool of ten connections, and you use 
each of those ten connections ten times with 2 ResultSets, you have 200 
ResultSets sitting in memory, assuming you don't close them yourself?

John


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


Re: [OT] Realizing a search functionality

2003-09-05 Thread John Turner
Ulrich Mayring wrote:

Lucene is not a search engine, but an API for writing a search engine, 
so it can do everything that you can write in Java. By itself it does 
nothing, like the JDK.
Thanks for the clarification.

I can only recommend Lucene, it is vastly superior to any pre-packaged 
search engine, because you do not depend on specific features or 
behavior, but can customize everything to your needs.
Assuming you have time, money, skills, etc. to do so, which is not 
always the case.

John



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


Re: How to use classes from another webapp/context?

2003-09-05 Thread Ulrich Mayring
Pradeep Gummi wrote:
Hi Ulrich,
I think you should get them working by placing the classes in the 
CATALINA_HOME/common/classes folder or the jars in the lib folder. This 
would share the classes in all web apps. There you would be giving the 
information of the catalina and system class loaders. 
I put the classes in CATALINA_HOME/shared/lib and 
CATALINA_HOME/shared/classes, which is where the Tomcat docs suggest I 
should put classes to share between all webapps.

However, I cannot update the classes now without restarting Tomcat, 
therefore I would like to have the classes in their own webapps, so they 
could be selectively deployed and undeployed.

Ulrich



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


servlet execution when updating web.xml

2003-09-05 Thread Jason Jesso
Hi:

I have a servlet which adds servlet config to web.xml.  It seems that 
I get a servlet exception.  If I reload it the servlet then it works.

I think Tomcat stops execution of servlets while it is reloading 
web.xml.Is this the case?  If so, is there anyway around this?

Thanks again,
Jason
--
jason/


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


RE: Cannot shutdown Tomcat gracefully

2003-09-05 Thread Shapira, Yoav

Howdy,
People assign priorities when they submit issues.  People also tend to
exaggerate the importance of their own bugs.  You should consider it
more on a personal level, i.e. is it a blocker to you?  Likely not.  And
no, it does not affect session serialization.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Krause Karin [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 4:54 AM
To: '[EMAIL PROTECTED]'
Subject: Cannot shutdown Tomcat gracefully

Hello,

I saw that bug in the bug database
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20663

I also receive this exception with Tomcat 4.1.27 and Solaris.
I'm just wondering why this bug has the Severity Blocker.
Can someone tell me about the consequences of this bug?
Are there any severe consequences (I mean like the session
will not be serialized)

Thanks in advance
Regards Karin



-
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: [OT] Realizing a search functionality

2003-09-05 Thread Ulrich Mayring
John Turner wrote:
Ulrich Mayring wrote:

I can only recommend Lucene, it is vastly superior to any pre-packaged 
search engine, because you do not depend on specific features or 
behavior, but can customize everything to your needs.
Assuming you have time, money, skills, etc. to do so, which is not 
always the case.
Skills is the key issue. It took me all of one week to write our own 
custom search engine and I doubt that anyone would be able to install 
and configure a third-party product any faster than that. I had no prior 
exposure to Lucene, but of course knew my way around Java.

So, I don't think time and money are factors here at all. BTW, the guy 
who originally wrote Lucene is now developing an OpenSource version of 
Google with major financial backing. So you can see that there is some 
serious technology behind Lucene and IMHO it's worth to learn it.

Ulrich



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


When does tomcat notice a newly deployed war file?

2003-09-05 Thread Roy Smith
I've got Tomcat-4.1.24 running on Linux.

I built a new war file and copied it to my webapps directory.  
According to my Tomcat book, Once Tomcat notices the file, it will 
unpack it  I guess the question is, what do I need to do to make 
Tomcat notice it?  Nothing seems to be happening, and there's nothing 
in the log files.  Is there something I need to do to prod Tomcat into 
noticing the new file?

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


Re: [OT] Realizing a search functionality

2003-09-05 Thread John Turner
Ulrich Mayring wrote:

John Turner wrote:

Ulrich Mayring wrote:

I can only recommend Lucene, it is vastly superior to any 
pre-packaged search engine, because you do not depend on specific 
features or behavior, but can customize everything to your needs.


Assuming you have time, money, skills, etc. to do so, which is not 
always the case.


Skills is the key issue. It took me all of one week to write our own 
custom search engine and I doubt that anyone would be able to install 
and configure a third-party product any faster than that. I had no prior 
exposure to Lucene, but of course knew my way around Java.
Hmmm...I had Atomz working for several clients by lunch one day. ;) I'm 
not arguing, just emphasizing that some of us are not Java developers. 
Granted, the question was somewhat in a context of using Java and not 
using Tomcat, but not every Tomcat user is a developer.

John



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


RE: SSL/Verisign Confusion

2003-09-05 Thread Jay Garala
Try the Java keytool help:
 http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html

Tomcat how-to:
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html

If you have OpenSSL:
 http://forum.java.sun.com/thread.jsp?forum=2thread=4240

Jay
-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 1:04 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks Bill.  I think this highlights something I'm really not
understanding...

Didn't I generate an important private key somewhere along the line that I
can't just regenerate if I blow away my keystore?  I assumed the certificate
I got back from verisign would only work if I still had the original private
key I generated before sending them my request.  Is that wrong?

(I'll take a look at the link you sent...at first glance, it looks a little
hard to follow, but hopefully not).

Thanks again.

Dave

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker
Sent: Thursday, September 04, 2003 11:06 PM
To: [EMAIL PROTECTED]
Subject: Re: SSL/Verisign Confusion


Firstly, it looks like you should wipe you keystore and start again.  To use
a VS cert with Tomcat, the two options I know are:
1) Follow the instructions at http://www.comu.de/docs/tomcat_ssl.htm.
2) Using openssl or otherwise, convert your cert+key to a pkcs12 file, and
use that as your keystore (remember to set 'keystoreType=pkcs12' on the
Factory in server.xml).


Dave Wood [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I'm having a problem getting an SSL certificate from Verisign working
 correctly.  I'm going to include everything I can think of that MIGHT be a
 problem.  Unfortunately, there are a couple things I can't quite remember
 for certain.  Here's the situation:

 1. I generated the initial key using an alias other than tomcat (we'll
 call it company)
 2. I generated the CSR and sent it to verisign.  I still have this file.
 3. Verisign changed the company name during the verification process (from
 an acronym to the full spelling of the name)
 4. I now have the certificate that they sent back after the validation
 process.
 5. One thing I can't account for is why when I see this:

 $ keytool -list

 Keystore type: jks
 Keystore provider: SUN

 Your keystore contains 4 entries: (...others removed...)

 company, Fri Aug 22 08:47:04 MDT 2003, trustedCertEntry,
 Certificate fingerprint (MD5):
 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 (the numbers aren't really
 0's)

 ...I think I must have self-signed or something (I was doing a couple of
 these things and don't recall exactly), but I'm surprised to see
 trustedCertEntry here.

 The problem I'm having is this:

 $ keytool -import -trustcacerts -alias company -file public.crt
 Enter keystore password: xxx
 keytool error: java.lang.Exception: Certificate not imported, alias
 company already exists

 (but I'm thinking it should be REPLACING this entry, so the fact that it
 exists shouldn't be a problem???)

 So, I have several questions:

 1. Am I hosed completely because I didn't use tomcat as the alias?
 2. How does the private key get stored exactly?  I assume that if I delete
 the current entry for the company alias, I'll be losing the private key,
 right?
 3. Can someone provide steps I should take to get this working given what
I
 have said above.

 Thanks so much in advance.  Sorry to be so long-winded.

 -Dave
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003




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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003


-
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: [OT] Realizing a search functionality

2003-09-05 Thread Louise Pryor

On Friday, September 5, 2003 at 1:20:00 PM, John Turner wrote:

snip
JT   The other tool I've used in the past to
JT great success is Atomz (http://www.atomz.com).  The trial is 
JT never-ending, so an index of up to 500 pages is free.  Pages also = 
JT URL.  The nice thing about Atomz is that it will spider your site and 
JT index the content returned, thus it works quite well for dynamic sites.

JT In other words, it will take a URL like 
JT http://your.domain.com/content.jsp?id=512view=full; and index the 
JT content returned from that, not the actual text string of the URL.

snip

I use atomz, because it's free. There are a couple of issues with it:

- the template for the search results is pretty hard to get right.
- because of the spidering, session tracking through the URL is not a
good idea. It gets up to the limit of 500 *very* quickly, as the
session id part of the URL makes it think that it's a whole new page.
Luckily my web site isn't really dependent on sessions, so I was able
to get round that (but it does mean that I can't use the struts
rewriting tags...).

Otherwise I'm very happy with atomz.

-- 
Louise Pryor
http://www.louisepryor.com



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



Re: forward error

2003-09-05 Thread Maxime Colas des Francs
Hi

thks for your response, but here is my code, i don't understand where the 
response is commited !

_

%@ page contentType=text/html; charset=iso-8859-1 language=java 
errorPage=/error_jsp.jsp%
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
%@ taglib prefix=log uri=http://jakarta.apache.org/taglibs/log-1.0; %
%@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; %

sql:query var=ctcRow
   SELECT DISTINCT email FROM ctc ORDER by email
/sql:query
c:forEach items=${ctcRow.rows} var=row

log:info category='%= request.getRemoteUser() %'
   c:out value=${row.email}/
/log:info
/c:forEach

jsp:forward page=/index.jsp/

___

if i put a autoFlush=false in page directive and a % out.flush(); % 
just before the forward i have a bufferOverflow ...



At 16:00 2003-09-04 -0400, you wrote:
More information ...
http://jakarta.apache.org/tomcat/faq/misc.html#illegalstate
-Tim
Shapira, Yoav wrote:
Howdy,
Both errors are fairly clear and essentially the same.  You can't
forward or redirect a response that's been committed, i.e. written to.
If you're going to forward or redirect a response, you must do so before
writing to the response.  You can read the JavaDoc for
HttpServletResponse#sendRedirect and RequestDispatcher#forward.
Yoav Shapira
Millennium ChemInformatics

-Original Message-
From: Maxime Colas des Francs [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 3:37 PM
To: [EMAIL PROTECTED]
Subject: forward error
Hi,

- If at the end of on of a jsp file, i put a jsp:forward, i have this
:

java.lang.IllegalStateException: Error: Attempt to clear a buffer
that's

already been flushed
at
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:
415)

at org.apache.jsp.test_ps_jsp._jspService(test_ps_jsp.java:448)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
...
- if i put a c:redirect, i have this :
java.lang.IllegalStateException
at
org.apache.catalina.connector.HttpResponseFacade.sendRedirect(HttpRespo
nseF

acade.java:173)
at
org.apache.taglibs.standard.tag.common.core.RedirectSupport.doEndTag(Re
dire

ctSupport.java:151)
at
org.apache.jsp.test_ps_jsp._jspx_meth_c_redirect_1(test_ps_jsp.java:123
3)

at org.apache.jsp.test_ps_jsp._jspService(test_ps_jsp.java:453)
...
- if i put nothing, i have no error ...

sombdy can help me to understand this error ?

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


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


RE: forward error

2003-09-05 Thread Allen Hadden

It could be in one of your tag libraries, but you probably thought of that already.  :)

I've also seen cases where it's the generated servlet that has out.println calls 
before the redirect.  Perhaps it's the newline character after the %.  Try putting 
all of the directives (page and taglib) on the same line.  For example:

%@ page contentType=...%%@ taglib ... %

You may also want to try looking at the .java file that gets generated to see what's 
going on.

Allen

 -Original Message-
 From: Maxime Colas des Francs [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 05, 2003 9:39 AM
 To: Tomcat Users List
 Subject: Re: forward error
 
 
 Hi
 
 thks for your response, but here is my code, i don't 
 understand where the 
 response is commited !
 
 _
 
 %@ page contentType=text/html; charset=iso-8859-1 language=java 
 errorPage=/error_jsp.jsp%
 %@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
 %@ taglib prefix=log 
 uri=http://jakarta.apache.org/taglibs/log-1.0; %
 %@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; %
 
 sql:query var=ctcRow
 SELECT DISTINCT email FROM ctc ORDER by email
 /sql:query
 
 c:forEach items=${ctcRow.rows} var=row
 
  log:info category='%= request.getRemoteUser() %'
 c:out value=${row.email}/
  /log:info
 
 /c:forEach
 
 jsp:forward page=/index.jsp/
 
 ___
 
 if i put a autoFlush=false in page directive and a % 
 out.flush(); % 
 just before the forward i have a bufferOverflow ...
 
 
 
 At 16:00 2003-09-04 -0400, you wrote:
 More information ...
 http://jakarta.apache.org/tomcat/faq/misc.html#illegalstate
 -Tim
 
 Shapira, Yoav wrote:
 Howdy,
 Both errors are fairly clear and essentially the same.  You can't
 forward or redirect a response that's been committed, i.e. 
 written to.
 If you're going to forward or redirect a response, you must 
 do so before
 writing to the response.  You can read the JavaDoc for
 HttpServletResponse#sendRedirect and RequestDispatcher#forward.
 Yoav Shapira
 Millennium ChemInformatics
 
 
 -Original Message-
 From: Maxime Colas des Francs [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 04, 2003 3:37 PM
 To: [EMAIL PROTECTED]
 Subject: forward error
 
 Hi,
 
 - If at the end of on of a jsp file, i put a 
 jsp:forward, i have this
 :
 
 java.lang.IllegalStateException: Error: Attempt to clear a buffer
 that's
 
 already been flushed
  at
 org.apache.jasper.runtime.PageContextImpl.forward(PageConte
 xtImpl.java:
 415)
 
  at 
 org.apache.jsp.test_ps_jsp._jspService(test_ps_jsp.java:448)
  at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
  ...
 
 - if i put a c:redirect, i have this :
 java.lang.IllegalStateException
  at
 org.apache.catalina.connector.HttpResponseFacade.sendRedire
 ct(HttpRespo
 nseF
 
 acade.java:173)
  at
 org.apache.taglibs.standard.tag.common.core.RedirectSupport
 .doEndTag(Re
 dire
 
 ctSupport.java:151)
  at
 org.apache.jsp.test_ps_jsp._jspx_meth_c_redirect_1(test_ps_
 jsp.java:123
 3)
 
  at 
 org.apache.jsp.test_ps_jsp._jspService(test_ps_jsp.java:453)
  ...
 
 - if i put nothing, i have no error ...
 
 sombdy can help me to understand this error ?
 
 
 ---
 --
 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]
 
 
 -
 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: forward error

2003-09-05 Thread Tim Funk
The last thing your page does is  jsp:forward page=/index.jsp/.

Before that is a c:forEach items=${ctcRow.rows} var=row loop. You are 
probably filling up the buffer with whitespace, then the repsonse gets 
committed when the buffer is full.

-Tim

Maxime Colas des Francs wrote:

Hi

thks for your response, but here is my code, i don't understand where 
the response is commited !

_

%@ page contentType=text/html; charset=iso-8859-1 language=java 
errorPage=/error_jsp.jsp%
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
%@ taglib prefix=log uri=http://jakarta.apache.org/taglibs/log-1.0; %
%@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; %

sql:query var=ctcRow
   SELECT DISTINCT email FROM ctc ORDER by email
/sql:query
c:forEach items=${ctcRow.rows} var=row

log:info category='%= request.getRemoteUser() %'
   c:out value=${row.email}/
/log:info
/c:forEach

jsp:forward page=/index.jsp/


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


RE: forward error

2003-09-05 Thread Shapira, Yoav

Howdy,
I'm not a JSTL expert, but I would imagine any of those taglibs could
write stuff to the header of your page, thereby committing your
response.

It seems like you're trying to log stuff and then forward: use a filter
for this rather than a JSP.

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: Session Timeout

2003-09-05 Thread G. Wade Johnson
I'm using Tomcat 4.1.18  4.1.24 (two different machines). The behavior
is the same on both. As I said in my other message, I was basing my
questions on the documentation I had read. Your response made me do a
little testing. Now, I'm even more confused.

My assumption was based on information in Professional Java Servlets
2.3 by Wrox. In chapter 5, they explicitly state that the
session-timeout/ value applies to lifetime, not inactivity, (p. 240).

I also checked with
http://developer.java.sun.com/developer/Books/javaserverpages/servlets_javaserver/servlets_javaserver05.pdf

Section 5.10 describes that parameter as well. It does seem to imply
that we are talking about inactivity timeouts, but the text is not
actually explicit. It could be read either way.

For my test, I set the session-timeout/ to 5 minutes. If this was a
lifetime thing, my session should expire pretty quickly. If not, it
would last forever. (My servlet is being queried by an applet on a
regular basis.)

The session did not expire after 5 minutes. It expired after 30 minutes,
just like it did before I added the session-timeout/.

Any help would be appreciated.
G. Wade

PS. Since the session-timeout/ is located in web.xml, I assume it is
webapp-specific. Is there any way to set up a timeout on multiple
webapps? (Short of making a change for each webapp.) I'm currently
using single-sign-on to bring a couple of webapps together into one
app from the user's point of view.



Filip Hanik wrote:
 
 I just found out that sessions on my webapp are automatically being
 logged out after some period of time. Even when they are being used.
 
 this should not be the case session-timeout should be the inactivity
 timeout
 what version of tomcat?
 Filip
 
 - Original Message -
 From: G. Wade Johnson [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Thursday, September 04, 2003 2:36 PM
 Subject: Session Timeout
 
 I've just been surprised by something that I thought I understood.
 
 I just found out that sessions on my webapp are automatically being
 logged out after some period of time. Even when they are being used.
 
 From reading the docs, it appears that the normal timeout behavior is
 to terminate any session that has lived longer than n minutes. Is this
 correct?
 
 Also there appears to be a session-timeout/ element that allows you
 to set the length of this timeout.
 
 However, if I am reading the documentation correctly, the only way to
 set an inactivity timeout is programmatically? (I actually thought
 the session-timeout was an inactivity timeout.shrug/)
 
 How is the best way to go about adding this feature? Is the
 HttpSessionListener interface the best way to go?
 
 Thanks,
 G. Wade
 
 -
 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: Session Timeout

2003-09-05 Thread Mike Curwen
anything you set in WEB-INF/web.xml can be set in
CATALINA_HOME/conf/web.xml and these setting will be used on a global
basis, unless overriden at a lower level.
 
FWIW, I've always understood session-timeout to mean after a period of
inactivity.  I mean really... how useful would sessions be if they
logged you out after n minutes, no matter your activity level?  Talk
about frustrating! It doesn't matter that you've been using my site
continuosly for the past 30 minutes, I'm still kicking you off. That
sounds like 'session-duration' to me.
 


 -Original Message-
 From: G. Wade Johnson [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 05, 2003 8:45 AM
 To: Tomcat Users List
 Subject: Re: Session Timeout
 
 
 I'm using Tomcat 4.1.18  4.1.24 (two different machines). 
 The behavior is the same on both. As I said in my other 
 message, I was basing my questions on the documentation I had 
 read. Your response made me do a little testing. Now, I'm 
 even more confused.
 
 My assumption was based on information in Professional Java 
 Servlets 2.3 by Wrox. In chapter 5, they explicitly state 
 that the session-timeout/ value applies to lifetime, not 
 inactivity, (p. 240).
 
 I also checked with 
 http://developer.java.sun.com/developer/Books/javaserverpages/
 servlets_javaserver/servlets_javaserver05.pdf
 
 Section 5.10 describes that parameter as well. It does seem 
 to imply that we are talking about inactivity timeouts, but 
 the text is not actually explicit. It could be read either way.
 
 For my test, I set the session-timeout/ to 5 minutes. If 
 this was a lifetime thing, my session should expire pretty 
 quickly. If not, it would last forever. (My servlet is being 
 queried by an applet on a regular basis.)
 
 The session did not expire after 5 minutes. It expired after 
 30 minutes, just like it did before I added the session-timeout/.
 
 Any help would be appreciated.
 G. Wade
 
 PS. Since the session-timeout/ is located in web.xml, I 
 assume it is webapp-specific. Is there any way to set up a 
 timeout on multiple webapps? (Short of making a change for 
 each webapp.) I'm currently using single-sign-on to bring a 
 couple of webapps together into one app from the user's point of view.
 
 
 
 Filip Hanik wrote:
  
  I just found out that sessions on my webapp are 
 automatically being 
  logged out after some period of time. Even when they are 
 being used.
  
  this should not be the case session-timeout should be the 
 inactivity 
  timeout what version of tomcat?
  Filip
  
  - Original Message -
  From: G. Wade Johnson [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Thursday, September 04, 2003 2:36 PM
  Subject: Session Timeout
  
  I've just been surprised by something that I thought I understood.
  
  I just found out that sessions on my webapp are automatically being 
  logged out after some period of time. Even when they are being used.
  
  From reading the docs, it appears that the normal timeout 
 behavior is
  to terminate any session that has lived longer than n 
 minutes. Is this 
  correct?
  
  Also there appears to be a session-timeout/ element that 
 allows you 
  to set the length of this timeout.
  
  However, if I am reading the documentation correctly, the 
 only way to 
  set an inactivity timeout is programmatically? (I 
 actually thought 
  the session-timeout was an inactivity timeout.shrug/)
  
  How is the best way to go about adding this feature? Is the 
  HttpSessionListener interface the best way to go?
  
  Thanks,
  G. Wade
  
  
 -
  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]



Bug in ErrorDispatcherValue?

2003-09-05 Thread Mike Cherichetti \(Renegade Internet\)
I've had this happen twice in the past two days on two rather busy servers.
Both are running RedHat Linux 7.3, IBM JDK 1.4.1, and Tomcat 4.1 (one is
4.1.24 and the other is 4.1.27).  After these exceptions hit the error log,
Tomcat stops responding:


2003-09-05 06:33:06 ErrorDispatcherValve[www.mysite.com]: Exception
Processing ErrorPage[errorCode=500, location=/error/500.jsp]
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java(Compiled
Code))
at
java.net.SocketOutputStream.write(SocketOutputStream.java(Compiled Code))
at
org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWri
te(InternalOutputBuffer.java(Compiled Code))
at
org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFi
lter.java(Compiled Code))
at
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.j
ava(Compiled Code))
at
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java(Compiled
Code))
at
org.apache.coyote.tomcat4.OutputBuffer.flush(OutputBuffer.java(Compiled
Code))
at
org.apache.coyote.tomcat4.CoyoteResponse.flushBuffer(CoyoteResponse.java:555
)
at
org.apache.coyote.tomcat4.CoyoteResponseFacade.flushBuffer(CoyoteResponseFac
ade.java:227)
at
org.apache.catalina.valves.ErrorDispatcherValve.status(ErrorDispatcherValve.
java(Compiled Code))
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java(Compiled Code))
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Com
piled Code))
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compi
led Code))
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled
Code))
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
(Compiled Code))
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compi
led Code))
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled
Code))
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java(Compiled
Code))
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java(Compil
ed Code))
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java(Compiled Code))
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java(Compil
ed Code))
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a(Compiled Code))
at java.lang.Thread.run(Thread.java(Compiled Code))


2003-09-04 15:42:54 ErrorDispatcherValve[localhost]: Exception Processing
ErrorPage[errorCode=500, location=/error/500.jsp]
java.lang.IllegalStateException: Cannot reset after response has been
committed
 at org.apache.catalina.connector.ResponseBase.reset(ResponseBase.java:789)
 at
org.apache.catalina.connector.HttpResponseBase.reset(HttpResponseBase.java:8
12)
 at
org.apache.catalina.connector.HttpResponseBase.reset(HttpResponseBase.java:3
73)
 at
org.apache.catalina.valves.ErrorDispatcherValve.custom(ErrorDispatcherValve.
java:413)
 at
org.apache.catalina.valves.ErrorDispatcherValve.status(ErrorDispatcherValve.
java(Compiled Code))
 at
org.apache.catalina.valves.ErrorDispatcherValve.throwable(ErrorDispatcherVal
ve.java:277)
 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java(Compiled Code))
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Com
piled Code))
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compi
led Code))
 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled
Code))
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
(Compiled Code))
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compi
led Code))
 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled
Code))
 at

Re: forward error

2003-09-05 Thread Maxime Colas des Francs
thanks !

i put all my c:forEach loop in the same line and it's work.

is there a solution for limit whitespace generated by JSTL code ?

or i have to put all loop of my application in one line ??

At 09:50 2003-09-05 -0400, you wrote:
The last thing your page does is  jsp:forward page=/index.jsp/.

Before that is a c:forEach items=${ctcRow.rows} var=row loop. You 
are probably filling up the buffer with whitespace, then the repsonse gets 
committed when the buffer is full.

-Tim

Maxime Colas des Francs wrote:

Hi
thks for your response, but here is my code, i don't understand where the 
response is commited !
_
%@ page contentType=text/html; charset=iso-8859-1 language=java 
errorPage=/error_jsp.jsp%
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
%@ taglib prefix=log uri=http://jakarta.apache.org/taglibs/log-1.0; %
%@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; %
sql:query var=ctcRow
   SELECT DISTINCT email FROM ctc ORDER by email
/sql:query
c:forEach items=${ctcRow.rows} var=row
log:info category='%= request.getRemoteUser() %'
   c:out value=${row.email}/
/log:info
/c:forEach
jsp:forward page=/index.jsp/


-
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: Memory leaks?

2003-09-05 Thread Christopher Williams
It's simple good practice to close objects that have close methods when you
no longer need them (as you do with stream objects, for example).

The spec says that ResultSet objects are closed when their Statement objects
are closed and that Statement objects are closed when their Connection
objects are closed.  I personally like to keep hold of a Connection object
for the lifetime of my application (or until it fails), because connecting
to a database is an expensive operation.  Also, if you use Connection
pooling, Connection objects can be kept open for as long as your application
server or whatever is running, so that unclosed Statements with their open
ResultSets simply sit around hogging resources (and some of the resources
that they hog, such as database cursors, are not lightweight).

This is what I do for JDBC calls:

// Assume a connection has been made
Connection conn...;
PreparedStatement ps = null;
ResultSet rs = null;

try {
// Create a PreparedStatement and use it to open a ResultSet
...
// Clean up
rs.close();
} catch (SQLException e) {
// Do something with the error
} finally {
try {
if (null != ps) {
ps.close();
} catch (SQLException e) {}
}

This guarantees that the objects are always closed (assuming, of course,
that the close() operations succeed).  The rs.close() is, in theory,
unnecessary as the ps.close() call is supposed to close it implicitly, but
my background is in C and I always tried to free anything that I'd malloced.
It's a habit that's stuck.

In short, ALWAYS CLOSE YOUR STATEMENT OBJECTS.



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



Tomcat startup failure

2003-09-05 Thread Noel Rappin
I have a set up where tomcat is supposed to start on boot via an rc 
shell script on a Linux system (tomcat 4.1.18).  I have this 
intermittent failure mode where tomcat fails to start up on reboot. 

I can _always_ trigger this failure by deleting all tomcat log files, 
and then rebooting.  After the reboot, the only thing in the log 
directory is a zero-length catalina.out file, and the java process is 
not running.  Invoking the tomcat startup again at this point causes it 
to work normally.

I can find no evidence that the tomcat java process exits, and no matter 
how much I turn up debugging, I get no logged output.  Is there any 
possible mechanism that could be causing this failure, or at least some 
place or some way I could get better debugging information?

Noel



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


RE: Session Timeout

2003-09-05 Thread Shapira, Yoav

Howdy,
The servlet specification is the only authority on this, misleading
books should be tossed aside.  SRV.7.5 is clear, session timeout is for
inactivity, not total duration, as Senor Curwen opined.

The first part of his message, using $CATALINA_HOME/conf/web.xml, I
would discourage, as it's non-standard.  Stick to WEB-INF/web.xml, which
is standard and therefore portable across containers.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Mike Curwen [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 10:05 AM
To: 'Tomcat Users List'
Subject: RE: Session Timeout

anything you set in WEB-INF/web.xml can be set in
CATALINA_HOME/conf/web.xml and these setting will be used on a global
basis, unless overriden at a lower level.

FWIW, I've always understood session-timeout to mean after a period of
inactivity.  I mean really... how useful would sessions be if they
logged you out after n minutes, no matter your activity level?  Talk
about frustrating! It doesn't matter that you've been using my site
continuosly for the past 30 minutes, I'm still kicking you off. That
sounds like 'session-duration' to me.



 -Original Message-
 From: G. Wade Johnson [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 05, 2003 8:45 AM
 To: Tomcat Users List
 Subject: Re: Session Timeout


 I'm using Tomcat 4.1.18  4.1.24 (two different machines).
 The behavior is the same on both. As I said in my other
 message, I was basing my questions on the documentation I had
 read. Your response made me do a little testing. Now, I'm
 even more confused.

 My assumption was based on information in Professional Java
 Servlets 2.3 by Wrox. In chapter 5, they explicitly state
 that the session-timeout/ value applies to lifetime, not
 inactivity, (p. 240).

 I also checked with
 http://developer.java.sun.com/developer/Books/javaserverpages/
 servlets_javaserver/servlets_javaserver05.pdf

 Section 5.10 describes that parameter as well. It does seem
 to imply that we are talking about inactivity timeouts, but
 the text is not actually explicit. It could be read either way.

 For my test, I set the session-timeout/ to 5 minutes. If
 this was a lifetime thing, my session should expire pretty
 quickly. If not, it would last forever. (My servlet is being
 queried by an applet on a regular basis.)

 The session did not expire after 5 minutes. It expired after
 30 minutes, just like it did before I added the session-timeout/.

 Any help would be appreciated.
 G. Wade

 PS. Since the session-timeout/ is located in web.xml, I
 assume it is webapp-specific. Is there any way to set up a
 timeout on multiple webapps? (Short of making a change for
 each webapp.) I'm currently using single-sign-on to bring a
 couple of webapps together into one app from the user's point of
view.



 Filip Hanik wrote:
 
  I just found out that sessions on my webapp are
 automatically being
  logged out after some period of time. Even when they are
 being used.
 
  this should not be the case session-timeout should be the
 inactivity
  timeout what version of tomcat?
  Filip
 
  - Original Message -
  From: G. Wade Johnson [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Thursday, September 04, 2003 2:36 PM
  Subject: Session Timeout
 
  I've just been surprised by something that I thought I understood.
 
  I just found out that sessions on my webapp are automatically being
  logged out after some period of time. Even when they are being
used.
 
  From reading the docs, it appears that the normal timeout
 behavior is
  to terminate any session that has lived longer than n
 minutes. Is this
  correct?
 
  Also there appears to be a session-timeout/ element that
 allows you
  to set the length of this timeout.
 
  However, if I am reading the documentation correctly, the
 only way to
  set an inactivity timeout is programmatically? (I
 actually thought
  the session-timeout was an inactivity timeout.shrug/)
 
  How is the best way to go about adding this feature? Is the
  HttpSessionListener interface the best way to go?
 
  Thanks,
  G. Wade
 
 
 -
  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]




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 

RE: forward error

2003-09-05 Thread Shapira, Yoav

Howdy,

is there a solution for limit whitespace generated by JSTL code ?

This would be a great patch for you to contribute to jakarta-taglibs! ;)

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: SSL/Verisign Confusion

2003-09-05 Thread Dave Wood
Thanks.  With the exception of the openssl doc, I've been over these quite a
bit.  The result is the problem I've mentioned where keytool says it can't
import my certificate because the alias already exists.

After some help I got last night, I think the question boils down to this:

* once I have extracted my private key from keytool (haven't done this yet),
how do I take that key, the VeriSign intermediate certificate and my public
key certificate and get them to play together.  I'm hoping the openssl stuff
will take care of this, because keytool doesn't really seem to recognize
private keys as things that you can work with directly.

Thanks again,
Dave

-Original Message-
From: Jay Garala [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 7:12 AM
To: 'Tomcat Users List'
Subject: RE: SSL/Verisign Confusion


Try the Java keytool help:
 http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html

Tomcat how-to:
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html

If you have OpenSSL:
 http://forum.java.sun.com/thread.jsp?forum=2thread=4240

Jay
-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 1:04 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks Bill.  I think this highlights something I'm really not
understanding...

Didn't I generate an important private key somewhere along the line that I
can't just regenerate if I blow away my keystore?  I assumed the certificate
I got back from verisign would only work if I still had the original private
key I generated before sending them my request.  Is that wrong?

(I'll take a look at the link you sent...at first glance, it looks a little
hard to follow, but hopefully not).

Thanks again.

Dave

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker
Sent: Thursday, September 04, 2003 11:06 PM
To: [EMAIL PROTECTED]
Subject: Re: SSL/Verisign Confusion


Firstly, it looks like you should wipe you keystore and start again.  To use
a VS cert with Tomcat, the two options I know are:
1) Follow the instructions at http://www.comu.de/docs/tomcat_ssl.htm.
2) Using openssl or otherwise, convert your cert+key to a pkcs12 file, and
use that as your keystore (remember to set 'keystoreType=pkcs12' on the
Factory in server.xml).


Dave Wood [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I'm having a problem getting an SSL certificate from Verisign working
 correctly.  I'm going to include everything I can think of that MIGHT be a
 problem.  Unfortunately, there are a couple things I can't quite remember
 for certain.  Here's the situation:

 1. I generated the initial key using an alias other than tomcat (we'll
 call it company)
 2. I generated the CSR and sent it to verisign.  I still have this file.
 3. Verisign changed the company name during the verification process (from
 an acronym to the full spelling of the name)
 4. I now have the certificate that they sent back after the validation
 process.
 5. One thing I can't account for is why when I see this:

 $ keytool -list

 Keystore type: jks
 Keystore provider: SUN

 Your keystore contains 4 entries: (...others removed...)

 company, Fri Aug 22 08:47:04 MDT 2003, trustedCertEntry,
 Certificate fingerprint (MD5):
 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 (the numbers aren't really
 0's)

 ...I think I must have self-signed or something (I was doing a couple of
 these things and don't recall exactly), but I'm surprised to see
 trustedCertEntry here.

 The problem I'm having is this:

 $ keytool -import -trustcacerts -alias company -file public.crt
 Enter keystore password: xxx
 keytool error: java.lang.Exception: Certificate not imported, alias
 company already exists

 (but I'm thinking it should be REPLACING this entry, so the fact that it
 exists shouldn't be a problem???)

 So, I have several questions:

 1. Am I hosed completely because I didn't use tomcat as the alias?
 2. How does the private key get stored exactly?  I assume that if I delete
 the current entry for the company alias, I'll be losing the private key,
 right?
 3. Can someone provide steps I should take to get this working given what
I
 have said above.

 Thanks so much in advance.  Sorry to be so long-winded.

 -Dave
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003




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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003



RE:CLASSLOADER(?) Using jndi to get a DBCP BasicDataSource give ClassCastException

2003-09-05 Thread Angus Mezick
Could this be a ClassLoader issue?  Seems like it might be.  Something
about the difference between the server and context loaders?

 -Original Message-
 From: Angus Mezick 
 Sent: Friday, September 05, 2003 8:31 AM
 To: Tomcat Users List
 Subject: RE: Using jndi to get a DBCP BasicDataSource give 
 ClassCastException
 
 
 I did an I got BasicDataSource.
 --Angus
 
  -Original Message-
  From: Adam Hardy [mailto:[EMAIL PROTECTED] 
  Sent: Friday, September 05, 2003 4:19 AM
  To: Tomcat Users List
  Subject: Re: Using jndi to get a DBCP BasicDataSource give 
  ClassCastException
  
  
  Hi Angus,
  looked at your first mail and couldn't see anything wrong 
  with it. I can 
  only suggest that you do some debugging, like output the 
  .getClass().getName() from the datasource, to see what it 
  really thinks 
  it is.
  
  Adam
  
  On 09/04/2003 10:27 PM Angus Mezick wrote:
   Anyone have a clue as to whether or not this is a Real bug, 
  or am I just
   screwing something up?
   
   
  -Original Message-
  From: Angus Mezick 
  Sent: Wednesday, September 03, 2003 4:32 PM
  To: [EMAIL PROTECTED]
  Subject: Using jndi to get a DBCP BasicDataSource give 
  ClassCastException
  
  
  I am having problems with the GlobalNamingResources.  If I 
  put my two DB
  resource entries into the GlobalNamingResources section 
 and just use
  Resource-Links to access them I cannot cast from DataSource to
  BasicDataSource.. I need to do this to use this line in my 
  monitoring
  app: (I can still use the Datasources to get talk to the 
  DB, just not
  recast it from the interface to the concrete class)
  
  pageContext.getOut().println( jdbc/CommerceDB:  Active:  +
  ((BasicDataSource)ds).getNumActive() +  Idle:  +
  ((BasicDataSource)ds).getNumIdle() + br);
  
  If I define the resources directly in the Context everything 
  works fine.
  ARGH!  Here is my server.xml snippets:
  
GlobalNamingResources
Resource name=jdbc/SessionDBGlobal auth=Container
type=javax.sql.DataSource/
Resource name=jdbc/CommerceDBGlobal auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/SessionDBGlobal
parameter
namefactory/name

  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
namemaxActive/name
value100/value
/parameter
parameter
namemaxIdle/name
value5/value
/parameter
parameter
namemaxWait/name
value1/value
/parameter
parameter
nameusername/name
value/value
/parameter
parameter
namepassword/name
value/value
/parameter
parameter
namedriverClassName/name
valuecom.inet.tds.TdsDriver/value
/parameter
parameter
nameurl/name
valuejdbc:inetdae7a:IPADDR/value
/parameter
parameter
namevalidationQuery/name
valueselect top 1 name from
  syscolumns/value
/parameter
parameter
nameremoveAbandoned/name
valuetrue/value
/parameter
parameter
nameremoveAbandonedTimeout/name
value300/value
/parameter
parameter
namelogAbandoned/name
valuetrue/value
/parameter
parameter

  nametimeBetweenEvictionRunsMillis/name
value6/value
/parameter
parameter
nametestOnBorrow/name
valuetrue/value
/parameter
parameter
nametestWhileIdle/name
valuetrue/value
/parameter
/ResourceParams
ResourceParams name=jdbc/CommerceDBGlobal
parameter
namefactory/name

  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
namemaxActive/name
value100/value

Re: forward error

2003-09-05 Thread Tim Funk
You can't prevent the whitespace. So as a kluge, I have a swallow tag for 
such occasions.

In your tld ...
  tag
nameswallow/name
tagclassSwallowTag/tagclass
  /tag
import java.io.IOException;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
public class SwallowTag extends BodyTagSupport {
public int doAfterBody() throws JspException {
return SKIP_BODY;
}
public int doEndTag() throws JspException {
try {
pageContext.getOut().clearBuffer();
} catch(IOException e) {
// silent ignore
}
return EVAL_PAGE;
}
}
-Tim

Maxime Colas des Francs wrote:

thanks !

i put all my c:forEach loop in the same line and it's work.

is there a solution for limit whitespace generated by JSTL code ?

or i have to put all loop of my application in one line ??

At 09:50 2003-09-05 -0400, you wrote:

The last thing your page does is  jsp:forward page=/index.jsp/.

Before that is a c:forEach items=${ctcRow.rows} var=row loop. 
You are probably filling up the buffer with whitespace, then the 
repsonse gets committed when the buffer is full.

-Tim

Maxime Colas des Francs wrote:

Hi
thks for your response, but here is my code, i don't understand where 
the response is commited !
_
%@ page contentType=text/html; charset=iso-8859-1 language=java 
errorPage=/error_jsp.jsp%
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
%@ taglib prefix=log 
uri=http://jakarta.apache.org/taglibs/log-1.0; %
%@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; %
sql:query var=ctcRow
   SELECT DISTINCT email FROM ctc ORDER by email
/sql:query
c:forEach items=${ctcRow.rows} var=row
log:info category='%= request.getRemoteUser() %'
   c:out value=${row.email}/
/log:info
/c:forEach
jsp:forward page=/index.jsp/




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


unsubscribe!

2003-09-05 Thread mailrun
I want to unsubscribe. I tryed to do this according the instruction, but 
still receive mails.

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



RE: SSL/Verisign Confusion

2003-09-05 Thread Jay Garala
NOTE: You cannot export private key from keystore.

-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 10:32 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks.  With the exception of the openssl doc, I've been over these quite a
bit.  The result is the problem I've mentioned where keytool says it can't
import my certificate because the alias already exists.

After some help I got last night, I think the question boils down to this:

* once I have extracted my private key from keytool (haven't done this yet),
how do I take that key, the VeriSign intermediate certificate and my public
key certificate and get them to play together.  I'm hoping the openssl stuff
will take care of this, because keytool doesn't really seem to recognize
private keys as things that you can work with directly.

Thanks again,
Dave

-Original Message-
From: Jay Garala [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 7:12 AM
To: 'Tomcat Users List'
Subject: RE: SSL/Verisign Confusion


Try the Java keytool help:
 http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html

Tomcat how-to:
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html

If you have OpenSSL:
 http://forum.java.sun.com/thread.jsp?forum=2thread=4240

Jay
-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 1:04 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks Bill.  I think this highlights something I'm really not
understanding...

Didn't I generate an important private key somewhere along the line that I
can't just regenerate if I blow away my keystore?  I assumed the certificate
I got back from verisign would only work if I still had the original private
key I generated before sending them my request.  Is that wrong?

(I'll take a look at the link you sent...at first glance, it looks a little
hard to follow, but hopefully not).

Thanks again.

Dave

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker
Sent: Thursday, September 04, 2003 11:06 PM
To: [EMAIL PROTECTED]
Subject: Re: SSL/Verisign Confusion


Firstly, it looks like you should wipe you keystore and start again.  To use
a VS cert with Tomcat, the two options I know are:
1) Follow the instructions at http://www.comu.de/docs/tomcat_ssl.htm.
2) Using openssl or otherwise, convert your cert+key to a pkcs12 file, and
use that as your keystore (remember to set 'keystoreType=pkcs12' on the
Factory in server.xml).


Dave Wood [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I'm having a problem getting an SSL certificate from Verisign working
 correctly.  I'm going to include everything I can think of that MIGHT be a
 problem.  Unfortunately, there are a couple things I can't quite remember
 for certain.  Here's the situation:

 1. I generated the initial key using an alias other than tomcat (we'll
 call it company)
 2. I generated the CSR and sent it to verisign.  I still have this file.
 3. Verisign changed the company name during the verification process (from
 an acronym to the full spelling of the name)
 4. I now have the certificate that they sent back after the validation
 process.
 5. One thing I can't account for is why when I see this:

 $ keytool -list

 Keystore type: jks
 Keystore provider: SUN

 Your keystore contains 4 entries: (...others removed...)

 company, Fri Aug 22 08:47:04 MDT 2003, trustedCertEntry,
 Certificate fingerprint (MD5):
 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 (the numbers aren't really
 0's)

 ...I think I must have self-signed or something (I was doing a couple of
 these things and don't recall exactly), but I'm surprised to see
 trustedCertEntry here.

 The problem I'm having is this:

 $ keytool -import -trustcacerts -alias company -file public.crt
 Enter keystore password: xxx
 keytool error: java.lang.Exception: Certificate not imported, alias
 company already exists

 (but I'm thinking it should be REPLACING this entry, so the fact that it
 exists shouldn't be a problem???)

 So, I have several questions:

 1. Am I hosed completely because I didn't use tomcat as the alias?
 2. How does the private key get stored exactly?  I assume that if I delete
 the current entry for the company alias, I'll be losing the private key,
 right?
 3. Can someone provide steps I should take to get this working given what
I
 have said above.

 Thanks so much in advance.  Sorry to be so long-winded.

 -Dave
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003




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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus 

Re: Using jndi to get a DBCP BasicDataSource give ClassCastException

2003-09-05 Thread Adam Hardy
And that was with the GlobalResourceLinK That doesn't make sense! If 
you get BasicDataSource as the class's name, then you won't get a 
ClassCastException if you try to cast it to that, but you did, so 
er. wow, you've got me stumped.

On 09/05/2003 02:31 PM Angus Mezick wrote:
I did an I got BasicDataSource.
--Angus

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 4:19 AM
To: Tomcat Users List
Subject: Re: Using jndi to get a DBCP BasicDataSource give 
ClassCastException

Hi Angus,
looked at your first mail and couldn't see anything wrong 
with it. I can 
only suggest that you do some debugging, like output the 
.getClass().getName() from the datasource, to see what it 
really thinks 
it is.

Adam

On 09/04/2003 10:27 PM Angus Mezick wrote:

Anyone have a clue as to whether or not this is a Real bug, 
or am I just

screwing something up?



-Original Message-
From: Angus Mezick 
Sent: Wednesday, September 03, 2003 4:32 PM
To: [EMAIL PROTECTED]
Subject: Using jndi to get a DBCP BasicDataSource give 
ClassCastException

I am having problems with the GlobalNamingResources.  If I 
put my two DB
resource entries into the GlobalNamingResources section and just use
Resource-Links to access them I cannot cast from DataSource to
BasicDataSource.. I need to do this to use this line in my 
monitoring

app: (I can still use the Datasources to get talk to the 
DB, just not

recast it from the interface to the concrete class)

pageContext.getOut().println( jdbc/CommerceDB:  Active:  +
((BasicDataSource)ds).getNumActive() +  Idle:  +
((BasicDataSource)ds).getNumIdle() + br);
If I define the resources directly in the Context everything 
works fine.
ARGH!  Here is my server.xml snippets:

GlobalNamingResources
Resource name=jdbc/SessionDBGlobal auth=Container
type=javax.sql.DataSource/
Resource name=jdbc/CommerceDBGlobal auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/SessionDBGlobal
parameter
namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
namemaxActive/name
value100/value
/parameter
parameter
namemaxIdle/name
value5/value
/parameter
parameter
namemaxWait/name
value1/value
/parameter
parameter
nameusername/name
value/value
/parameter
parameter
namepassword/name
value/value
/parameter
parameter
namedriverClassName/name
valuecom.inet.tds.TdsDriver/value
/parameter
parameter
nameurl/name
valuejdbc:inetdae7a:IPADDR/value
/parameter
parameter
namevalidationQuery/name
valueselect top 1 name from
syscolumns/value
/parameter
parameter
nameremoveAbandoned/name
valuetrue/value
/parameter
parameter
nameremoveAbandonedTimeout/name
value300/value
/parameter
parameter
namelogAbandoned/name
valuetrue/value
/parameter
parameter

nametimeBetweenEvictionRunsMillis/name
value6/value
/parameter
parameter
nametestOnBorrow/name
valuetrue/value
/parameter
parameter
nametestWhileIdle/name
valuetrue/value
/parameter
/ResourceParams
ResourceParams name=jdbc/CommerceDBGlobal
parameter
namefactory/name

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

RE: SSL/Verisign Confusion

2003-09-05 Thread Dave Wood
I realize you can't do this with keytool.  Is there no way to do it at all?

I'm beginning to think I might be totally hosed here.

Thanks,
Dave

-Original Message-
From: Jay Garala [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 8:37 AM
To: 'Tomcat Users List'
Subject: RE: SSL/Verisign Confusion


NOTE: You cannot export private key from keystore.

-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 10:32 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks.  With the exception of the openssl doc, I've been over these quite a
bit.  The result is the problem I've mentioned where keytool says it can't
import my certificate because the alias already exists.

After some help I got last night, I think the question boils down to this:

* once I have extracted my private key from keytool (haven't done this yet),
how do I take that key, the VeriSign intermediate certificate and my public
key certificate and get them to play together.  I'm hoping the openssl stuff
will take care of this, because keytool doesn't really seem to recognize
private keys as things that you can work with directly.

Thanks again,
Dave

-Original Message-
From: Jay Garala [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 7:12 AM
To: 'Tomcat Users List'
Subject: RE: SSL/Verisign Confusion


Try the Java keytool help:
 http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html

Tomcat how-to:
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html

If you have OpenSSL:
 http://forum.java.sun.com/thread.jsp?forum=2thread=4240

Jay
-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 1:04 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks Bill.  I think this highlights something I'm really not
understanding...

Didn't I generate an important private key somewhere along the line that I
can't just regenerate if I blow away my keystore?  I assumed the certificate
I got back from verisign would only work if I still had the original private
key I generated before sending them my request.  Is that wrong?

(I'll take a look at the link you sent...at first glance, it looks a little
hard to follow, but hopefully not).

Thanks again.

Dave

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker
Sent: Thursday, September 04, 2003 11:06 PM
To: [EMAIL PROTECTED]
Subject: Re: SSL/Verisign Confusion


Firstly, it looks like you should wipe you keystore and start again.  To use
a VS cert with Tomcat, the two options I know are:
1) Follow the instructions at http://www.comu.de/docs/tomcat_ssl.htm.
2) Using openssl or otherwise, convert your cert+key to a pkcs12 file, and
use that as your keystore (remember to set 'keystoreType=pkcs12' on the
Factory in server.xml).


Dave Wood [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I'm having a problem getting an SSL certificate from Verisign working
 correctly.  I'm going to include everything I can think of that MIGHT be a
 problem.  Unfortunately, there are a couple things I can't quite remember
 for certain.  Here's the situation:

 1. I generated the initial key using an alias other than tomcat (we'll
 call it company)
 2. I generated the CSR and sent it to verisign.  I still have this file.
 3. Verisign changed the company name during the verification process (from
 an acronym to the full spelling of the name)
 4. I now have the certificate that they sent back after the validation
 process.
 5. One thing I can't account for is why when I see this:

 $ keytool -list

 Keystore type: jks
 Keystore provider: SUN

 Your keystore contains 4 entries: (...others removed...)

 company, Fri Aug 22 08:47:04 MDT 2003, trustedCertEntry,
 Certificate fingerprint (MD5):
 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 (the numbers aren't really
 0's)

 ...I think I must have self-signed or something (I was doing a couple of
 these things and don't recall exactly), but I'm surprised to see
 trustedCertEntry here.

 The problem I'm having is this:

 $ keytool -import -trustcacerts -alias company -file public.crt
 Enter keystore password: xxx
 keytool error: java.lang.Exception: Certificate not imported, alias
 company already exists

 (but I'm thinking it should be REPLACING this entry, so the fact that it
 exists shouldn't be a problem???)

 So, I have several questions:

 1. Am I hosed completely because I didn't use tomcat as the alias?
 2. How does the private key get stored exactly?  I assume that if I delete
 the current entry for the company alias, I'll be losing the private key,
 right?
 3. Can someone provide steps I should take to get this working given what
I
 have said above.

 Thanks so much in advance.  Sorry to be so long-winded.

 -Dave
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.512 / Virus Database: 309 - Release 

RE: When does tomcat notice a newly deployed war file?

2003-09-05 Thread Schalk
In your tomcat server.xml you can add a property like this:
!-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps 
   unpackWARs=true autoDeploy=true 

Kind Regards
Schalk Neethling
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
 

:: -Original Message-
:: From: Roy Smith [mailto:[EMAIL PROTECTED]
:: Sent: Friday, September 05, 2003 2:59 PM
:: To: [EMAIL PROTECTED]
:: Cc: Roy Smith
:: Subject: When does tomcat notice a newly deployed war file?
:: 
:: I've got Tomcat-4.1.24 running on Linux.
:: 
:: I built a new war file and copied it to my webapps directory.
:: According to my Tomcat book, Once Tomcat notices the file, it will
:: unpack it  I guess the question is, what do I need to do to make
:: Tomcat notice it?  Nothing seems to be happening, and there's nothing
:: in the log files.  Is there something I need to do to prod Tomcat into
:: noticing the new file?
:: 
:: 
:: -
:: 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 jndi to get a DBCP BasicDataSource give ClassCastExce ption

2003-09-05 Thread Bodycombe, Andrew
I suppose there could be two different classes called BasicDataSource, in
two different packages...

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 05 September 2003 16:03
To: Tomcat Users List
Subject: Re: Using jndi to get a DBCP BasicDataSource give
ClassCastException


And that was with the GlobalResourceLinK That doesn't make sense! If 
you get BasicDataSource as the class's name, then you won't get a 
ClassCastException if you try to cast it to that, but you did, so 
er. wow, you've got me stumped.

On 09/05/2003 02:31 PM Angus Mezick wrote:
 I did an I got BasicDataSource.
 --Angus
 
 
-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 4:19 AM
To: Tomcat Users List
Subject: Re: Using jndi to get a DBCP BasicDataSource give 
ClassCastException


Hi Angus,
looked at your first mail and couldn't see anything wrong 
with it. I can 
only suggest that you do some debugging, like output the 
.getClass().getName() from the datasource, to see what it 
really thinks 
it is.

Adam

On 09/04/2003 10:27 PM Angus Mezick wrote:

Anyone have a clue as to whether or not this is a Real bug, 

or am I just

screwing something up?



-Original Message-
From: Angus Mezick 
Sent: Wednesday, September 03, 2003 4:32 PM
To: [EMAIL PROTECTED]
Subject: Using jndi to get a DBCP BasicDataSource give 
ClassCastException


I am having problems with the GlobalNamingResources.  If I 
put my two DB
resource entries into the GlobalNamingResources section and just use
Resource-Links to access them I cannot cast from DataSource to
BasicDataSource.. I need to do this to use this line in my 

monitoring

app: (I can still use the Datasources to get talk to the 

DB, just not

recast it from the interface to the concrete class)

pageContext.getOut().println( jdbc/CommerceDB:  Active:  +
((BasicDataSource)ds).getNumActive() +  Idle:  +
((BasicDataSource)ds).getNumIdle() + br);

If I define the resources directly in the Context everything 
works fine.
ARGH!  Here is my server.xml snippets:

GlobalNamingResources
Resource name=jdbc/SessionDBGlobal auth=Container
type=javax.sql.DataSource/
Resource name=jdbc/CommerceDBGlobal auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/SessionDBGlobal
parameter
namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
namemaxActive/name
value100/value
/parameter
parameter
namemaxIdle/name
value5/value
/parameter
parameter
namemaxWait/name
value1/value
/parameter
parameter
nameusername/name
value/value
/parameter
parameter
namepassword/name
value/value
/parameter
parameter
namedriverClassName/name
valuecom.inet.tds.TdsDriver/value
/parameter
parameter
nameurl/name
valuejdbc:inetdae7a:IPADDR/value
/parameter
parameter
namevalidationQuery/name
valueselect top 1 name from
syscolumns/value
/parameter
parameter
nameremoveAbandoned/name
valuetrue/value
/parameter
parameter
nameremoveAbandonedTimeout/name
value300/value
/parameter
parameter
namelogAbandoned/name
valuetrue/value
/parameter
parameter

nametimeBetweenEvictionRunsMillis/name
value6/value
/parameter
parameter
nametestOnBorrow/name
valuetrue/value
/parameter
parameter
nametestWhileIdle/name
valuetrue/value
/parameter
/ResourceParams
ResourceParams name=jdbc/CommerceDBGlobal
parameter
namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   

RE: SSL/Verisign Confusion

2003-09-05 Thread Jay Garala
Hmm..  Did you create the PK in Tomcat's keystore or your JDK's keystore?

Try the keyclone?  Clone your 'company' to 'tomcat'.

-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 11:07 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

I realize you can't do this with keytool.  Is there no way to do it at all?

I'm beginning to think I might be totally hosed here.

Thanks,
Dave

-Original Message-
From: Jay Garala [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 8:37 AM
To: 'Tomcat Users List'
Subject: RE: SSL/Verisign Confusion


NOTE: You cannot export private key from keystore.

-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 10:32 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks.  With the exception of the openssl doc, I've been over these quite a
bit.  The result is the problem I've mentioned where keytool says it can't
import my certificate because the alias already exists.

After some help I got last night, I think the question boils down to this:

* once I have extracted my private key from keytool (haven't done this yet),
how do I take that key, the VeriSign intermediate certificate and my public
key certificate and get them to play together.  I'm hoping the openssl stuff
will take care of this, because keytool doesn't really seem to recognize
private keys as things that you can work with directly.

Thanks again,
Dave

-Original Message-
From: Jay Garala [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 7:12 AM
To: 'Tomcat Users List'
Subject: RE: SSL/Verisign Confusion


Try the Java keytool help:
 http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html

Tomcat how-to:
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html

If you have OpenSSL:
 http://forum.java.sun.com/thread.jsp?forum=2thread=4240

Jay
-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 1:04 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks Bill.  I think this highlights something I'm really not
understanding...

Didn't I generate an important private key somewhere along the line that I
can't just regenerate if I blow away my keystore?  I assumed the certificate
I got back from verisign would only work if I still had the original private
key I generated before sending them my request.  Is that wrong?

(I'll take a look at the link you sent...at first glance, it looks a little
hard to follow, but hopefully not).

Thanks again.

Dave

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker
Sent: Thursday, September 04, 2003 11:06 PM
To: [EMAIL PROTECTED]
Subject: Re: SSL/Verisign Confusion


Firstly, it looks like you should wipe you keystore and start again.  To use
a VS cert with Tomcat, the two options I know are:
1) Follow the instructions at http://www.comu.de/docs/tomcat_ssl.htm.
2) Using openssl or otherwise, convert your cert+key to a pkcs12 file, and
use that as your keystore (remember to set 'keystoreType=pkcs12' on the
Factory in server.xml).


Dave Wood [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I'm having a problem getting an SSL certificate from Verisign working
 correctly.  I'm going to include everything I can think of that MIGHT be a
 problem.  Unfortunately, there are a couple things I can't quite remember
 for certain.  Here's the situation:

 1. I generated the initial key using an alias other than tomcat (we'll
 call it company)
 2. I generated the CSR and sent it to verisign.  I still have this file.
 3. Verisign changed the company name during the verification process (from
 an acronym to the full spelling of the name)
 4. I now have the certificate that they sent back after the validation
 process.
 5. One thing I can't account for is why when I see this:

 $ keytool -list

 Keystore type: jks
 Keystore provider: SUN

 Your keystore contains 4 entries: (...others removed...)

 company, Fri Aug 22 08:47:04 MDT 2003, trustedCertEntry,
 Certificate fingerprint (MD5):
 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 (the numbers aren't really
 0's)

 ...I think I must have self-signed or something (I was doing a couple of
 these things and don't recall exactly), but I'm surprised to see
 trustedCertEntry here.

 The problem I'm having is this:

 $ keytool -import -trustcacerts -alias company -file public.crt
 Enter keystore password: xxx
 keytool error: java.lang.Exception: Certificate not imported, alias
 company already exists

 (but I'm thinking it should be REPLACING this entry, so the fact that it
 exists shouldn't be a problem???)

 So, I have several questions:

 1. Am I hosed completely because I didn't use tomcat as the alias?
 2. How does the private key get stored exactly?  I assume that if I delete
 the current entry for the company alias, I'll be losing the private key,
 right?
 3. Can someone 

[OT] javamail uses wrong timezone in tomcat

2003-09-05 Thread Vladimer Shioshvili
Hi all,

I am trying to send email message using javamail from Tomcat and messages 
have GMT + timestamp. Do i have to manually set the date through the 
javamail message, or i am missing something else?

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: setting classpath in setclasspath.bat

2003-09-05 Thread Pradeep Gummi
Hi all, 
I am tring to include external classes that are needed for my servlet 
class.   I tried to modify classpath in setclasspath.bat file by 
set CLASSPATH=%JAVA_HOME%
\lib\tools.jar;c:\mindbridge\classes\saclasses.jar
I needed all the classes in the saclasses.jar file for my servlet. When 
i restart the tomcat server, it just shows a blank page with out 
showing the default page. Am I giving a wrong classpath here? Any 
suggestions.
 
thanks
pradeep





- Original Message -
From: Tim Funk [EMAIL PROTECTED]
Date: Friday, September 5, 2003 10:34 am
Subject: Re: forward error

 You can't prevent the whitespace. So as a kluge, I have a swallow 
 tag for 
 such occasions.
 
 In your tld ...
   tag
 nameswallow/name
 tagclassSwallowTag/tagclass
   /tag
 
 import java.io.IOException;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.BodyTagSupport;
 
 public class SwallowTag extends BodyTagSupport {
 public int doAfterBody() throws JspException {
 return SKIP_BODY;
 }
 
 public int doEndTag() throws JspException {
   try {
   pageContext.getOut().clearBuffer();
   } catch(IOException e) {
   // silent ignore
   }
 return EVAL_PAGE;
 }
 }
 
 -Tim
 
 
 Maxime Colas des Francs wrote:
 
  thanks !
  
  i put all my c:forEach loop in the same line and it's work.
  
  is there a solution for limit whitespace generated by JSTL code ?
  
  or i have to put all loop of my application in one line ??
  
  
  At 09:50 2003-09-05 -0400, you wrote:
  
  The last thing your page does is  jsp:forward page=/index.jsp/.
 
  Before that is a c:forEach items=${ctcRow.rows} var=row 
 loop. 
  You are probably filling up the buffer with whitespace, then 
 the 
  repsonse gets committed when the buffer is full.
 
  -Tim
 
  Maxime Colas des Francs wrote:
 
  Hi
  thks for your response, but here is my code, i don't 
 understand where 
  the response is commited !
  _
  %@ page contentType=text/html; charset=iso-8859-1 
 language=java 
  errorPage=/error_jsp.jsp%
  %@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
  %@ taglib prefix=log 
  uri=http://jakarta.apache.org/taglibs/log-1.0; %
  %@ taglib prefix=sql uri=http://java.sun.com/jstl/sql; %
  sql:query var=ctcRow
 SELECT DISTINCT email FROM ctc ORDER by email
  /sql:query
  c:forEach items=${ctcRow.rows} var=row
  log:info category='%= request.getRemoteUser() %'
 c:out value=${row.email}/
  /log:info
  /c:forEach
  jsp:forward page=/index.jsp/
 
 
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: tomcat-user-
 [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: SSL/Verisign Confusion

2003-09-05 Thread Dave Wood
I did everything with keytool.

I tried keyclone last night, but it appears that you can't clone a
trustedCertEntry.  I get the error:

Alias company has no (private) key

...it almost seems like once your keyEntry becomes a trustedCertEntry, you
can't get to the private key at all. ???

The REALLY annoying this is that I can't imagine why I would have
self-signed this thing, but that's the only explanation I can come up with
for why it is showing as a trustedCertEntry when I do a keytool -list.

I *must* be missing something.

-Original Message-
From: Jay Garala [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 9:21 AM
To: 'Tomcat Users List'
Subject: RE: SSL/Verisign Confusion


Hmm..  Did you create the PK in Tomcat's keystore or your JDK's keystore?

Try the keyclone?  Clone your 'company' to 'tomcat'.

-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 11:07 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

I realize you can't do this with keytool.  Is there no way to do it at all?

I'm beginning to think I might be totally hosed here.

Thanks,
Dave

-Original Message-
From: Jay Garala [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 8:37 AM
To: 'Tomcat Users List'
Subject: RE: SSL/Verisign Confusion


NOTE: You cannot export private key from keystore.

-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 10:32 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks.  With the exception of the openssl doc, I've been over these quite a
bit.  The result is the problem I've mentioned where keytool says it can't
import my certificate because the alias already exists.

After some help I got last night, I think the question boils down to this:

* once I have extracted my private key from keytool (haven't done this yet),
how do I take that key, the VeriSign intermediate certificate and my public
key certificate and get them to play together.  I'm hoping the openssl stuff
will take care of this, because keytool doesn't really seem to recognize
private keys as things that you can work with directly.

Thanks again,
Dave

-Original Message-
From: Jay Garala [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 7:12 AM
To: 'Tomcat Users List'
Subject: RE: SSL/Verisign Confusion


Try the Java keytool help:
 http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html

Tomcat how-to:
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html

If you have OpenSSL:
 http://forum.java.sun.com/thread.jsp?forum=2thread=4240

Jay
-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 1:04 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks Bill.  I think this highlights something I'm really not
understanding...

Didn't I generate an important private key somewhere along the line that I
can't just regenerate if I blow away my keystore?  I assumed the certificate
I got back from verisign would only work if I still had the original private
key I generated before sending them my request.  Is that wrong?

(I'll take a look at the link you sent...at first glance, it looks a little
hard to follow, but hopefully not).

Thanks again.

Dave

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker
Sent: Thursday, September 04, 2003 11:06 PM
To: [EMAIL PROTECTED]
Subject: Re: SSL/Verisign Confusion


Firstly, it looks like you should wipe you keystore and start again.  To use
a VS cert with Tomcat, the two options I know are:
1) Follow the instructions at http://www.comu.de/docs/tomcat_ssl.htm.
2) Using openssl or otherwise, convert your cert+key to a pkcs12 file, and
use that as your keystore (remember to set 'keystoreType=pkcs12' on the
Factory in server.xml).


Dave Wood [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I'm having a problem getting an SSL certificate from Verisign working
 correctly.  I'm going to include everything I can think of that MIGHT be a
 problem.  Unfortunately, there are a couple things I can't quite remember
 for certain.  Here's the situation:

 1. I generated the initial key using an alias other than tomcat (we'll
 call it company)
 2. I generated the CSR and sent it to verisign.  I still have this file.
 3. Verisign changed the company name during the verification process (from
 an acronym to the full spelling of the name)
 4. I now have the certificate that they sent back after the validation
 process.
 5. One thing I can't account for is why when I see this:

 $ keytool -list

 Keystore type: jks
 Keystore provider: SUN

 Your keystore contains 4 entries: (...others removed...)

 company, Fri Aug 22 08:47:04 MDT 2003, trustedCertEntry,
 Certificate fingerprint (MD5):
 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 (the numbers aren't really
 0's)

 ...I think I must have self-signed or something (I was doing a 

Sessions in Tomcat

2003-09-05 Thread steph . kimbrough
Hi everybody!

In a webapp (Struts/Tomcat) we have the problem,
that actions will not be found.

Besides that we encountered another more universal
problem with Tomcat: A Session is started for each
request. So eg in the Number Guess example the
Number to be guessed doesn't stay the same and you
get very strange lower/higher tips ;-)

How comes?

Tomcat4.1.18/Struts1.01/SUSELinux8.1

Bye


-- 
Sparen sie sich reich - 
Werden Sie Premium Mitglied bei freenet.de und erleben Sie 
eine exklusive aufregende Vorteilswelt!
http://www.freenet.de/tipp/premium/vorteile/index.html

RE: Using jndi to get a DBCP BasicDataSource give ClassCastExce ption

2003-09-05 Thread Angus Mezick
Andrew:  I wish, I don't use * in my imports though.  I have attached
the full tag that causes this error.

Adam: Is there a tag named GlobalResourceLink that I am not aware of?  I
am using ResourceLink as the docs tell me.

--Angus 
(3 A's)

 -Original Message-
 From: Bodycombe, Andrew [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 05, 2003 11:11 AM
 To: 'Tomcat Users List'
 Subject: RE: Using jndi to get a DBCP BasicDataSource give 
 ClassCastExce ption
 
 
 I suppose there could be two different classes called 
 BasicDataSource, in
 two different packages...
 
 -Original Message-
 From: Adam Hardy [mailto:[EMAIL PROTECTED] 
 Sent: 05 September 2003 16:03
 To: Tomcat Users List
 Subject: Re: Using jndi to get a DBCP BasicDataSource give
 ClassCastException
 
 
 And that was with the GlobalResourceLinK That doesn't 
 make sense! If 
 you get BasicDataSource as the class's name, then you won't get a 
 ClassCastException if you try to cast it to that, but you did, so 
 er. wow, you've got me stumped.
 
 On 09/05/2003 02:31 PM Angus Mezick wrote:
  I did an I got BasicDataSource.
  --Angus
  
  
 -Original Message-
 From: Adam Hardy [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 05, 2003 4:19 AM
 To: Tomcat Users List
 Subject: Re: Using jndi to get a DBCP BasicDataSource give 
 ClassCastException
 
 
 Hi Angus,
 looked at your first mail and couldn't see anything wrong 
 with it. I can 
 only suggest that you do some debugging, like output the 
 .getClass().getName() from the datasource, to see what it 
 really thinks 
 it is.
 
 Adam
 
 On 09/04/2003 10:27 PM Angus Mezick wrote:
 
 Anyone have a clue as to whether or not this is a Real bug, 
 
 or am I just
 
 screwing something up?
 
 
 
 -Original Message-
 From: Angus Mezick 
 Sent: Wednesday, September 03, 2003 4:32 PM
 To: [EMAIL PROTECTED]
 Subject: Using jndi to get a DBCP BasicDataSource give 
 ClassCastException
 
 
 I am having problems with the GlobalNamingResources.  If I 
 put my two DB
 resource entries into the GlobalNamingResources section 
 and just use
 Resource-Links to access them I cannot cast from DataSource to
 BasicDataSource.. I need to do this to use this line in my 
 
 monitoring
 
 app: (I can still use the Datasources to get talk to the 
 
 DB, just not
 
 recast it from the interface to the concrete class)
 
 pageContext.getOut().println( jdbc/CommerceDB:  Active:  +
 ((BasicDataSource)ds).getNumActive() +  Idle:  +
 ((BasicDataSource)ds).getNumIdle() + br);
 
 If I define the resources directly in the Context everything 
 works fine.
 ARGH!  Here is my server.xml snippets:
 
   GlobalNamingResources
   Resource name=jdbc/SessionDBGlobal auth=Container
   type=javax.sql.DataSource/
   Resource name=jdbc/CommerceDBGlobal auth=Container
   type=javax.sql.DataSource/
   ResourceParams name=jdbc/SessionDBGlobal
   parameter
   namefactory/name
   
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   parameter
   namemaxActive/name
   value100/value
   /parameter
   parameter
   namemaxIdle/name
   value5/value
   /parameter
   parameter
   namemaxWait/name
   value1/value
   /parameter
   parameter
   nameusername/name
   value/value
   /parameter
   parameter
   namepassword/name
   value/value
   /parameter
   parameter
   namedriverClassName/name
   valuecom.inet.tds.TdsDriver/value
   /parameter
   parameter
   nameurl/name
   valuejdbc:inetdae7a:IPADDR/value
   /parameter
   parameter
   namevalidationQuery/name
   valueselect top 1 name from
 syscolumns/value
   /parameter
   parameter
   nameremoveAbandoned/name
   valuetrue/value
   /parameter
   parameter
   nameremoveAbandonedTimeout/name
   value300/value
   /parameter
   parameter
   namelogAbandoned/name
   valuetrue/value
   /parameter
   parameter
   
 nametimeBetweenEvictionRunsMillis/name
   value6/value
   /parameter
   parameter
  

RE: Using jndi to get a DBCP BasicDataSource give ClassCastExce ption

2003-09-05 Thread Bodycombe, Andrew
You could try 

Resource name=jdbc/SessionDBGlobal auth=Container
type=org.apache.commons.dbcp.BasicDataSource/
Resource name=jdbc/CommerceDBGlobal auth=Container
type=org.apache.commons.dbcp.BasicDataSource/


-Original Message-
From: Angus Mezick [mailto:[EMAIL PROTECTED] 
Sent: 05 September 2003 16:37
To: Tomcat Users List
Subject: RE: Using jndi to get a DBCP BasicDataSource give ClassCastExce
ption


Andrew:  I wish, I don't use * in my imports though.  I have attached
the full tag that causes this error.

Adam: Is there a tag named GlobalResourceLink that I am not aware of?  I
am using ResourceLink as the docs tell me.

--Angus 
(3 A's)

 -Original Message-
 From: Bodycombe, Andrew [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 05, 2003 11:11 AM
 To: 'Tomcat Users List'
 Subject: RE: Using jndi to get a DBCP BasicDataSource give 
 ClassCastExce ption
 
 
 I suppose there could be two different classes called 
 BasicDataSource, in
 two different packages...
 
 -Original Message-
 From: Adam Hardy [mailto:[EMAIL PROTECTED] 
 Sent: 05 September 2003 16:03
 To: Tomcat Users List
 Subject: Re: Using jndi to get a DBCP BasicDataSource give
 ClassCastException
 
 
 And that was with the GlobalResourceLinK That doesn't 
 make sense! If 
 you get BasicDataSource as the class's name, then you won't get a 
 ClassCastException if you try to cast it to that, but you did, so 
 er. wow, you've got me stumped.
 
 On 09/05/2003 02:31 PM Angus Mezick wrote:
  I did an I got BasicDataSource.
  --Angus
  
  
 -Original Message-
 From: Adam Hardy [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 05, 2003 4:19 AM
 To: Tomcat Users List
 Subject: Re: Using jndi to get a DBCP BasicDataSource give 
 ClassCastException
 
 
 Hi Angus,
 looked at your first mail and couldn't see anything wrong 
 with it. I can 
 only suggest that you do some debugging, like output the 
 .getClass().getName() from the datasource, to see what it 
 really thinks 
 it is.
 
 Adam
 
 On 09/04/2003 10:27 PM Angus Mezick wrote:
 
 Anyone have a clue as to whether or not this is a Real bug, 
 
 or am I just
 
 screwing something up?
 
 
 
 -Original Message-
 From: Angus Mezick 
 Sent: Wednesday, September 03, 2003 4:32 PM
 To: [EMAIL PROTECTED]
 Subject: Using jndi to get a DBCP BasicDataSource give 
 ClassCastException
 
 
 I am having problems with the GlobalNamingResources.  If I 
 put my two DB
 resource entries into the GlobalNamingResources section 
 and just use
 Resource-Links to access them I cannot cast from DataSource to
 BasicDataSource.. I need to do this to use this line in my 
 
 monitoring
 
 app: (I can still use the Datasources to get talk to the 
 
 DB, just not
 
 recast it from the interface to the concrete class)
 
 pageContext.getOut().println( jdbc/CommerceDB:  Active:  +
 ((BasicDataSource)ds).getNumActive() +  Idle:  +
 ((BasicDataSource)ds).getNumIdle() + br);
 
 If I define the resources directly in the Context everything 
 works fine.
 ARGH!  Here is my server.xml snippets:
 
   GlobalNamingResources
   Resource name=jdbc/SessionDBGlobal auth=Container
   type=javax.sql.DataSource/
   Resource name=jdbc/CommerceDBGlobal auth=Container
   type=javax.sql.DataSource/
   ResourceParams name=jdbc/SessionDBGlobal
   parameter
   namefactory/name
   
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   parameter
   namemaxActive/name
   value100/value
   /parameter
   parameter
   namemaxIdle/name
   value5/value
   /parameter
   parameter
   namemaxWait/name
   value1/value
   /parameter
   parameter
   nameusername/name
   value/value
   /parameter
   parameter
   namepassword/name
   value/value
   /parameter
   parameter
   namedriverClassName/name
   valuecom.inet.tds.TdsDriver/value
   /parameter
   parameter
   nameurl/name
   valuejdbc:inetdae7a:IPADDR/value
   /parameter
   parameter
   namevalidationQuery/name
   valueselect top 1 name from
 syscolumns/value
   /parameter
   parameter
   nameremoveAbandoned/name
   valuetrue/value
   

Re: Using jndi to get a DBCP BasicDataSource give ClassCastExce ption

2003-09-05 Thread Adam Hardy
No, my mistake. This is my server.xml context for using a resource link:

Context path=/blacksail docBase=blacksail
  debug=5 reloadable=true crossContext=true
   Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_realm_log. suffix=.txt
timestamp=true/
   ResourceLink name=jdbc/RealmDB
global=jdbc/GlobalRealmDB
type=javax.sql.DataSource/
/Context
Perhaps it's the resource link type here that you need to examine?

Adam

On 09/05/2003 05:37 PM Angus Mezick wrote:
Andrew:  I wish, I don't use * in my imports though.  I have attached
the full tag that causes this error.
Adam: Is there a tag named GlobalResourceLink that I am not aware of?  I
am using ResourceLink as the docs tell me.
--Angus 
(3 A's)


-Original Message-
From: Bodycombe, Andrew [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 11:11 AM
To: 'Tomcat Users List'
Subject: RE: Using jndi to get a DBCP BasicDataSource give 
ClassCastExce ption

I suppose there could be two different classes called 
BasicDataSource, in
two different packages...

-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: 05 September 2003 16:03
To: Tomcat Users List
Subject: Re: Using jndi to get a DBCP BasicDataSource give
ClassCastException

And that was with the GlobalResourceLinK That doesn't 
make sense! If 
you get BasicDataSource as the class's name, then you won't get a 
ClassCastException if you try to cast it to that, but you did, so 
er. wow, you've got me stumped.

On 09/05/2003 02:31 PM Angus Mezick wrote:

I did an I got BasicDataSource.
--Angus


-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 4:19 AM
To: Tomcat Users List
Subject: Re: Using jndi to get a DBCP BasicDataSource give 
ClassCastException

Hi Angus,
looked at your first mail and couldn't see anything wrong 
with it. I can 
only suggest that you do some debugging, like output the 
.getClass().getName() from the datasource, to see what it 
really thinks 
it is.

Adam

On 09/04/2003 10:27 PM Angus Mezick wrote:


Anyone have a clue as to whether or not this is a Real bug, 
or am I just


screwing something up?




-Original Message-
From: Angus Mezick 
Sent: Wednesday, September 03, 2003 4:32 PM
To: [EMAIL PROTECTED]
Subject: Using jndi to get a DBCP BasicDataSource give 
ClassCastException

I am having problems with the GlobalNamingResources.  If I 
put my two DB
resource entries into the GlobalNamingResources section 
and just use

Resource-Links to access them I cannot cast from DataSource to
BasicDataSource.. I need to do this to use this line in my 
monitoring


app: (I can still use the Datasources to get talk to the 
DB, just not


recast it from the interface to the concrete class)

pageContext.getOut().println( jdbc/CommerceDB:  Active:  +
((BasicDataSource)ds).getNumActive() +  Idle:  +
((BasicDataSource)ds).getNumIdle() + br);
If I define the resources directly in the Context everything 
works fine.
ARGH!  Here is my server.xml snippets:

GlobalNamingResources
Resource name=jdbc/SessionDBGlobal auth=Container
type=javax.sql.DataSource/
Resource name=jdbc/CommerceDBGlobal auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/SessionDBGlobal
parameter
namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
namemaxActive/name
value100/value
/parameter
parameter
namemaxIdle/name
value5/value
/parameter
parameter
namemaxWait/name
value1/value
/parameter
parameter
nameusername/name
value/value
/parameter
parameter
namepassword/name
value/value
/parameter
parameter
namedriverClassName/name
valuecom.inet.tds.TdsDriver/value
/parameter
parameter
nameurl/name
valuejdbc:inetdae7a:IPADDR/value
/parameter
parameter
namevalidationQuery/name
valueselect top 1 name from
syscolumns/value

RE: SSL/Verisign Confusion

2003-09-05 Thread Jay Garala
Is public the one returned from Versign or is it the Verisign's CA Cert?

If you want try following to see if the cert exists within JDK trusted
calist: 
Execute from jdk\jre\lib\security Directory

keytool -list -keystore cacerts -storepass changeit

Jay

-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 04, 2003 11:12 PM
To: Tomcat Email List
Subject: SSL/Verisign Confusion

I'm having a problem getting an SSL certificate from Verisign working
correctly.  I'm going to include everything I can think of that MIGHT be a
problem.  Unfortunately, there are a couple things I can't quite remember
for certain.  Here's the situation:

1. I generated the initial key using an alias other than tomcat (we'll
call it company)
2. I generated the CSR and sent it to verisign.  I still have this file.
3. Verisign changed the company name during the verification process (from
an acronym to the full spelling of the name)
4. I now have the certificate that they sent back after the validation
process.
5. One thing I can't account for is why when I see this:

$ keytool -list

Keystore type: jks
Keystore provider: SUN

Your keystore contains 4 entries: (...others removed...)

company, Fri Aug 22 08:47:04 MDT 2003, trustedCertEntry,
Certificate fingerprint (MD5):
00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 (the numbers aren't really
0's)

...I think I must have self-signed or something (I was doing a couple of
these things and don't recall exactly), but I'm surprised to see
trustedCertEntry here.

The problem I'm having is this:

$ keytool -import -trustcacerts -alias company -file public.crt
Enter keystore password: xxx
keytool error: java.lang.Exception: Certificate not imported, alias
company already exists

(but I'm thinking it should be REPLACING this entry, so the fact that it
exists shouldn't be a problem???)

So, I have several questions:

1. Am I hosed completely because I didn't use tomcat as the alias?
2. How does the private key get stored exactly?  I assume that if I delete
the current entry for the company alias, I'll be losing the private key,
right?
3. Can someone provide steps I should take to get this working given what I
have said above.

Thanks so much in advance.  Sorry to be so long-winded.

-Dave
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003


-
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: SSL/Verisign Confusion

2003-09-05 Thread Lawrence, Gabriel
I'm working on a tool to pull out the private key. It should be done by
the end of the day. I will send something to the list when I have it
finished. Kind of funny how just as I'm getting around to a project that
has been on my plate all week someone else needs it too ;-)

-gabe

-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 8:07 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

I realize you can't do this with keytool.  Is there no way to do it at
all?

I'm beginning to think I might be totally hosed here.

Thanks,
Dave

-Original Message-
From: Jay Garala [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 8:37 AM
To: 'Tomcat Users List'
Subject: RE: SSL/Verisign Confusion


NOTE: You cannot export private key from keystore.

-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 10:32 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks.  With the exception of the openssl doc, I've been over these
quite a
bit.  The result is the problem I've mentioned where keytool says it
can't
import my certificate because the alias already exists.

After some help I got last night, I think the question boils down to
this:

* once I have extracted my private key from keytool (haven't done this
yet),
how do I take that key, the VeriSign intermediate certificate and my
public
key certificate and get them to play together.  I'm hoping the openssl
stuff
will take care of this, because keytool doesn't really seem to recognize
private keys as things that you can work with directly.

Thanks again,
Dave

-Original Message-
From: Jay Garala [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 7:12 AM
To: 'Tomcat Users List'
Subject: RE: SSL/Verisign Confusion


Try the Java keytool help:
 http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html

Tomcat how-to:
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html

If you have OpenSSL:
 http://forum.java.sun.com/thread.jsp?forum=2thread=4240

Jay
-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 1:04 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks Bill.  I think this highlights something I'm really not
understanding...

Didn't I generate an important private key somewhere along the line
that I
can't just regenerate if I blow away my keystore?  I assumed the
certificate
I got back from verisign would only work if I still had the original
private
key I generated before sending them my request.  Is that wrong?

(I'll take a look at the link you sent...at first glance, it looks a
little
hard to follow, but hopefully not).

Thanks again.

Dave

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker
Sent: Thursday, September 04, 2003 11:06 PM
To: [EMAIL PROTECTED]
Subject: Re: SSL/Verisign Confusion


Firstly, it looks like you should wipe you keystore and start again.  To
use
a VS cert with Tomcat, the two options I know are:
1) Follow the instructions at http://www.comu.de/docs/tomcat_ssl.htm.
2) Using openssl or otherwise, convert your cert+key to a pkcs12 file,
and
use that as your keystore (remember to set 'keystoreType=pkcs12' on
the
Factory in server.xml).


Dave Wood [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I'm having a problem getting an SSL certificate from Verisign working
 correctly.  I'm going to include everything I can think of that MIGHT
be a
 problem.  Unfortunately, there are a couple things I can't quite
remember
 for certain.  Here's the situation:

 1. I generated the initial key using an alias other than tomcat
(we'll
 call it company)
 2. I generated the CSR and sent it to verisign.  I still have this
file.
 3. Verisign changed the company name during the verification process
(from
 an acronym to the full spelling of the name)
 4. I now have the certificate that they sent back after the validation
 process.
 5. One thing I can't account for is why when I see this:

 $ keytool -list

 Keystore type: jks
 Keystore provider: SUN

 Your keystore contains 4 entries: (...others removed...)

 company, Fri Aug 22 08:47:04 MDT 2003, trustedCertEntry,
 Certificate fingerprint (MD5):
 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 (the numbers aren't
really
 0's)

 ...I think I must have self-signed or something (I was doing a couple
of
 these things and don't recall exactly), but I'm surprised to see
 trustedCertEntry here.

 The problem I'm having is this:

 $ keytool -import -trustcacerts -alias company -file public.crt
 Enter keystore password: xxx
 keytool error: java.lang.Exception: Certificate not imported, alias
 company already exists

 (but I'm thinking it should be REPLACING this entry, so the fact that
it
 exists shouldn't be a problem???)

 So, I have several questions:

 1. Am I hosed completely because I didn't use tomcat as the alias?
 2. How does the 

RE: SSL/Verisign Confusion

2003-09-05 Thread Dave Wood
So it's possible then...?  That's promising.

Thanks (in advance) very much.

-dave

-Original Message-
From: Lawrence, Gabriel [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 10:13 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion


I'm working on a tool to pull out the private key. It should be done by
the end of the day. I will send something to the list when I have it
finished. Kind of funny how just as I'm getting around to a project that
has been on my plate all week someone else needs it too ;-)

-gabe

-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 8:07 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

I realize you can't do this with keytool.  Is there no way to do it at
all?

I'm beginning to think I might be totally hosed here.

Thanks,
Dave

-Original Message-
From: Jay Garala [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 8:37 AM
To: 'Tomcat Users List'
Subject: RE: SSL/Verisign Confusion


NOTE: You cannot export private key from keystore.

-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 10:32 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks.  With the exception of the openssl doc, I've been over these
quite a
bit.  The result is the problem I've mentioned where keytool says it
can't
import my certificate because the alias already exists.

After some help I got last night, I think the question boils down to
this:

* once I have extracted my private key from keytool (haven't done this
yet),
how do I take that key, the VeriSign intermediate certificate and my
public
key certificate and get them to play together.  I'm hoping the openssl
stuff
will take care of this, because keytool doesn't really seem to recognize
private keys as things that you can work with directly.

Thanks again,
Dave

-Original Message-
From: Jay Garala [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 7:12 AM
To: 'Tomcat Users List'
Subject: RE: SSL/Verisign Confusion


Try the Java keytool help:
 http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html

Tomcat how-to:
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html

If you have OpenSSL:
 http://forum.java.sun.com/thread.jsp?forum=2thread=4240

Jay
-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 1:04 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks Bill.  I think this highlights something I'm really not
understanding...

Didn't I generate an important private key somewhere along the line
that I
can't just regenerate if I blow away my keystore?  I assumed the
certificate
I got back from verisign would only work if I still had the original
private
key I generated before sending them my request.  Is that wrong?

(I'll take a look at the link you sent...at first glance, it looks a
little
hard to follow, but hopefully not).

Thanks again.

Dave

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker
Sent: Thursday, September 04, 2003 11:06 PM
To: [EMAIL PROTECTED]
Subject: Re: SSL/Verisign Confusion


Firstly, it looks like you should wipe you keystore and start again.  To
use
a VS cert with Tomcat, the two options I know are:
1) Follow the instructions at http://www.comu.de/docs/tomcat_ssl.htm.
2) Using openssl or otherwise, convert your cert+key to a pkcs12 file,
and
use that as your keystore (remember to set 'keystoreType=pkcs12' on
the
Factory in server.xml).


Dave Wood [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I'm having a problem getting an SSL certificate from Verisign working
 correctly.  I'm going to include everything I can think of that MIGHT
be a
 problem.  Unfortunately, there are a couple things I can't quite
remember
 for certain.  Here's the situation:

 1. I generated the initial key using an alias other than tomcat
(we'll
 call it company)
 2. I generated the CSR and sent it to verisign.  I still have this
file.
 3. Verisign changed the company name during the verification process
(from
 an acronym to the full spelling of the name)
 4. I now have the certificate that they sent back after the validation
 process.
 5. One thing I can't account for is why when I see this:

 $ keytool -list

 Keystore type: jks
 Keystore provider: SUN

 Your keystore contains 4 entries: (...others removed...)

 company, Fri Aug 22 08:47:04 MDT 2003, trustedCertEntry,
 Certificate fingerprint (MD5):
 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 (the numbers aren't
really
 0's)

 ...I think I must have self-signed or something (I was doing a couple
of
 these things and don't recall exactly), but I'm surprised to see
 trustedCertEntry here.

 The problem I'm having is this:

 $ keytool -import -trustcacerts -alias company -file public.crt
 Enter keystore password: xxx
 keytool error: java.lang.Exception: Certificate not imported, 

Re: SSL/Verisign Confusion

2003-09-05 Thread John Turner
I always use openssl myself, but from the sound of this thread, it sure 
sounds like it is desperately needed!  Thanks!

John

Lawrence, Gabriel wrote:

I'm working on a tool to pull out the private key. It should be done by
the end of the day. I will send something to the list when I have it
finished. Kind of funny how just as I'm getting around to a project that
has been on my plate all week someone else needs it too ;-)
-gabe

-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 8:07 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

I realize you can't do this with keytool.  Is there no way to do it at
all?
I'm beginning to think I might be totally hosed here.

Thanks,
Dave
-Original Message-
From: Jay Garala [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 8:37 AM
To: 'Tomcat Users List'
Subject: RE: SSL/Verisign Confusion
NOTE: You cannot export private key from keystore.



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


RE: Bug in ErrorDispatcherValue?

2003-09-05 Thread Mike Cherichetti \(Renegade Internet\)
After debugging this further, I've figured out what's going on here.  I was
calling two methods after committing the response that process some optional
logging to a backend database and submit a record to a queue that later gets
processed by a background thread in batches.  Both of those methods access
the HttpSession to get various peices of information out of it, which
appears to be a problem when using the PersistentManager to store sessions
in a database.  I noticed some errors like this spawing from one of those
methods:

java.lang.IllegalStateException: getAttribute: Session already invalidated
at
org.apache.catalina.session.StandardSession.getAttribute(StandardSession.jav
a(Compiled Code))
at
org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessi
onFacade.java(Compiled Code))
at
org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessi
onFacade.java(Compiled Code))
... snip ...

I'm guessing the session was swapped out of memory right after the request
occurred?  Doesn't seem to make sense because I have the swap out set to
happen after 1 minute of inactivity.  This is the best possible explanation
I could come up with for the exceptions though.  Maybe a problem with the
PersistentManager swapping out a session when processing hasn't left the
service() method?

Still, I think there may be a problem with the ErrorDispatcherValve.  It
shouldn't be trying to process an error response after the response has
already been committed should it?  Maybe I'm only seeing this because I've
disabled keep alive connections.

Anyone have any input?  Should I submit something as a bug here?

Thanks,
Mike

-Original Message-
From: Mike Cherichetti (Renegade Internet)
[mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 10:06 AM
To: Tomcat Users
Subject: Bug in ErrorDispatcherValue?


I've had this happen twice in the past two days on two rather busy servers.
Both are running RedHat Linux 7.3, IBM JDK 1.4.1, and Tomcat 4.1 (one is
4.1.24 and the other is 4.1.27).  After these exceptions hit the error log,
Tomcat stops responding:


2003-09-05 06:33:06 ErrorDispatcherValve[www.mysite.com]: Exception
Processing ErrorPage[errorCode=500, location=/error/500.jsp]
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java(Compiled
Code))
at
java.net.SocketOutputStream.write(SocketOutputStream.java(Compiled Code))
at
org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWri
te(InternalOutputBuffer.java(Compiled Code))
at
org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFi
lter.java(Compiled Code))
at
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.j
ava(Compiled Code))
at
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java(Compiled
Code))
at
org.apache.coyote.tomcat4.OutputBuffer.flush(OutputBuffer.java(Compiled
Code))
at
org.apache.coyote.tomcat4.CoyoteResponse.flushBuffer(CoyoteResponse.java:555
)
at
org.apache.coyote.tomcat4.CoyoteResponseFacade.flushBuffer(CoyoteResponseFac
ade.java:227)
at
org.apache.catalina.valves.ErrorDispatcherValve.status(ErrorDispatcherValve.
java(Compiled Code))
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java(Compiled Code))
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Com
piled Code))
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compi
led Code))
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled
Code))
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
(Compiled Code))
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java(Compiled Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Compi
led Code))
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled
Code))
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java(Compiled
Code))
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java(Compil
ed Code))
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java(Compiled Code))
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java(Compil
ed Code))
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a(Compiled 

RE: Sessions in Tomcat

2003-09-05 Thread Shapira, Yoav

Howdy,
You'll need to provide more information so we can help you ;)  Needless
to say, the number guess example works properly for nearly everyone ;)

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 11:33 AM
To: [EMAIL PROTECTED]
Subject: Sessions in Tomcat

Hi everybody!

In a webapp (Struts/Tomcat) we have the problem,
that actions will not be found.

Besides that we encountered another more universal
problem with Tomcat: A Session is started for each
request. So eg in the Number Guess example the
Number to be guessed doesn't stay the same and you
get very strange lower/higher tips ;-)

How comes?

Tomcat4.1.18/Struts1.01/SUSELinux8.1

Bye


--
Sparen sie sich reich -
Werden Sie Premium Mitglied bei freenet.de und erleben Sie
eine exklusive aufregende Vorteilswelt!
http://www.freenet.de/tipp/premium/vorteile/index.html



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: Memory leaks?

2003-09-05 Thread Jim Lynch
I'm most certain the connections are closed but there may be a few
dangling statements.  I'm using mysql jdbc.  Not using pools since I
never could get it working.  Making direct requests.  

Still getting a out of memory hit every couple of days so I have to
shutdown the server and start it up again.

THnak,s
Jim.

Shapira, Yoav wrote:
 
 Howdy,
 You don't have to close a result set if you're closing the statement
 right away and the result set is the only one associated with the
 statement... And in no case can closing the result set explicitly hurt
 performance.
 
 Yoav Shapira
 Millennium ChemInformatics
 
 -Original Message-
 From: Greg Ward [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 04, 2003 10:05 AM
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: Re: Memory leaks?
 
 On 03 September 2003, Jim Lynch said:
  OK, that's probably what's going on.  I know I should close
 Statements
  and Connections and do normally but I'm fairly certain I've some out
  there dangling.  I didn't know you had to close ResultSets, however.
  Glad to know that.
 
 You don't have to close ResultSets -- check the JDBC docs:
 
 
 http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Statement.html#close()
 
 (Closing a Statement also closes any open ResultSets associated with
 that Statement.)
 
 Greg
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 This e-mail, including any attachments, is a confidential business communication, 
 and may contain information that is confidential, proprietary and/or privileged.  
 This e-mail is intended only for the individual(s) to whom it is addressed, and may 
 not be saved, copied, printed, disclosed or used by anyone else.  If you are not 
 the(an) intended recipient, please immediately delete this e-mail from your computer 
 system and notify the sender.  Thank you.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

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



Re: Session Timeout

2003-09-05 Thread G. Wade Johnson
That's actually why I was floored when my applet was kicked back to the
login form after half an hours of continuous activity.

Mike Curwen wrote:
 
 anything you set in WEB-INF/web.xml can be set in
 CATALINA_HOME/conf/web.xml and these setting will be used on a global
 basis, unless overriden at a lower level.
 
 FWIW, I've always understood session-timeout to mean after a period of
 inactivity.  I mean really... how useful would sessions be if they
 logged you out after n minutes, no matter your activity level?  Talk
 about frustrating! It doesn't matter that you've been using my site
 continuosly for the past 30 minutes, I'm still kicking you off. That
 sounds like 'session-duration' to me.
 
 
  -Original Message-
  From: G. Wade Johnson [mailto:[EMAIL PROTECTED]
  Sent: Friday, September 05, 2003 8:45 AM
  To: Tomcat Users List
  Subject: Re: Session Timeout
 
 
  I'm using Tomcat 4.1.18  4.1.24 (two different machines).
  The behavior is the same on both. As I said in my other
  message, I was basing my questions on the documentation I had
  read. Your response made me do a little testing. Now, I'm
  even more confused.
 
  My assumption was based on information in Professional Java
  Servlets 2.3 by Wrox. In chapter 5, they explicitly state
  that the session-timeout/ value applies to lifetime, not
  inactivity, (p. 240).
 
  I also checked with
  http://developer.java.sun.com/developer/Books/javaserverpages/
  servlets_javaserver/servlets_javaserver05.pdf
 
  Section 5.10 describes that parameter as well. It does seem
  to imply that we are talking about inactivity timeouts, but
  the text is not actually explicit. It could be read either way.
 
  For my test, I set the session-timeout/ to 5 minutes. If
  this was a lifetime thing, my session should expire pretty
  quickly. If not, it would last forever. (My servlet is being
  queried by an applet on a regular basis.)
 
  The session did not expire after 5 minutes. It expired after
  30 minutes, just like it did before I added the session-timeout/.
 
  Any help would be appreciated.
  G. Wade
 
  PS. Since the session-timeout/ is located in web.xml, I
  assume it is webapp-specific. Is there any way to set up a
  timeout on multiple webapps? (Short of making a change for
  each webapp.) I'm currently using single-sign-on to bring a
  couple of webapps together into one app from the user's point of view.
 
 
 
  Filip Hanik wrote:
  
   I just found out that sessions on my webapp are
  automatically being
   logged out after some period of time. Even when they are
  being used.
  
   this should not be the case session-timeout should be the
  inactivity
   timeout what version of tomcat?
   Filip
  
   - Original Message -
   From: G. Wade Johnson [EMAIL PROTECTED]
   To: Tomcat Users List [EMAIL PROTECTED]
   Sent: Thursday, September 04, 2003 2:36 PM
   Subject: Session Timeout
  
   I've just been surprised by something that I thought I understood.
  
   I just found out that sessions on my webapp are automatically being
   logged out after some period of time. Even when they are being used.
  
   From reading the docs, it appears that the normal timeout
  behavior is
   to terminate any session that has lived longer than n
  minutes. Is this
   correct?
  
   Also there appears to be a session-timeout/ element that
  allows you
   to set the length of this timeout.
  
   However, if I am reading the documentation correctly, the
  only way to
   set an inactivity timeout is programmatically? (I
  actually thought
   the session-timeout was an inactivity timeout.shrug/)
  
   How is the best way to go about adding this feature? Is the
   HttpSessionListener interface the best way to go?
  
   Thanks,
   G. Wade
  
  
  -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

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



RE: When does tomcat notice a newly deployed war file?

2003-09-05 Thread Roy Smith
It's in there already (came that way in the default install).  Anything 
else you can think of?

I'm going to try turning the debug value up to see if that shows me 
anything.

-- Schalk [EMAIL PROTECTED] wrote:

In your tomcat server.xml you can add a property like this:
!-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps
   unpackWARs=true autoDeploy=true
Kind Regards
Schalk Neethling
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.co.za
:: -Original Message-
:: From: Roy Smith [mailto:[EMAIL PROTECTED]
:: Sent: Friday, September 05, 2003 2:59 PM
:: To: [EMAIL PROTECTED]
:: Cc: Roy Smith
:: Subject: When does tomcat notice a newly deployed war file?
::
:: I've got Tomcat-4.1.24 running on Linux.
::
:: I built a new war file and copied it to my webapps directory.
:: According to my Tomcat book, Once Tomcat notices the file, it will
:: unpack it  I guess the question is, what do I need to do to make
:: Tomcat notice it?  Nothing seems to be happening, and there's nothing
:: in the log files.  Is there something I need to do to prod Tomcat into
:: noticing the new file?
::
::
:: -
:: 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]


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


Re: Tomcat startup failure

2003-09-05 Thread John Turner
Sounds to me like a permissions/environment problem.  For example, 
starting Tomcat as root manually, but then the script tries to start 
tomcat as some non-root user.  If Tomcat starts as root, log files are 
owned by root and non-root users cannot write to them.  It should throw 
an error somewhere, though maybe its getting swallowed by a redirect to 
/dev/null or something.

I would verify the script and doublecheck that the script environment 
(variables, user account, etc) matches exactly with the way you start 
Tomcat manually.

John

Noel Rappin wrote:

I have a set up where tomcat is supposed to start on boot via an rc 
shell script on a Linux system (tomcat 4.1.18).  I have this 
intermittent failure mode where tomcat fails to start up on reboot.
I can _always_ trigger this failure by deleting all tomcat log files, 
and then rebooting.  After the reboot, the only thing in the log 
directory is a zero-length catalina.out file, and the java process is 
not running.  Invoking the tomcat startup again at this point causes it 
to work normally.

I can find no evidence that the tomcat java process exits, and no matter 
how much I turn up debugging, I get no logged output.  Is there any 
possible mechanism that could be causing this failure, or at least some 
place or some way I could get better debugging information?

Noel



-
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: Memory leaks?

2003-09-05 Thread Mike Curwen
After about 15 emails, I'm gonna go back to the first:

 I seemed to have read that java/tomcat isn't 
 supposed to have memory leaks,

AND

 So where do I start looking for the problem?  
 If I forget to close Statements would that cause the 
 problem?

So first of all, Java has built-in memory management and garbage
collection, so comparing against a language like C++, it's MUCH harder
to cause a memory leak in a Java program, *but not impossible*. And up
to now we're focusing on JDBC.  Connection pools and whether or not your
driver strictly adheres to the JDBC standard are certainly one source of
memory leaks. But they're not the only ones possible. What sorts of
other activities are going on in your application?  Do you have other
3rd party libraries?  Libraries you've written yourself? Have these been
profiled and exercised to ensure they are not the ones leaking?

 
 -Original Message-
 From: Jim Lynch [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 05, 2003 9:37 AM
 To: Tomcat Users List
 Subject: Re: Memory leaks?
 
 
 I'm most certain the connections are closed but there may be 
 a few dangling statements.  I'm using mysql jdbc.  Not using 
 pools since I never could get it working.  Making direct requests.  
 
 Still getting a out of memory hit every couple of days so I 
 have to shutdown the server and start it up again.
 
 THnak,s
 Jim.
 
 Shapira, Yoav wrote:
  
  Howdy,
  You don't have to close a result set if you're closing the 
 statement 
  right away and the result set is the only one associated with the 
  statement... And in no case can closing the result set 
 explicitly hurt 
  performance.
  
  Yoav Shapira
  Millennium ChemInformatics
  
  -Original Message-
  From: Greg Ward [mailto:[EMAIL PROTECTED]
  Sent: Thursday, September 04, 2003 10:05 AM
  To: Tomcat Users List; [EMAIL PROTECTED]
  Subject: Re: Memory leaks?
  
  On 03 September 2003, Jim Lynch said:
   OK, that's probably what's going on.  I know I should close
  Statements
   and Connections and do normally but I'm fairly certain I've some 
   out there dangling.  I didn't know you had to close ResultSets, 
   however. Glad to know that.
  
  You don't have to close ResultSets -- check the JDBC docs:
  
  
  
 http://java.sun.com/j2se/1.4.2/docs/api/java/s
ql/Statement.html#close(
  )
  
  (Closing a Statement also closes any open ResultSets 
 associated with 
  that Statement.)
  
  Greg
  
  
 -
  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]
 


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



Re: How to use classes from another webapp/context?

2003-09-05 Thread Christopher Williams
Easiest method:

Put JSPs in WAR and stick in webapps
Put classes in JAR and stick in common\lib



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



Re: SSL/Verisign Confusion

2003-09-05 Thread Christopher Williams
Have you thought of manipulating the keystore programmatically?  Here's what
you'd do:

1. Open your existing keystore
2. Find the entry with your private key and (presumably) a temporary
self-signed certificate.
3. Open the certificate you got from Versign.
4. Change the certificate in your key entry to your Verisign certificate.
5. Save and close the keystore.

OpenSSL doesn't understand most of the Java keystore formats, although it
can manipulate PKCS#12 files which Keytool can handle.  If you download the
BouncyCastle crypto provider, then you can use keytool to write PKCS#12
files as well.

Also, if the person who originally posted the question doesn't feel up to
monkeying around with the Keystore classes, I have some code that I can
adapt to stick your Verisign certificate in your keystore.  Get in touch
with me personally and I'll see what I can do.

- Original Message - 
From: Jay Garala [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, September 05, 2003 3:36 PM
Subject: RE: SSL/Verisign Confusion


NOTE: You cannot export private key from keystore.

-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 10:32 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks.  With the exception of the openssl doc, I've been over these quite a
bit.  The result is the problem I've mentioned where keytool says it can't
import my certificate because the alias already exists.

After some help I got last night, I think the question boils down to this:

* once I have extracted my private key from keytool (haven't done this yet),
how do I take that key, the VeriSign intermediate certificate and my public
key certificate and get them to play together.  I'm hoping the openssl stuff
will take care of this, because keytool doesn't really seem to recognize
private keys as things that you can work with directly.

Thanks again,
Dave

-Original Message-
From: Jay Garala [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 7:12 AM
To: 'Tomcat Users List'
Subject: RE: SSL/Verisign Confusion


Try the Java keytool help:
 http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html

Tomcat how-to:
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html

If you have OpenSSL:
 http://forum.java.sun.com/thread.jsp?forum=2thread=4240

Jay
-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 1:04 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks Bill.  I think this highlights something I'm really not
understanding...

Didn't I generate an important private key somewhere along the line that I
can't just regenerate if I blow away my keystore?  I assumed the certificate
I got back from verisign would only work if I still had the original private
key I generated before sending them my request.  Is that wrong?

(I'll take a look at the link you sent...at first glance, it looks a little
hard to follow, but hopefully not).

Thanks again.

Dave

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker
Sent: Thursday, September 04, 2003 11:06 PM
To: [EMAIL PROTECTED]
Subject: Re: SSL/Verisign Confusion


Firstly, it looks like you should wipe you keystore and start again.  To use
a VS cert with Tomcat, the two options I know are:
1) Follow the instructions at http://www.comu.de/docs/tomcat_ssl.htm.
2) Using openssl or otherwise, convert your cert+key to a pkcs12 file, and
use that as your keystore (remember to set 'keystoreType=pkcs12' on the
Factory in server.xml).


Dave Wood [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I'm having a problem getting an SSL certificate from Verisign working
 correctly.  I'm going to include everything I can think of that MIGHT be a
 problem.  Unfortunately, there are a couple things I can't quite remember
 for certain.  Here's the situation:

 1. I generated the initial key using an alias other than tomcat (we'll
 call it company)
 2. I generated the CSR and sent it to verisign.  I still have this file.
 3. Verisign changed the company name during the verification process (from
 an acronym to the full spelling of the name)
 4. I now have the certificate that they sent back after the validation
 process.
 5. One thing I can't account for is why when I see this:

 $ keytool -list

 Keystore type: jks
 Keystore provider: SUN

 Your keystore contains 4 entries: (...others removed...)

 company, Fri Aug 22 08:47:04 MDT 2003, trustedCertEntry,
 Certificate fingerprint (MD5):
 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 (the numbers aren't really
 0's)

 ...I think I must have self-signed or something (I was doing a couple of
 these things and don't recall exactly), but I'm surprised to see
 trustedCertEntry here.

 The problem I'm having is this:

 $ keytool -import -trustcacerts -alias company -file public.crt
 Enter keystore password: xxx
 keytool error: java.lang.Exception: 

Re: Session Timeout

2003-09-05 Thread G. Wade Johnson
I'm looking at the 2.3 spec right now. SRV 7.5 does say that the timeout
set by setMaxInactiveInterval() is for inactivity. However, that section
doesn't address the session-timeout/ parameter. It does say that the
default is up to the container.

In SRV.13.3, the session-timeout/ defines the default timeout.
However,
the word inactivity is interestingly missing from this description. It
also specifies the ability to set the system to never timeout if the
value is set to 0 or less.

None of this explains why my session timed out after ~30 minutes of
continuous activity by default or with the session-timeout/ parameter
set to 5 minutes.

I must really be missing something. Everything everybody has said is
reasonable and matches my expectations. However, it does not appear to
match my experiments.

I'll try some more.

Thanks,
G. Wade

Shapira, Yoav wrote:
 
 Howdy,
 The servlet specification is the only authority on this, misleading
 books should be tossed aside.  SRV.7.5 is clear, session timeout is for
 inactivity, not total duration, as Senor Curwen opined.
 
 The first part of his message, using $CATALINA_HOME/conf/web.xml, I
 would discourage, as it's non-standard.  Stick to WEB-INF/web.xml, which
 is standard and therefore portable across containers.
 
 Yoav Shapira
 Millennium ChemInformatics
 
 -Original Message-
 From: Mike Curwen [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 05, 2003 10:05 AM
 To: 'Tomcat Users List'
 Subject: RE: Session Timeout
 
 anything you set in WEB-INF/web.xml can be set in
 CATALINA_HOME/conf/web.xml and these setting will be used on a global
 basis, unless overriden at a lower level.
 
 FWIW, I've always understood session-timeout to mean after a period of
 inactivity.  I mean really... how useful would sessions be if they
 logged you out after n minutes, no matter your activity level?  Talk
 about frustrating! It doesn't matter that you've been using my site
 continuosly for the past 30 minutes, I'm still kicking you off. That
 sounds like 'session-duration' to me.
 
 
 
  -Original Message-
  From: G. Wade Johnson [mailto:[EMAIL PROTECTED]
  Sent: Friday, September 05, 2003 8:45 AM
  To: Tomcat Users List
  Subject: Re: Session Timeout
 
 
  I'm using Tomcat 4.1.18  4.1.24 (two different machines).
  The behavior is the same on both. As I said in my other
  message, I was basing my questions on the documentation I had
  read. Your response made me do a little testing. Now, I'm
  even more confused.
 
  My assumption was based on information in Professional Java
  Servlets 2.3 by Wrox. In chapter 5, they explicitly state
  that the session-timeout/ value applies to lifetime, not
  inactivity, (p. 240).
 
  I also checked with
  http://developer.java.sun.com/developer/Books/javaserverpages/
  servlets_javaserver/servlets_javaserver05.pdf
 
  Section 5.10 describes that parameter as well. It does seem
  to imply that we are talking about inactivity timeouts, but
  the text is not actually explicit. It could be read either way.
 
  For my test, I set the session-timeout/ to 5 minutes. If
  this was a lifetime thing, my session should expire pretty
  quickly. If not, it would last forever. (My servlet is being
  queried by an applet on a regular basis.)
 
  The session did not expire after 5 minutes. It expired after
  30 minutes, just like it did before I added the session-timeout/.
 
  Any help would be appreciated.
  G. Wade
 
  PS. Since the session-timeout/ is located in web.xml, I
  assume it is webapp-specific. Is there any way to set up a
  timeout on multiple webapps? (Short of making a change for
  each webapp.) I'm currently using single-sign-on to bring a
  couple of webapps together into one app from the user's point of
 view.
 
 
 
  Filip Hanik wrote:
  
   I just found out that sessions on my webapp are
  automatically being
   logged out after some period of time. Even when they are
  being used.
  
   this should not be the case session-timeout should be the
  inactivity
   timeout what version of tomcat?
   Filip
  
   - Original Message -
   From: G. Wade Johnson [EMAIL PROTECTED]
   To: Tomcat Users List [EMAIL PROTECTED]
   Sent: Thursday, September 04, 2003 2:36 PM
   Subject: Session Timeout
  
   I've just been surprised by something that I thought I understood.
  
   I just found out that sessions on my webapp are automatically being
   logged out after some period of time. Even when they are being
 used.
  
   From reading the docs, it appears that the normal timeout
  behavior is
   to terminate any session that has lived longer than n
  minutes. Is this
   correct?
  
   Also there appears to be a session-timeout/ element that
  allows you
   to set the length of this timeout.
  
   However, if I am reading the documentation correctly, the
  only way to
   set an inactivity timeout is programmatically? (I
  actually thought
   the session-timeout was an inactivity timeout.shrug/)
  
   How is the best way to go 

Tomcat 4.1.24 Coyote Connector hangs

2003-09-05 Thread ryan
Hi,

Our Tomcat instances are configured to use two Coyote Connectors, one for
requests from our SSL accelerator and the other for standard HTTP requests.

We are experiencing problem where after a period of time, anything from 10
minutes to a few days, one of the Connectors stops working.  The effected
Connector continues to accept incoming requests for a short while but never
responds to them.  It occurs on both Connectors and, once one has stopped
working, typically, the other Connector remains unaffected and continues
working normally.  The only way to recover from this is for us to restart
Tomcat.

We are using Tomcat 4.1.24 running on x86 based dual CPU machines using Red
Hat Linux 9 (kernel 2.4.20-8smp) and using Java Runtime 1.4.1_03.  

We have experienced the problem even when the site is under very little
load.  Inspecting the log files does not show any occurrences of 'All
threads are busy' messages.  We have set the debug attribute of the
Connector to 9 but this has not revealed anything of interest in the logs.

We have generated numerous full thread dumps while the problem is occurring
but cannot see anything obvious when examining these and we have used
OptimizeIt to analyze our application and we cannot see anything obvious in
our application.

Our server.xml file and one of the thread dumps (when the server was under
very little load) are at the end of this mail.

Has anyone experienced something similar or perhaps have some
comments/suggestions?

Thanks for your attention.

Ryan


JAVA_OPTS=-server
CATALINA_OPTS=-Xms=900m -Xmx=900m

Server port=8005 shutdown=SHUTDOWN debug=0

Service name=Tomcat-Standalone

Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=8800 minProcessors=70 maxProcessors=300
enableLookups=false redirectPort=8443
acceptCount=10 debug=0 connectionTimeout=6
useURIValidationHack=false disableUploadTimeout=true/

Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=8801 minProcessors=70 maxProcessors=300
enableLookups=false redirectPort=8443
acceptCount=10 debug=0 connectionTimeout=6
useURIValidationHack=false disableUploadTimeout=true/

Engine name=Standalone defaultHost=localhost debug=0

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

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

Host name=localhost debug=0 appBase=webapps
unpackWARs=true autoDeploy=true liveDeploy=false

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

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

Context path= docBase=pol debug=0 
reloadable=false
Manager 
className=org.apache.catalina.session.StandardManager
debug=0
maxActiveSessions=-1
minIdleSwap=-1
maxIdleSwap=-1
maxIdleBackup=-1

pathname=/usr/local/tomcat/sessiondata/sessions.ser
/Manager
/Context

/Host

/Engine

/Service

/Server





Full thread dump Java HotSpot(TM) Server VM (1.4.1_03-b02 mixed mode):

RMI RenewClean-[10.253.2.130:1200] daemon prio=1 tid=0x0x8241728
nid=0x3571 in Object.wait() [8667f000..8667f690]
at java.lang.Object.wait(Native Method)
- waiting on 0x4ca88d38 (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
- locked 0x4ca88d38 (a java.lang.ref.ReferenceQueue$Lock)
at
sun.rmi.transport.DGCClient$EndpointEntry$RenewCleanThread.run(DGCClient.java:500)
at java.lang.Thread.run(Thread.java:536)

Thread-133 daemon prio=1 tid=0x0x83d5790 nid=0x3571 in Object.wait()
[8657e000..8657e790]
at java.lang.Object.wait(Native Method)
- waiting on 0x4ca88e08 (a java.util.TaskQueue)

RE: SSL/Verisign Confusion

2003-09-05 Thread Dave Wood
Well, after all this, I just discovered that VeriSign will basically let you
start over if it's within 30 days (which it is).  So, for now, I'm going
down this path.  Just talked to someone at V/S who said it would take just a
couple hours.

Oh, and I made a BACKUP of my new keystore file this time that now contains
a single keyEntry with the alias tomcat.  I try to avoid being stupid in
the same way more than once! :)

As for the programmatic approach, FWIW, I started down that path as well,
but somehow I had no private key entry in the keystore (best I can tell).
Still not sure how I got in that messed up state.

Thanks,
Dave

-Original Message-
From: Christopher Williams [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 9:43 AM
To: Tomcat Users List
Subject: Re: SSL/Verisign Confusion


Have you thought of manipulating the keystore programmatically?  Here's what
you'd do:

1. Open your existing keystore
2. Find the entry with your private key and (presumably) a temporary
self-signed certificate.
3. Open the certificate you got from Versign.
4. Change the certificate in your key entry to your Verisign certificate.
5. Save and close the keystore.

OpenSSL doesn't understand most of the Java keystore formats, although it
can manipulate PKCS#12 files which Keytool can handle.  If you download the
BouncyCastle crypto provider, then you can use keytool to write PKCS#12
files as well.

Also, if the person who originally posted the question doesn't feel up to
monkeying around with the Keystore classes, I have some code that I can
adapt to stick your Verisign certificate in your keystore.  Get in touch
with me personally and I'll see what I can do.

- Original Message -
From: Jay Garala [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, September 05, 2003 3:36 PM
Subject: RE: SSL/Verisign Confusion


NOTE: You cannot export private key from keystore.

-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 10:32 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks.  With the exception of the openssl doc, I've been over these quite a
bit.  The result is the problem I've mentioned where keytool says it can't
import my certificate because the alias already exists.

After some help I got last night, I think the question boils down to this:

* once I have extracted my private key from keytool (haven't done this yet),
how do I take that key, the VeriSign intermediate certificate and my public
key certificate and get them to play together.  I'm hoping the openssl stuff
will take care of this, because keytool doesn't really seem to recognize
private keys as things that you can work with directly.

Thanks again,
Dave

-Original Message-
From: Jay Garala [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 7:12 AM
To: 'Tomcat Users List'
Subject: RE: SSL/Verisign Confusion


Try the Java keytool help:
 http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html

Tomcat how-to:
 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html

If you have OpenSSL:
 http://forum.java.sun.com/thread.jsp?forum=2thread=4240

Jay
-Original Message-
From: Dave Wood [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 1:04 AM
To: Tomcat Users List
Subject: RE: SSL/Verisign Confusion

Thanks Bill.  I think this highlights something I'm really not
understanding...

Didn't I generate an important private key somewhere along the line that I
can't just regenerate if I blow away my keystore?  I assumed the certificate
I got back from verisign would only work if I still had the original private
key I generated before sending them my request.  Is that wrong?

(I'll take a look at the link you sent...at first glance, it looks a little
hard to follow, but hopefully not).

Thanks again.

Dave

-Original Message-
From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Barker
Sent: Thursday, September 04, 2003 11:06 PM
To: [EMAIL PROTECTED]
Subject: Re: SSL/Verisign Confusion


Firstly, it looks like you should wipe you keystore and start again.  To use
a VS cert with Tomcat, the two options I know are:
1) Follow the instructions at http://www.comu.de/docs/tomcat_ssl.htm.
2) Using openssl or otherwise, convert your cert+key to a pkcs12 file, and
use that as your keystore (remember to set 'keystoreType=pkcs12' on the
Factory in server.xml).


Dave Wood [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I'm having a problem getting an SSL certificate from Verisign working
 correctly.  I'm going to include everything I can think of that MIGHT be a
 problem.  Unfortunately, there are a couple things I can't quite remember
 for certain.  Here's the situation:

 1. I generated the initial key using an alias other than tomcat (we'll
 call it company)
 2. I generated the CSR and sent it to verisign.  I still have this file.
 3. Verisign changed the company name during the verification process (from

Re:setting external classes in the classpath

2003-09-05 Thread Pradeep Gummi

Hi all, 
I am tring to include external classes that are needed for my servlet 
class.   I tried to modify classpath in setclasspath.bat file by 
set CLASSPATH=%JAVA_HOME%
\lib\tools.jar;c:\mindbridge\classes\saclasses.jar
I needed all the classes in the saclasses.jar file for my servlet. When 
i restart the tomcat server, it just shows a blank page with out 
showing the default page. Is this the right way of including classes?
pradeep
- Original Message -
From: Pradeep Gummi [EMAIL PROTECTED]
Date: Friday, September 5, 2003 8:28 am
Subject: Re: How to use classes from another webapp/context?

 Hi Ulrich,
 I think you should get them working by placing the classes in the 
 CATALINA_HOME/common/classes folder or the jars in the lib folder. 
 This 
 would share the classes in all web apps. There you would be giving 
 the 
 information of the catalina and system class loaders. 
 
 grant codeBase file:${catalina.home}/common/- {
  permission java.security.AllPermission;
 };
 I am not sure if this is what you want. Actually I am trying to 
 use 
 classes from outside catalina.home and am trying to figure out if 
 that 
 is practically possible. Please update me if you have any solutions
 
 thanks
 pradeep 
 
 - Original Message -
 From: Ulrich Mayring [EMAIL PROTECTED]
 Date: Friday, September 5, 2003 4:19 am
 Subject: How to use classes from another webapp/context?
 
  Hello,
  
  I know that Tomcat has seperate classloaders for each webapp, 
 but 
  what I 
  would like to do is have JSPs in one webapp and the classes they 
  use in 
  another. I tried enabling the crossContext feature for the 
  relevant 
  contexts, but that didn't work, the classes weren't found.
  
  Background: we have editors, who write and deploy JSP files, and 
  programmers, who write and deploy classes used by JSP files. I 
  would 
  like to have the editors manage their webapps with the JSP files 
  via the 
  HTML manager and the programmers to do the same for their webapps.
  
  I know that I could put the classes under the shared directory, 
  but then 
  they would not be in a webapp anymore and thus management via 
 the 
  HTML 
  manager would not work anymore. Tomcat would need to be 
 restarted 
  on 
  every change.
  
  I could also have the programmers give JAR files to the editors 
  and have 
  the editors deploy them with their webapps, but then the classes 
  would 
  be duplicated across many webapps and also I don't want the 
  editors 
  handling JAR files.
  
  Is there any solution?
  
  Thanks in advance for any pointers,
  
  Ulrich
  
  
  
  -
 --
  --
  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 4.1.27: Realm authentication 400 error code

2003-09-05 Thread Fabio Bazzani
How is it possible I get this message:

HTTP Status 400 - Invalid direct reference to form login page

during JDBC Realm FORM authentication.

These are the stpes I followed :


1. create tables in mysql db :

create table IsInRole(
usernamevarchar(20) not null,
userrolevarchar(10) not null,
primary key(username,userrole)
);

create table usertable(
usernamevarchar(20) not null,
userpwdvarchar(10) ,

...
primary key (username)
);

2. in server.xml

  Realm className=org.apache.catalina.realm.JDBCRealm 
  debug=99
 driverName=org.gjt.mm.mysql.Driver
connectionURL=jdbc:mysql://localhost/mydb
   connectionName=username 
   connectionPassword=password
 userTable=usertable 
 userNameCol=username 
 userCredCol=userpwd
userRoleTable=IsInRole 
roleNameCol=userrole /



3.  always in server.xml, commented out :
!--
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
 debug=0 resourceName=UserDatabase/
--
4. created webapps/logIn/login.jsp with:

form name=form1 method=post action=j_security_check
   input name=j_username type=text id=login maxlength=16 size=20 
   input name=j_password type=password id=password maxlength=10 
size=20
   input type=submit value=log in name=action
   input type=reset value=pulisci name=action/p
   /form

5. in web.xml :

  security-constraint
   web-resource-collection
web-resource-nametest/web-resource-name
url-pattern/protected/*/url-pattern

http-methodDELETE/http-method
http-methodGET/http-method
http-methodPOST/http-method
http-methodPUT/http-method

  /web-resource-collection

   auth-constraint
role-namemyrole/role-name
   /auth-constraint

  /security-constraint

  login-config
   auth-methodFORM/auth-method
   realm-nameauthentication test/realm-name
   form-login-config
form-login-page/logIn/logIn.jsp/form-login-page
form-error-page/logIn/logIn-error.jsp/form-error-page
   /form-login-config
  /login-config


when I try to go to /protected/index.jsp I have to pass the login.jsp and when I 
authenticate I get 400 error code ? what's wrong ?

thank you

FB



response.sendRedirect

2003-09-05 Thread Charlie Toohey
The Servlet API doc for the sendRedirect method states:

If the location is relative with a leading '/' the container interprets 
it as relative to the servlet container root.

I've looked thru the Servlet Spec and can not quite figure out what they mean 
by servlet container root ? Is this a typo and supposed to be servlet context 
root ? Or is there really such a thing as the servlet container root, and if 
so, what is it ? 

e.g. if my context path is /cal and I want to redirect to 
/cal/form/index.jsp, what would I use in sendRedirect ?
(I know I could do a forward, but want to redirect in my situation)

Thanks,
Charlie


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



Re: setting external classes in the classpath

2003-09-05 Thread Christopher Williams
I guess that about a hundred people will respond to this.  Tomcat, for
reasons better known to itself, ignores your classpath.  The easiest
solution is to put your JAR in the Tomcat common\lib directory.
Alternatively, you can put them in WEB-INF\lib.

Question to any Tomcat developers reading: why does Tomcat ignore the class
path (and jre\lib\ext and all the other places that Java loads classes
from).  Having to stick JARs in multiple locations so that different Java
programs can find them is a serious headache, not to mention a
version-mismatch hazard.


- Original Message - 
From: Pradeep Gummi [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, September 05, 2003 6:30 PM
Subject: Re:setting external classes in the classpath



 Hi all,
 I am tring to include external classes that are needed for my servlet
 class.   I tried to modify classpath in setclasspath.bat file by
 set CLASSPATH=%JAVA_HOME%
 \lib\tools.jar;c:\mindbridge\classes\saclasses.jar
 I needed all the classes in the saclasses.jar file for my servlet. When
 i restart the tomcat server, it just shows a blank page with out
 showing the default page. Is this the right way of including classes?
 pradeep
 - Original Message -
 From: Pradeep Gummi [EMAIL PROTECTED]
 Date: Friday, September 5, 2003 8:28 am
 Subject: Re: How to use classes from another webapp/context?

  Hi Ulrich,
  I think you should get them working by placing the classes in the
  CATALINA_HOME/common/classes folder or the jars in the lib folder.
  This
  would share the classes in all web apps. There you would be giving
  the
  information of the catalina and system class loaders.
 
  grant codeBase file:${catalina.home}/common/- {
   permission java.security.AllPermission;
  };
  I am not sure if this is what you want. Actually I am trying to
  use
  classes from outside catalina.home and am trying to figure out if
  that
  is practically possible. Please update me if you have any solutions
 
  thanks
  pradeep
 
  - Original Message -
  From: Ulrich Mayring [EMAIL PROTECTED]
  Date: Friday, September 5, 2003 4:19 am
  Subject: How to use classes from another webapp/context?
 
   Hello,
  
   I know that Tomcat has seperate classloaders for each webapp,
  but
   what I
   would like to do is have JSPs in one webapp and the classes they
   use in
   another. I tried enabling the crossContext feature for the
   relevant
   contexts, but that didn't work, the classes weren't found.
  
   Background: we have editors, who write and deploy JSP files, and
   programmers, who write and deploy classes used by JSP files. I
   would
   like to have the editors manage their webapps with the JSP files
   via the
   HTML manager and the programmers to do the same for their webapps.
  
   I know that I could put the classes under the shared directory,
   but then
   they would not be in a webapp anymore and thus management via
  the
   HTML
   manager would not work anymore. Tomcat would need to be
  restarted
   on
   every change.
  
   I could also have the programmers give JAR files to the editors
   and have
   the editors deploy them with their webapps, but then the classes
   would
   be duplicated across many webapps and also I don't want the
   editors
   handling JAR files.
  
   Is there any solution?
  
   Thanks in advance for any pointers,
  
   Ulrich
  
  
  
   -
  --
   --
   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 as an in-process Servlet container?

2003-09-05 Thread Carlos Cajina - Hotmail
Howdy Bill.

My confusion comes from the fact that when using channelSocket to connect Apache 
and Tomcat I can type the URL of any WebApp without specifying Tomcat's listening port 
because the mapping/forwarding is handled in the config files, but after configuring 
ChannelJni to handle Apache-Tomcat communication I'm forced to include the port number 
(8080) in the URL to access the WebApps, otherwise I get an Internal Server Error.

I wonder wether I'm missing something in my configuration because, as I stated, my 
main concern is to let user access any WebApp without having to type
Tomcat's listening port.

Thanks for taking time to answer.

Best regards,

Carlos


Bill Barker [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 I don't really understand the question.  If you are using channelJni, then
 there is no address or port:  The data is passed in-memory.
 
 Carlos Cajina - Hotmail [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 Hi everyone.
 
 I've followed the steps in
 http://www.greenfieldresearch.ca/technical/jk2_config.html for configuring
 Apache and Tomcat to communicate using JNI with good results, but there's
 just one thing that I can't figure out: When using channelSocket as the
 communication channel between the two servers is possible to use the
 workers2.properties file to configure the host:port where Apache is supposed
 to forward requests for non-static content, so a call to some
 http://host/webapp/index.jsp would be served transparently. Now, how do I do
 the same mapping when using channelJni?
 
 My main concern is to let user access any WebApp without having to type
 Tomcat's listening port.
 
 Regards,
 
 Carlos
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

Re: response.sendRedirect

2003-09-05 Thread Christopher Williams
Say you're accessing pages on localhost, so your URLs take the form
http://localhost:8080/war-file/jsp-file
then the servlet container root is http://localhost:8080/ and a redirect to
/another-war-file/another.jsp would be a redirect to:
http://localhost:8080/another-war-file/another.jsp

In sendRedirect, I'm fairly sure that you simply use /cal/form/index.jsp.
That sort of pattern always works for my webapps.

- Original Message - 
From: Charlie Toohey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 05, 2003 7:07 PM
Subject: response.sendRedirect


 The Servlet API doc for the sendRedirect method states:

 If the location is relative with a leading '/' the container
interprets
 it as relative to the servlet container root.

 I've looked thru the Servlet Spec and can not quite figure out what they
mean
 by servlet container root ? Is this a typo and supposed to be servlet
context
 root ? Or is there really such a thing as the servlet container root, and
if
 so, what is it ?

 e.g. if my context path is /cal and I want to redirect to
 /cal/form/index.jsp, what would I use in sendRedirect ?
 (I know I could do a forward, but want to redirect in my situation)

 Thanks,
 Charlie


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



Inquiry received

2003-09-05 Thread [EMAIL PROTECTED]
Thank you for your inquiry to Alset Support!

We will process your request as soon as possible.

Please see www.alset.com for complete support information.

Alset Support Staff


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



Tomcat 5.0 Setup

2003-09-05 Thread Jun Zuo
Hi, there!

I just installed Tomcat 5.0.9 on my Windows 2000
Professional laptop. When I click on the Welcome link
in the Tomcat group on the Start menu, I get the Enter
Network Password dialog, with Site 127.0.0.1 and Realm
XDB. I tried the admin login but it didn't work.

I don't think that I'm supposed to get this dialog.
What should I do?

Thanks!

Jun Zuo


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Debugging outbound SSL communications?

2003-09-05 Thread Ert
I'm using a poorly-supported external service that interacts over SSL.   
I can connect fine to their production environment, but their developer  
environment apparently uses a less-well-known certifying authority, and  
when I try to use it I am thwarted:

javax.net.ssl.SSLException: Connection has been shutdown:  
javax.net.ssl.SSLHandshakeException:  
java.security.cert.CertificateException: Could not find trusted  
certificate
	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.d(DashoA6275)
	at com.sun.net.ssl.internal.ssl.AppInputStream.read(DashoA6275)
	at  
sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:406)
	at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:446)
	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:180)
	at java.io.InputStreamReader.read(InputStreamReader.java:167)
The vendor informs me that I merely need to add the appropriate key:

The Equifax Key is not in Java by default. You need to add it.   
Example:

1) cd $JAVA_HOME/jre/lib/security/cacerts

2) copy the GeoTrust root from here:
     
http://www.geotrust.com/resources/roots/ 
Equifax_Secure_Certificate_Authority.cer
to the file geotrustroot.cer in this directory

3) Run this command:
keytool -import -trustcacerts -alias geotrustroot -keystore cacerts  
-file geotrustroot.cer -storepass changeit
I've imported this key to every keystore I can find or think of on my  
Mac OS X system (keytool's default one,  
/Library/Java/Home/lib/security/cacerts, ~/.keystore, ~root/.keystore)  
and I continue to get the same error.

So now I'm trying to figure out if a default Tomcat 4.1.24 install uses  
its own keystore.  If not I'm hoping to find some way I can figure out  
what key the SSL connection is being presented with, and what keystore  
it's attempting to find a matching key in.  I don't know if I just have  
the wrong certificate, or if I've put it in the wrong place.

Any thoughts from the gallery?

- Ert


RE: Inquiry received

2003-09-05 Thread Welch, Ronald P
1377732 is the latest Windchill config id I have. It should be
the same config id for the gateway, I assume.

--=-=-=-=-=-=-=-=-oOo-=-=-=-=-=-=-=-=--
mailto:[EMAIL PROTECTED]Phone:(607)770-3701
BAE SYSTEMS Controls600 Main St Johnson City, NY 13790-1888
--=-=-=-=-=-=-=-=-===-=-=-=-=-=-=-=-=--


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 05, 2003 11:46 AM
To: Tomcat Users List
Subject: Inquiry received


Thank you for your inquiry to Alset Support!

We will process your request as soon as possible.

Please see www.alset.com for complete support information.

Alset Support Staff


-
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: response.sendRedirect

2003-09-05 Thread Ben Souther
The easiest way to understand this is to think about how a browser sees a 
relative link.  Browsers don't know that they're dealing with a servlet app. 
A sendRedirect simply puts the following header in the response:
Location:  url 

Let's take the following url:
http://www.mydomain.com/cal/index.jsp

If your page index.jsp resides in the context root cal and you want to 
send a redirect to page2.jsp  you would use page2.jsp.  This tells the 
browser to look in the current directory for a file name page2.jsp. 

If you enter /page2.jsp  The browser will go to what IT considers to be the 
webroot;  the first directory after the base url http://www.mydomain.com/; 
and look for page2.jsp. 

If you're several directories below the context root and need to redirect to a 
higher directory, you're better off prepending one ../ to the url for each 
directory that you need to climb than to try to list the context root and 
work your way down ( /cal/page.jsp).  This way, you won't need to fish 
through your code and change the urls if the application name cal changes. 
But that's just my opinion.

-Ben

On Friday 05 September 2003 02:07 pm, Charlie Toohey wrote:
 The Servlet API doc for the sendRedirect method states:

 If the location is relative with a leading '/' the container
 interprets it as relative to the servlet container root.

 I've looked thru the Servlet Spec and can not quite figure out what they
 mean by servlet container root ? Is this a typo and supposed to be servlet
 context root ? Or is there really such a thing as the servlet container
 root, and if so, what is it ?

 e.g. if my context path is /cal and I want to redirect to
 /cal/form/index.jsp, what would I use in sendRedirect ?
 (I know I could do a forward, but want to redirect in my situation)

 Thanks,
 Charlie


 -
 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: response.sendRedirect

2003-09-05 Thread Allen Hadden
The one thing you want to watch out for with relative redirects is that they're 
converted by the servlet container to absolute URLs (this is in the servlet spec).  
This is, by the letter of the HTTP spec, the correct thing to do.  Unfortunately, it 
can cause problems in deployments where an proxying SSL accelerator is used.  These 
are proxies that take HTTPS requests and convert them to HTTP requests, handling all 
the SSL crypto stuff in the process (this technique is used in some high-volume 
deployments where SSL is required...the SSL stuff can be done in hardware).

Consider the following:

- browser requests https://visibleserver/a.jsp
- a proxy SSL accelerator does the SSL processing, then forwards the 
  request via standard HTTP to http://realserver/a.jsp
- the web application does some processing, followed by a 
  response.sendRedirect(b.jsp), which the servlet 
  container trainslates to http://realserver/b.jsp.  
  This is probably not what the programmer intended

There are a couple of things you can do to solve this problem:

* Change all sendRedirect calls to use absolute URLs.  This implies that you know the 
absolute URL...it'd have to be a parameter to the web application, or something.

OR

* Implement your own sendRedirect method that sends the relative URL to the browser.  
This does not adhere to the HTTP spec, but all the browsers I tested seem to handle it 
fine (I've read elsewhere that this was the case too).

Anyway, this probably isn't an issue for most people.  If you have a commercial 
application and can't control the deployment, you should at least consider this, 
though.

Allen

 -Original Message-
 From: Christopher Williams [mailto:[EMAIL PROTECTED] 
 Sent: Friday, September 05, 2003 2:22 PM
 To: Tomcat Users List
 Subject: Re: response.sendRedirect
 
 
 Say you're accessing pages on localhost, so your URLs take the form
 http://localhost:8080/war-file/jsp-file
 then the servlet container root is http://localhost:8080/ and 
 a redirect to
 /another-war-file/another.jsp would be a redirect to:
 http://localhost:8080/another-war-file/another.jsp
 
 In sendRedirect, I'm fairly sure that you simply use 
 /cal/form/index.jsp.
 That sort of pattern always works for my webapps.
 
 - Original Message - 
 From: Charlie Toohey [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, September 05, 2003 7:07 PM
 Subject: response.sendRedirect
 
 
  The Servlet API doc for the sendRedirect method states:
 
  If the location is relative with a leading '/' the container
 interprets
  it as relative to the servlet container root.
 
  I've looked thru the Servlet Spec and can not quite figure 
 out what they
 mean
  by servlet container root ? Is this a typo and supposed to 
 be servlet
 context
  root ? Or is there really such a thing as the servlet 
 container root, and
 if
  so, what is it ?
 
  e.g. if my context path is /cal and I want to redirect to
  /cal/form/index.jsp, what would I use in sendRedirect ?
  (I know I could do a forward, but want to redirect in my situation)
 
  Thanks,
  Charlie
 
 
  
 -
  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: response.sendRedirect

2003-09-05 Thread Ben Souther
The one thing you want to watch out for with relative redirects is that 
they're converted by the servlet container to absolute URLs (this is in the 
servlet spec).  This is, by the letter of the HTTP spec, the correct thing 
to do.  Unfortunately, it can cause problems in deployments where an 
proxying SSL accelerator is used.  These are proxies that take HTTPS 
requests and convert them to HTTP requests, handling all the SSL crypto 
stuff in the process (this technique is used in some high-volume deployments 
where SSL is required...the SSL stuff can be done in hardware).

I stand corrected. I was unaware the container converted relative urls to 
absolute urls.  That being said, the rest of what I've said still holds true, 
just not for the reason that I thought it does.

On Friday 05 September 2003 02:53 pm, Ben Souther wrote:
 The easiest way to understand this is to think about how a browser sees a
 relative link.  Browsers don't know that they're dealing with a servlet
 app. A sendRedirect simply puts the following header in the response:
 Location:  url

 Let's take the following url:
 http://www.mydomain.com/cal/index.jsp

 If your page index.jsp resides in the context root cal and you want to
 send a redirect to page2.jsp  you would use page2.jsp.  This tells the
 browser to look in the current directory for a file name page2.jsp.

 If you enter /page2.jsp  The browser will go to what IT considers to be
 the webroot;  the first directory after the base url
 http://www.mydomain.com/; and look for page2.jsp.

 If you're several directories below the context root and need to redirect
 to a higher directory, you're better off prepending one ../ to the url
 for each directory that you need to climb than to try to list the context
 root and work your way down ( /cal/page.jsp).  This way, you won't need
 to fish through your code and change the urls if the application name cal
 changes. But that's just my opinion.

 -Ben

 On Friday 05 September 2003 02:07 pm, Charlie Toohey wrote:
  The Servlet API doc for the sendRedirect method states:
 
  If the location is relative with a leading '/' the container
  interprets it as relative to the servlet container root.
 
  I've looked thru the Servlet Spec and can not quite figure out what they
  mean by servlet container root ? Is this a typo and supposed to be
  servlet context root ? Or is there really such a thing as the servlet
  container root, and if so, what is it ?
 
  e.g. if my context path is /cal and I want to redirect to
  /cal/form/index.jsp, what would I use in sendRedirect ?
  (I know I could do a forward, but want to redirect in my situation)
 
  Thanks,
  Charlie
 
 
  -
  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]

-- 
Ben Souther
F.W. Davison  Company, Inc.



REGISTER NOW FOR THE SCORPEO USER CONFERENCE!
September 18-19, 2003 in Boston/Brookline, MA
Additional Training Sessions held September 17, 2003
More info  http://www.fwdco.com/services/Uconf03/default.shtm


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



Re: Tomcat 4.1.24 Coyote Connector hangs

2003-09-05 Thread Remy Maucherat
[EMAIL PROTECTED] wrote:

Hi,

Our Tomcat instances are configured to use two Coyote Connectors, one for
requests from our SSL accelerator and the other for standard HTTP requests.
We are experiencing problem where after a period of time, anything from 10
minutes to a few days, one of the Connectors stops working.  The effected
Connector continues to accept incoming requests for a short while but never
responds to them.  It occurs on both Connectors and, once one has stopped
working, typically, the other Connector remains unaffected and continues
working normally.  The only way to recover from this is for us to restart
Tomcat.
We are using Tomcat 4.1.24 running on x86 based dual CPU machines using Red
Hat Linux 9 (kernel 2.4.20-8smp) and using Java Runtime 1.4.1_03.  

We have experienced the problem even when the site is under very little
load.  Inspecting the log files does not show any occurrences of 'All
threads are busy' messages.  We have set the debug attribute of the
Connector to 9 but this has not revealed anything of interest in the logs.
We have generated numerous full thread dumps while the problem is occurring
but cannot see anything obvious when examining these and we have used
OptimizeIt to analyze our application and we cannot see anything obvious in
our application.
Our server.xml file and one of the thread dumps (when the server was under
very little load) are at the end of this mail.
Has anyone experienced something similar or perhaps have some
comments/suggestions?
Thanks for your attention.
I'm scpetical.

Well, there's not too much wrong with your dump. I'm only wondering 
about the thread ids which are a bit weird (the gaps are too big). Would 
you be willing to test TC 5.0.9 or 5.0.10 ? If you're having such 
stability issues with 4.1, it can't be really worse IMO. There's 
additional monitoring features (such as the status servlet), which can 
help investigate.

If you didn't edit the thread dump, then the only explanation I can see 
so far is that there's a bug with the currentThreadCount variable (and I 
can see how that would happen). If you can add some traces on the 
internal ThreadPool variables, that could also help. The structure of 
the class is relatively simple.

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


Re: setting external classes in the classpath

2003-09-05 Thread Pradeep Gummi
Hi Chistopher, 
I got this figured out with out placing the classes in any of the 
CATALINA_HOME sub directories by deleting the CLASSPATH set in the 
setclasspath.bat file. Check out the setclasspath.bat file. you wont 
have the classpath appended there. It just replaces the classpath what 
ever you set. I think that is the reason Tomcat ignores the class path.
pradeep


- Original Message -
From: Christopher Williams [EMAIL PROTECTED]
Date: Friday, September 5, 2003 2:16 pm
Subject: Re: setting external classes in the classpath

 I guess that about a hundred people will respond to this.  Tomcat, for
 reasons better known to itself, ignores your classpath.  The easiest
 solution is to put your JAR in the Tomcat common\lib directory.
 Alternatively, you can put them in WEB-INF\lib.
 
 Question to any Tomcat developers reading: why does Tomcat ignore 
 the class
 path (and jre\lib\ext and all the other places that Java loads classes
 from).  Having to stick JARs in multiple locations so that 
 different Java
 programs can find them is a serious headache, not to mention a
 version-mismatch hazard.
 
 
 - Original Message - 
 From: Pradeep Gummi [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Friday, September 05, 2003 6:30 PM
 Subject: Re:setting external classes in the classpath
 
 
 
  Hi all,
  I am tring to include external classes that are needed for my 
 servlet class.   I tried to modify classpath in setclasspath.bat 
 file by
  set CLASSPATH=%JAVA_HOME%
  \lib\tools.jar;c:\mindbridge\classes\saclasses.jar
  I needed all the classes in the saclasses.jar file for my 
 servlet. When
  i restart the tomcat server, it just shows a blank page with out
  showing the default page. Is this the right way of including 
 classes? pradeep
  - Original Message -
  From: Pradeep Gummi [EMAIL PROTECTED]
  Date: Friday, September 5, 2003 8:28 am
  Subject: Re: How to use classes from another webapp/context?
 
   Hi Ulrich,
   I think you should get them working by placing the classes in the
   CATALINA_HOME/common/classes folder or the jars in the lib folder.
   This
   would share the classes in all web apps. There you would be giving
   the
   information of the catalina and system class loaders.
  
   grant codeBase file:${catalina.home}/common/- {
permission java.security.AllPermission;
   };
   I am not sure if this is what you want. Actually I am trying to
   use
   classes from outside catalina.home and am trying to figure out if
   that
   is practically possible. Please update me if you have any 
 solutions 
   thanks
   pradeep
  
   - Original Message -
   From: Ulrich Mayring [EMAIL PROTECTED]
   Date: Friday, September 5, 2003 4:19 am
   Subject: How to use classes from another webapp/context?
  
Hello,
   
I know that Tomcat has seperate classloaders for each webapp,
   but
what I
would like to do is have JSPs in one webapp and the classes they
use in
another. I tried enabling the crossContext feature for the
relevant
contexts, but that didn't work, the classes weren't found.
   
Background: we have editors, who write and deploy JSP files, and
programmers, who write and deploy classes used by JSP files. I
would
like to have the editors manage their webapps with the JSP files
via the
HTML manager and the programmers to do the same for their 
 webapps.  
I know that I could put the classes under the shared directory,
but then
they would not be in a webapp anymore and thus management via
   the
HTML
manager would not work anymore. Tomcat would need to be
   restarted
on
every change.
   
I could also have the programmers give JAR files to the editors
and have
the editors deploy them with their webapps, but then the classes
would
be duplicated across many webapps and also I don't want the
editors
handling JAR files.
   
Is there any solution?
   
Thanks in advance for any pointers,
   
Ulrich
   
   
   
-
 
   --
--
To unsubscribe, e-mail: tomcat-user-
 [EMAIL PROTECTED]   For additional commands, e-
 mail: [EMAIL PROTECTED]
   
   
   
  
  
  
   ---
 
   --
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: tomcat-user-
 [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 

Session Timeouts and SSO

2003-09-05 Thread G. Wade Johnson
Thanks again for all of the responses so far on my Timeout issue.
I still have a problem, but it is not what I thought it was.

Apparently, there is a session-timeout/ set to 30 minutes in the
$CATALINA_HOME/conf/web.xml that I have. I don't recall changing this
(but I won't rule out the possibility). I modified that, and found
that I could get the session to expire at the time I specify.

This time, I looked at the cookies that were sent back just before I
get the login screen and found that Tomcat is sending a request to
delete the JSESSIONIDSSO cookie used by the SingleSignon valve.
Apparently, it is this valve and not Tomcat proper that is signing me
out after the timeout period.

Is this expected behavior?

Is there any way for me to work around this behavior?

Thanks again,
G. Wade

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



  1   2   >