running Tomcat from jsvc daemon under Linux as user tomcat

2004-05-20 Thread Bob White
I am running Tomcat (under Linux) from jsvc daemon as user tomcat. When I do
this, Tomcat fails to run JSPs because Tomcat cannot create java files in the
work directories and subsequently cannot compile them (cuz they're not there).
 
When I run Tomcat using startup.sh as user root I have no problems.
 
When I run Tomcat using startup.sh as user tomcat, I can compile at least
some of the java files, but there's another problem with one particular app
which uses css stylesheets and the stylesheets don't get made properly.  I'll
worry about that later.
 
Of course, the quick solution is to simply invoke startup.sh as root from my
/etc/init.d/tomcat script. But according to instructions
on the Apache site, I'm supposed to be able to run Tomcat as daemon using jsvc.
 
But something's amiss. I installed Tomcat as user tomcat and user tomcat
owns the entire directory tree (ie. /usr/local/tomcat5/...).  I put user
tomcat into group tomcat and group root and tried putting the entire
directory tree into both the tomcat group and the root group.  No
difference.
 
Any ideas?
 
BTW, the exact error message I am getting is:
 
java.io.FileNotFoundException:
/usr/local/tomcat5/work/Catalina/localhost/AHEMSS/org/apache/jsp/ahess/ess0_jsp.java
 at java.io.FileOutputStream.open(Native Method)
 at java.io.FileOutputStream.(FileOutputStream.java:179)
 at java.io.FileOutputStream.(FileOutputStream.java:70)
 at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:223)
 ... etc
 
..Bob. 

=
--Bob White-- home:727-490-7363, cell:727-463-6061
New (popup free!) photos of Polina: http://polina.70kg.com/

Everything that irritates us about others can lead us to an understanding of 
ourselves. - Carl Jung

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



Re: Tomcat 4.1 + AJP is encoding HTTP headers as UTF-8

2004-05-20 Thread Bill Barker

Eric Jacobson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Bill,

 I have been trying to trace down a problem with an application I am
building
 on top of Tomcat 4.1. The problem I was encountering was that my HTTP
 response headers were being returned to the client using UTF-8 encoding.

 My understanding of RFC 2068 is that all request and response headers
should
 be encoded as ISO-8859-1. The only mechanism for supporting other
encodings
 is by use of RFC 2047.

I seem to remember that UTF-8 was choosen based on what browsers seemed to
want.  You're correct that RFC 2616 specifies ISO-8859-1.


 The issue becomes more curious when I notice that tomcat uses ISO-8859-1
to
 encode response headers if the request is routed through the internal HTTP
 1.1 implementation. However, if the request uses the Coyote JK
 implementation, then the header strings are encoded as UTF-8. This is
being
 done explicitly in org.apache.jk.server.JkCoyoteHandler line 281.

 Is there any explanation why the Jk code is writing out the headers in
 UTF-8?


It's been doing this for a long time, but as I recall, it was to catch edge
cases for some browsers.  It would be interesting to know what header value
is giving you trouble in which client.

 Any help would be greatly appreciated.

 Thanks,
 Eric Jacobson
 Software Engineer
 FileMaker Inc.




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



Re: Session Timeout and Direct Reference to login page

2004-05-20 Thread Veniamin Fichin
Jonathan Eric Miller wrote:
Thanks. I think option #1 is what I'm looking for. What I don't understand
is what I need to do with the session listener though?
I don't understand how to determine whether the new session is truly new, or
if it's a new session because a previous session timed out. Could I use a
filter and check the incoming session ID and if the session ID isn't in the
list of session IDs that the server knows about, assume that it's an expired
session?
   Yes, this may be the right solution. Store a hash in a singleton 
class and fill it with session ids that has expired (add a new hash pair 
in every invocation of sessionDestroyed()). And at every request check that:
0) HttpSession.isNew()==true .
1) HttpServletRequest.getCookies() array contains an entry that matches 
one of your hash pairs.
   That way you may determine if that session is truly new or an 
expired one. It's just a guess.

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


webdav servlet problems with Tomcat 5.0.24 and IE

2004-05-20 Thread Roy Gardner
I posted a bug (29094) on 19/04/04. The webdav webapp shipped with 
Tomcat 5.0.24 does not serve web folders to IE5 and IE6. The server 
platform is Solaris 8 on Sun. The same behaviour is exhibited when 
running Tomcat 5.0.24 on Mac OS X 10.3.3.

This is the case despite the following, recommended, web.xml setting 
which is supposed to deal with bugs in IE:

  servlet-mapping
servlet-namewebdav/servlet-name
url-pattern/*/url-pattern
  /servlet-mapping
The problem does not occur in the webdav webapp supplied with Tomcat 
4.1.12 even though its web.xml contains:

  servlet-mapping
servlet-namewebdav/servlet-name
url-pattern//url-pattern
  /servlet-mapping
ie. the pattern that would evoke the IE bug.
Any insights would be welcome.


Production configuration

2004-05-20 Thread Wojciech Sobczuk
Hello,
I'm running a production server currently with Tomcat 5.0.19 (should I 
upgrade?) serving 200-300 thousand hits per day (and increasing).  I'm 
curious what kind of configurations you are using (server.xml, web.xml, 
JVM parameters) for your production deployments.  And what should be 
changed in my configuration in order to make it more robust/stable/etc.

Mine are:
server.xml
   Connector port=8080
  maxThreads=150 minSpareThreads=15 maxSpareThreads=45
  enableLookups=false acceptCount=100
  debug=0 connectionTimeout=1
  disableUploadTimeout=true /
web.xml
   servlet
   servlet-namejsp/servlet-name
   servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
   init-param
   param-namedevelopment/param-name
   param-valuefalse/param-value
   /init-param
   init-param
   param-namefork/param-name
   param-valuetrue/param-value
   /init-param
   init-param
   param-namexpoweredBy/param-name
   param-valuefalse/param-value
   /init-param
   init-param
   param-nametagpoolMaxSize/param-name
   param-value10/param-value
   /init-param
   load-on-startup3/load-on-startup
   /servlet
and JVM parameters:
-Xincgc -Xmx256m -server
Best regards,
Wojtek
--
Wojciech Sobczuk
[EMAIL PROTECTED]
+48 501 456 923
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Database backups initiated from Tomcat

2004-05-20 Thread Frank Burns
Thanks to ALL who contributed to helping me with this!

- Original Message - 
From: Tom K [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Wednesday, May 19, 2004 9:54 PM
Subject: RE: Database backups initiated from Tomcat


 But ?? can't you do something like this
 
 
 public static final void openFileAndExecuteAssociatedApplication(String 
 fullPathAndFileName){ 
 try { 
 Process p = Runtime.getRuntime().exec(cmd /c start 
 +fullPathAndFileName); 
 p.waitFor(); 
 } catch (Throwable ex) { 
 ex.printStackTrace(); 
 } 
 }
 
 I do agree that some of this Runtime stuff is dangerous. I'm just trying
 to help, but I don't want to waste time, so this is my last post
 regarding this topic. If anyone has a proven solution please share and
 leave the corrections to God!
 
 Tom Kochanowicz
 
 -Original Message-
 From: Ben Souther [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, May 19, 2004 3:37 PM
 To: Tomcat Users List
 Subject: Re: Database backups initiated from Tomcat
 
 On Wednesday 19 May 2004 04:22 pm, Tom K wrote:
  I'm not sure either, but you could try it in a sync block and see if
 it
  works and let us know ;-)
 
 Yoav Shapira answered that.  (getRuntime().exec is non-blocking)
 Read his reply for the details.
 
 
 
 
 -
 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.682 / Virus Database: 444 - Release Date: 5/11/2004
  
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.682 / Virus Database: 444 - Release Date: 5/11/2004
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

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



Re: Memory leak with Tomcat 5.0.19

2004-05-20 Thread wsedio
On 19-05-2004 23:15, Michiel Toneman wrote:
We were having severe memory problems too with 5.0.19.
Does Tomcat 5.0.24 fix this problem?
We added this to the jk2.properties:
 request.registerRequests=false
and the memory usage was normal again. Somewhat non-obvious, I agree. It 
also gets rid of Error registering request messages in catalina.out. 
We are using mod_jk (1.2) with Apache 1.3.x on Sun Solaris and Linux.
Do you have to add the setting even if you are using jk 1.2 (not jk 2)?
Below is the memory profile of one of our servers before and after the 
change (old generation memory refers to the memory buckets in the 
garbage collector. For more information, see jvmstat. At 100% you will 
start getting OutOfMemory errors):
How do you get the memory profile? Is it a Tomcat command?
Thanks.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Can I use Tomcat 4.1.29 with Apache 1.3.x

2004-05-20 Thread wsedio
On 19-05-2004 22:12, QM wrote:
I believe JK2 requires Apache2 but I may be wrong on that, so don't
quote me.
JK2 also works with Apache web server 1.3.
Ciao.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: tomcat 5.X mem/system tunning for lunix

2004-05-20 Thread wsedio
On 19-05-2004 21:35, QM wrote:
2/ load-test and profile the app (preferably, in a separate environment)
   to see whether the issue is load-induced, and find out what's
   leaking.
Do you have any info or link about it?
Thanks!
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Any Resource talking abt how Tomcat intergrated to Apache

2004-05-20 Thread Eric YH WONG
Hello,

Does anyone have good resources which talking about how Tomcat v5.X integrated 
with Apache v2.0.49 ?

Thx

Eric

Re: Any Resource talking abt how Tomcat intergrated to Apache

2004-05-20 Thread Salvador Santander Gutierrez
http://johnturner.com/howto/apache-tomcat-howto.html

I hope this helkp you

- Original Message - 
From: Eric YH WONG [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 12:09 PM
Subject: Any Resource talking abt how Tomcat intergrated to Apache


Hello,

Does anyone have good resources which talking about how Tomcat v5.X
integrated with Apache v2.0.49 ?

Thx

Eric



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



hi

2004-05-20 Thread TOIS
An e-mail was sent to you with an attachment.
It contains a virus. It was saved on your mail server.
Sender was: [EMAIL PROTECTED]
Recipient was: [EMAIL PROTECTED]

TOIS


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



Re: running Tomcat from jsvc daemon under Linux as user tomcat

2004-05-20 Thread Parsons Technical Services
Bob,

It sounds like a permissions problem. Check the settings in the context for
workdir=...
If you have set this, then you must ensure that your tomcat user has rights
to that directory also.

Read through the following to see if you missed anything in your setup:
http://marc.theaimsgroup.com/?l=tomcat-userm=108373546715111w=2

If all else fails, run TC as root, search for the temp directory and check
the permissions on the parent directory. Set it and the temp directory to
tomcat owner.

Doug
www.parsonstechnical.com


- Original Message - 
From: Bob White [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 2:08 AM
Subject: running Tomcat from jsvc daemon under Linux as user tomcat


 I am running Tomcat (under Linux) from jsvc daemon as user tomcat. When
I do
 this, Tomcat fails to run JSPs because Tomcat cannot create java files in
the
 work directories and subsequently cannot compile them (cuz they're not
there).

 When I run Tomcat using startup.sh as user root I have no problems.

 When I run Tomcat using startup.sh as user tomcat, I can compile at
least
 some of the java files, but there's another problem with one particular
app
 which uses css stylesheets and the stylesheets don't get made properly.
I'll
 worry about that later.

 Of course, the quick solution is to simply invoke startup.sh as root from
my
 /etc/init.d/tomcat script. But according to instructions
 on the Apache site, I'm supposed to be able to run Tomcat as daemon using
jsvc.

 But something's amiss. I installed Tomcat as user tomcat and user
tomcat
 owns the entire directory tree (ie. /usr/local/tomcat5/...).  I put user
 tomcat into group tomcat and group root and tried putting the entire
 directory tree into both the tomcat group and the root group.  No
 difference.

 Any ideas?

 BTW, the exact error message I am getting is:

 java.io.FileNotFoundException:

/usr/local/tomcat5/work/Catalina/localhost/AHEMSS/org/apache/jsp/ahess/ess0_
jsp.java
  at java.io.FileOutputStream.open(Native Method)
  at java.io.FileOutputStream.(FileOutputStream.java:179)
  at java.io.FileOutputStream.(FileOutputStream.java:70)
  at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:223)
  ... etc

 ..Bob.

 =
 --Bob White-- home:727-490-7363, cell:727-463-6061
 New (popup free!) photos of Polina: http://polina.70kg.com/

 Everything that irritates us about others can lead us to an understanding
of ourselves. - Carl Jung

 -
 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 and Direct Reference to login page

2004-05-20 Thread Ben Souther
In my case, I don't just want to test for a timed out session. I want to see 
if the session has timed out since the user has logged in.

So, when the user logs in, I add an object to the session (any object will 
do).  Then at the top of every servlet I test for the existence of that 
object 'if(session.getAttribute(myObject) == null)'.  If the object is null 
then I know that the session has timed out since the user last logged in.
At that point, I forward to the session expired page which informs the user 
that he/she must log back in.

It sounds like you're looking for something similar.


On Wednesday 19 May 2004 04:56 pm, Jonathan Eric Miller wrote:
 Thanks. I think option #1 is what I'm looking for. What I don't understand
 is what I need to do with the session listener though?

 I don't understand how to determine whether the new session is truly new,
 or if it's a new session because a previous session timed out. Could I use
 a filter and check the incoming session ID and if the session ID isn't in
 the list of session IDs that the server knows about, assume that it's an
 expired session?

 Does anyone have example source code on how to do this?

 Jon

 - Original Message -
 From: QM [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Wednesday, May 19, 2004 3:16 PM
 Subject: Re: Session Timeout and Direct Reference to login page

  On Wed, May 19, 2004 at 02:58:05PM -0500, Jonathan Eric Miller wrote:
  : All I want to do is detect when a session has timed out for a user and
  : display a page stating such when the user makes a request after the

 session

  : has timed out. It seems like this should be a straight forward thing to

 do.

  : Am I missing something?
 
  You could use a session listener and check its existence with a
  filter... In other words:
 
  // filter pseudocode
  if( null != session.getAttribute( UserMarker ) ){
  // pass the req and resp down the filter chain
  }else{
  // forward() to a your session timed out page
  }
 
  Is this what you're after?
 
  Option #2: have each page meta-refresh to the your session timed out
  page (set the refresh value 1 or 2 seconds beyond the session timeout).
  This is more intrusive, though: people don't typically like it when
  their browser starts moving around when they didn't explicitly ask.
 
  -QM
 
  --
 
  software  -- http://www.brandxdev.net
  tech news -- http://www.RoarNetworX.com
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

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

-- 
Ben Souther
F.W. Davison  Company, Inc.


This e-mail message, and any accompanying documents, is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.  Any unauthorized review, use, disclosure, distribution or
copying is prohibited.  If you are not the intended recipient, please
contact our office by email or by telephone at (508) 747-7261 and
immediately destroy all copies of the original message.

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



Re: jar and jad with httpd

2004-05-20 Thread Ben Souther

 thanks a lot...  does that mean i can use the httpd?!

If your app is running on the client side (Applets or J2ME) then you don't 
need httpd or anything other than a webserver on the server side.  None of 
you code gets executed on the server anyway.  It all get's downloaded to the 
browser (or whatever device is running j2me) and handled there.




On Wednesday 19 May 2004 05:59 pm, kalin mintchev wrote:
  For JAD files..
  .jad = text/vnd.sun.j2me.app-descriptor
 
  For JAR files...
  .jar = application/java-archive
  and / or
  .jar = application/x-java-archive

 thanks a lot...  does that mean i can use the httpd?!

  kalin mintchev wrote:
 hi all
 sorry if this isn't the right place for this question...  i just couldn't
 find a better place to ask...
 
 i'm trying to figure out if it's possible to serve .jar and .jad files
 with the apache httpd to java enabled cell phones. if so what excatly are
 the mime types i should map to the extentions...
 
 thanks...
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

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

-- 
Ben Souther
F.W. Davison  Company, Inc.


This e-mail message, and any accompanying documents, is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.  Any unauthorized review, use, disclosure, distribution or
copying is prohibited.  If you are not the intended recipient, please
contact our office by email or by telephone at (508) 747-7261 and
immediately destroy all copies of the original message.

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



session data in Tomcat 5

2004-05-20 Thread M.Hockings
My ISP has just upgraded the servlet container from Tomcat 4.1 (which 
was working just fine BTW) to Tomcat 5.0 (5.0.19 I believe).  I have had 
several webapps successfully deployed under Tomcat 4.1 that were causing 
Tomcat 5 not to start.  For the most part I think I have fixed all of 
these problems (largely a miss-configuration of log4j) but still one 
major problem remains. 

The remaining problem is that session data does not seem to be preserved 
from page to page.  That is, if on a simple .jsp I have something like:

  myPackage.myClass ml = new myPackage.myClass();
  session.putValue(ml,ml);
Then do a form-based submit to a second jsp which contains:
  jsp:useBean id=ml scope=session type=myPackage.myClass /
Then I get an error saying
  javax.servlet.ServletException: bean ml not found within scope
If I try to manually extract the ml attribute from the session in the 
second .jsp I find that it is not set.

I have done some Googling about this problem but I don't see anything 
that would help -- the hits were largely about clustering.  In my case I 
do not have access to the Tomcat config (server.xml) and have to live 
with how things are configured at the ISP.

Has anyone else experienced this problem?  If so, is there a solution?
To test this I have also installed Tomcat 5.0.24 on my laptop (Win2K) 
where it exhibits the same problem and on a Linux (Fedora Core 1) 
machine where it does not exhibit this problem. Both are running on 
Sun's 1.4 JDK with the stock (as shipped) server.xml.

The ISP which has been very responsive in the past is being not all that 
helpful and they had the active component of the sites down for the best 
part of a week!

Mike

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


RE: How to detect tomcat down

2004-05-20 Thread Boland, Dave
Feel free to shoot this down in flames, but wouldn't the JMX approach be
more appropriate? 

If the only connector you have is the mod_jk, then testing for serving of
pages will be a bit of a bugger to write, but an attempt to connect to the
Tomcat instance MBean ( ServerLifeCycleListener? ) would be an immediate
check - no?

Surely, this is one of the things that JMX is designed for ... 

Dave
( Currently reading up on JMX ... sorry ;)



-Original Message-
From: Simon Zeng [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 18, 2004 8:04 PM
To: 'Tomcat Users List'
Subject: How to detect tomcat down


Hi,

I am running Apache 2.0.47 and Tomcat 4.1.24 on Win2K/NT. I would like to
monitor the tomcat 
server and restart it automatically if it is detected down. I did a lot
research but could not find any convincing way to do it.

Another issue, I am running tomcat load balancing with mod_jk. I would like
to know from mod_jk.log (or anywhere else?) which tomcat instance has
problem (if it happens). But I could not find how to put the information
there. Those flags in mod_jk documentation does not work for me.

I would highly appreciate it if anyone here could help me out.


Thanks,
-Simon


The contents of this email and any attachments are sent for the personal attention
of the addressee(s) only and may be confidential.  If you are not the intended
addressee, any use, disclosure or copying of this email and any attachments is
unauthorised - please notify the sender by return and delete the message.  Any
representations or commitments expressed in this email are subject to contract. 
 
ntl Group Limited


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



Re: java.lang.ClassCircularityError

2004-05-20 Thread Viktor Matic
On Wed, 2004-05-19 at 18:49, Jeanfrancois Arcand wrote:
/*This line is in servlet service method*/
Subject.doAsPrivileged(subject, new SecuredActions(), null );
   
 
 Yes, that's probably the problem since SecurityUtil has already set that 
 value.  The AccesControlContext already has the Subject attached to it. 
 You may want to try:
 
 Subject.getSubject(AccessController.getContext());
 

I have checked SecurityUtil class. If I understand it well it invokes
servlet service method with the doAsPrivileged and the subject cached in
the HttpSession. If I check current Subject with
Subject.getSubject(AccessController.getContext()) inside service method
before I call my doAsPrivleged it returns null. 
So I use my subject (which I get from login context with
lc.getSubject()) to execute Subject.doAsPrivileged(subject, new
SecuredActions(), null )
protected code which in turn check the subject permission. 

So I can try to describe whole situation as I see it:

First, servlet service method is called as doAsPrivileged with null
subject (which is cached in HttpSession) then I invoke doAsPrivileged
within service method with subject generated in Login procedure on
SecuredAction class. Here something goes wrong and I can't get what!?

(P.S. This works fine on tomcat 4.1.30 maybe we should check
SecurityUtil class implementation there?)

Viktor






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



RE: Any Resource talking abt how Tomcat intergrated to Apache

2004-05-20 Thread Shapira, Yoav

Hi,
And more: http://wiki.apache.org/jakarta-tomcat/Tomcat/Links.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Salvador Santander Gutierrez [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 7:17 AM
To: Tomcat Users List
Subject: Re: Any Resource talking abt how Tomcat intergrated to Apache

http://johnturner.com/howto/apache-tomcat-howto.html

I hope this helkp you

- Original Message -
From: Eric YH WONG [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 12:09 PM
Subject: Any Resource talking abt how Tomcat intergrated to Apache


Hello,

Does anyone have good resources which talking about how Tomcat v5.X
integrated with Apache v2.0.49 ?

Thx

Eric



-
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: session data in Tomcat 5

2004-05-20 Thread Ben Souther
putValue and getValue have been deprecated.
See: http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.html

Use setAttribute and getAttribute instead.



On Thursday 20 May 2004 08:41 am, M.Hockings wrote:
 My ISP has just upgraded the servlet container from Tomcat 4.1 (which
 was working just fine BTW) to Tomcat 5.0 (5.0.19 I believe).  I have had
 several webapps successfully deployed under Tomcat 4.1 that were causing
 Tomcat 5 not to start.  For the most part I think I have fixed all of
 these problems (largely a miss-configuration of log4j) but still one
 major problem remains.

 The remaining problem is that session data does not seem to be preserved
 from page to page.  That is, if on a simple .jsp I have something like:

myPackage.myClass ml = new myPackage.myClass();
session.putValue(ml,ml);

 Then do a form-based submit to a second jsp which contains:

jsp:useBean id=ml scope=session type=myPackage.myClass /

 Then I get an error saying

javax.servlet.ServletException: bean ml not found within scope

 If I try to manually extract the ml attribute from the session in the
 second .jsp I find that it is not set.

 I have done some Googling about this problem but I don't see anything
 that would help -- the hits were largely about clustering.  In my case I
 do not have access to the Tomcat config (server.xml) and have to live
 with how things are configured at the ISP.

 Has anyone else experienced this problem?  If so, is there a solution?

 To test this I have also installed Tomcat 5.0.24 on my laptop (Win2K)
 where it exhibits the same problem and on a Linux (Fedora Core 1)
 machine where it does not exhibit this problem. Both are running on
 Sun's 1.4 JDK with the stock (as shipped) server.xml.

 The ISP which has been very responsive in the past is being not all that
 helpful and they had the active component of the sites down for the best
 part of a week!

 Mike



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

-- 
Ben Souther
F.W. Davison  Company, Inc.


This e-mail message, and any accompanying documents, is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.  Any unauthorized review, use, disclosure, distribution or
copying is prohibited.  If you are not the intended recipient, please
contact our office by email or by telephone at (508) 747-7261 and
immediately destroy all copies of the original message.

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



RE: tomcat 5.X mem/system tunning for lunix

2004-05-20 Thread Shapira, Yoav

Hi,
STFA ;)  Search the archives of this list, there is plenty of
information on testing and profiling.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: wsedio [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 6:04 AM
To: Tomcat Users List
Subject: Re: tomcat 5.X mem/system tunning for lunix

On 19-05-2004 21:35, QM wrote:

 2/ load-test and profile the app (preferably, in a separate
environment)
to see whether the issue is load-induced, and find out what's
leaking.

Do you have any info or link about it?

Thanks!

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




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


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



Re: java.lang.ClassCircularityError

2004-05-20 Thread Viktor Matic
On Wed, 2004-05-19 at 18:41, Filip Hanik - Dev wrote:
 where are your classes?
 if you put them in server/lib or server/classes and not in your webapp,
 do you still get the error?
 
 Filip

These classes are placed in the webapp directory together with
application that use them. This approach seems logical to me. Hence, as
you have suggested I have tried to put them in the server/classes
directory, but this approach arised new problem, I receive ClassNotFound
error for first class that should be used from our security system. I'am
not sure why this happens (why class loader can not find these
classes?). But, something tells me that this problem is not correlated
with initial problem. 

Why did you suggest me to place classes in server/classes directory,
what did you have on your mind?

-- Viktor 


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



Re: Production configuration

2004-05-20 Thread QM
On Thu, May 20, 2004 at 11:56:00AM +0200, Wojciech Sobczuk wrote:
: I'm running a production server currently with Tomcat 5.0.19 (should I 
: upgrade?) serving 200-300 thousand hits per day (and increasing).  I'm 
: curious what kind of configurations you are using (server.xml, web.xml, 
: JVM parameters) for your production deployments.  And what should be 
: changed in my configuration in order to make it more robust/stable/etc.

Load-test, profile, tune accordingly.


For the JSP servlet:
:init-param
:param-namefork/param-name
:param-valuetrue/param-value

You don't need this if you precompile.


: and JVM parameters:
: -Xincgc -Xmx256m -server

Similar questions get asked twice a week, especially the JVM
parameters one.  Please search the archives.  Yesterday there was a
message explaining exactly why no one can help you with the JVM params.

-QM

-- 


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


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



Caching Service for clustered tomcat

2004-05-20 Thread Holly, Michael
I have written a web app that uses my own object cache, this works great
as a singleton,  but would like to eventually get where I can cluster my
servlet container.  I have just heard about jcs and jCache.  Does anyone
have any other resources for implementing these on a clustered tomcat
4.x?  Am I missing a FAQ somewhere?
 
thanks
 
Michael Holly


Re: session data in Tomcat 5

2004-05-20 Thread QM
On Thu, May 20, 2004 at 08:55:43AM -0400, Ben Souther wrote:
: putValue and getValue have been deprecated.
: See:
: http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.html
: 
: Use setAttribute and getAttribute instead.

Yes, did you rebuild your app when you upgraded?
That would have caught the deprecation warning.

I've included that, and other tips, in my (brief) 4.x - 5.x upgrade
guide:

http://www.brandxdev.net/misc/tomcat_upgrade.site

Ben: thanks for the putValue/getValue info, I'll include that as well.
(It never bit me, because I never used them... ;)

-QM

-- 

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


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



equivalent of DefaultContext element for Host

2004-05-20 Thread wsedio
Hi all,
I've found the DefaultContext element very useful:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/defaultcontext.html
---
The DefaultContext element represents a subset of the configuration 
settings for a Context, and can be nested inside an Engine or Host 
element to represent default configuration properties for Contexts that 
are automatically created.
---

Is there an equivalent element for Host?
I've a few Tomcat virtual hosts and I'd like to set some default config 
properties for them.

I am running Tomcat 5.0.24 on Linux.
Thanks!
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: session data in Tomcat 5

2004-05-20 Thread Ryan Lissack
Hi,

 I've included that, and other tips, in my (brief) 4.x - 5.x upgrade
 guide:

  http://www.brandxdev.net/misc/tomcat_upgrade.site

Thanks for making that available, quite useful.

Regards,
Ryan.

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



Re: trick question

2004-05-20 Thread Sam Seaver
Thank you for your reply,
so basically, this shouldn't affect Tomcat adversley in anyway right? 

I was considering having tomcat automcatically restart a minute later 
after httpd every sunday morning, is there anything wrong with that idea?
Cheers
Sam

Bill Barker wrote:
Sam Seaver [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 

Httpd by default, because of the logfile rotation that occurs every
Sunday morning at 4am, restarts at the same time.
If Tomcat is never re-started, what does this do to the jk2 connection
between the two?
   

I'm going to assume that you are using the socket-channel.  The answer is a
bit different if you are using the jni-channel.
Of course, the jk2 connections are closed when httpd shuts down.  For
connections that aren't in the middle of handling a request, they will close
down and the corresponding Thread will terminate.  For connections that are
in the middle of handling a request, you'll likely get an IOException the
next time they try and write output, and then they will shutdown and
terminate the Thread.  When httpd comes back up, it will establish new
connections as soon as it gets a request that should be forwarded to Tomcat.
 

S
   



-
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 data in Tomcat 5

2004-05-20 Thread M.Hockings
QM wrote:
On Thu, May 20, 2004 at 08:55:43AM -0400, Ben Souther wrote:
: putValue and getValue have been deprecated.
: See:
: http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.html
: 
: Use setAttribute and getAttribute instead.

Yes, did you rebuild your app when you upgraded?
That would have caught the deprecation warning.
I've included that, and other tips, in my (brief) 4.x - 5.x upgrade
guide:
http://www.brandxdev.net/misc/tomcat_upgrade.site
Ben: thanks for the putValue/getValue info, I'll include that as well.
(It never bit me, because I never used them... ;)
-QM
To be honest the putValue/getValue has been deprecated for a while but 
continues to work so I've been too lazy to change it (why change what 
works).  However changing to setAttribute/getAttribute seems to make no 
difference.  All I'm trying to get functional at the moment is a set of 
4 or 5 jsp's that bounce back and forth to allow people to update some 
properties files.  If I can get that going then I'll move on to the 
Stuts based apps.  The loose jsp's are just dropped into a pre-defined 
(by the ISP) webapp and are thus not truly built.  The bigger apps are 
crafted using IBM's WDSCi for j2ee 1.3 and deployed via WAR files.

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


Re: Trying to get a Cluster/Session Replication working

2004-05-20 Thread Filip Hanik - Dev
You're problem is obvious,
the application in team.xml is only running on box 2.
Make sure that all your clustered applications are deployed on all servers.

Filip

- Original Message - 
From: Randy [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Wednesday, May 19, 2004 11:37 PM
Subject: RE: Trying to get a Cluster/Session Replication working


I am saying. don't start the servers at the same time :)
Sorry Brain Flatulence

BTW, I am running these are user apache. That's how they run in production..

Here are the logs
BOX 1
=
-bash-2.05b$ ./catalina.sh run
Using CATALINA_BASE:   /usr/java/jakarta-tomcat
Using CATALINA_HOME:   /usr/java/jakarta-tomcat
Using CATALINA_TMPDIR: /usr/java/jakarta-tomcat/temp
Using JAVA_HOME:   /usr/java/j2sdk1.4.2_04
May 19, 2004 11:31:42 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 19, 2004 11:31:43 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4842 ms
May 19, 2004 11:31:43 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 19, 2004 11:31:43 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.24
May 19, 2004 11:31:43 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 19, 2004 11:31:43 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster
start
INFO: Cluster is about to start
May 19, 2004 11:31:43 PM org.apache.catalina.cluster.mcast.McastService
start
INFO: Sleeping for 2000 secs to establish cluster membership
May 19, 2004 11:31:46 PM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx ) 
May 19, 2004 11:31:46 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL
file:/usr/java/jakarta-tomcat-5.0.24/conf/Catalina/localhost/admin.xml
May 19, 2004 11:31:47 PM org.apache.struts.util.PropertyMessageResources
init
INFO: Initializing, config='org.apache.struts.util.LocalStrings',
returnNull=true
May 19, 2004 11:31:47 PM org.apache.struts.util.PropertyMessageResources
init
INFO: Initializing, config='org.apache.struts.action.ActionResources',
returnNull=true
May 19, 2004 11:31:49 PM org.apache.struts.util.PropertyMessageResources
init
INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources',
returnNull=true
May 19, 2004 11:31:55 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL
file:/usr/java/jakarta-tomcat-5.0.24/conf/Catalina/localhost/balancer.xml
May 19, 2004 11:31:56 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL
file:/usr/java/jakarta-tomcat-5.0.24/conf/Catalina/localhost/manager.xml
May 19, 2004 11:31:56 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path  from URL
file:/usr/java/jakarta-tomcat-5.0.24/webapps/ROOT
May 19, 2004 11:31:56 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /jsp-examples from URL
file:/usr/java/jakarta-tomcat-5.0.24/webapps/jsp-examples
May 19, 2004 11:31:57 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /servlets-examples from URL
file:/usr/java/jakarta-tomcat-5.0.24/webapps/servlets-examples
May 19, 2004 11:31:57 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /tomcat-docs from URL
file:/usr/java/jakarta-tomcat-5.0.24/webapps/tomcat-docs
May 19, 2004 11:31:57 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /webdav from URL
file:/usr/java/jakarta-tomcat-5.0.24/webapps/webdav
May 19, 2004 11:31:57 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 19, 2004 11:31:58 PM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx ) 
May 19, 2004 11:31:58 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 19, 2004 11:31:58 PM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx ) 
May 19, 2004 11:31:58 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 19, 2004 11:32:00 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
May 19, 2004 11:32:00 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=2/206
config=/usr/java/jakarta-tomcat/conf/jk2.properties
May 19, 2004 11:32:00 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 17178 ms
May 19, 2004 11:32:43 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster
memberAdded
INFO: Replication member

Re: java.lang.ClassCircularityError

2004-05-20 Thread Jeanfrancois Arcand

Viktor Matic wrote:
On Wed, 2004-05-19 at 18:49, Jeanfrancois Arcand wrote:
 

 /*This line is in servlet service method*/
 Subject.doAsPrivileged(subject, new SecuredActions(), null );
 

Yes, that's probably the problem since SecurityUtil has already set that 
value.  The AccesControlContext already has the Subject attached to it. 
You may want to try:

Subject.getSubject(AccessController.getContext());
   

I have checked SecurityUtil class. If I understand it well it invokes
servlet service method with the doAsPrivileged and the subject cached in
the HttpSession. If I check current Subject with
Subject.getSubject(AccessController.getContext()) inside service method
before I call my doAsPrivleged it returns null.
So I use my subject (which I get from login context with
lc.getSubject()) to execute Subject.doAsPrivileged(subject, new
SecuredActions(), null )
protected code which in turn check the subject permission. 

So I can try to describe whole situation as I see it:
First, servlet service method is called as doAsPrivileged with null
subject (which is cached in HttpSession) then I invoke doAsPrivileged
within service method with subject generated in Login procedure on
SecuredAction class. Here something goes wrong and I can't get what!?
 

This is probably related to the subject configuration. Can you create a 
small test case that reproduce the problem? I will be able to better see 
what's happening.

(P.S. This works fine on tomcat 4.1.30 maybe we should check
SecurityUtil class implementation there?)
 

There is no such class in 4.x. This was added in 5.x. That's why I 
suspect the problem is with that class.

Thanks
-- Jeanfrancois
Viktor


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


aparche log backup and cleanup

2004-05-20 Thread Simon Zeng
Hello,

Our aparche access.log is getting bigger  bigger. I would like to put in a
script to check
the size and do a backup  cleanup without shutdowning Apache. But it won't
allow me to do that because other process(Apache) is using it. Is there any
way to work around this. Or if 
Aparch has similar mechanism like Tomcat catalina log?

Thanks,
-Simon

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



RE: tag library compile - semi-resolution

2004-05-20 Thread Zollinhofer, Matt
Thanks for all help Yoav, QM, and Filip.  It turns out that the
jsp-api.jar was the jar I needed to have on the classpath.  The
confusing thing is that I had the directory that it was in on the class
path (eg. $CATALINA_HOME/common/lib) but my HelloTag.java still would
not compile.  It was only when I put the jar file in particular on the
classpath that it would compile (eg.
$CATALINE_HOME/common/lib/jsp-api.jar).  I also tried, just to see if it
would work, putting the jar in the same directory as the HelloTag.java
because the current directory is on the classpath, but that did not work
either.  

So, it works, but I don't really understand the necessity of having the
particular jar file on the classpath.

matt

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



RE: equivalent of DefaultContext element for Host

2004-05-20 Thread Shapira, Yoav

Hi,
There isn't an equivalent for Host at this point.

Be careful when relying on the DefaultContext, it can lead to laziness.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: wsedio [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 9:25 AM
To: Tomcat Users List
Subject: equivalent of DefaultContext element for Host

Hi all,
I've found the DefaultContext element very useful:

http://jakarta.apache.org/tomcat/tomcat-5.0-
doc/config/defaultcontext.html
---
The DefaultContext element represents a subset of the configuration
settings for a Context, and can be nested inside an Engine or Host
element to represent default configuration properties for Contexts that
are automatically created.
---

Is there an equivalent element for Host?

I've a few Tomcat virtual hosts and I'd like to set some default config
properties for them.

I am running Tomcat 5.0.24 on Linux.

Thanks!

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




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


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



RE: aparche log backup and cleanup

2004-05-20 Thread Shapira, Yoav

Hi,
Logrotate: http://www.rt.com/man/logrotate.8.html.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Simon Zeng [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 10:05 AM
To: 'Tomcat Users List'
Subject: aparche log backup and cleanup

Hello,

Our aparche access.log is getting bigger  bigger. I would like to put
in a
script to check
the size and do a backup  cleanup without shutdowning Apache. But it
won't
allow me to do that because other process(Apache) is using it. Is there
any
way to work around this. Or if
Aparch has similar mechanism like Tomcat catalina log?

Thanks,
-Simon

-
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: session data in Tomcat 5

2004-05-20 Thread M.Hockings
Yes, good point, gives you an idea how long some of this stuff has been 
deployed :-)

However, even changing to setAttribute() and getAttribute() does not 
seem to solve the problem.  This should be trivial I would think but it 
seems to be beyond me at the moment.

Is there maybe some (small) limit to the size of session attributes in 
Tomcat 5?  In this case ml is a populated properties file.  Though in 
this case it contains only about 5 or 6 entries.

in starting jsp 1
 session.setAttribute(ml,ml);
in target jsp 2
 MyPackage.MyClass ml = (MyPackage.MyClass)session.getAttribute(ml);
 System.out.println(ml = +ml); 

then in the log I see...
  ml = null
Mike
Ben Souther wrote:
putValue and getValue have been deprecated.
See: http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.html
Use setAttribute and getAttribute instead.

On Thursday 20 May 2004 08:41 am, M.Hockings wrote:
 

My ISP has just upgraded the servlet container from Tomcat 4.1 (which
was working just fine BTW) to Tomcat 5.0 (5.0.19 I believe).  I have had
several webapps successfully deployed under Tomcat 4.1 that were causing
Tomcat 5 not to start.  For the most part I think I have fixed all of
these problems (largely a miss-configuration of log4j) but still one
major problem remains.
The remaining problem is that session data does not seem to be preserved
from page to page.  That is, if on a simple .jsp I have something like:
  myPackage.myClass ml = new myPackage.myClass();
  session.putValue(ml,ml);
Then do a form-based submit to a second jsp which contains:
  jsp:useBean id=ml scope=session type=myPackage.myClass /
Then I get an error saying
  javax.servlet.ServletException: bean ml not found within scope
If I try to manually extract the ml attribute from the session in the
second .jsp I find that it is not set.
I have done some Googling about this problem but I don't see anything
that would help -- the hits were largely about clustering.  In my case I
do not have access to the Tomcat config (server.xml) and have to live
with how things are configured at the ISP.
Has anyone else experienced this problem?  If so, is there a solution?
To test this I have also installed Tomcat 5.0.24 on my laptop (Win2K)
where it exhibits the same problem and on a Linux (Fedora Core 1)
machine where it does not exhibit this problem. Both are running on
Sun's 1.4 JDK with the stock (as shipped) server.xml.
The ISP which has been very responsive in the past is being not all that
helpful and they had the active component of the sites down for the best
part of a week!
Mike

-
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 data in Tomcat 5

2004-05-20 Thread Shapira, Yoav

Hi,
Is your attribute Serializable?  That's a big deal ;)

There's no limit imposed by Tomcat on session attribute size.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: M.Hockings [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 9:20 AM
To: Tomcat Users List
Subject: Re: session data in Tomcat 5

Yes, good point, gives you an idea how long some of this stuff has been
deployed :-)

However, even changing to setAttribute() and getAttribute() does not
seem to solve the problem.  This should be trivial I would think but it
seems to be beyond me at the moment.

Is there maybe some (small) limit to the size of session attributes in
Tomcat 5?  In this case ml is a populated properties file.  Though in
this case it contains only about 5 or 6 entries.

in starting jsp 1
  session.setAttribute(ml,ml);

in target jsp 2
  MyPackage.MyClass ml = (MyPackage.MyClass)session.getAttribute(ml);
  System.out.println(ml = +ml);

then in the log I see...

   ml = null


Mike

Ben Souther wrote:

putValue and getValue have been deprecated.
See:
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.ht
ml

Use setAttribute and getAttribute instead.



On Thursday 20 May 2004 08:41 am, M.Hockings wrote:


My ISP has just upgraded the servlet container from Tomcat 4.1 (which
was working just fine BTW) to Tomcat 5.0 (5.0.19 I believe).  I have
had
several webapps successfully deployed under Tomcat 4.1 that were
causing
Tomcat 5 not to start.  For the most part I think I have fixed all of
these problems (largely a miss-configuration of log4j) but still one
major problem remains.

The remaining problem is that session data does not seem to be
preserved
from page to page.  That is, if on a simple .jsp I have something
like:

   myPackage.myClass ml = new myPackage.myClass();
   session.putValue(ml,ml);

Then do a form-based submit to a second jsp which contains:

   jsp:useBean id=ml scope=session type=myPackage.myClass /

Then I get an error saying

   javax.servlet.ServletException: bean ml not found within scope

If I try to manually extract the ml attribute from the session in the
second .jsp I find that it is not set.

I have done some Googling about this problem but I don't see anything
that would help -- the hits were largely about clustering.  In my
case I
do not have access to the Tomcat config (server.xml) and have to live
with how things are configured at the ISP.

Has anyone else experienced this problem?  If so, is there a
solution?

To test this I have also installed Tomcat 5.0.24 on my laptop (Win2K)
where it exhibits the same problem and on a Linux (Fedora Core 1)
machine where it does not exhibit this problem. Both are running on
Sun's 1.4 JDK with the stock (as shipped) server.xml.

The ISP which has been very responsive in the past is being not all
that
helpful and they had the active component of the sites down for the
best
part of a week!

Mike



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







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




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


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



Is there any way to check # of Records in RecordSet

2004-05-20 Thread soh_mah
Hi

Is there any way to check number of Records in
RecordSet?


=
Regards

Sohail Mahmood
(416) 636-2553




__
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

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



RE: Is there any way to check # of Records in RecordSet

2004-05-20 Thread Dale, Matt
This is the wrong list i'm pretty sure but there are a couple of ways to get the 
number but there isnt a direct method that returns it.

If the result set is scrollable you can iterate through it counting the number of 
iterations, then set it back to the start when you want to process the records.

The other option (one I prefer) is to load the records into an ArrayList, you can then 
determine the size quite easily.

If anyone else has any neater solutions i'd like to hear them too as I've had to do 
this in a few places.

Ta
Matt

-Original Message-
From: soh_mah [mailto:[EMAIL PROTECTED]
Sent: 20 May 2004 15:20
To: [EMAIL PROTECTED]
Subject: Is there any way to check # of Records in RecordSet


Hi

Is there any way to check number of Records in
RecordSet?


=
Regards

Sohail Mahmood
(416) 636-2553




__
Do you Yahoo!?
Yahoo! Domains - Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

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

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


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

RE: Is there any way to check # of Records in RecordSet

2004-05-20 Thread Adam Buglass
This is the wrong list but never mind

An alternative is the following:

ResultSet rs;
int i = 0;
while( rs.next() ) {
i++;
}

The integer i should be the length of your result set (by the way, don't
get confused with RecordSets which are VB - I used to do that all the
time!) at the end of the loop - assuming of course that you start from
the start of the set, you could use rs.first() to ensure this.

There's tons of useful info on Java methods and classes on suns site:
http://java.sun.com/j2se/1.3/docs/api/
http://java.sun.com/j2se/1.3/

Also look on www.sun.com for good java mailing lists where this kind of
question is more specific.

Adam.


On Thu, 2004-05-20 at 15:26, Dale, Matt wrote:
 This is the wrong list i'm pretty sure but there are a couple of ways to get the 
 number but there isnt a direct method that returns it.
 
 If the result set is scrollable you can iterate through it counting the number of 
 iterations, then set it back to the start when you want to process the records.
 
 The other option (one I prefer) is to load the records into an ArrayList, you can 
 then determine the size quite easily.
 
 If anyone else has any neater solutions i'd like to hear them too as I've had to do 
 this in a few places.
 
 Ta
 Matt
 
 -Original Message-
 From: soh_mah [mailto:[EMAIL PROTECTED]
 Sent: 20 May 2004 15:20
 To: [EMAIL PROTECTED]
 Subject: Is there any way to check # of Records in RecordSet
 
 
 Hi
 
 Is there any way to check number of Records in
 RecordSet?
 
 
 =
 Regards
 
 Sohail Mahmood
 (416) 636-2553
 
 
   
   
 __
 Do you Yahoo!?
 Yahoo! Domains - Claim yours for only $14.70/year
 http://smallbusiness.promotions.yahoo.com/offer
 
 -
 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]
-- 

Adam Buglass,  
The Golden Freeway,
Department of Child Health,
University of Newcastle-upon-Tyne.
Royal Victoria Infirmary.

(0191) 2023062

Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well-armed lamb contesting the vote. 
~Benjamin Franklin, 1759


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



Re: tag library compile - semi-resolution

2004-05-20 Thread QM
On Thu, May 20, 2004 at 10:02:27AM -0400, Zollinhofer, Matt wrote:
: So, it works, but I don't really understand the necessity of having the
: particular jar file on the classpath.

Is this a confusion of
class directories vs JAR files
or
webapp class search paths
?

JAR files and directories are equivalent in Java: they both contain a
hierarchy of classes and resources.  (You can think of a class dir as an
exploded JAR file.)

When building on the commandline (with ant or straight javac) you must
explicitly set the classpath.

With webapps, it's a little different: JAR files from certain
directories are automagically included for you.  Imagine the
container, on startup, scans for WEB-INF/lib/*.jar and puts those in
its search path.

That's not a Tomcat thing; that's the servlet spec.

-or did I miss your question entirely?

-QM

-- 

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


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



Re: Is there any way to check # of Records in RecordSet

2004-05-20 Thread Filip Hanik - Dev
ResultSet rs;
int i = 0;
while( rs.next() ) {
i++;
}

If the cursor is non scrollable, this will only work once.
It is better for you to execute a Select count(1) ... query, to find out how many 
results you would get back. Or even better,
execute a stored procedure that returns the count as an out variable, and the result 
set as another out variable

Filip

- Original Message -
From: Adam Buglass [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 9:31 AM
Subject: RE: Is there any way to check # of Records in RecordSet


This is the wrong list but never mind

An alternative is the following:

ResultSet rs;
int i = 0;
while( rs.next() ) {
i++;
}

The integer i should be the length of your result set (by the way, don't
get confused with RecordSets which are VB - I used to do that all the
time!) at the end of the loop - assuming of course that you start from
the start of the set, you could use rs.first() to ensure this.

There's tons of useful info on Java methods and classes on suns site:
http://java.sun.com/j2se/1.3/docs/api/
http://java.sun.com/j2se/1.3/

Also look on www.sun.com for good java mailing lists where this kind of
question is more specific.

Adam.


On Thu, 2004-05-20 at 15:26, Dale, Matt wrote:
 This is the wrong list i'm pretty sure but there are a couple of ways to get the 
 number but there isnt a direct method that
returns it.

 If the result set is scrollable you can iterate through it counting the number of 
 iterations, then set it back to the start when
you want to process the records.

 The other option (one I prefer) is to load the records into an ArrayList, you can 
 then determine the size quite easily.

 If anyone else has any neater solutions i'd like to hear them too as I've had to do 
 this in a few places.

 Ta
 Matt

 -Original Message-
 From: soh_mah [mailto:[EMAIL PROTECTED]
 Sent: 20 May 2004 15:20
 To: [EMAIL PROTECTED]
 Subject: Is there any way to check # of Records in RecordSet


 Hi

 Is there any way to check number of Records in
 RecordSet?


 =
 Regards

 Sohail Mahmood
 (416) 636-2553




 __
 Do you Yahoo!?
 Yahoo! Domains - Claim yours for only $14.70/year
 http://smallbusiness.promotions.yahoo.com/offer

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

Adam Buglass,  
The Golden Freeway,
Department of Child Health,
University of Newcastle-upon-Tyne.
Royal Victoria Infirmary.

(0191) 2023062

Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well-armed lamb contesting the vote.
~Benjamin Franklin, 1759


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


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



Re: Is there any way to check # of Records in RecordSet

2004-05-20 Thread QM
On Thu, May 20, 2004 at 03:26:25PM +0100, Dale, Matt wrote:
: This is the wrong list i'm pretty sure but there are a couple of ways to get
: the number but there isnt a direct method that returns it.
: 
: If the result set is scrollable you can iterate through it counting the number
: of iterations, then set it back to the start when you want to process the
: records.

If I can stand a second trip to the DB:
select COUNT(*) from {...rest of query here...}
then, perform the normal query.

This is great for when you are going to pull back a subset of records,
e.g. to display X of Total records per page.

Slight risk of a race condition if the data's volatile, but...

-QM


-- 

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


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



RE: Is there any way to check # of Records in RecordSet

2004-05-20 Thread soh_mah
Thanks Adam :)

First of all I subscribe to the list yesterday and I m
new to JSP. Secondly could u plz tell me right list
name so I can subscribe to that.

Adam, I did exactly the same way u mentioned, but when
I use like 

//---
ResultSet rs = stmt.executeQuery(query);
while(rs.next()) { 
count1++;
}
rs.first();
//-

it does not show me any thing on the page but when I
use like this it shows me all records.

//---
ResultSet rs = stmt.executeQuery(query);
while(rs.next()) { 
count1++;
}

ResultSet rs1 = stmt.executeQuery(query);

while{rs1.next()) { %

Here is HTML %
out.println(rs.getInt(first_column)); } % 

//-
Then it shows me all the records, what is wrong with
my first code?





--- Adam Buglass [EMAIL PROTECTED] wrote:
 This is the wrong list but never mind
 
 An alternative is the following:
 
 ResultSet rs;
 int i = 0;
 while( rs.next() ) {
   i++;
 }
 
 The integer i should be the length of your result
 set (by the way, don't
 get confused with RecordSets which are VB - I used
 to do that all the
 time!) at the end of the loop - assuming of course
 that you start from
 the start of the set, you could use rs.first() to
 ensure this.
 
 There's tons of useful info on Java methods and
 classes on suns site:
 http://java.sun.com/j2se/1.3/docs/api/
 http://java.sun.com/j2se/1.3/
 
 Also look on www.sun.com for good java mailing lists
 where this kind of
 question is more specific.
 
 Adam.
 
 
 On Thu, 2004-05-20 at 15:26, Dale, Matt wrote:
  This is the wrong list i'm pretty sure but there
 are a couple of ways to get the number but there
 isnt a direct method that returns it.
  
  If the result set is scrollable you can iterate
 through it counting the number of iterations, then
 set it back to the start when you want to process
 the records.
  
  The other option (one I prefer) is to load the
 records into an ArrayList, you can then determine
 the size quite easily.
  
  If anyone else has any neater solutions i'd like
 to hear them too as I've had to do this in a few
 places.
  
  Ta
  Matt
  
  -Original Message-
  From: soh_mah [mailto:[EMAIL PROTECTED]
  Sent: 20 May 2004 15:20
  To: [EMAIL PROTECTED]
  Subject: Is there any way to check # of Records in
 RecordSet
  
  
  Hi
  
  Is there any way to check number of Records in
  RecordSet?
  
  
  =
  Regards
  
  Sohail Mahmood
  (416) 636-2553
  
  
  
  
  __
  Do you Yahoo!?
  Yahoo! Domains - Claim yours for only $14.70/year
  http://smallbusiness.promotions.yahoo.com/offer
  
 

-
  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]
 -- 
 
 Adam Buglass,  
 The Golden Freeway,
 Department of Child Health,
 University of Newcastle-upon-Tyne.
 Royal Victoria Infirmary.
 
 (0191) 2023062
 
 Democracy is two wolves and a lamb voting on what
 to have for lunch.
 Liberty is a well-armed lamb contesting the vote. 
 ~Benjamin Franklin, 1759
 
 

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


=
Regards

Sohail Mahmood
(416) 636-2553




__
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

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



Re: access ENV variables

2004-05-20 Thread Daniel Gibby
Thanks for answering resurfacing this thread! I just happened to see my 
name and realized that I was the one who started it originally... but 
with no response when I first answered. So with mod_jk there is a way to 
pass in apache environment variables to tomcat? How do you access them?

Thanks again.
Graham Bleach wrote:
On Wed, Apr 07, 2004 at 02:19:25PM -0700, Daniel Gibby wrote:
 

Is it possible to access environment variables in tomcat that were set 
by apache?
   

Which connector are you using? With mod_jk, you need to specify them in
your httpd.conf:
JkEnvVar ENVVAR
They are then set as request attributes.
G
 




RE: Is there any way to check # of Records in RecordSet

2004-05-20 Thread Dale, Matt

The first code will work if when you create your statement object you define it as 
scrollable.

Statement stmt =
con.createStatement(
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);

-Original Message-
From: soh_mah [mailto:[EMAIL PROTECTED]
Sent: 20 May 2004 15:50
To: Tomcat Users List
Subject: RE: Is there any way to check # of Records in RecordSet


Thanks Adam :)

First of all I subscribe to the list yesterday and I m
new to JSP. Secondly could u plz tell me right list
name so I can subscribe to that.

Adam, I did exactly the same way u mentioned, but when
I use like 

//---
ResultSet rs = stmt.executeQuery(query);
while(rs.next()) { 
count1++;
}
rs.first();
//-

it does not show me any thing on the page but when I
use like this it shows me all records.

//---
ResultSet rs = stmt.executeQuery(query);
while(rs.next()) { 
count1++;
}

ResultSet rs1 = stmt.executeQuery(query);

while{rs1.next()) { %

Here is HTML %
out.println(rs.getInt(first_column)); } % 

//-
Then it shows me all the records, what is wrong with
my first code?





--- Adam Buglass [EMAIL PROTECTED] wrote:
 This is the wrong list but never mind
 
 An alternative is the following:
 
 ResultSet rs;
 int i = 0;
 while( rs.next() ) {
   i++;
 }
 
 The integer i should be the length of your result
 set (by the way, don't
 get confused with RecordSets which are VB - I used
 to do that all the
 time!) at the end of the loop - assuming of course
 that you start from
 the start of the set, you could use rs.first() to
 ensure this.
 
 There's tons of useful info on Java methods and
 classes on suns site:
 http://java.sun.com/j2se/1.3/docs/api/
 http://java.sun.com/j2se/1.3/
 
 Also look on www.sun.com for good java mailing lists
 where this kind of
 question is more specific.
 
 Adam.
 
 
 On Thu, 2004-05-20 at 15:26, Dale, Matt wrote:
  This is the wrong list i'm pretty sure but there
 are a couple of ways to get the number but there
 isnt a direct method that returns it.
  
  If the result set is scrollable you can iterate
 through it counting the number of iterations, then
 set it back to the start when you want to process
 the records.
  
  The other option (one I prefer) is to load the
 records into an ArrayList, you can then determine
 the size quite easily.
  
  If anyone else has any neater solutions i'd like
 to hear them too as I've had to do this in a few
 places.
  
  Ta
  Matt
  
  -Original Message-
  From: soh_mah [mailto:[EMAIL PROTECTED]
  Sent: 20 May 2004 15:20
  To: [EMAIL PROTECTED]
  Subject: Is there any way to check # of Records in
 RecordSet
  
  
  Hi
  
  Is there any way to check number of Records in
  RecordSet?
  
  
  =
  Regards
  
  Sohail Mahmood
  (416) 636-2553
  
  
  
  
  __
  Do you Yahoo!?
  Yahoo! Domains - Claim yours for only $14.70/year
  http://smallbusiness.promotions.yahoo.com/offer
  
 

-
  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]
 -- 
 
 Adam Buglass,  
 The Golden Freeway,
 Department of Child Health,
 University of Newcastle-upon-Tyne.
 Royal Victoria Infirmary.
 
 (0191) 2023062
 
 Democracy is two wolves and a lamb voting on what
 to have for lunch.
 Liberty is a well-armed lamb contesting the vote. 
 ~Benjamin Franklin, 1759
 
 

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


=
Regards

Sohail Mahmood
(416) 636-2553




__
Do you Yahoo!?
Yahoo! Domains - Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

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

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not the 
intended recipient or the person responsible for delivering to the intended recipient, 
be advised that you have received this E-mail in error and that any use or copying is 
strictly prohibited. If you have received this E-mail in error please notify the 
beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual sender and 
not beCogent 

Re: Is there any way to check # of Records in RecordSet

2004-05-20 Thread Filip Hanik - Dev
first code = result set not scrollable, you can only loop through it once

Filip;

- Original Message - 
From: soh_mah [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 9:50 AM
Subject: RE: Is there any way to check # of Records in RecordSet


Thanks Adam :)

First of all I subscribe to the list yesterday and I m
new to JSP. Secondly could u plz tell me right list
name so I can subscribe to that.

Adam, I did exactly the same way u mentioned, but when
I use like 

//---
ResultSet rs = stmt.executeQuery(query);
while(rs.next()) { 
count1++;
}
rs.first();
//-

it does not show me any thing on the page but when I
use like this it shows me all records.

//---
ResultSet rs = stmt.executeQuery(query);
while(rs.next()) { 
count1++;
}

ResultSet rs1 = stmt.executeQuery(query);

while{rs1.next()) { %

Here is HTML %
out.println(rs.getInt(first_column)); } % 

//-
Then it shows me all the records, what is wrong with
my first code?





--- Adam Buglass [EMAIL PROTECTED] wrote:
 This is the wrong list but never mind
 
 An alternative is the following:
 
 ResultSet rs;
 int i = 0;
 while( rs.next() ) {
 i++;
 }
 
 The integer i should be the length of your result
 set (by the way, don't
 get confused with RecordSets which are VB - I used
 to do that all the
 time!) at the end of the loop - assuming of course
 that you start from
 the start of the set, you could use rs.first() to
 ensure this.
 
 There's tons of useful info on Java methods and
 classes on suns site:
 http://java.sun.com/j2se/1.3/docs/api/
 http://java.sun.com/j2se/1.3/
 
 Also look on www.sun.com for good java mailing lists
 where this kind of
 question is more specific.
 
 Adam.
 
 
 On Thu, 2004-05-20 at 15:26, Dale, Matt wrote:
  This is the wrong list i'm pretty sure but there
 are a couple of ways to get the number but there
 isnt a direct method that returns it.
  
  If the result set is scrollable you can iterate
 through it counting the number of iterations, then
 set it back to the start when you want to process
 the records.
  
  The other option (one I prefer) is to load the
 records into an ArrayList, you can then determine
 the size quite easily.
  
  If anyone else has any neater solutions i'd like
 to hear them too as I've had to do this in a few
 places.
  
  Ta
  Matt
  
  -Original Message-
  From: soh_mah [mailto:[EMAIL PROTECTED]
  Sent: 20 May 2004 15:20
  To: [EMAIL PROTECTED]
  Subject: Is there any way to check # of Records in
 RecordSet
  
  
  Hi
  
  Is there any way to check number of Records in
  RecordSet?
  
  
  =
  Regards
  
  Sohail Mahmood
  (416) 636-2553
  
  
  
  
  __
  Do you Yahoo!?
  Yahoo! Domains - Claim yours for only $14.70/year
  http://smallbusiness.promotions.yahoo.com/offer
  
 

-
  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]
 -- 
 
 Adam Buglass,  
 The Golden Freeway,
 Department of Child Health,
 University of Newcastle-upon-Tyne.
 Royal Victoria Infirmary.
 
 (0191) 2023062
 
 Democracy is two wolves and a lamb voting on what
 to have for lunch.
 Liberty is a well-armed lamb contesting the vote. 
 ~Benjamin Franklin, 1759
 
 

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


=
Regards

Sohail Mahmood
(416) 636-2553




__
Do you Yahoo!?
Yahoo! Domains - Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

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


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



RE: Is there any way to check # of Records in RecordSet

2004-05-20 Thread Kannan Sundararajan
Please dont use for other than stated purpose of the list. I hope you
understand that. 


-Original Message-
From: soh_mah [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 10:50 AM
To: Tomcat Users List
Subject: RE: Is there any way to check # of Records in RecordSet


Thanks Adam :)

First of all I subscribe to the list yesterday and I m
new to JSP. Secondly could u plz tell me right list
name so I can subscribe to that.

Adam, I did exactly the same way u mentioned, but when
I use like 

//---
ResultSet rs = stmt.executeQuery(query);
while(rs.next()) { 
count1++;
}
rs.first();
//-

it does not show me any thing on the page but when I
use like this it shows me all records.

//---
ResultSet rs = stmt.executeQuery(query);
while(rs.next()) { 
count1++;
}

ResultSet rs1 = stmt.executeQuery(query);

while{rs1.next()) { %

Here is HTML %
out.println(rs.getInt(first_column)); } % 

//-
Then it shows me all the records, what is wrong with
my first code?





--- Adam Buglass [EMAIL PROTECTED] wrote:
 This is the wrong list but never mind
 
 An alternative is the following:
 
 ResultSet rs;
 int i = 0;
 while( rs.next() ) {
   i++;
 }
 
 The integer i should be the length of your result
 set (by the way, don't
 get confused with RecordSets which are VB - I used
 to do that all the
 time!) at the end of the loop - assuming of course
 that you start from
 the start of the set, you could use rs.first() to
 ensure this.
 
 There's tons of useful info on Java methods and
 classes on suns site:
 http://java.sun.com/j2se/1.3/docs/api/
 http://java.sun.com/j2se/1.3/
 
 Also look on www.sun.com for good java mailing lists
 where this kind of
 question is more specific.
 
 Adam.
 
 
 On Thu, 2004-05-20 at 15:26, Dale, Matt wrote:
  This is the wrong list i'm pretty sure but there
 are a couple of ways to get the number but there
 isnt a direct method that returns it.
  
  If the result set is scrollable you can iterate
 through it counting the number of iterations, then
 set it back to the start when you want to process
 the records.
  
  The other option (one I prefer) is to load the
 records into an ArrayList, you can then determine
 the size quite easily.
  
  If anyone else has any neater solutions i'd like
 to hear them too as I've had to do this in a few
 places.
  
  Ta
  Matt
  
  -Original Message-
  From: soh_mah [mailto:[EMAIL PROTECTED]
  Sent: 20 May 2004 15:20
  To: [EMAIL PROTECTED]
  Subject: Is there any way to check # of Records in
 RecordSet
  
  
  Hi
  
  Is there any way to check number of Records in
  RecordSet?
  
  
  =
  Regards
  
  Sohail Mahmood
  (416) 636-2553
  
  
  
  
  __
  Do you Yahoo!?
  Yahoo! Domains - Claim yours for only $14.70/year
  http://smallbusiness.promotions.yahoo.com/offer
  
 

-
  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]
 -- 
 
 Adam Buglass,  
 The Golden Freeway,
 Department of Child Health,
 University of Newcastle-upon-Tyne.
 Royal Victoria Infirmary.
 
 (0191) 2023062
 
 Democracy is two wolves and a lamb voting on what
 to have for lunch.
 Liberty is a well-armed lamb contesting the vote. 
 ~Benjamin Franklin, 1759
 
 

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


=
Regards

Sohail Mahmood
(416) 636-2553




__
Do you Yahoo!?
Yahoo! Domains - Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

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

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



RE: Is there any way to check # of Records in RecordSet

2004-05-20 Thread Adam Buglass
First of all forgive me for being very stressed and tired - All I did
was put into some kind of code model a suggestion previously put forward
by Matt:
 If the result set is scrollable you can iterate through it counting
the number of iterations, then set it back to the start when
 you want to process the records.

Second, I'm not sure whay Filip thinks it would only work once. Surely
you could put it in a method and call that method over again - Just make
sure you set it back to the start of the ResultSet each time! (I may
well be missing something here - please don't hesitate to point it
out!):
 If the cursor is non scrollable, this will only work once.

However I do like the suggestion of getting it from the Database via a
new query. You should avoid too many loops in code (especially While
loops) - I'm afraid my SQL isn't quite what it should be!


I'm assuming your HTML output is also set for the first option?

Assuming the function is successful, you should be able to use
%=count% in your HTML.

If I know the precise list I would have given it to you!
As I said, go check on Sun's java site (http://java.sun.com ??) and look
for an appropriate messageboard on there, I think that's your best bet!


On Thu, 2004-05-20 at 15:50, soh_mah wrote:
 Thanks Adam :)
 
 First of all I subscribe to the list yesterday and I m
 new to JSP. Secondly could u plz tell me right list
 name so I can subscribe to that.
 
 Adam, I did exactly the same way u mentioned, but when
 I use like 
 
 //---
 ResultSet rs = stmt.executeQuery(query);
 while(rs.next()) { 
 count1++;
 }
 rs.first();
 //-
 
 it does not show me any thing on the page but when I
 use like this it shows me all records.
 
 //---
 ResultSet rs = stmt.executeQuery(query);
 while(rs.next()) { 
 count1++;
 }
 
 ResultSet rs1 = stmt.executeQuery(query);
 
 while{rs1.next()) { %
 
 Here is HTML %
 out.println(rs.getInt(first_column)); } % 
 
 //-
 Then it shows me all the records, what is wrong with
 my first code?
 
 
 
   
 
 --- Adam Buglass [EMAIL PROTECTED] wrote:
  This is the wrong list but never mind
  
  An alternative is the following:
  
  ResultSet rs;
  int i = 0;
  while( rs.next() ) {
  i++;
  }
  
  The integer i should be the length of your result
  set (by the way, don't
  get confused with RecordSets which are VB - I used
  to do that all the
  time!) at the end of the loop - assuming of course
  that you start from
  the start of the set, you could use rs.first() to
  ensure this.
  
  There's tons of useful info on Java methods and
  classes on suns site:
  http://java.sun.com/j2se/1.3/docs/api/
  http://java.sun.com/j2se/1.3/
  
  Also look on www.sun.com for good java mailing lists
  where this kind of
  question is more specific.
  
  Adam.
  
  
  On Thu, 2004-05-20 at 15:26, Dale, Matt wrote:
   This is the wrong list i'm pretty sure but there
  are a couple of ways to get the number but there
  isnt a direct method that returns it.
   
   If the result set is scrollable you can iterate
  through it counting the number of iterations, then
  set it back to the start when you want to process
  the records.
   
   The other option (one I prefer) is to load the
  records into an ArrayList, you can then determine
  the size quite easily.
   
   If anyone else has any neater solutions i'd like
  to hear them too as I've had to do this in a few
  places.
   
   Ta
   Matt
   
   -Original Message-
   From: soh_mah [mailto:[EMAIL PROTECTED]
   Sent: 20 May 2004 15:20
   To: [EMAIL PROTECTED]
   Subject: Is there any way to check # of Records in
  RecordSet
   
   
   Hi
   
   Is there any way to check number of Records in
   RecordSet?
   
   
   =
   Regards
   
   Sohail Mahmood
   (416) 636-2553
   
   
 
 
   __
   Do you Yahoo!?
   Yahoo! Domains - Claim yours for only $14.70/year
   http://smallbusiness.promotions.yahoo.com/offer
   
  
 
 -
   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]
  -- 
  
  Adam Buglass,  
  The Golden Freeway,
  Department of Child Health,
  University of Newcastle-upon-Tyne.
  Royal Victoria Infirmary.
  
  (0191) 2023062
  
  Democracy is two wolves and a lamb voting on what
  to have for lunch.
  Liberty is a well-armed lamb contesting the vote. 
  ~Benjamin Franklin, 1759
  
  
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
 
 =
 Regards
 
 Sohail 

Re: session data in Tomcat 5

2004-05-20 Thread M.Hockings
Shapira, Yoav wrote:
Hi,
Is your attribute Serializable?  That's a big deal ;)
There's no limit imposed by Tomcat on session attribute size.
Yoav Shapira
Millennium Research Informatics
 

Hmm, interesting thought  Yoav.   It is a class derived from a 
properties file but I'm not sure if the derived class itself is 
serializable.I guess I'd only considered that important when dealing 
with policy redirectors  clusters in a larger environment.  Is Tomcat 5 
requiring/enforcing  this?  When I look at the javadoc for 
setAttribute(String key, Object value) it does not indicate that the 
value needs to be serializable.  However, it would not hurt, I'll give 
it a try.

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


install4iis.js error

2004-05-20 Thread Sasha Borodin
I'm getting the following error when running the JavaScript installer for
the JK2 ISAPI filter on my W2K box:

Unable to find Web Server ROOT Directory

Looking inside the JavaScript, this error is reported here:

if ((IIsROOT = findADSIObject(IIsWebServer, _IIS_WEBDIR, ROOT)) == null) {
ERROR(args, Unable to find Web Server ROOT direcrory.);
}

Since I know nothing about windows scripting, I'm at a loss - has anyone
encountered this error before when trying to install the JK2 filter?

Thanks,

-Sasha



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



RE: aparche log backup and cleanup

2004-05-20 Thread Simon Zeng
That's a linux tool, isn't it? Is there a similar tool in Windows because
our 
production servers are all WinNt/2K.

Thanks,
-Simon

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 10:04 AM
To: Tomcat Users List
Subject: RE: aparche log backup and cleanup



Hi,
Logrotate: http://www.rt.com/man/logrotate.8.html.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Simon Zeng [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 10:05 AM
To: 'Tomcat Users List'
Subject: aparche log backup and cleanup

Hello,

Our aparche access.log is getting bigger  bigger. I would like to put
in a
script to check
the size and do a backup  cleanup without shutdowning Apache. But it
won't
allow me to do that because other process(Apache) is using it. Is there
any
way to work around this. Or if
Aparch has similar mechanism like Tomcat catalina log?

Thanks,
-Simon

-
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 data in Tomcat 5

2004-05-20 Thread Ben Souther
On Thursday 20 May 2004 10:15 am, Shapira, Yoav wrote:
 in starting jsp 1
   session.setAttribute(ml,ml);
 
 
 in target jsp 2
   MyPackage.MyClass ml = (MyPackage.MyClass)session.getAttribute(ml);
   System.out.println(ml = +ml);
 
 
 then in the log I see...
 
 
ml = null



You didn't include it in your code snippet so I have to ask:  are you sure 
that the ml object wasn't null before you called setAttribute?

Also, are you testing this with the same browser that you were using with the 
4x version of Tomcat (that was working)?  
I'm asking because this looks like a case of MSIE not storing session cookies 
properly.  (IOW: every hit to the server is generating it's own session).  



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



Re: session data in Tomcat 5

2004-05-20 Thread Filip Hanik - Dev
setAttribute(ml,null); is the same as
removeAttribute(ml);

just an fyi :)

- Original Message - 
From: Ben Souther [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 10:24 AM
Subject: Re: session data in Tomcat 5


On Thursday 20 May 2004 10:15 am, Shapira, Yoav wrote:
 in starting jsp 1
   session.setAttribute(ml,ml);
 
 
 in target jsp 2
   MyPackage.MyClass ml = (MyPackage.MyClass)session.getAttribute(ml);
   System.out.println(ml = +ml);
 
 
 then in the log I see...
 
 
ml = null



You didn't include it in your code snippet so I have to ask:  are you sure 
that the ml object wasn't null before you called setAttribute?

Also, are you testing this with the same browser that you were using with the 
4x version of Tomcat (that was working)?  
I'm asking because this looks like a case of MSIE not storing session cookies 
properly.  (IOW: every hit to the server is generating it's own session).  



-
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 configure tomcat5.0 to remove the limitation of jsp code length?

2004-05-20 Thread Benjamin Armintor
This is somewhat of a stab, but it's possible the Jasper changed so that the generated 
code for your page is slightly more verbose, bumping it into some restrictions of the 
Java language spec.  The magic number seems to be 64k.  From the Java Specialists 
(http://www.javaspecialists.co.za/archive/Issue059.html), this sounds likely related:
2. The amount of code per non-native, non-abstract method is limited to 65536 bytes 
by the sizes of the indices in the exception_table of the Code attribute, in the 
LineNumberTable attribute, and in the LocalVariableTable attribute.

As does this thread at IBM developerWorks: 
http://www-106.ibm.com/developerworks/forums/dw_thread.jsp?message=52566cat=10thread=12882forum=177#52566

Google is your friend.  And if you have 5000 lines in a single JSP, perhaps Martin 
Fowler should be, too.

Benjamin J. Armintor
Systems Analyst
ITS-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]
 


-Original Message-
From: nong nong [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 19, 2004 9:37 PM
To: [EMAIL PROTECTED]
Subject: how to configure tomcat5.0 to remove the limitation of jsp code length?


hi all
  
 I develop a Jsp application, some Jsps' code exceed 5000 rows. In 
tomcat4.0, it work correctly, but in tomcat5.0, it report an error:'code 
too large for try statement'. Whether are there any limitations of jsp code 
length?  how to configure tomcat5.0 to remove the limitation of jsp code 
length?

thanks

_
 MSN Messenger:  http://messenger.msn.com/cn  


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


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



RE: Is there any way to check # of Records in RecordSet

2004-05-20 Thread Dale, Matt
Adam - I mentioned this in another post but unless the result set is scrollable then 
you can't reset it back to the beginning. You need to declare the statement object as 
scrollable when you create it to achieve this. So Filip was right in that it will only 
work once with the default behaviour.

-Original Message-
From: Adam Buglass [mailto:[EMAIL PROTECTED]
Sent: 20 May 2004 16:02
To: Tomcat Users List
Subject: RE: Is there any way to check # of Records in RecordSet


First of all forgive me for being very stressed and tired - All I did
was put into some kind of code model a suggestion previously put forward
by Matt:
 If the result set is scrollable you can iterate through it counting
the number of iterations, then set it back to the start when
 you want to process the records.

Second, I'm not sure whay Filip thinks it would only work once. Surely
you could put it in a method and call that method over again - Just make
sure you set it back to the start of the ResultSet each time! (I may
well be missing something here - please don't hesitate to point it
out!):
 If the cursor is non scrollable, this will only work once.

However I do like the suggestion of getting it from the Database via a
new query. You should avoid too many loops in code (especially While
loops) - I'm afraid my SQL isn't quite what it should be!


I'm assuming your HTML output is also set for the first option?

Assuming the function is successful, you should be able to use
%=count% in your HTML.

If I know the precise list I would have given it to you!
As I said, go check on Sun's java site (http://java.sun.com ??) and look
for an appropriate messageboard on there, I think that's your best bet!


On Thu, 2004-05-20 at 15:50, soh_mah wrote:
 Thanks Adam :)
 
 First of all I subscribe to the list yesterday and I m
 new to JSP. Secondly could u plz tell me right list
 name so I can subscribe to that.
 
 Adam, I did exactly the same way u mentioned, but when
 I use like 
 
 //---
 ResultSet rs = stmt.executeQuery(query);
 while(rs.next()) { 
 count1++;
 }
 rs.first();
 //-
 
 it does not show me any thing on the page but when I
 use like this it shows me all records.
 
 //---
 ResultSet rs = stmt.executeQuery(query);
 while(rs.next()) { 
 count1++;
 }
 
 ResultSet rs1 = stmt.executeQuery(query);
 
 while{rs1.next()) { %
 
 Here is HTML %
 out.println(rs.getInt(first_column)); } % 
 
 //-
 Then it shows me all the records, what is wrong with
 my first code?
 
 
 
   
 
 --- Adam Buglass [EMAIL PROTECTED] wrote:
  This is the wrong list but never mind
  
  An alternative is the following:
  
  ResultSet rs;
  int i = 0;
  while( rs.next() ) {
  i++;
  }
  
  The integer i should be the length of your result
  set (by the way, don't
  get confused with RecordSets which are VB - I used
  to do that all the
  time!) at the end of the loop - assuming of course
  that you start from
  the start of the set, you could use rs.first() to
  ensure this.
  
  There's tons of useful info on Java methods and
  classes on suns site:
  http://java.sun.com/j2se/1.3/docs/api/
  http://java.sun.com/j2se/1.3/
  
  Also look on www.sun.com for good java mailing lists
  where this kind of
  question is more specific.
  
  Adam.
  
  
  On Thu, 2004-05-20 at 15:26, Dale, Matt wrote:
   This is the wrong list i'm pretty sure but there
  are a couple of ways to get the number but there
  isnt a direct method that returns it.
   
   If the result set is scrollable you can iterate
  through it counting the number of iterations, then
  set it back to the start when you want to process
  the records.
   
   The other option (one I prefer) is to load the
  records into an ArrayList, you can then determine
  the size quite easily.
   
   If anyone else has any neater solutions i'd like
  to hear them too as I've had to do this in a few
  places.
   
   Ta
   Matt
   
   -Original Message-
   From: soh_mah [mailto:[EMAIL PROTECTED]
   Sent: 20 May 2004 15:20
   To: [EMAIL PROTECTED]
   Subject: Is there any way to check # of Records in
  RecordSet
   
   
   Hi
   
   Is there any way to check number of Records in
   RecordSet?
   
   
   =
   Regards
   
   Sohail Mahmood
   (416) 636-2553
   
   
 
 
   __
   Do you Yahoo!?
   Yahoo! Domains - Claim yours for only $14.70/year
   http://smallbusiness.promotions.yahoo.com/offer
   
  
 
 -
   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]
  -- 
  
  Adam Buglass,  
  The Golden Freeway,
  

need workers2.properties for multiple tomcats w/ same IP, diff po rts

2004-05-20 Thread Wendell Holmes
Can someone point me to a tutorial/example of a workers2.properties file
that shows how to set up several instances of Tomcat on the same machine,
different ports?

What I want to do is have a mapping from worker1 to /context1 on 1st tomcat
instance and a worker2 that handles requests to /context2 on the second
tomcat instance.

I'm using tomcat4.1.29 and IIS 5.0, all works okay for a single instance of
tomcat.


Thanks for any clues,

Wendell Holmes
Education Logistics, Inc.
Missoula, MT

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



Bug? Repost: JkCoyoteHandler Error

2004-05-20 Thread Allistair Crossley
Hi All,

This is a repost of an issue we are still experiencing on the production server. I 
found a similar post re: tomcat 4 that was a bug (although cannot find in bugzilla 
now). The same thing happens to us .. 

I have been looking through our production server logs and the following error block 
is repeated an awful lot, like every 6 minutes or so and sometimes 6 times per minute.

06-May-2004 14:38:50 org.apache.jk.server.JkCoyoteHandler action
SEVERE: Error in action code 
java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:489)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:697)
at org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:487)
at org.apache.coyote.Response.action(Response.java:226)
at org.apache.coyote.Response.finish(Response.java:348)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:344)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:415)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:716)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:650)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:829)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688)
at java.lang.Thread.run(Thread.java:534)
06-May-2004 14:38:50 org.apache.jk.common.HandlerRequest invoke
INFO: Unknown message 0

The difficult part is that no user has reported any errors to us and I have never seen 
an error arise from using the system, so I am a little puzzled at where this is coming 
from and despite not having errors reveal themselves or being reported, I still want 
to get to the bottom of them and remove the cause if possible.

The system is now fairly basic:

IIS + NTLM Auth
  -- JK2
-- Tomcat 5.0.19

If anyone could suggest what this error may be, why I may be getting it or how I can 
go about getting better resolution on the root cause I would be very grateful,

Cheers, Allistair.


The post I found on Google is as follows but the 2 bugs listed below are no longer 
there...

http://nagoya.apache.org/bugzilla/show_bug.cgi?idW35 
http://nagoya.apache.org/bugzilla/show_bug.cgi?idF63 

 -Original Message- 
 From: Boemio, Neil (IT, FGIC) [mailto:Neil.Boemio@(protected)] 
 Sent: 07 ßíóàðè 2004 ?. 22:16 
 To: Tomcat Users List 
 Subject: Tomcat: Connection reset by peer: socket write error 
 
 
 My W2K, Apache 2.0.47, Tomcat 4.1.27, JK2 2.0.43 setup works 
 fine . for a while. After an hour, a few hours, maybe 
 minutes (I don 't really see a pattern), my JSP pages will 
 hang. When I restart the Tomcat service, everything is fine 
 again until the next hang. 
 
 Here 's the sequence: 
 
 About every minute in the jk2.log, I get this set or errors 
 over and over again. This doesn 't seem to be directly 
 related to my problem because this happens even when 
 everything is OK  but I thought I would include it as well: 
 
 [Wed Jan 07 14:19:27 2004] (error ) [jk_channel_socket.c 
 (557)] channelSocket.receive(): Error receiving message body 
 -1 0 [Wed Jan 07 14:19:27 2004] (error ) [jk_workerEnv.c 
 (482)] workerEnv.processCallbacks() Error reading reply [Wed 
 Jan 07 14:19:27 2004] (error ) [jk_worker_ajp13.c (416)] 
 ajp13.service() ajpGetReply recoverable error 12 [Wed Jan 
 07 14:19:49 2004] (error ) [jk_channel_socket.c (557)] 
 channelSocket.receive(): Error receiving message body -1 0 
 [Wed Jan 07 14:19:49 2004] (error ) [jk_workerEnv.c (482)] 
 workerEnv.processCallbacks() Error reading reply [Wed Jan 07 
 14:19:49 2004] (error ) [jk_worker_ajp13.c (416)] 
 ajp13.service() ajpGetReply recoverable error 12 
 
 When the problem occurs, I get this in the Tomcat Error Log: 
 
 Jan 7, 2004 2:21:25 PM org.apache.jk.server.JkCoyoteHandler action 
 SEVERE: Error in action code 
 java.net.SocketException: Connection reset by peer: socket write error 
at java.net.SocketOutputStream.socketWrite0(Native Method) 
at java.net.SocketOutputStream.socketWrite(Unknown Source) 
at java.net.SocketOutputStream.write(Unknown Source) 
at 
 org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407) 
at 
 org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:599) 
at 
 org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:385) 
at org.apache.coyote.Response.action(Response.java:222) 
at org.apache.coyote.Response.finish(Response.java:343) 
at 
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:268) 
at 
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360) 
at 
 

When will the JK2 connector be available for Fedora AMD64?

2004-05-20 Thread Brad Hafichuk
Just wondering if someone is working on the JK2 connector for Fedora Core 1 x86_64 
(AMD64). If someone is and needs a test site, let me know.

Cheers,
Brad

Re: Any Resource talking abt how Tomcat intergrated to Apache

2004-05-20 Thread Paul Gregoire
You can use mine
http://www.gregoire.org/howto/virtualhost.jk2.html
just make sure you rename the worker= to group= in the
workers2.properties file


Salvador Santander Gutierrez wrote:

http://johnturner.com/howto/apache-tomcat-howto.html

I hope this helkp you

- Original Message - 
From: Eric YH WONG [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 12:09 PM
Subject: Any Resource talking abt how Tomcat intergrated to Apache


Hello,

Does anyone have good resources which talking about how Tomcat v5.X
integrated with Apache v2.0.49 ?

Thx

Eric



-
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: FW: Server.xml/AccessLog question

2004-05-20 Thread Marc X. Schroeder
Tim,

Many thanks for replying.  A custom pattern is what I figured I needed
to do, but when I tried it in many combinations it errored on certain
tags.

I would ultimately like to get all fields so trying this worked for all
values except the %{}i entries.

pattern='%a %A %b %B %h %H %l %m %p %q %r %s %t %u %U %v %{Referer}i
%{User-Agent}i'

The log file logged everything fine except showed ???{???Referer} and
???{???User-Agent}.  It is like it doesn't recognize { as a proper
property.


But when I actually spell out the 'combined' string like this:
pattern='%h %l %u %t %r %s %b %{Referer}i %{User-Agent}i'

The log file is fine.


So I tried adding in just the %v to the combined tag like this:
pattern='%h %l %u %t %r %s %b %v %{Referer}i %{User-Agent}i'

And then the log file showed all % properties ok but gave me the same
errors: ???{???Referer}


It seems that using %{Referer}i with any combination other than the
'combined' string will fail to log it properly.

At the very least we need to be able to log %v and %{Referer}.  Is
anyone doing anything similar?



Regards,
 
Marc S.
Web Content Editor
CSA Travel Protection

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 20, 2004 5:00 AM
To: Tomcat Users List
Subject: Re: FW: Server.xml/AccessLog question

You should be able to use a custom pattern in 4.0 (or better).

But pattern=combined %v is incorrect. You need to explictily specify
all the fields. (As in the javadocs or Vavle docs which talks about
accesslogvalve)

-Tim

Marc X. Schroeder wrote:

Hi,

I need to be able to customize my access_log file which is defined in
server.xml.  Were using tomcat 4.0.

I have been using
Valve className=org.apache.catalina.valves.AccessLogValve
directory=c:\logs\tomcat  prefix=localhost_access_log.
suffix=.txt
pattern=combined/

But I also need to be able to track the %v option as well.  When I do 
this Valve className=org.apache.catalina.valves.AccessLogValve
directory=c:\logs\tomcat  prefix=localhost_access_log.
suffix=.txt
pattern=combined %v/

I get this logged
combined dev.csatravelprotection.com
-or with other configurations -
???{???Referer}i dev.csatravelprotection.com


I need to be able to log all of the combined properties and the Local
server name to the same log entry.  I have tried many combinations with
no success.  I have also poured over documentation for days before
sending this email.  Does anyone have any ideas what I'm doing wrong?

 
 Also is this the correct email to post questions?
 

-
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: FW: Server.xml/AccessLog question

2004-05-20 Thread Tim Funk
Tomcat 4.0 doesn't support the %{xxx}i syntax. You need 4.1.16 or better.
-Tim
Marc X. Schroeder wrote:
Tim,
Many thanks for replying.  A custom pattern is what I figured I needed
to do, but when I tried it in many combinations it errored on certain
tags.
I would ultimately like to get all fields so trying this worked for all
values except the %{}i entries.
pattern='%a %A %b %B %h %H %l %m %p %q %r %s %t %u %U %v %{Referer}i
%{User-Agent}i'
The log file logged everything fine except showed ???{???Referer} and
???{???User-Agent}.  It is like it doesn't recognize { as a proper
property.
But when I actually spell out the 'combined' string like this:
pattern='%h %l %u %t %r %s %b %{Referer}i %{User-Agent}i'
The log file is fine.
So I tried adding in just the %v to the combined tag like this:
pattern='%h %l %u %t %r %s %b %v %{Referer}i %{User-Agent}i'
And then the log file showed all % properties ok but gave me the same
errors: ???{???Referer}
It seems that using %{Referer}i with any combination other than the
'combined' string will fail to log it properly.
At the very least we need to be able to log %v and %{Referer}.  Is
anyone doing anything similar?

Regards,
 
Marc S.
Web Content Editor
CSA Travel Protection

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 20, 2004 5:00 AM
To: Tomcat Users List
Subject: Re: FW: Server.xml/AccessLog question

You should be able to use a custom pattern in 4.0 (or better).
But pattern=combined %v is incorrect. You need to explictily specify
all the fields. (As in the javadocs or Vavle docs which talks about
accesslogvalve)
-Tim
Marc X. Schroeder wrote:

Hi,
I need to be able to customize my access_log file which is defined in
server.xml.  Were using tomcat 4.0.
I have been using
Valve className=org.apache.catalina.valves.AccessLogValve
directory=c:\logs\tomcat  prefix=localhost_access_log.
suffix=.txt
pattern=combined/
But I also need to be able to track the %v option as well.  When I do 
this Valve className=org.apache.catalina.valves.AccessLogValve
directory=c:\logs\tomcat  prefix=localhost_access_log.
suffix=.txt
pattern=combined %v/
I get this logged
combined dev.csatravelprotection.com
-or with other configurations -
???{???Referer}i dev.csatravelprotection.com
I need to be able to log all of the combined properties and the Local
server name to the same log entry.  I have tried many combinations with
no success.  I have also poured over documentation for days before
sending this email.  Does anyone have any ideas what I'm doing wrong?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Jk2 URI mapping: global virtual host and jkstatus mappings coexist?

2004-05-20 Thread Clute, Andrew
I have a forward facing HTTPD server that forwards certain requests via
mod_proxy to my Tomcat box that has it's own version HTTPD and jk2
running.

I actually have two instances of Jboss/Tomcat running on this machine,
bound to different IP's

Every request that is incoming to to the Jboss HTTPD server is really
just a request for Tomcat, so I want to forward all of them to it,
except that I would still like to have the jkstatus URI mapping to be
picked up my JK2.

So, in my ideal world, my workers2.properties file snipit would look
like:


[status:]

[uri:/jkstatus/*]
Group=status:

[uri:192.168.2.85/*]
channel=channel.un:${serverRoot}/sockets/jk2_dev.socket
group=devlbgroup
alias=dev

[uri:192.168.2.87/*]
channel=channel.un:${serverRoot}/sockets/jk2_stage.socket
group=stagelbgroup
alias=stage

But, in this case, jkstatus isn't being picked up JK2, but is being
forwarded to Tomcat.

So, is there a way to have a global mapping to Tomcat, except for
jkstatus?


RE: Is there any way to check # of Records in RecordSet

2004-05-20 Thread Adam Buglass
On Thu, 2004-05-20 at 16:38, Dale, Matt wrote:
 Adam - I mentioned this in another post but unless the result set is scrollable then 
 you can't reset it back to the beginning. You need to declare the statement object 
 as scrollable when you create it to achieve this. So Filip was right in that it wi

Matt, yes you did I just didn't get it until after I'd sent mine!

I was just surprised because I've never run into that behaviour before
and I've never changed the defaults. I'm sure you're right though, I
probably set some global variable somewhere and forgot about it!

 
 -Original Message-
 From: Adam Buglass [mailto:[EMAIL PROTECTED]
 Sent: 20 May 2004 16:02
 To: Tomcat Users List
 Subject: RE: Is there any way to check # of Records in RecordSet
 
 
 First of all forgive me for being very stressed and tired - All I did
 was put into some kind of code model a suggestion previously put forward
 by Matt:
  If the result set is scrollable you can iterate through it counting
 the number of iterations, then set it back to the start when
  you want to process the records.
 
 Second, I'm not sure whay Filip thinks it would only work once. Surely
 you could put it in a method and call that method over again - Just make
 sure you set it back to the start of the ResultSet each time! (I may
 well be missing something here - please don't hesitate to point it
 out!):
  If the cursor is non scrollable, this will only work once.
 
 However I do like the suggestion of getting it from the Database via a
 new query. You should avoid too many loops in code (especially While
 loops) - I'm afraid my SQL isn't quite what it should be!
 
 
 I'm assuming your HTML output is also set for the first option?
 
 Assuming the function is successful, you should be able to use
 %=count% in your HTML.
 
 If I know the precise list I would have given it to you!
 As I said, go check on Sun's java site (http://java.sun.com ??) and look
 for an appropriate messageboard on there, I think that's your best bet!
 
 
 On Thu, 2004-05-20 at 15:50, soh_mah wrote:
  Thanks Adam :)
  
  First of all I subscribe to the list yesterday and I m
  new to JSP. Secondly could u plz tell me right list
  name so I can subscribe to that.
  
  Adam, I did exactly the same way u mentioned, but when
  I use like 
  
  //---
  ResultSet rs = stmt.executeQuery(query);
  while(rs.next()) { 
  count1++;
  }
  rs.first();
  //-
  
  it does not show me any thing on the page but when I
  use like this it shows me all records.
  
  //---
  ResultSet rs = stmt.executeQuery(query);
  while(rs.next()) { 
  count1++;
  }
  
  ResultSet rs1 = stmt.executeQuery(query);
  
  while{rs1.next()) { %
  
  Here is HTML %
  out.println(rs.getInt(first_column)); } % 
  
  //-
  Then it shows me all the records, what is wrong with
  my first code?
  
  
  
  
  
  --- Adam Buglass [EMAIL PROTECTED] wrote:
   This is the wrong list but never mind
   
   An alternative is the following:
   
   ResultSet rs;
   int i = 0;
   while( rs.next() ) {
 i++;
   }
   
   The integer i should be the length of your result
   set (by the way, don't
   get confused with RecordSets which are VB - I used
   to do that all the
   time!) at the end of the loop - assuming of course
   that you start from
   the start of the set, you could use rs.first() to
   ensure this.
   
   There's tons of useful info on Java methods and
   classes on suns site:
   http://java.sun.com/j2se/1.3/docs/api/
   http://java.sun.com/j2se/1.3/
   
   Also look on www.sun.com for good java mailing lists
   where this kind of
   question is more specific.
   
   Adam.
   
   
   On Thu, 2004-05-20 at 15:26, Dale, Matt wrote:
This is the wrong list i'm pretty sure but there
   are a couple of ways to get the number but there
   isnt a direct method that returns it.

If the result set is scrollable you can iterate
   through it counting the number of iterations, then
   set it back to the start when you want to process
   the records.

The other option (one I prefer) is to load the
   records into an ArrayList, you can then determine
   the size quite easily.

If anyone else has any neater solutions i'd like
   to hear them too as I've had to do this in a few
   places.

Ta
Matt

-Original Message-
From: soh_mah [mailto:[EMAIL PROTECTED]
Sent: 20 May 2004 15:20
To: [EMAIL PROTECTED]
Subject: Is there any way to check # of Records in
   RecordSet


Hi

Is there any way to check number of Records in
RecordSet?


=
Regards

Sohail Mahmood
(416) 636-2553




__
Do you Yahoo!?
Yahoo! Domains - Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer

   
  
  

Re: Session Timeout and Direct Reference to login page

2004-05-20 Thread Jonathan Eric Miller
Yeah, that seems like it would work. I'm wondering if I could maybe use a
filter by itself though and not use the listener and do something like the
following.

1. Intercept all requests with a filter.
2. Get the HttpSession out of the request. Get the session ID by calling
HttpSession.getId();
3. Get the cookie array and see if there is a cookie named jsessionid. If
there is, compare the two session IDs. If they are different forward to
sessionexpired.jsp to display error page. Otherwise, continue as normal.

This assumes that the session ID changes everytime it expires. As far as I
know, that is the case.

I would also have to figure out how to get the jsessionid if it is in the
URL rather than in a cookie.

I would prefer to do it that way if I can for the sake of simplicity. I want
to avoid having a Hashtable that grows indefinitely if possible.

Does it seem like this work, or, am I missing something?

I'm wondering if this wouldn't work if I didn't have single sign-on enabled.
i.e. the login page would get displayed at session expiration. I'm not sure
if the login page does only forwards, or if it does a redirect. I'm thinking
the redirect might make the above logic not work since the session ID in the
cookie would get updated first by the login page. Note, the filter runs
after the login page.

It seems like there should be a generic way to handle this kind of thing
that is well understood and known to work.

Jon

- Original Message - 
From: Veniamin Fichin [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 2:59 AM
Subject: Re: Session Timeout and Direct Reference to login page


 Jonathan Eric Miller wrote:

  Thanks. I think option #1 is what I'm looking for. What I don't
understand
  is what I need to do with the session listener though?
 
  I don't understand how to determine whether the new session is truly
new, or
  if it's a new session because a previous session timed out. Could I use
a
  filter and check the incoming session ID and if the session ID isn't in
the
  list of session IDs that the server knows about, assume that it's an
expired
  session?

 Yes, this may be the right solution. Store a hash in a singleton
 class and fill it with session ids that has expired (add a new hash pair
 in every invocation of sessionDestroyed()). And at every request check
that:
 0) HttpSession.isNew()==true .
 1) HttpServletRequest.getCookies() array contains an entry that matches
 one of your hash pairs.
 That way you may determine if that session is truly new or an
 expired one. It's just a guess.


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



converting a certificate for use on Tomcat

2004-05-20 Thread Chris Purcell
I have an Apache server with an SSL certificate installed from a CA.   Its
just a plain text certificate that looks like this..

-BEGIN CERTIFICATE-
MIID/DCCAuSgAwIBAgIEAIXW1jANBgkqhkiG9w0BAQQFADCBozELMAkGA1UEBhMC
blablablba
/WeCY0ZzyRYuHhQYIm3R+A==
-END CERTIFICATE-

I want to move this certificate to a new server that only runs Tomcat in
standalone mode.   I tried to convert it like this (below) but am getting
an error...

[EMAIL PROTECTED] cert# openssl pkcs12 -export -inkey host-privkey.pem -in
server.cert -out host.foo.org.pfx
[EMAIL PROTECTED] cert# /usr/java/bin/keytool -import -file host.foo.org.pfx
Enter keystore password: changeit
keytool error: java.lang.Exception: Input not an X.509 certificate

Am I doing something wrong here?

Thanks,
Chris



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



The tomcat not accept more connections

2004-05-20 Thread Software
Hi i have tomcat 4.03 with Apache 1.3.24 with mod_jk module over RedHat 8.0.
The problem when i starting the tomcat  it is stable for a some time, 
then the tomcat not accept any more connection and i must to restart the 
service to our application start working without problem

Theses the errors messages
2004-05-20 09:04:29 HttpConnector[8091] No processor available, 
rejecting this connection

2004-05-20 09:02:24 Ajp13Connector[11009] No processor available, 
rejecting thiss connection


When i start the tomcat theses the messages
2004-05-20 09:05:53 HttpProcessor[8091][4] Starting background thread
2004-05-20 09:10:34 Ajp13Processor[11009][7] Starting background thread
What is the problem?   Thanks a lot for you help
Fabian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Trying to get a Cluster/Session Replication working

2004-05-20 Thread Randy
DUH!

thanks 

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 20, 2004 8:55 AM
To: Tomcat Users List
Subject: Re: Trying to get a Cluster/Session Replication working

You're problem is obvious,
the application in team.xml is only running on box 2.
Make sure that all your clustered applications are deployed on all servers.

Filip

- Original Message -
From: Randy [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Wednesday, May 19, 2004 11:37 PM
Subject: RE: Trying to get a Cluster/Session Replication working


I am saying. don't start the servers at the same time :)
Sorry Brain Flatulence

BTW, I am running these are user apache. That's how they run in production..

Here are the logs
BOX 1
=
-bash-2.05b$ ./catalina.sh run
Using CATALINA_BASE:   /usr/java/jakarta-tomcat
Using CATALINA_HOME:   /usr/java/jakarta-tomcat
Using CATALINA_TMPDIR: /usr/java/jakarta-tomcat/temp
Using JAVA_HOME:   /usr/java/j2sdk1.4.2_04
May 19, 2004 11:31:42 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 19, 2004 11:31:43 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4842 ms
May 19, 2004 11:31:43 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 19, 2004 11:31:43 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.24
May 19, 2004 11:31:43 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 19, 2004 11:31:43 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster
start
INFO: Cluster is about to start
May 19, 2004 11:31:43 PM org.apache.catalina.cluster.mcast.McastService
start
INFO: Sleeping for 2000 secs to establish cluster membership
May 19, 2004 11:31:46 PM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx ) 
May 19, 2004 11:31:46 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL
file:/usr/java/jakarta-tomcat-5.0.24/conf/Catalina/localhost/admin.xml
May 19, 2004 11:31:47 PM org.apache.struts.util.PropertyMessageResources
init
INFO: Initializing, config='org.apache.struts.util.LocalStrings',
returnNull=true
May 19, 2004 11:31:47 PM org.apache.struts.util.PropertyMessageResources
init
INFO: Initializing, config='org.apache.struts.action.ActionResources',
returnNull=true
May 19, 2004 11:31:49 PM org.apache.struts.util.PropertyMessageResources
init
INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources',
returnNull=true
May 19, 2004 11:31:55 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL
file:/usr/java/jakarta-tomcat-5.0.24/conf/Catalina/localhost/balancer.xml
May 19, 2004 11:31:56 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Processing Context configuration file URL
file:/usr/java/jakarta-tomcat-5.0.24/conf/Catalina/localhost/manager.xml
May 19, 2004 11:31:56 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path  from URL
file:/usr/java/jakarta-tomcat-5.0.24/webapps/ROOT
May 19, 2004 11:31:56 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /jsp-examples from URL
file:/usr/java/jakarta-tomcat-5.0.24/webapps/jsp-examples
May 19, 2004 11:31:57 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /servlets-examples from URL
file:/usr/java/jakarta-tomcat-5.0.24/webapps/servlets-examples
May 19, 2004 11:31:57 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /tomcat-docs from URL
file:/usr/java/jakarta-tomcat-5.0.24/webapps/tomcat-docs
May 19, 2004 11:31:57 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /webdav from URL
file:/usr/java/jakarta-tomcat-5.0.24/webapps/webdav
May 19, 2004 11:31:57 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 19, 2004 11:31:58 PM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx ) 
May 19, 2004 11:31:58 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 19, 2004 11:31:58 PM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx ) 
May 19, 2004 11:31:58 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 19, 2004 11:32:00 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
May 19, 2004 11:32:00 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=2/206
config=/usr/java/jakarta-tomcat/conf/jk2.properties
May 19, 2004 11:32:00 PM 

Re: Memory leak with Tomcat 5.0.19

2004-05-20 Thread Emerson Cargnin
wsedio wrote:
On 19-05-2004 23:15, Michiel Toneman wrote:
We were having severe memory problems too with 5.0.19.

Does Tomcat 5.0.24 fix this problem?
We added this to the jk2.properties:
 request.registerRequests=false
and the memory usage was normal again. Somewhat non-obvious, I agree. 
It also gets rid of Error registering request messages in 
catalina.out. We are using mod_jk (1.2) with Apache 1.3.x on Sun 
Solaris and Linux.

Do you have to add the setting even if you are using jk 1.2 (not jk 2)?
Someone could answer this question, please? Becouse my available memory 
is going down from 120 to 50 and to 10 megabytes to fast. And I'm not 
finding any leak in my apps...


Below is the memory profile of one of our servers before and after the 
change (old generation memory refers to the memory buckets in the 
garbage collector. For more information, see jvmstat. At 100% you will 
start getting OutOfMemory errors):

How do you get the memory profile? Is it a Tomcat command?
Thanks.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Memory leak with Tomcat 5.0.19

2004-05-20 Thread Emerson Cargnin
 Someone could answer this question, please? Becouse my available memory
 is going down from 120 to 50 and to 10 megabytes to fast. And I'm not
 finding any leak in my apps...
Sorry if I looked rude, didn't mean that   :P
Maybe this leak is solved in tomcat 5.0.24??
Emerson Cargnin wrote:
wsedio wrote:
On 19-05-2004 23:15, Michiel Toneman wrote:
We were having severe memory problems too with 5.0.19.

Does Tomcat 5.0.24 fix this problem?
We added this to the jk2.properties:
 request.registerRequests=false
and the memory usage was normal again. Somewhat non-obvious, I agree. 
It also gets rid of Error registering request messages in 
catalina.out. We are using mod_jk (1.2) with Apache 1.3.x on Sun 
Solaris and Linux.

Do you have to add the setting even if you are using jk 1.2 (not jk 2)?



Below is the memory profile of one of our servers before and after 
the change (old generation memory refers to the memory buckets in 
the garbage collector. For more information, see jvmstat. At 100% you 
will start getting OutOfMemory errors):

How do you get the memory profile? Is it a Tomcat command?
Thanks.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Memory leak with Tomcat 5.0.19

2004-05-20 Thread Shapira, Yoav

Hi,
What if your webapp actually requires more than 120MB of memory under
your load?

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 1:09 PM
To: Tomcat Users List
Subject: Re: Memory leak with Tomcat 5.0.19


wsedio wrote:
 On 19-05-2004 23:15, Michiel Toneman wrote:

 We were having severe memory problems too with 5.0.19.


 Does Tomcat 5.0.24 fix this problem?

 We added this to the jk2.properties:

  request.registerRequests=false

 and the memory usage was normal again. Somewhat non-obvious, I
agree.
 It also gets rid of Error registering request messages in
 catalina.out. We are using mod_jk (1.2) with Apache 1.3.x on Sun
 Solaris and Linux.


 Do you have to add the setting even if you are using jk 1.2 (not jk
2)?

Someone could answer this question, please? Becouse my available memory
is going down from 120 to 50 and to 10 megabytes to fast. And I'm not
finding any leak in my apps...


 Below is the memory profile of one of our servers before and after
the
 change (old generation memory refers to the memory buckets in the
 garbage collector. For more information, see jvmstat. At 100% you
will
 start getting OutOfMemory errors):


 How do you get the memory profile? Is it a Tomcat command?

 Thanks.

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




--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181

-
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: Session Timeout and Direct Reference to login page

2004-05-20 Thread Ben Souther
What was wrong with the first suggestion?

1.) When your user logs in, throw an object in their session.
2.) In each servlet/jsp (or, better, in a filter), test for the existence of 
that object and forward back to the login if it is null.

Seems pretty straight forward to me.





On Thursday 20 May 2004 12:51 pm, Jonathan Eric Miller wrote:
 Yeah, that seems like it would work. I'm wondering if I could maybe use a
 filter by itself though and not use the listener and do something like the
 following.

 1. Intercept all requests with a filter.
 2. Get the HttpSession out of the request. Get the session ID by calling
 HttpSession.getId();
 3. Get the cookie array and see if there is a cookie named jsessionid. If
 there is, compare the two session IDs. If they are different forward to
 sessionexpired.jsp to display error page. Otherwise, continue as normal.

 This assumes that the session ID changes everytime it expires. As far as I
 know, that is the case.

 I would also have to figure out how to get the jsessionid if it is in the
 URL rather than in a cookie.

 I would prefer to do it that way if I can for the sake of simplicity. I
 want to avoid having a Hashtable that grows indefinitely if possible.

 Does it seem like this work, or, am I missing something?

 I'm wondering if this wouldn't work if I didn't have single sign-on
 enabled. i.e. the login page would get displayed at session expiration. I'm
 not sure if the login page does only forwards, or if it does a redirect.
 I'm thinking the redirect might make the above logic not work since the
 session ID in the cookie would get updated first by the login page. Note,
 the filter runs after the login page.

 It seems like there should be a generic way to handle this kind of thing
 that is well understood and known to work.

 Jon

 - Original Message -
 From: Veniamin Fichin [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Thursday, May 20, 2004 2:59 AM
 Subject: Re: Session Timeout and Direct Reference to login page

  Jonathan Eric Miller wrote:
   Thanks. I think option #1 is what I'm looking for. What I don't

 understand

   is what I need to do with the session listener though?
  
   I don't understand how to determine whether the new session is truly

 new, or

   if it's a new session because a previous session timed out. Could I use

 a

   filter and check the incoming session ID and if the session ID isn't in

 the

   list of session IDs that the server knows about, assume that it's an

 expired

   session?
 
  Yes, this may be the right solution. Store a hash in a singleton
  class and fill it with session ids that has expired (add a new hash pair
  in every invocation of sessionDestroyed()). And at every request check

 that:
  0) HttpSession.isNew()==true .
  1) HttpServletRequest.getCookies() array contains an entry that matches
  one of your hash pairs.
  That way you may determine if that session is truly new or an
  expired one. It's just a guess.
 
 
  -
  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.


This e-mail message, and any accompanying documents, is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.  Any unauthorized review, use, disclosure, distribution or
copying is prohibited.  If you are not the intended recipient, please
contact our office by email or by telephone at (508) 747-7261 and
immediately destroy all copies of the original message.

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



Re: Session Timeout and Direct Reference to login page

2004-05-20 Thread Jonathan Eric Miller
Thanks for the suggestion. The reason that I can't do it that way (as far as
I know) is because I'm using container-based security. I'm not handling the
submission of the login form directly.

Before I switched to using container-based security, I was doing it exactly
as you described.

Jon

- Original Message - 
From: Ben Souther [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 12:26 PM
Subject: Re: Session Timeout and Direct Reference to login page


 What was wrong with the first suggestion?

 1.) When your user logs in, throw an object in their session.
 2.) In each servlet/jsp (or, better, in a filter), test for the existence
of
 that object and forward back to the login if it is null.

 Seems pretty straight forward to me.





 On Thursday 20 May 2004 12:51 pm, Jonathan Eric Miller wrote:
  Yeah, that seems like it would work. I'm wondering if I could maybe use
a
  filter by itself though and not use the listener and do something like
the
  following.
 
  1. Intercept all requests with a filter.
  2. Get the HttpSession out of the request. Get the session ID by calling
  HttpSession.getId();
  3. Get the cookie array and see if there is a cookie named jsessionid.
If
  there is, compare the two session IDs. If they are different forward to
  sessionexpired.jsp to display error page. Otherwise, continue as normal.
 
  This assumes that the session ID changes everytime it expires. As far as
I
  know, that is the case.
 
  I would also have to figure out how to get the jsessionid if it is in
the
  URL rather than in a cookie.
 
  I would prefer to do it that way if I can for the sake of simplicity. I
  want to avoid having a Hashtable that grows indefinitely if possible.
 
  Does it seem like this work, or, am I missing something?
 
  I'm wondering if this wouldn't work if I didn't have single sign-on
  enabled. i.e. the login page would get displayed at session expiration.
I'm
  not sure if the login page does only forwards, or if it does a redirect.
  I'm thinking the redirect might make the above logic not work since the
  session ID in the cookie would get updated first by the login page.
Note,
  the filter runs after the login page.
 
  It seems like there should be a generic way to handle this kind of thing
  that is well understood and known to work.
 
  Jon
 
  - Original Message -
  From: Veniamin Fichin [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Thursday, May 20, 2004 2:59 AM
  Subject: Re: Session Timeout and Direct Reference to login page
 
   Jonathan Eric Miller wrote:
Thanks. I think option #1 is what I'm looking for. What I don't
 
  understand
 
is what I need to do with the session listener though?
   
I don't understand how to determine whether the new session is truly
 
  new, or
 
if it's a new session because a previous session timed out. Could I
use
 
  a
 
filter and check the incoming session ID and if the session ID isn't
in
 
  the
 
list of session IDs that the server knows about, assume that it's an
 
  expired
 
session?
  
   Yes, this may be the right solution. Store a hash in a singleton
   class and fill it with session ids that has expired (add a new hash
pair
   in every invocation of sessionDestroyed()). And at every request check
 
  that:
   0) HttpSession.isNew()==true .
   1) HttpServletRequest.getCookies() array contains an entry that
matches
   one of your hash pairs.
   That way you may determine if that session is truly new or an
   expired one. It's just a guess.
  
  
   -
   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.


 This e-mail message, and any accompanying documents, is for the sole use
of
 the intended recipient(s) and may contain confidential and privileged
 information.  Any unauthorized review, use, disclosure, distribution or
 copying is prohibited.  If you are not the intended recipient, please
 contact our office by email or by telephone at (508) 747-7261 and
 immediately destroy all copies of the original message.

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



tomcat5 server stalling

2004-05-20 Thread Steven Garrett
Hi,

I'm running tomcat5 on a Redhat9 box.  It looks like its accepting
connections for a while, which is good.  But then it hits a limit and there
are alot of TIME_WAIT connections in the netstat output.  Below are the
server.xml portions where we configure tomcat to listen and accept
connections on port 80.  If you need any more info, please let me know.

Thanks,

Steve

   !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 80 --
Connector port=80
   maxThreads=1 minSpareThreads=25
maxSpareThreads=2000
   enableLookups=false redirectPort=8443 acceptCount=1
   debug=0 connectionTimeout=2000
   disableUploadTimeout=true /
!-- Note : To disable connection timeouts, set connectionTimeout value
 to -1 --

!-- Note : To use gzip compression you could set the following
properties :

   compression=on
   compressionMinSize=2048
   noCompressionUserAgents=gozilla, traviata
   compressableMimeType=text/html,text/xml
--

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



Re: jar and jad with httpd

2004-05-20 Thread kalin mintchev

 thanks a lot...  does that mean i can use the httpd?!

 If your app is running on the client side (Applets or J2ME) then you don't
 need httpd or anything other than a webserver on the server side.  None of
 you code gets executed on the server anyway.  It all get's downloaded to
 the
 browser (or whatever device is running j2me) and handled there.

I'm aware. but thanks...  my question was 'cell phone' related. the thing
is a client wants to deliver .jar and .jad files for j2me applications on
cell phones. he said when tried to request the file with the cell phone
browser it didn't work. since all the files in the archive are executed
(like you noted) on  the client side i was wondering if the httpd has to
understand some 'special' mime.type requests. that's all...

thank you






 On Wednesday 19 May 2004 05:59 pm, kalin mintchev wrote:
  For JAD files..
  .jad = text/vnd.sun.j2me.app-descriptor
 
  For JAR files...
  .jar = application/java-archive
  and / or
  .jar = application/x-java-archive

 thanks a lot...  does that mean i can use the httpd?!

  kalin mintchev wrote:
 hi all
 sorry if this isn't the right place for this question...  i just
 couldn't
 find a better place to ask...
 
 i'm trying to figure out if it's possible to serve .jar and .jad files
 with the apache httpd to java enabled cell phones. if so what excatly
 are
 the mime types i should map to the extentions...
 
 thanks...
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

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

 --
 Ben Souther
 F.W. Davison  Company, Inc.


 This e-mail message, and any accompanying documents, is for the sole use
 of
 the intended recipient(s) and may contain confidential and privileged
 information.  Any unauthorized review, use, disclosure, distribution or
 copying is prohibited.  If you are not the intended recipient, please
 contact our office by email or by telephone at (508) 747-7261 and
 immediately destroy all copies of the original message.

 -
 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: jar and jad with httpd

2004-05-20 Thread Shapira, Yoav

Hi,
As an aside, the choice of .jad as an extension standard is amusing to
anyone who's used the JAD decompiler ;)

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: kalin mintchev [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 1:50 PM
To: Tomcat Users List
Subject: Re: jar and jad with httpd


 thanks a lot...  does that mean i can use the httpd?!

 If your app is running on the client side (Applets or J2ME) then you
don't
 need httpd or anything other than a webserver on the server side.
None
of
 you code gets executed on the server anyway.  It all get's downloaded
to
 the
 browser (or whatever device is running j2me) and handled there.

I'm aware. but thanks...  my question was 'cell phone' related. the
thing
is a client wants to deliver .jar and .jad files for j2me applications
on
cell phones. he said when tried to request the file with the cell phone
browser it didn't work. since all the files in the archive are executed
(like you noted) on  the client side i was wondering if the httpd has
to
understand some 'special' mime.type requests. that's all...

thank you






 On Wednesday 19 May 2004 05:59 pm, kalin mintchev wrote:
  For JAD files..
  .jad = text/vnd.sun.j2me.app-descriptor
 
  For JAR files...
  .jar = application/java-archive
  and / or
  .jar = application/x-java-archive

 thanks a lot...  does that mean i can use the httpd?!

  kalin mintchev wrote:
 hi all
 sorry if this isn't the right place for this question...  i just
 couldn't
 find a better place to ask...
 
 i'm trying to figure out if it's possible to serve .jar and .jad
files
 with the apache httpd to java enabled cell phones. if so what
excatly
 are
 the mime types i should map to the extentions...
 
 thanks...
 

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


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

 --
 Ben Souther
 F.W. Davison  Company, Inc.


 This e-mail message, and any accompanying documents, is for the sole
use
 of
 the intended recipient(s) and may contain confidential and privileged
 information.  Any unauthorized review, use, disclosure, distribution
or
 copying is prohibited.  If you are not the intended recipient, please
 contact our office by email or by telephone at (508) 747-7261 and
 immediately destroy all copies of the original message.

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



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




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


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



Re: The tomcat not accept more connections

2004-05-20 Thread Software
The  parameter connectionTimeout in the server.xml file which unit of 
time uses ? what is te recomendable for tomcat 4.0.3


Software wrote:
Hi i have tomcat 4.03 with Apache 1.3.24 with mod_jk module over 
RedHat 8.0.

The problem when i starting the tomcat  it is stable for a some time, 
then the tomcat not accept any more connection and i must to restart 
the service to our application start working without problem

Theses the errors messages
2004-05-20 09:04:29 HttpConnector[8091] No processor available, 
rejecting this connection

2004-05-20 09:02:24 Ajp13Connector[11009] No processor available, 
rejecting thiss connection


When i start the tomcat theses the messages
2004-05-20 09:05:53 HttpProcessor[8091][4] Starting background thread
2004-05-20 09:10:34 Ajp13Processor[11009][7] Starting background thread
What is the problem?   Thanks a lot for you help
Fabian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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


Re: Why 41 processes with Tomcat under Linux

2004-05-20 Thread Software
Which Linux platform are do you install, because with RH 7.3 you can see 
many proccess (almost 40 proccess) with ps -auxw --forest | grep java 
and i've installed to test the same environmet and using the same 
command to review the java proccess and i've saw only one...my 
conclusion is the kernel of redhat 7.3 not manage the threads like 
version Rh 8 or 9... remenber i've installed apache 1.3.24 and tomcat 4.0.3


Sheng Huang wrote:
Hi Bob,
Some process may be child processes of the Tomcat processes. For example,
Tomcat may have a process for a specific jar in the /lib directory. You can
tell this by examining process id. The root tomcat process id will have
ppid=1, where others will have ppid = pid of the root process. If you kill
the root process, all child processes of this process will be terminated.
Sheng
-Original Message-
From: Bob White [mailto:[EMAIL PROTECTED]
Sent: May 17, 2004 5:05 PM
To: [EMAIL PROTECTED]
Subject: Why 41 processes with Tomcat under Linux
I just installed TC 5.0.19 under Linux and I find that it causes 41 Tomcat
processes to be launched.  Why is this?  How can I control the number of
processes that are created?  Is this to be expected?
I naively expected only one Tomcat process.  There is absolutely no load on
the
server, it just initally generates 41 Tomcat processes.
..Bob.
=
--Bob White-- home:727-490-7363, cell:727-463-6061
New (popup free!) photos of Polina: http://polina.70kg.com/
Everything that irritates us about others can lead us to an understanding of
ourselves. - Carl Jung
-
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: The tomcat not accept more connections

2004-05-20 Thread Benjamin Armintor
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/http11.html
The number of milliseconds this Connector will wait, after accepting a
connection, for the request URI line to be presented. The default value
is 6 (i.e. 60 seconds).

Benjamin J. Armintor
Systems Analyst
ITS-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]
 


-Original Message-
From: Software [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 20, 2004 1:04 PM
To: Tomcat Users List
Subject: Re: The tomcat not accept more connections


The  parameter connectionTimeout in the server.xml file which unit of 
time uses ? what is te recomendable for tomcat 4.0.3



Software wrote:

 Hi i have tomcat 4.03 with Apache 1.3.24 with mod_jk module over
 RedHat 8.0.

 The problem when i starting the tomcat  it is stable for a some time,
 then the tomcat not accept any more connection and i must to restart 
 the service to our application start working without problem

 Theses the errors messages


 2004-05-20 09:04:29 HttpConnector[8091] No processor available,
 rejecting this connection

 2004-05-20 09:02:24 Ajp13Connector[11009] No processor available,
 rejecting thiss connection



 When i start the tomcat theses the messages


 2004-05-20 09:05:53 HttpProcessor[8091][4] Starting background thread

 2004-05-20 09:10:34 Ajp13Processor[11009][7] Starting background 
 thread


 What is the problem?   Thanks a lot for you help

 Fabian


 -
 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: The tomcat not accept more connections

2004-05-20 Thread Shapira, Yoav

Hi,
The parameter uses milliseconds.  The default and recommended value for
99% of applications is 6ms.

I suggested upgrading your tomcat version: 4.1.30 and 5.0.24 are good
releases.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Software [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 2:04 PM
To: Tomcat Users List
Subject: Re: The tomcat not accept more connections

The  parameter connectionTimeout in the server.xml file which unit of
time uses ? what is te recomendable for tomcat 4.0.3



Software wrote:

 Hi i have tomcat 4.03 with Apache 1.3.24 with mod_jk module over
 RedHat 8.0.

 The problem when i starting the tomcat  it is stable for a some time,
 then the tomcat not accept any more connection and i must to restart
 the service to our application start working without problem

 Theses the errors messages


 2004-05-20 09:04:29 HttpConnector[8091] No processor available,
 rejecting this connection

 2004-05-20 09:02:24 Ajp13Connector[11009] No processor available,
 rejecting thiss connection



 When i start the tomcat theses the messages


 2004-05-20 09:05:53 HttpProcessor[8091][4] Starting background thread

 2004-05-20 09:10:34 Ajp13Processor[11009][7] Starting background
thread


 What is the problem?   Thanks a lot for you help

 Fabian


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




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




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


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



RE: webdav servlet problems with Tomcat 5.0.24 and IE

2004-05-20 Thread Mark Thomas
Roy,

First of all it is worth pointing out that this works quite happily for me on
WinXP using TC5.0.24 and IE6.

There are difference between how tomcat 4 and 5 handle redirection from
www.yourhost.com/webdav to www.yourhost.com/webdav/ Either should be valid but
the webdav implementation in IE doesn't handle http redirection responses
correctly. This is why TC4 works with / but TC5 sometimes has trouble with IE
clients. Needless to say when I tried to report this to Microsoft they refused
to acknowledge this as a bug and said I needed to pay to get any further
support.

It can be rather slow and painful but the best way to see what is going on is to
use telnet. 

Open a telnet session to tomcat and try the following:
PROPFIND http://yourhost:port/webdav/ HTTP/1.1 new line
new line
new line
You should see a long sequence of xml.

A few other thoughts:
- does it work if you run TC5 on a windows box?
- are you using the webdav servlet as it comes with TC5?

Mark

-Original Message-
 From: Roy Gardner [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, May 20, 2004 10:53 AM
 To: [EMAIL PROTECTED]
 Subject: webdav servlet problems with Tomcat 5.0.24 and IE
 
 I posted a bug (29094) on 19/04/04. The webdav webapp shipped with 
 Tomcat 5.0.24 does not serve web folders to IE5 and IE6. The server 
 platform is Solaris 8 on Sun. The same behaviour is exhibited when 
 running Tomcat 5.0.24 on Mac OS X 10.3.3.
 
 This is the case despite the following, recommended, web.xml setting 
 which is supposed to deal with bugs in IE:
 
servlet-mapping
  servlet-namewebdav/servlet-name
  url-pattern/*/url-pattern
/servlet-mapping
 
 The problem does not occur in the webdav webapp supplied with Tomcat 
 4.1.12 even though its web.xml contains:
 
servlet-mapping
  servlet-namewebdav/servlet-name
  url-pattern//url-pattern
/servlet-mapping
 
 ie. the pattern that would evoke the IE bug.
 
 Any insights would be welcome.
 



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



Problem with error-page

2004-05-20 Thread Jim Kennedy
 I am trying to configure a custom error page when users try to access an
area of my site that they don't have sufficient rights to access.

The book says this to configure this in web.xml:

error-page
error-code403/error-code
location/error/403.jsp/location
/error-page

This doesn't work for me, but

error-page
error-code403/error-code
location/error/403.html/location
/error-page

Does work.  Is there a problem with using JSP's.


I'm am using JBOSS with Tomcat, but that shouldn't matter.  It's still the
Tomcat engine.  I'm also using Struts.

I'm using Tomcat 4.1.24.

Anybody have troublem with this out there?

Thanks


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



Re: Memory leak with Tomcat 5.0.19

2004-05-20 Thread Emerson Cargnin
Our load is very low, and all the new app deployed after changing to 
5.0.19 was tested (undeployed to see if mem usage get lower) and I 
didn't find any other clue.

I think I'll have to profile it... hope to find the hole ;P
thanks anyway
Emerson
Shapira, Yoav wrote:
Hi,
What if your webapp actually requires more than 120MB of memory under
your load?
Yoav Shapira
Millennium Research Informatics

-Original Message-
From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 1:09 PM
To: Tomcat Users List
Subject: Re: Memory leak with Tomcat 5.0.19
wsedio wrote:
On 19-05-2004 23:15, Michiel Toneman wrote:

We were having severe memory problems too with 5.0.19.

Does Tomcat 5.0.24 fix this problem?

We added this to the jk2.properties:
request.registerRequests=false
and the memory usage was normal again. Somewhat non-obvious, I
agree.
It also gets rid of Error registering request messages in
catalina.out. We are using mod_jk (1.2) with Apache 1.3.x on Sun
Solaris and Linux.

Do you have to add the setting even if you are using jk 1.2 (not jk
2)?
Someone could answer this question, please? Becouse my available memory
is going down from 120 to 50 and to 10 megabytes to fast. And I'm not
finding any leak in my apps...

Below is the memory profile of one of our servers before and after
the
change (old generation memory refers to the memory buckets in the
garbage collector. For more information, see jvmstat. At 100% you
will
start getting OutOfMemory errors):

How do you get the memory profile? Is it a Tomcat command?
Thanks.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
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]


--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tricky situation

2004-05-20 Thread Rajesh_Narayanan
I have to configure my tomcat to look into two different directories for
file availability.

Scenario: I have a different webserver iplanet with docroot say
C:\iplanet\server\docs...

I hv my tomcat installed in c:\tomcat

lets assume that a user try to access http:\\localhost:8080\a

(where a is a directory in iplanet docroot..) I want tomcat to pick
that(index.html) up from iplanet docroot

how can i do that?.. 

I already configured my context path like this

Context path= reloadable=true docBase=C:\workspace /

Thanks in advance. -
Raj*
* 
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**

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



Re: The tomcat not accept more connections

2004-05-20 Thread Software
OK but is that the reasos that the tomcat not accept more connections?
Shapira, Yoav wrote:
Hi,
The parameter uses milliseconds.  The default and recommended value for
99% of applications is 6ms.
I suggested upgrading your tomcat version: 4.1.30 and 5.0.24 are good
releases.
Yoav Shapira
Millennium Research Informatics
 

-Original Message-
From: Software [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 2:04 PM
To: Tomcat Users List
Subject: Re: The tomcat not accept more connections
The  parameter connectionTimeout in the server.xml file which unit of
time uses ? what is te recomendable for tomcat 4.0.3

Software wrote:
   

Hi i have tomcat 4.03 with Apache 1.3.24 with mod_jk module over
RedHat 8.0.
The problem when i starting the tomcat  it is stable for a some time,
then the tomcat not accept any more connection and i must to restart
the service to our application start working without problem
Theses the errors messages
2004-05-20 09:04:29 HttpConnector[8091] No processor available,
rejecting this connection
2004-05-20 09:02:24 Ajp13Connector[11009] No processor available,
rejecting thiss connection

When i start the tomcat theses the messages
2004-05-20 09:05:53 HttpProcessor[8091][4] Starting background thread
2004-05-20 09:10:34 Ajp13Processor[11009][7] Starting background
 

thread
 

What is the problem?   Thanks a lot for you help
Fabian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

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



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



Re: access ENV variables

2004-05-20 Thread Oreste Luci
That did it, thanks. This is what I did:
1. In Apache httpd.conf:
JkEnvVar REDIRECT_URL NULL
ErrorDocument 404 /404.jsp
2. In 404.jsp:
%=request.getAttribute(REDIRECT_URL)%
And that way I can capture the URL the user typed.
Thanks for all the help.
Here goes a link I found useful:
http://groups.yahoo.com/group/jetty-support/message/5239
Oreste Luci

Graham Bleach wrote:
On Wed, Apr 07, 2004 at 02:19:25PM -0700, Daniel Gibby wrote:
 

Is it possible to access environment variables in tomcat that were set 
by apache?
   

Which connector are you using? With mod_jk, you need to specify them in
your httpd.conf:
JkEnvVar ENVVAR
They are then set as request attributes.
G
 




GateLock Virus Notification.

2004-05-20 Thread GateLockX200
Dear GateLock user,

GateLock has detected the WORM_NETSKY.D in your email attachment your_picture.pif. 
The file could not be cleaned and was therefore deleted.---BeginMessage---
Your file is attached.
---End Message---
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: converting a certificate for use on Tomcat

2004-05-20 Thread Jim Hopp
Hi Chris-
I had to do this myself a month ago.
You can't use Sun's keytool to import private keys into keystores. 
You'll need to use something else to load the private key and 
corresponding cert into a keystore which Tomcat can then read.

See the program and notes at http://www.comu.de/docs/tomcat_ssl.htm - it 
 will explain how to use openssl to convert an existing private key and 
cert into a format that can then be loaded (using source code they 
provide) into a Java JKS keystore.

Let me know if you need more details.
-Jim
Chris Purcell wrote:
I have an Apache server with an SSL certificate installed from a CA.   Its
just a plain text certificate that looks like this..
-BEGIN CERTIFICATE-
MIID/DCCAuSgAwIBAgIEAIXW1jANBgkqhkiG9w0BAQQFADCBozELMAkGA1UEBhMC
blablablba
/WeCY0ZzyRYuHhQYIm3R+A==
-END CERTIFICATE-
I want to move this certificate to a new server that only runs Tomcat in
standalone mode.   I tried to convert it like this (below) but am getting
an error...
[EMAIL PROTECTED] cert# openssl pkcs12 -export -inkey host-privkey.pem -in
server.cert -out host.foo.org.pfx
[EMAIL PROTECTED] cert# /usr/java/bin/keytool -import -file host.foo.org.pfx
Enter keystore password: changeit
keytool error: java.lang.Exception: Input not an X.509 certificate
Am I doing something wrong here?
Thanks,
Chris

-
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: tag library compile - semi-resolution

2004-05-20 Thread Zollinhofer, Matt
Right, class dir = exploded jar, I follow you there.  Let me lay out the
situation a little better.  I'm trying to compile HelloTag.java.  My
classpath initially was set to this:  /Users/matt/development/java:.
So, I realize, the jar files I need (jsp-api.jar, included in tomcat
distro) are not in either the java directory or the . (current
directory).  

First, I just wanted to make sure that jsp-api.jar was the correct jar I
needed (yes I know this isn't the best way to go about things), so
copied the jsp-api.jar into the current directory.  Figuring that if
that was the correct jar, I would be able to compile HelloTag.java.
Unfortunately, it did not compile.  So, then I set my classpath to
include the actual jar file, classpath was changed to
/Users/matt/development/java:/Library/Tomcat/Home/common/lib/jsp-api.ja
r:.  So that's why I'm a little confused.

matt



-Original Message-
From: QM [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 10:38 AM
To: Tomcat Users List
Subject: Re: tag library compile - semi-resolution


On Thu, May 20, 2004 at 10:02:27AM -0400, Zollinhofer, Matt wrote:
: So, it works, but I don't really understand the necessity of having
the
: particular jar file on the classpath.

Is this a confusion of
class directories vs JAR files
or
webapp class search paths
?

JAR files and directories are equivalent in Java: they both contain a
hierarchy of classes and resources.  (You can think of a class dir as an
exploded JAR file.)

When building on the commandline (with ant or straight javac) you must
explicitly set the classpath.

With webapps, it's a little different: JAR files from certain
directories are automagically included for you.  Imagine the
container, on startup, scans for WEB-INF/lib/*.jar and puts those in
its search path.

That's not a Tomcat thing; that's the servlet spec.

-or did I miss your question entirely?

-QM

-- 

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


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


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



problem with bundle

2004-05-20 Thread hookah
hi 
i have a problem with servlet

given error is like this

--

type Exception report
message 

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

exception 

java.util.MissingResourceException: Can't find bundle for base name LocalStrings, 
locale tr
--how can i solve this problem hookah

RE: problem with bundle

2004-05-20 Thread Shapira, Yoav

Hi,
Create a Turkish locale bundle or modify your servlet to not require
one.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: hookah [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 20, 2004 4:30 PM
To: [EMAIL PROTECTED]
Subject: problem with bundle

hi
i have a problem with servlet

given error is like this

--

type Exception report
message

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

exception

java.util.MissingResourceException: Can't find bundle for base name
LocalStrings, locale tr
--how can i solve this problem hookah



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: Problem with error-page

2004-05-20 Thread Yansheng Lin
Class names must be a legal Java identifier, i.e., starts with a letter, $,
or _.

-Yan

-Original Message-
From: Jim Kennedy [mailto:[EMAIL PROTECTED] 
Sent: May 20, 2004 12:50
To: 'Tomcat Users List'
Subject: Problem with error-page


 I am trying to configure a custom error page when users try to access an
area of my site that they don't have sufficient rights to access.

The book says this to configure this in web.xml:

error-page
error-code403/error-code
location/error/403.jsp/location
/error-page

This doesn't work for me, but

error-page
error-code403/error-code
location/error/403.html/location
/error-page

Does work.  Is there a problem with using JSP's.


I'm am using JBOSS with Tomcat, but that shouldn't matter.  It's still the
Tomcat engine.  I'm also using Struts.

I'm using Tomcat 4.1.24.

Anybody have troublem with this out there?

Thanks


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


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



RE: Problem with error-page

2004-05-20 Thread Mike Curwen
I had never thought of that!  But when I tested it, it seems that JASPER
appends a _, and so a JSP  page that starts with a number should still
work.


 -Original Message-
 From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, May 20, 2004 3:33 PM
 To: 'Tomcat Users List'; [EMAIL PROTECTED]
 Subject: RE: Problem with error-page
 
 
 Class names must be a legal Java identifier, i.e., starts 
 with a letter, $, or _.
 
 -Yan
 
 -Original Message-
 From: Jim Kennedy [mailto:[EMAIL PROTECTED] 
 Sent: May 20, 2004 12:50
 To: 'Tomcat Users List'
 Subject: Problem with error-page
 
 
  I am trying to configure a custom error page when users try 
 to access an area of my site that they don't have sufficient 
 rights to access.
 
 The book says this to configure this in web.xml:
 
   error-page
   error-code403/error-code
   location/error/403.jsp/location
   /error-page
 
 This doesn't work for me, but
 
   error-page
   error-code403/error-code
   location/error/403.html/location
   /error-page
 
 Does work.  Is there a problem with using JSP's.
 
 
 I'm am using JBOSS with Tomcat, but that shouldn't matter.  
 It's still the Tomcat engine.  I'm also using Struts.
 
 I'm using Tomcat 4.1.24.
 
 Anybody have troublem with this out there?
 
 Thanks
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



RE: Problem with error-page

2004-05-20 Thread Mike Curwen
DOH!  prepend is what I meant to say.

 -Original Message-
 From: Mike Curwen [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, May 20, 2004 3:45 PM
 To: 'Tomcat Users List'
 Subject: RE: Problem with error-page
 
 
 I had never thought of that!  But when I tested it, it seems 
 that JASPER appends a _, and so a JSP  page that starts with 
 a number should still work.
 
 


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



Different Problem with error-page

2004-05-20 Thread Frank T. Murphy
I have a different problem with the error-page.

Our goal is to have any 404's redirected to a particular web page called
act_check.html

the web.xml piece looks as follows

 error-page
error-code404/error-code
location/act_check.html/location
  /error-page

It works on netscape 7.0 but I still get the standard IE 404 page when
running IE

Any thoughts?



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



Re: session data in Tomcat 5

2004-05-20 Thread M.Hockings
Ben Souther wrote:
On Thursday 20 May 2004 10:15 am, Shapira, Yoav wrote:
 

in starting jsp 1
session.setAttribute(ml,ml);
in target jsp 2
MyPackage.MyClass ml = (MyPackage.MyClass)session.getAttribute(ml);
System.out.println(ml = +ml);
then in the log I see...
 ml = null
 

You didn't include it in your code snippet so I have to ask:  are you sure 
that the ml object wasn't null before you called setAttribute?

Also, are you testing this with the same browser that you were using with the 
4x version of Tomcat (that was working)?  
I'm asking because this looks like a case of MSIE not storing session cookies 
properly.  (IOW: every hit to the server is generating it's own session).  
 

Yup the original is non-null.  What I did to confirm this is that after 
the setAttribute I did a getAttribute into another reference and did a 
System.out on that to be sure that it actually got put in the session.

Today I created a new project in  WDSC 5.1.2 (the latest) imported all 
the files and cleaned up every last validation error.  It works just 
fine in the WAS 5.0 and 5.1 test environments (only J2EE 1.3 though).  
Deploying to my test Tomcat 5 on Win2K shows the same problem as before.

I'm using the same browser and machine as was working with Tomcat 4.   I 
did wonder if cookies were being dropped (I have to run this Integrity 
Client thing on Win2K that does block some stuff) so I've even tried 
running with Mozilla from Linux and the symptoms are identical.  So it 
still seems to be something related to this specific webapp code but it 
hasn't dawned on me what yet.  Tomorrow I plan on writing a simple pair 
of  jsps, one to display the session id and all the session data and the 
other that will display the session id, put an element in the session 
and submit to the first one.  That will more or less simulate the 
function of the real app that seems to be failing.  Once I figure this 
one out I'm sure it will be a duh kinda feeling...

Mike


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


RE: Different Problem with error-page

2004-05-20 Thread Benjamin Armintor
Check under Tools/Internet Options/Advanced to see whether the Show
friendly HTTP error messages property is active.  If it is, I think IE
puts its own page up whenever it gets a server response that indicates
an error.

Benjamin J. Armintor
Systems Analyst
ITS-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]
 


-Original Message-
From: Frank T. Murphy [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 20, 2004 3:48 PM
To: 'Tomcat Users List'
Subject: Different Problem with error-page


I have a different problem with the error-page.

Our goal is to have any 404's redirected to a particular web page called
act_check.html

the web.xml piece looks as follows

 error-page
error-code404/error-code
location/act_check.html/location
  /error-page

It works on netscape 7.0 but I still get the standard IE 404 page when
running IE

Any thoughts?



-
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: Problem with error-page

2004-05-20 Thread Yansheng Lin
Doooh. My quick guess was not right, then:).

Sorry.

-Original Message-
From: Mike Curwen [mailto:[EMAIL PROTECTED] 
Sent: May 20, 2004 14:48
To: 'Tomcat Users List'
Subject: RE: Problem with error-page


DOH!  prepend is what I meant to say.

 -Original Message-
 From: Mike Curwen [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, May 20, 2004 3:45 PM
 To: 'Tomcat Users List'
 Subject: RE: Problem with error-page
 
 
 I had never thought of that!  But when I tested it, it seems 
 that JASPER appends a _, and so a JSP  page that starts with 
 a number should still work.
 
 


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



Conversion of String value to Double...

2004-05-20 Thread soh_mah
Hi all

I have couple of basic problems in JSP.

How can I convert in String value into double, Like

String a=0.2345;
double b=0;

I need to assign the value of variable a into varuble
b, How can I do that.

Thanks in advance for ur help!!


=
Regards

Sohail Mahmood
(416) 636-2553




__
Do you Yahoo!?
Yahoo! Domains – Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer 

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



RE: jsvc versus startup.sh with jdk 1.4

2004-05-20 Thread Jonathan Quinn
Hi,

Thanks for the reply here.  Actually, this issue is not 
solved by having tools.jar in the classpath.  I made sure 
that it was there for both the jsvc case as well as the 
startup.sh case.  It seems there is some other difference.

Thanks,
Tal

 Original message 
Date: Mon, 17 May 2004 09:07:14 -0400
From: Shapira, Yoav [EMAIL PROTECTED]  
Subject: RE: jsvc versus startup.sh with jdk 1.4  
To: Tomcat Users List [EMAIL PROTECTED]


Hi
We may simply have not had the bandwidth or may note have 
noted the
issue -- there's a ton of stuff going on and we're all 
busy.  This
should get fixed ;)  Is there a bugzilla issue open for it?

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]
Sent: Sunday, May 16, 2004 3:24 AM
To: Tomcat Users List
Subject: Re: jsvc versus startup.sh with jdk 1.4

I had to add tools.jar to the classpath for the windows 
service (in
service.bat) in order to get jsp's to compile.  I've 
mentioned it to
the
Tomcat developers, but they haven't added it.  The .sh 
and .bat files
add
tools.jar to the classpath, so I don't know why they 
wouldn't want to
do it
for jsvc???

Jake

At 03:17 AM 5/16/2004 -0400, you wrote:

Using Sun jdk 1.4 on RH Linux Enterprise Workstation, when 
I
start Tomcat 5 using jsvc, jasper does not successfully
create the .java files from the .jsp files.  The error
reported is that the .java files are not found when they 
need
to be compiled.

The problem does not seem to exist on jdk 1.3.

Starting Tomcat using startup.sh also fixes the problem -
even with jdk 1.4.  Root cause unkown.

As a new user, it might be that the template script for 
using
jsvc is incomplete in some way that I have not determined, 
so
I would not go so far as to call this a bug.  Am I missing
something?

Thanks,
Jonathan

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



-
To unsubscribe, e-mail: tomcat-user-
[EMAIL PROTECTED]
For additional commands, e-mail: tomcat-user-
[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: tomcat-user-
[EMAIL PROTECTED]
For additional commands, e-mail: tomcat-user-
[EMAIL PROTECTED]


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



  1   2   >