Re: Tomcat5.5.3 serious problems!

2004-10-29 Thread Remy Maucherat
On Thu, 28 Oct 2004 16:39:12 -0700, David Lee <[EMAIL PROTECTED]> wrote:
> HI!
> 
> I tried to use GUI manager to upload war file (war file to deploy, the
> message says OK, but nothing happened. no context files deployed.
> nothing.
> 
> then I tried to upload the same war file using "deploy directory or war
> file located on server", the upload problem entered into an infinitive
> loop, just kept runnin...runing.
> 
> What happened!

Is this a question ?

> The war file I tried to upload works perfect on Tomcat5.0.29.

I guess that's the usual killer argument that somehow never ever convinces me ;)

Please submit a test war, this works very well for me.

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

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



RE: Problem with logging in Eclipse

2004-10-29 Thread Donie Kelly
Anybody else have this problem???

Thanks
Donie


-Original Message-
From: Donie Kelly [mailto:[EMAIL PROTECTED] 
Sent: 28 October 2004 11:12
To: Tomcat Users List
Subject: RE: Problem with logging in Eclipse

Hi guys

I have the same problem and it's driving me nuts. I have a run configuration
in Eclipse 3.0 for tomcat 4.1.18 and I call bootstrap.jar directly within
eclipse to start tomcat. The only jars I put in the run configuration class
path are the tomcat ones.

This starts tomcat as it would be normally run and tomcat then inits the
webapps directory and creates the classpath for each webapp based on the
contents of the WEB-INF/lib.

I have commons-logging.jar in my WEB-INF/lib as it's required by some code.
This has problems finding log4j even though it's there. When I send in a
request that uses com.sun.xml.messaging.saaj.soap.dom4j.ElementFactory
tomcat throws an exception into Catalina.out log showing the following stack
trace below.

Now, if I put log4j.jar into the run configuration class path the problem
goes away? Why can't tomcat find this jar under Eclipse 3

However, because I have multiple webapps running, the logging for the
different webapps is the same as the log4j.jar is now global so the last
webapp to init sets the logging scheme and location. Painful.

Thanks
Donie




2004-10-28 11:14:41 StandardWrapperValve[webclient]: Servlet.service() for
servlet webclient threw exception
javax.servlet.ServletException: Servlet execution threw an exception
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:493)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1040)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151
)
at java.lang.Thread.run(Thread.java:534)
- Root Cause -
java.lang.NoClassDefFoundError: org/apache/log4j/Layout
at
org.apache.commons.logging.impl.Log4jFactory.getInstance(Log4jFactory.java:1
40)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.ja
va:257)
at
com.sun.xml.messaging.saaj.soap.dom4j.ElementFactory.(ElementFactory
.java:84)
at
com.sun.xml.messaging.saaj.soap.dom4j.EnvelopeFactoryImpl.createEnvelope(Env
elopeFactoryImpl.java:67)
at
com.sun.xml.messaging.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:8
7)

Failed to install Tomcat5 service

2004-10-29 Thread Sharma_Ashutosh
Hi,
I'm installing Tomcat 5.5 on Windows XP Professional Box.

Jdk version is 1.5.
When I issue java -version on cmd prompt I get this output:
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)

I have already set the JAVA_HOME to the proper JRE.
But at the time of installing I get this error message:
"Failed to install Tomcat5 service. Check your settings and permissions.
Ignore and continue(not Recommneded) with 3 usual buttons:
Abort/Retry/Ignore
This happens at the time of performing this action in the installation
dialog box:
Failed to install tomcat service
Using %JAVA_HOME%\bin\client\jvm.dll

And then I just cant start tomcat.
Please help me out as I'm stuck at the very first step of installing tomcat.

My directory structure is as follows:
D:\Tomcat 5.5\bin>tomcat5
[2004-10-26 20:50:52] [373  prunsrv.c] [error]
The system cannot find the file specified.
[2004-10-26 20:50:52] [1186 prunsrv.c] [error]
Load configuration failed

D:\Tomcat 5.5\bin>tomcat5w.exe

D:\Tomcat 5.5\bin>dir
 Volume in drive D is WINNT_D
 Volume Serial Number is 744B-4B58

 Directory of D:\Tomcat 5.5\bin

26/Oct/04  08:42 PM  .
26/Oct/04  08:42 PM  ..
06/Oct/04  12:47 AM23,098 bootstrap.jar
06/Oct/04  12:47 AM26,202 commons-logging-api.jar
06/Oct/04  12:48 AM   102,400 tomcat5.exe
06/Oct/04  12:48 AM   131,072 tomcat5w.exe
   4 File(s)282,772 bytes
   2 Dir(s)   1,352,249,344 bytes free

With best regards:
Ashutosh Sharma
 
EMC Data Storage Systems (India) Private Limited 
No. 12, Subramanya Arcade, Tower B,Bannerghatta Road, 
Bangalore - 560 076.
Tel. +91-80-26788930 x 6296
 



Tomcat fails - Can't read body, waited #0 Seems size related

2004-10-29 Thread Varley, Roger
I have a servlet that recieves data from a client. All the servlet is doing is reading 
from the InputStream of the HttpServletResponse (BufferedReader br = new 
BufferedReader( new InputStreamReader(request.getInputStream()));) and writing the 
data to a disk file.

Periodically Tomcat refuses to read the data and dumps with an IOException (attached 
below). I've googled for the error message but all I can find is references to CVS 
versions of the AJP13 code - which puts me out of my depth. I can't find any reference 
to the error message in the list archives.

The "odd" thing is this seems to be related to the size of the data stream. The data 
is actually an Order Confirmation and when the order contains five lines at 7745 bytes 
everything works OK. When the order contains 6 lines (or more) at 8862 bytes then I 
get the dump. It's not related to the data content - I've tested this by using known 
good data.

I'm using Tomcat 4.1.7-LE-jdk14 - upgrading is an option, but not one I will be able 
to undertake lightly.

Regards
Roger 


29-Oct-2004 11:14:15 org.apache.jk.common.ChannelSocket receive
WARNING: can't read body, waited #0
java.io.IOException
at org.apache.jk.common.JkInputStream.receive(JkInputStream.java:304)
at org.apache.jk.common.JkInputStream.refillReadBuffer(JkInputStream.jav
a:372)
at org.apache.jk.common.JkInputStream.doRead(JkInputStream.java:284)
at org.apache.jk.server.JkCoyoteHandler.doRead(JkCoyoteHandler.java:223)

at org.apache.coyote.Request.doRead(Request.java:431)
at org.apache.coyote.tomcat4.CoyoteInputStream.readBytes(CoyoteInputStre
am.java:195)
at org.apache.coyote.tomcat4.CoyoteInputStream.read(CoyoteInputStream.ja
va:152)
at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:406)
at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:446)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:180)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at PlayReceiveXMLAsPost.processRequest(PlayReceiveXMLAsPost.java:57)
at PlayReceiveXMLAsPost.doPost(PlayReceiveXMLAsPost.java:123)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
2350)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
rValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContex
t.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:22
3)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:253)

at org.apache.jk.common.Hand

Active connections in db pool

2004-10-29 Thread Trond G. Ziarkowski
Is there a way of finding out how many commections which are currently 
active when using a db connection pool? I got this error message in my 
logs: "Cannot get a connection, pool exhausted". When I increased the 
number of mxActive the error message of course disappeared. I tripled 
the number of connections just to make sure that it will not happen 
again for some while, but I would like to check the value from time to 
time so I can increase it yet again if that would be necessary or 
decrease it if I really needed just oldMax + 10.

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


RE: Tomcat fails - Can't read body, waited #0 Seems size related

2004-10-29 Thread Varley, Roger
As a follow-up to my original post - further testing shows that this problem only 
appears when I access Tomcat via IIS. If I connect to Tomcat directly via port 8080 
then everything works as expected. 

Regards
Roger


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

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



RE: OutOfMemoryError: unable to create new native thread

2004-10-29 Thread Carl Olivier
Hi.

No problem! :)

Reduced Maintenance is definitely one reason.  Another reason is that I
generally share a connector on the same port/protocol - and place all of
these in a  The other connectors are all for HTTPS sites - each
running on the same port but bound to different Ips.

I also have a management tool that abstracts all the conf entries - and
doing this in one tomcat instance is easier than with multiple!

Question:  Having multiple tomcat instances on the same server - would this
not increase the memory usage - due to multiple JVMs?

Thanks

Carl 

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 28, 2004 6:56 PM
To: Tomcat Users List
Subject: RE: OutOfMemoryError: unable to create new native thread


Hi,

>Apparently Windows NT/2000 defaults to a 1mb virtual thread stack size
per
>thread unless otherwise stated.  In addition a maximum of 2gb of thread 
>stack space per process is allowed by Windows (not sure if this can be 
>changed or not!).  Thus the tomcat JVM could only have 2000 odd
concurrent
>threads - and on a server that hosts 50 sites, of which 20 are fairly
busy
>this could be a problem.

Thanks for posting your findings and solutions.  These type of posts make
the best archival materials, assuming people bother to search the archives.

Just out of curiosity, why are you running all the sites on one Tomcat
instance?  Reduced maintenance?  I'm not arguing against it, it clearly
works fine, and I do similar things myself.  Just curious for your
reasoning.

Yoav



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


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

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



RE: Tomcat fails - Can't read body, waited #0 Seems size related

2004-10-29 Thread Subbarao Anaparthi



thanks 
Regards


-Original Message-
From: Varley, Roger [mailto:[EMAIL PROTECTED]
Sent: Friday, October 29, 2004 4:56 PM
To: Tomcat Users List
Subject: RE: Tomcat fails - Can't read body, waited #0 Seems size
related


As a follow-up to my original post - further testing shows that this problem only 
appears when I access Tomcat via IIS. If I connect to Tomcat directly via port 8080 
then everything works as expected. 

Regards
Roger


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

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



--
This message, including any attachments, contains confidential information intended 
for a specific individual and purpose, and is intended for the addressee only.  Any 
unauthorized disclosure, use, dissemination, copying, or distribution of this message 
or any of its attachments or the information contained in this e-mail, or the taking 
of any action based on it, is strictly prohibited.  If you are not the intended 
recipient, please notify the sender immediately by return e-mail and delete this 
message. 

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



Re: Tomcat just STOPS

2004-10-29 Thread QM
On Fri, Oct 29, 2004 at 02:21:16PM +1000, Derek Clarkson wrote:
:   Tricky bug. We've been all over our system and cannot figure out
: what is going on. The tomcats (we have 2 tomcat 4.1.24's behind an apache
: server, just stop reponding after a couple of days. Restart them and
: everything is fine. Then some undefinied period later, one or both will just
: stop ahain. It can be as little as an hour or as a long as a week. But they
: will not stay up reliably. 

What OS?
What JDK?
etc., etc.  Your description is incomplete.

If it's Linux 2.6 (or a 2.4 kernel with backported NPTL functionality),
check the archives for LD_KERNEL_ASSUME...

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



Resticting Access via a Request Filter

2004-10-29 Thread Acácio Furtado Costa
HI all,

 

I have only one TomCat Application Server and I need to offer some 
Applications to the Internet and deny to others. I look for some Valves and found a 
"RemoteAddrValve", but looking in the documentation, it is Setup in the SERVER.XML and 
it is valid for all host and all applications.

 

Is it possible to have the same option but only for one application ?

 

Example:

 

APP1 it is offer for all world by Internet - allow to everybody

 

APP2 it is offer only for 192.168.1.2, 192.168.2.3, etc

 

Thanks 

 

Acacio Furtado Costa
Pesquisa e Tecnologia

GIA - Magnesita S/A
*  [EMAIL PROTECTED]

 



Re: Resticting Access via a Request Filter

2004-10-29 Thread Tim Funk
Inside the  declaration you may also declare Valves.
-Tim
Acácio Furtado Costa wrote:
HI all,
 

I have only one TomCat Application Server and I need to offer some Applications to 
the Internet and deny to others. I look for some Valves and found a "RemoteAddrValve", 
but looking in the documentation, it is Setup in the SERVER.XML and it is valid for all host and 
all applications.
 

Is it possible to have the same option but only for one application ?
 

Example:
 

APP1 it is offer for all world by Internet - allow to everybody
 

APP2 it is offer only for 192.168.1.2, 192.168.2.3, etc
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Problem Authenticating Users in LDAP

2004-10-29 Thread Mark Doppelfeld
So your user hasn't been authenticated by the JNDIRealm. Is there any 
security role specific stuff?? You have to distinguish between 
authentication and authorization (roles etc.) Can you trace your ldap 
engine??? We are facing problems with german umlauts in passwords 
(JDBCRealm). Do you have any chars within user/password which need 
special encoding???
Cheers
Mark

Sandeep N wrote:
This is what the log file (catalina_log.2004-10-29.txt)  reads -
2004-10-29 15:53:14 JNDIRealm[Standalone]: Connecting to URL
ldap://localhost:389
2004-10-29 15:53:38 JNDIRealm[Standalone]: lookupUser(sandeep)
2004-10-29 15:53:38 JNDIRealm[Standalone]:  
dn=cn=sandeep,cn=Manager,dc=my-domain,dc=com
2004-10-29 15:53:38 JNDIRealm[Standalone]:   retrieving attribute userPassword
2004-10-29 15:53:38 JNDIRealm[Standalone]:   validating credentials
2004-10-29 15:53:38 JNDIRealm[Standalone]: Username sandeep NOT
successfully authenticated

On Thu, 28 Oct 2004 15:29:00 +0200, Mark Doppelfeld
<[EMAIL PROTECTED]> wrote:
 

Hi,
have a look in your log files. It should tell you something about your
authentication process...
Mark

Sandeep N wrote:
   

Hi,
I have a problem trying to authenticate users, whose details are
stored in the LDAP directory through Apache Tomcat. The details of the
software I am using are as follows :
LDAP: OpenLDAP V 2.2.17
Web-Server: Apache-Tomcat V 4.1.30
OS: Suse - Linux
The LDAP directory structure is somewhat like this -
dc=my-domain,dc=com
cn= Manager
  cn=person1
  cn=person2 and so on
In the server.xml file (under APACHE-TOMCAT-DIR/conf/) I have included
he following piece of code  -
ldap://localhost:389";
roleName="cn" roleSearch="(uniqueMember={0})"
userPassword="userPassword"
userPattern="cn={0},cn=Manager,dn=my-domain,dn=com" />
The folder I have to authenticate is "param_test" and this resides
under "APACHE-TOMCAT-DIR/webapps".
The web.xml file under the "param_test" folder contains the following
piece of code  -
..

   
   test
   /*
   
   
   cn
   


   BASIC
   test

..
I have even copied the jndi.jar, ldap.jar files to
APACHE-TOMCAT-DIR/server/lib directory
When I try to access the link, http://localhost:8089/param_test, it
prompts me for the username and password. When I type in these
parameters as per the entries in the LDAP directory, the pop-up
reappears and this goes on continously. If I cancel this pop-up, HTTP
error 401 is returned. Any guesses where I have gone wrong?
Thanks in advance.
Regards,
Sandeep
 

-
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 Authenticating Users in LDAP

2004-10-29 Thread Sandeep N
I guess in the LDAP directory, the password is not stored as a clear
text but in an encrypted manner using SHA (Simple Hashing Algorithm).
Can that be the reason for not authenticating this user? And I don't
have any special characters embedded in my username/ password.

Also, I can trace my LDAP directory, without any problems, though.

On Fri, 29 Oct 2004 13:50:35 +0200, Mark Doppelfeld
<[EMAIL PROTECTED]> wrote:
> So your user hasn't been authenticated by the JNDIRealm. Is there any
> security role specific stuff?? You have to distinguish between
> authentication and authorization (roles etc.) Can you trace your ldap
> engine??? We are facing problems with german umlauts in passwords
> (JDBCRealm). Do you have any chars within user/password which need
> special encoding???
> Cheers
> Mark
> 
> 
> 
> Sandeep N wrote:
> 
> >This is what the log file (catalina_log.2004-10-29.txt)  reads -
> >
> >2004-10-29 15:53:14 JNDIRealm[Standalone]: Connecting to URL
> >ldap://localhost:389
> >2004-10-29 15:53:38 JNDIRealm[Standalone]: lookupUser(sandeep)
> >2004-10-29 15:53:38 JNDIRealm[Standalone]:
> >dn=cn=sandeep,cn=Manager,dc=my-domain,dc=com
> >2004-10-29 15:53:38 JNDIRealm[Standalone]:   retrieving attribute userPassword
> >2004-10-29 15:53:38 JNDIRealm[Standalone]:   validating credentials
> >2004-10-29 15:53:38 JNDIRealm[Standalone]: Username sandeep NOT
> >successfully authenticated
> >
> >
> >On Thu, 28 Oct 2004 15:29:00 +0200, Mark Doppelfeld
> ><[EMAIL PROTECTED]> wrote:
> >
> >
> >>Hi,
> >>
> >>have a look in your log files. It should tell you something about your
> >>authentication process...
> >>Mark
> >>
> >>
> >>
> >>Sandeep N wrote:
> >>
> >>
> >>
> >>>Hi,
> >>>
> >>>I have a problem trying to authenticate users, whose details are
> >>>stored in the LDAP directory through Apache Tomcat. The details of the
> >>>software I am using are as follows :
> >>>
> >>>LDAP: OpenLDAP V 2.2.17
> >>>Web-Server: Apache-Tomcat V 4.1.30
> >>>OS: Suse - Linux
> >>>
> >>>The LDAP directory structure is somewhat like this -
> >>>dc=my-domain,dc=com
> >>>cn= Manager
> >>>   cn=person1
> >>>   cn=person2 and so on
> >>>
> >>>In the server.xml file (under APACHE-TOMCAT-DIR/conf/) I have included
> >>>he following piece of code  -
> >>>
> >>> >>>connectionName="cn=Manager,dc=my-domain,dc=com"
> >>>connectionPassword="secret" connectionURL="ldap://localhost:389";
> >>>roleName="cn" roleSearch="(uniqueMember={0})"
> >>>userPassword="userPassword"
> >>>userPattern="cn={0},cn=Manager,dn=my-domain,dn=com" />
> >>>
> >>>The folder I have to authenticate is "param_test" and this resides
> >>>under "APACHE-TOMCAT-DIR/webapps".
> >>>
> >>>The web.xml file under the "param_test" folder contains the following
> >>>piece of code  -
> >>>..
> >>>
> >>>
> >>>test
> >>>/*
> >>>
> >>>
> >>>cn
> >>>
> >>>
> >>>
> >>>
> >>>BASIC
> >>>test
> >>>
> >>>
> >>>..
> >>>
> >>>I have even copied the jndi.jar, ldap.jar files to
> >>>APACHE-TOMCAT-DIR/server/lib directory
> >>>
> >>>When I try to access the link, http://localhost:8089/param_test, it
> >>>prompts me for the username and password. When I type in these
> >>>parameters as per the entries in the LDAP directory, the pop-up
> >>>reappears and this goes on continously. If I cancel this pop-up, HTTP
> >>>error 401 is returned. Any guesses where I have gone wrong?
> >>>
> >>>Thanks in advance.
> >>>
> >>>Regards,
> >>>Sandeep
> >>>
> >>>
> >>>
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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



RE: Tomcat 5 and returning PDF in response outputstream

2004-10-29 Thread Jerome Jacobsen
I've been able to generate PDF in the response output stream in Tomcat 5.
I used the example from this O'Reilly OnJava article:

http://www.onjava.com/pub/a/onjava/2003/06/18/dynamic_files.html

The code of interest is shown below:


resp.setHeader("Cache-Control", "max-age=30");
resp.setContentType("application/pdf");

StringBuffer sbContentDispValue = new StringBuffer();
sbContentDispValue.append("inline");
sbContentDispValue.append("; filename=");
sbContentDispValue.append(sbFilename);

resp.setHeader(
"Content-disposition",
sbContentDispValue.toString());

resp.setContentLength(baosPDF.size());
ServletOutputStream sos;
sos = resp.getOutputStream();

baosPDF.writeTo(sos);
sos.flush();


I'm using Tomcat 5.0.28 on Windows 2000 with JDK 1.4.1_02.

Give this example a try.

-Jerome


> From:   "Jeremy Nix" 
> Date:   2004-10-01 16:50:30
> Message-ID: <7503E16AAE4DB3498884AB2DC4B779D501A51AE2 () fernhill ! sfsltd
! com>
>
> Has anyone else had trouble rendering PDF's (in Internet Explorer) when
> sending the pdf directly into the response outputstream and rendering in
> Internet Explorer?  I realize there are a lot of factors at work here,
> but I find that my configuration works fine when I switch to Tomcat
> 4.1.30.  I'm setting the content type and content length on the
> response.  The code I use is below:
>
>   pdf = generatePDF();
>   response.resetBuffer();
>   response.setHeader("Cache-Control", "max-age=30");
>   response.setHeader("Content-Disposition", "inline;
> filename=generated.pdf; size=" + pdf.getBytes().length);
>   response.setContentType("application/pdf");
>   response.setContentLength(pdf.getBytes().length);
>   response.getOutputStream().write(pdf.getBytes());
>   response.flushBuffer();
>
> If I access my url with Netscape, the pdf displays correctly.  If I save
> it out to the filesystem (on server side), pdf displays correctly. It's
> just something with the configuration of Tomcat 5 and Internet Explorer
> that is not working correctly.  The same code posted above works for
> both Netscape and IE when run under Tomcat 4.1.30.
>
> Has anyone had similar problems?
>
>
> _
> Jeremy Nix
> Senior Application Developer
> Southwest Financial Services, LTD.
> (513) 621-6699 x1158
> www.sfsltd.com


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



Re: Problem Authenticating Users in LDAP

2004-10-29 Thread Mark Doppelfeld
Hi,
took this from the documentation
   For each of the standard |Realm| implementations, the user's
   password (by default) is stored in clear text. In many environments,
   this is undesireable because casual observers of the authentication
   data can collect enough information to log on successfully, and
   impersonate other users. To avoid this problem, the standard
   implementations support the concept of /digesting/ user passwords.
   This causes the stored version of the passwords to be encoded (in a
   form that is not easily reversible), but that the |Realm|
   implementation can still utilize for authentication.
   Digested passwords are selected by specifying the |digest| attribute
   on your || element. The value for this attribute must be one
   of the digest algorithms supported by the
   |java.security.MessageDigest| class (SHA, MD2, or MD5). When you
   select this option, the contents of the password that is stored in
   the |Realm| must be the cleartext version of the password, as
   digested by the specified algorithm.
   When the |authenticate()| method of the Realm is called, the
   (cleartext) password specified by the user is itself digested by the
   same algorithm, and the result is compared with the value returned
   by the |Realm|. An equal match implies that the cleartext version of
   the original password is the same as the one presented by the user,
   so that this user should be authorized.
So give it a try and please feedback some information.
Mark
Sandeep N wrote:
I guess in the LDAP directory, the password is not stored as a clear
text but in an encrypted manner using SHA (Simple Hashing Algorithm).
Can that be the reason for not authenticating this user? And I don't
have any special characters embedded in my username/ password.
Also, I can trace my LDAP directory, without any problems, though.
On Fri, 29 Oct 2004 13:50:35 +0200, Mark Doppelfeld
<[EMAIL PROTECTED]> wrote:
 

So your user hasn't been authenticated by the JNDIRealm. Is there any
security role specific stuff?? You have to distinguish between
authentication and authorization (roles etc.) Can you trace your ldap
engine??? We are facing problems with german umlauts in passwords
(JDBCRealm). Do you have any chars within user/password which need
special encoding???
Cheers
Mark

Sandeep N wrote:
   

This is what the log file (catalina_log.2004-10-29.txt)  reads -
2004-10-29 15:53:14 JNDIRealm[Standalone]: Connecting to URL
ldap://localhost:389
2004-10-29 15:53:38 JNDIRealm[Standalone]: lookupUser(sandeep)
2004-10-29 15:53:38 JNDIRealm[Standalone]:
dn=cn=sandeep,cn=Manager,dc=my-domain,dc=com
2004-10-29 15:53:38 JNDIRealm[Standalone]:   retrieving attribute userPassword
2004-10-29 15:53:38 JNDIRealm[Standalone]:   validating credentials
2004-10-29 15:53:38 JNDIRealm[Standalone]: Username sandeep NOT
successfully authenticated
On Thu, 28 Oct 2004 15:29:00 +0200, Mark Doppelfeld
<[EMAIL PROTECTED]> wrote:
 

Hi,
have a look in your log files. It should tell you something about your
authentication process...
Mark

Sandeep N wrote:

   

Hi,
I have a problem trying to authenticate users, whose details are
stored in the LDAP directory through Apache Tomcat. The details of the
software I am using are as follows :
LDAP: OpenLDAP V 2.2.17
Web-Server: Apache-Tomcat V 4.1.30
OS: Suse - Linux
The LDAP directory structure is somewhat like this -
dc=my-domain,dc=com
cn= Manager
 cn=person1
 cn=person2 and so on
In the server.xml file (under APACHE-TOMCAT-DIR/conf/) I have included
he following piece of code  -
ldap://localhost:389";
roleName="cn" roleSearch="(uniqueMember={0})"
userPassword="userPassword"
userPattern="cn={0},cn=Manager,dn=my-domain,dn=com" />
The folder I have to authenticate is "param_test" and this resides
under "APACHE-TOMCAT-DIR/webapps".
The web.xml file under the "param_test" folder contains the following
piece of code  -
..

  
  test
  /*
  
  
  cn
  


  BASIC
  test

..
I have even copied the jndi.jar, ldap.jar files to
APACHE-TOMCAT-DIR/server/lib directory
When I try to access the link, http://localhost:8089/param_test, it
prompts me for the username and password. When I type in these
parameters as per the entries in the LDAP directory, the pop-up
reappears and this goes on continously. If I cancel this pop-up, HTTP
error 401 is returned. Any guesses where I have gone wrong?
Thanks in advance.
Regards,
Sandeep

 

-
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: [EM

RE: Active connections in db pool

2004-10-29 Thread Shapira, Yoav

Hi,
You have to cast the DataSource to its implementation type, since
javax.sql.DataSource doesn't provide for pool statistics.  The
implementation class, e.g. org.apache.dbcp.BasicDataSource, provides
various statistics methods including the number of active connections.

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Trond G. Ziarkowski [mailto:[EMAIL PROTECTED]
>Sent: Friday, October 29, 2004 6:52 AM
>To: [EMAIL PROTECTED]
>Subject: Active connections in db pool
>
>Is there a way of finding out how many commections which are currently
>active when using a db connection pool? I got this error message in my
>logs: "Cannot get a connection, pool exhausted". When I increased the
>number of mxActive the error message of course disappeared. I tripled
>the number of connections just to make sure that it will not happen
>again for some while, but I would like to check the value from time to
>time so I can increase it yet again if that would be necessary or
>decrease it if I really needed just oldMax + 10.
>
>Regards
>Trond Ziarkowski
>
>-
>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]



problems with LD_LIBRARY_PATH !

2004-10-29 Thread Her, Andre
> All,
> 
> I have ported a web application normally running on NT4 / ISS /Jrun to a
> tomcat 3.3.2.
> The results are mixed.
> servlets seems top work OK but some of them do a call to a perl script.
> The perl script is well called but
> the environment LD_LIBRARY_PATH is not set, so loading of modules and
> library fails.
> 
> I have tried every thing I could think of, even including a
> $ENV{'LD_LIBRARY_PATH'} = "/usr/lib:/usr/local/lib:/usr/local/perl/lib";
> in the perl script, but still fails loading libraries *.so !!
> 
> Any idea someone !?
> Many thanks in advances
> Regards
> Andre
> 
> 
> 
> Andre Her
> BlarenbergLaan,2
> 2800 Mechelen
> Belgium
> Tel : +32 (0)15 78 6887
> Fax: +32 (0)15 78 5405
> 
> 

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



RE: OutOfMemoryError: unable to create new native thread

2004-10-29 Thread Shapira, Yoav

Hi,

>Question:  Having multiple tomcat instances on the same server - would
this
>not increase the memory usage - due to multiple JVMs?

If configured correctly, the total should be just about the same.  It
might be a bit higher or lower depending on the semantics of your webapp
(% in old generation vs. % new, from a GC perspective).  But it
shouldn't be a big change from a total memory consumption standpoint.
And on the plus side, you'd let each JVM tune itself optimally for its
webapp(s), something that's virtually impossible to do with more than a
couple of webapps in one JVM.

Yoav



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


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



Re: Problem Authenticating Users in LDAP

2004-10-29 Thread Sandeep N
I did try out these things long back, but it did not yield any
success. Hence mailed the list.


On Fri, 29 Oct 2004 14:14:57 +0200, Mark Doppelfeld
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> took this from the documentation
> 
>For each of the standard |Realm| implementations, the user's
>password (by default) is stored in clear text. In many environments,
>this is undesireable because casual observers of the authentication
>data can collect enough information to log on successfully, and
>impersonate other users. To avoid this problem, the standard
>implementations support the concept of /digesting/ user passwords.
>This causes the stored version of the passwords to be encoded (in a
>form that is not easily reversible), but that the |Realm|
>implementation can still utilize for authentication.
> 
>Digested passwords are selected by specifying the |digest| attribute
>on your || element. The value for this attribute must be one
>of the digest algorithms supported by the
>|java.security.MessageDigest| class (SHA, MD2, or MD5). When you
>select this option, the contents of the password that is stored in
>the |Realm| must be the cleartext version of the password, as
>digested by the specified algorithm.
> 
>When the |authenticate()| method of the Realm is called, the
>(cleartext) password specified by the user is itself digested by the
>same algorithm, and the result is compared with the value returned
>by the |Realm|. An equal match implies that the cleartext version of
>the original password is the same as the one presented by the user,
>so that this user should be authorized.
> 
> So give it a try and please feedback some information.
> Mark
> 
> 
> 
> Sandeep N wrote:
> 
> >I guess in the LDAP directory, the password is not stored as a clear
> >text but in an encrypted manner using SHA (Simple Hashing Algorithm).
> >Can that be the reason for not authenticating this user? And I don't
> >have any special characters embedded in my username/ password.
> >
> >Also, I can trace my LDAP directory, without any problems, though.
> >
> >On Fri, 29 Oct 2004 13:50:35 +0200, Mark Doppelfeld
> ><[EMAIL PROTECTED]> wrote:
> >
> >
> >>So your user hasn't been authenticated by the JNDIRealm. Is there any
> >>security role specific stuff?? You have to distinguish between
> >>authentication and authorization (roles etc.) Can you trace your ldap
> >>engine??? We are facing problems with german umlauts in passwords
> >>(JDBCRealm). Do you have any chars within user/password which need
> >>special encoding???
> >>Cheers
> >>Mark
> >>
> >>
> >>
> >>Sandeep N wrote:
> >>
> >>
> >>
> >>>This is what the log file (catalina_log.2004-10-29.txt)  reads -
> >>>
> >>>2004-10-29 15:53:14 JNDIRealm[Standalone]: Connecting to URL
> >>>ldap://localhost:389
> >>>2004-10-29 15:53:38 JNDIRealm[Standalone]: lookupUser(sandeep)
> >>>2004-10-29 15:53:38 JNDIRealm[Standalone]:
> >>>dn=cn=sandeep,cn=Manager,dc=my-domain,dc=com
> >>>2004-10-29 15:53:38 JNDIRealm[Standalone]:   retrieving attribute userPassword
> >>>2004-10-29 15:53:38 JNDIRealm[Standalone]:   validating credentials
> >>>2004-10-29 15:53:38 JNDIRealm[Standalone]: Username sandeep NOT
> >>>successfully authenticated
> >>>
> >>>
> >>>On Thu, 28 Oct 2004 15:29:00 +0200, Mark Doppelfeld
> >>><[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>
> >>>
> Hi,
> 
> have a look in your log files. It should tell you something about your
> authentication process...
> Mark
> 
> 
> 
> Sandeep N wrote:
> 
> 
> 
> 
> 
> >Hi,
> >
> >I have a problem trying to authenticate users, whose details are
> >stored in the LDAP directory through Apache Tomcat. The details of the
> >software I am using are as follows :
> >
> >LDAP: OpenLDAP V 2.2.17
> >Web-Server: Apache-Tomcat V 4.1.30
> >OS: Suse - Linux
> >
> >The LDAP directory structure is somewhat like this -
> >dc=my-domain,dc=com
> >cn= Manager
> >  cn=person1
> >  cn=person2 and so on
> >
> >In the server.xml file (under APACHE-TOMCAT-DIR/conf/) I have included
> >he following piece of code  -
> >
> > >connectionName="cn=Manager,dc=my-domain,dc=com"
> >connectionPassword="secret" connectionURL="ldap://localhost:389";
> >roleName="cn" roleSearch="(uniqueMember={0})"
> >userPassword="userPassword"
> >userPattern="cn={0},cn=Manager,dn=my-domain,dn=com" />
> >
> >The folder I have to authenticate is "param_test" and this resides
> >under "APACHE-TOMCAT-DIR/webapps".
> >
> >The web.xml file under the "param_test" folder contains the following
> >piece of code  -
> >..
> >
> >   
> >   test
> >   /*
> >   
> >   
> >   cn
> >   
> >
> >
> >
> >   BASIC
> >   test
> >
> >
> >...

Re: problems with LD_LIBRARY_PATH !

2004-10-29 Thread dmu2201

I have tried every thing I could think of, even including a
$ENV{'LD_LIBRARY_PATH'} = "/usr/lib:/usr/local/lib:/usr/local/perl/lib";
in the perl script, but still fails loading libraries *.so !!
Any idea someone !?
Many thanks in advances
Regards
Andre
   

How do you start your Tomcat?! Trough a init.d script, or from bash, sh 
or another shell? If it is from a shell you have to be sure that your 
LD_LIBRARY_PATH is set _before_ you start Tomcat, ie try this:
 LD_LIBRARY_PATH="/usr/lib:/usr/local/lib:/usr/local/perl/lib" 
/path/to/tomcat/bin/startup.sh

Perhaps this happens because you do not call 'export' when setting an 
env variable. You have to otherwise it will only exist in the moment you 
press enter...

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


RE: Tomcat fails - Can't read body, waited #0 Seems size related

2004-10-29 Thread Shapira, Yoav

Hi,
Ahh, it's great that you tried this: I was just going to ask if the
connector is to blame ;)

The range of data sizes you mentioned immediately starts the "buffer
size alarm horn" in my head ;)  8192 = 8k is the default buffer size for
many connector versions, including probably the one you're using.  See
if adjusting the buffer size (if it's possible at all) to a higher value
like 16K makes this go away.

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Varley, Roger [mailto:[EMAIL PROTECTED]
>Sent: Friday, October 29, 2004 7:26 AM
>To: Tomcat Users List
>Subject: RE: Tomcat fails - Can't read body, waited #0 Seems size
related
>
>As a follow-up to my original post - further testing shows that this
>problem only appears when I access Tomcat via IIS. If I connect to
Tomcat
>directly via port 8080 then everything works as expected.
>
>Regards
>Roger
>
>
>___
___
>This e-mail and the documents attached are confidential and intended
>solely for the addressee; it may also be privileged. If you receive
this
>e-mail in error, please notify the sender immediately and destroy it.
>As its integrity cannot be secured on the Internet, the Atos Origin
group
>liability cannot be triggered for the message content. Although the
>sender endeavours to maintain a computer virus-free network, the sender
>does not warrant that this transmission is virus-free and will not be
>liable for any damages resulting from any virus transmitted.
>___
___
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




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: Active connections in db pool

2004-10-29 Thread Hollerman Geralyn M
"Trond G. Ziarkowski" <[EMAIL PROTECTED]> wrote:
Is there a way of finding out how many commections which are currently 
active when using a db connection pool? I got this error message in my 
logs: "Cannot get a connection, pool exhausted". When I increased the 
number of mxActive the error message of course disappeared. I tripled 
the number of connections just to make sure that it will not happen 
again for some while, but I would like to check the value from time to 
time so I can increase it yet again if that would be necessary or 
decrease it if I really needed just oldMax + 10.
I had the same question - what I ended up doing was searching thru the docs 
about DBCP as well as reading the Wiki for DBCP. It was a few months back, but 
there I found some discussion about doing this and a .jsp that the developer 
used for testing - I'd post it for you, but I had to make a lot of alterations 
to it to get it to provide all the info I needed, and I'm afraid I didn't keep 
track of what I was adding and subtracting!

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


RE: Tomcat fails - Can't read body, waited #0 Seems size related

2004-10-29 Thread Varley, Roger
> 
> Hi,
> Ahh, it's great that you tried this: I was just going to ask if the
> connector is to blame ;)
> 
> The range of data sizes you mentioned immediately starts the "buffer
> size alarm horn" in my head ;)  8192 = 8k is the default 
> buffer size for
> many connector versions, including probably the one you're using.  See
> if adjusting the buffer size (if it's possible at all) to a 
> higher value
> like 16K makes this go away.
> 

Hi Yoav

Thanks for your response. Any idea where I should be looking. I've found the AJP13 
config entry in server.xml but there is nothing that looks like a buffersize 
parameter. I've looked on the AJP13 page at 
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/ajp.html and that doesn't seem 
to mention buffersizes either.

Regards
Roger


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

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



RE: auto reload?

2004-10-29 Thread Didier McGillis
>Anyway this was my last resort after Google had jack ... how about
those
>Red
>Sox
Go Sox ;)  I probably shouldn't be committing stuff to CVS today given
the amount of drinking and partying over the past 24 hours...

We had the same worries about the hosting company we have and some of the 
tech there going into the cage the next day ;)

Yoav

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Designer Mail isn't just fun to send, it's fun to receive. Use special 
stationery, fonts and colors. 
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines 
 Start enjoying all the benefits of MSN® Premium right now and get the 
first two months FREE*.

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


RE: problems with LD_LIBRARY_PATH !

2004-10-29 Thread Her, Andre
for the moment I am starting tomcat with $TOMCAT_HOME/bin/startup.

I have included

# Shell script to startup the server

LD_LIBRARY_PATH="/usr/lib:/usr/local/lib/:/usr/local/perl5/lib:/usr/java/lib
" ;export LD_LIBRARY_PATH
TOMCAT_HOME="/usr/tomcat/tomcat"   ;export TOMCAT_HOME

BASEDIR=`dirname $0`

I have exported LD_LIBRARY_PATH already from my .bashrc

I have placed context_param in conf/apps-19x.xx.xx.xml and init-param in
WEB-INFO/web.xml

But so far, no results

Also, the perl script (with the $ENV{'LD_LIBRARY_PATH'} =.. ) is working
when I call it manually eg:
/usr/local/bin/perl user_auth
even if I first do a unset LD_LIBRARY_PATH

BTW: I am running tomact on a Solaris 9 server.
Regards
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, October 29, 2004 2:23 PM
To: Tomcat Users List
Subject: Re: problems with LD_LIBRARY_PATH !



>>I have tried every thing I could think of, even including a
>>$ENV{'LD_LIBRARY_PATH'} = "/usr/lib:/usr/local/lib:/usr/local/perl/lib";
>>in the perl script, but still fails loading libraries *.so !!
>>
>>Any idea someone !?
>>Many thanks in advances
>>Regards
>>Andre
>>
>>
How do you start your Tomcat?! Trough a init.d script, or from bash, sh 
or another shell? If it is from a shell you have to be sure that your 
LD_LIBRARY_PATH is set _before_ you start Tomcat, ie try this:
  LD_LIBRARY_PATH="/usr/lib:/usr/local/lib:/usr/local/perl/lib" 
/path/to/tomcat/bin/startup.sh

Perhaps this happens because you do not call 'export' when setting an 
env variable. You have to otherwise it will only exist in the moment you 
press enter...

Claus

-
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 Authenticating Users in LDAP

2004-10-29 Thread Mark Doppelfeld
So did you try debugging the JNDIRealm
That's what I wonna do with my umlaut problem...
Mark
Sandeep N wrote:
I did try out these things long back, but it did not yield any
success. Hence mailed the list.
On Fri, 29 Oct 2004 14:14:57 +0200, Mark Doppelfeld
<[EMAIL PROTECTED]> wrote:
 

Hi,
took this from the documentation
  For each of the standard |Realm| implementations, the user's
  password (by default) is stored in clear text. In many environments,
  this is undesireable because casual observers of the authentication
  data can collect enough information to log on successfully, and
  impersonate other users. To avoid this problem, the standard
  implementations support the concept of /digesting/ user passwords.
  This causes the stored version of the passwords to be encoded (in a
  form that is not easily reversible), but that the |Realm|
  implementation can still utilize for authentication.
  Digested passwords are selected by specifying the |digest| attribute
  on your || element. The value for this attribute must be one
  of the digest algorithms supported by the
  |java.security.MessageDigest| class (SHA, MD2, or MD5). When you
  select this option, the contents of the password that is stored in
  the |Realm| must be the cleartext version of the password, as
  digested by the specified algorithm.
  When the |authenticate()| method of the Realm is called, the
  (cleartext) password specified by the user is itself digested by the
  same algorithm, and the result is compared with the value returned
  by the |Realm|. An equal match implies that the cleartext version of
  the original password is the same as the one presented by the user,
  so that this user should be authorized.
So give it a try and please feedback some information.
Mark

Sandeep N wrote:
   

I guess in the LDAP directory, the password is not stored as a clear
text but in an encrypted manner using SHA (Simple Hashing Algorithm).
Can that be the reason for not authenticating this user? And I don't
have any special characters embedded in my username/ password.
Also, I can trace my LDAP directory, without any problems, though.
On Fri, 29 Oct 2004 13:50:35 +0200, Mark Doppelfeld
<[EMAIL PROTECTED]> wrote:
 

So your user hasn't been authenticated by the JNDIRealm. Is there any
security role specific stuff?? You have to distinguish between
authentication and authorization (roles etc.) Can you trace your ldap
engine??? We are facing problems with german umlauts in passwords
(JDBCRealm). Do you have any chars within user/password which need
special encoding???
Cheers
Mark

Sandeep N wrote:

   

This is what the log file (catalina_log.2004-10-29.txt)  reads -
2004-10-29 15:53:14 JNDIRealm[Standalone]: Connecting to URL
ldap://localhost:389
2004-10-29 15:53:38 JNDIRealm[Standalone]: lookupUser(sandeep)
2004-10-29 15:53:38 JNDIRealm[Standalone]:
dn=cn=sandeep,cn=Manager,dc=my-domain,dc=com
2004-10-29 15:53:38 JNDIRealm[Standalone]:   retrieving attribute userPassword
2004-10-29 15:53:38 JNDIRealm[Standalone]:   validating credentials
2004-10-29 15:53:38 JNDIRealm[Standalone]: Username sandeep NOT
successfully authenticated
On Thu, 28 Oct 2004 15:29:00 +0200, Mark Doppelfeld
<[EMAIL PROTECTED]> wrote:

 

Hi,
have a look in your log files. It should tell you something about your
authentication process...
Mark

Sandeep N wrote:


   

Hi,
I have a problem trying to authenticate users, whose details are
stored in the LDAP directory through Apache Tomcat. The details of the
software I am using are as follows :
LDAP: OpenLDAP V 2.2.17
Web-Server: Apache-Tomcat V 4.1.30
OS: Suse - Linux
The LDAP directory structure is somewhat like this -
dc=my-domain,dc=com
cn= Manager
cn=person1
cn=person2 and so on
In the server.xml file (under APACHE-TOMCAT-DIR/conf/) I have included
he following piece of code  -
ldap://localhost:389";
roleName="cn" roleSearch="(uniqueMember={0})"
userPassword="userPassword"
userPattern="cn={0},cn=Manager,dn=my-domain,dn=com" />
The folder I have to authenticate is "param_test" and this resides
under "APACHE-TOMCAT-DIR/webapps".
The web.xml file under the "param_test" folder contains the following
piece of code  -
..

 
 test
 /*
 
 
 cn
 


 BASIC
 test

..
I have even copied the jndi.jar, ldap.jar files to
APACHE-TOMCAT-DIR/server/lib directory
When I try to access the link, http://localhost:8089/param_test, it
prompts me for the username and password. When I type in these
parameters as per the entries in the LDAP directory, the pop-up
reappears and this goes on continously. If I cancel this pop-up, HTTP
error 401 is returned. Any guesses where I have gone wrong?
Thanks in advance.
Regards,
Sandeep


 

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


 

---

Re: channelUnix.file is missing

2004-10-29 Thread FM
Thanks,
I modified my jk2.properties but now in catalina.out I have :
INFO: APR not loaded, disabling jni components: java.io.IOException: 
java.lang.UnsatisfiedLinkError: /usr/lib/httpd/modules/jkjni.so: 
/usr/lib/httpd/modules/jkjni.so: undefined symbol: apr_md5_final

How can I load APR ?
Thanks... again :-)

Nikola Milutinovic wrote:
FM wrote:
I read that tomcat is supposed to create the 
"channelUnix.file=${jkHome}/work/jk2.socket" file. But it did not.

I use the binary of tomcat, do i have to use src to be able to use 
unixsocket ?

In order to use a UNIX file system socket, you need to build and use 
jkJNI.so alongside mod_jk2.so.

jk JNI is Jakarta (mod_jk2) Java Native Interface and is neccessary 
for UNIX sockets, since that concept is non existant in JVM. Then you 
need to tell Tomcat (actually Coyote JK2 module) where that shlib is, 
in order to make it possible to use UNIX socket.

This is from my jk2.config
#
# Environment
#
jkHome=Apache-2.0.50-Jk2-2.0.4
jkUSR=/usr/opt/${jkHome}
jkVAR=/var/opt/${jkHome}
# Set the desired handler list
handler.list=apr,request,channelUnix
#
# APR
#
apr.NativeSo=${jkUSR}/module/jkjni.so
apr.baseDir=${jkVAR}
apr.aprHome=/usr/opt/Apache-2.0.50-W
apr.soExt=so
#
# UNIX file socket channel
#
channelUnix.file=${jkVAR}/channels/jk2.sock
-
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: Active connections in db pool

2004-10-29 Thread Shapira, Yoav

Hi,
This is simple.  Code below is for DBCP, the spirit is the same for
other providers:

// Get initial context, naming context
DataSource ds = (DataSource) ctx.lookup("jdbc/mydb");
BasicDataSource bds = (BasicDataSource) ds;
System.out.println("Active connections = " + bds.getNumActive());

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Hollerman Geralyn M [mailto:[EMAIL PROTECTED]
>Sent: Friday, October 29, 2004 8:43 AM
>To: [EMAIL PROTECTED]
>Subject: Re: Active connections in db pool
>
>"Trond G. Ziarkowski" <[EMAIL PROTECTED]> wrote:
>> Is there a way of finding out how many commections which are
currently
>> active when using a db connection pool? I got this error message in
my
>> logs: "Cannot get a connection, pool exhausted". When I increased the
>> number of mxActive the error message of course disappeared. I tripled
>> the number of connections just to make sure that it will not happen
>> again for some while, but I would like to check the value from time
to
>> time so I can increase it yet again if that would be necessary or
>> decrease it if I really needed just oldMax + 10.
>
>I had the same question - what I ended up doing was searching thru the
docs
>about DBCP as well as reading the Wiki for DBCP. It was a few months
back,
>but
>there I found some discussion about doing this and a .jsp that the
>developer
>used for testing - I'd post it for you, but I had to make a lot of
>alterations
>to it to get it to provide all the info I needed, and I'm afraid I
didn't
>keep
>track of what I was adding and subtracting!
>
>Lynn Hollerman.
>
>-
>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: channelUnix.file is missing

2004-10-29 Thread Nikola Milutinovic
FM wrote:
Thanks,
I modified my jk2.properties but now in catalina.out I have :
INFO: APR not loaded, disabling jni components: java.io.IOException: 
java.lang.UnsatisfiedLinkError: /usr/lib/httpd/modules/jkjni.so: 
/usr/lib/httpd/modules/jkjni.so: undefined symbol: apr_md5_final

How can I load APR ?
This is a common problem on Linux, I believe there are a couple of 
HowTo-s. Basically, when building it, you need to either manually or by 
modifying the Makefile, add "-lapr -laprutil" to link flags for "jkjni.so".

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


RE: Tomcat fails - Can't read body, waited #0 Seems size related

2004-10-29 Thread Shapira, Yoav

Hi,

>Thanks for your response. Any idea where I should be looking. I've
found
>the AJP13 config entry in server.xml but there is nothing that looks
like a
>buffersize parameter. I've looked on the AJP13 page at
>http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/ajp.html and
that
>doesn't seem to mention buffersizes either.

The buffer would be on the mod_jk/mod_jk connector, not on Tomcat's end,
most likely.  So you'd look in
http://jakarta.apache.org/tomcat/connectors-doc/jk2/.  I just took a
quick look and saw nothing relevant, but I'm not willing to spend any
more time on connector research, so I'll leave it up to you and others
who might know.

Yoav



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


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



Signals sent by Tomcat to web applications during shutdown.

2004-10-29 Thread Simon Kelly
Hi All,

I've been having a good shufty through the Tomcat documentation, but I
can't find a reference to what signals Tomcat sends to the web
applications to shut them down during the shutdown operation.

Does anyone know what signals i would need to trap in my code to allow
all of my threads to die when tomcat shuts down?

Kind regards

Slim

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it."
-Brian W. Kernighan



##

This email from Talgentra is intended only for the personal use of the
recipient(s) named above. The email and any files transmitted with it are confidential 
to the intended recipient(s) and may be legally privileged or contain proprietary and 
private information. If you are not an intended recipient, you may not review, copy or 
distribute this message. If received in error, please notify the sender and delete the 
message from your system.
 
Any views or opinions expressed in this email and any files transmitted with it are 
those of the author only and may not necessarily reflect the views of Talgentra and it 
does not create any legally binding rights or obligations whatsoever. Unless otherwise 
pre-agreed by exchange of hard copy documents signed by duly authorised 
representatives, contracts may not be concluded on behalf of Talgentra by email.
 
Please note that neither Talgentra nor the sender accepts any responsibility for any 
viruses and it is your responsibility to scan the email and the attachments (if any). 
All email received and sent by Talgentra may be monitored to protect the business 
interests of Talgentra.



##


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



RE: Signals sent by Tomcat to web applications during shutdown.

2004-10-29 Thread Shapira, Yoav

Hi,
ServletContextListener#contextDestroyed is a good one.

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Simon Kelly [mailto:[EMAIL PROTECTED]
>Sent: Friday, October 29, 2004 9:21 AM
>To: [EMAIL PROTECTED]
>Subject: Signals sent by Tomcat to web applications during shutdown.
>
>Hi All,
>
>I've been having a good shufty through the Tomcat documentation, but I
>can't find a reference to what signals Tomcat sends to the web
>applications to shut them down during the shutdown operation.
>
>Does anyone know what signals i would need to trap in my code to allow
>all of my threads to die when tomcat shuts down?
>
>Kind regards
>
>Slim
>
>"Debugging is twice as hard as writing the code in the first place.
>Therefore, if you write the code as cleverly as possible, you are, by
>definition, not smart enough to debug it."
>-Brian W. Kernighan
>
>
>
>###

>###
>
>This email from Talgentra is intended only for the personal use of the
>recipient(s) named above. The email and any files transmitted with it
are
>confidential to the intended recipient(s) and may be legally privileged
or
>contain proprietary and private information. If you are not an intended
>recipient, you may not review, copy or distribute this message. If
received
>in error, please notify the sender and delete the message from your
system.
>
>Any views or opinions expressed in this email and any files transmitted
>with it are those of the author only and may not necessarily reflect
the
>views of Talgentra and it does not create any legally binding rights or
>obligations whatsoever. Unless otherwise pre-agreed by exchange of hard
>copy documents signed by duly authorised representatives, contracts may
not
>be concluded on behalf of Talgentra by email.
>
>Please note that neither Talgentra nor the sender accepts any
>responsibility for any viruses and it is your responsibility to scan
the
>email and the attachments (if any). All email received and sent by
>Talgentra may be monitored to protect the business interests of
Talgentra.
>
>
>
>###

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



Internationalization of characters --UTF8 encoding

2004-10-29 Thread Shilpa Nalgonda
Hi,

I am using Tomcat4.1, Oracle 8i , and XmlRpc to write an application which
is supposed to take japanese characters an insert them into database.  Is
there any setting in Tomcat4 where i should be giving the encoding option.
And aslo i get the request from the client in the form of xml and pass that
request via xmlrpc and insert into oracle database.
The client sends japanese characters in Unicode , our database has caracter
set of US7ASCII.

select * from NLS_DATABASE_PARAMETERS where parameter = 'NLS_CHARACTERSET';

PARAMETER VALUE
-- --
NLS_CHARACTERSET US7ASCII

The data is being inserted as all brackets in  database.'{{{'
Is there any conversion i need to do while inserting in the database.

Please suggest if anyone has any opinions.


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



mod_rewrite mod_proxy issues with apache and tomcat

2004-10-29 Thread Pablo
To anyone who can help,
 I currently am looking into alternative to mod_jk2 for apache and 
tomcat . Simply because of latency issues. One of the avenues that I am 
attempting is using mod_proxy and mod_rewrite.  I have followed the 
directions from this url

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/balancer-howto.html
the only difference between these directions and my implementation is 
that I have this


RewriteEngine On
RewriteCond "%{HTTP_COOKIE}"  
"(^|;\s*)JSESSIONID=\w*\.(\w+)($|;)"
RewriteRule "(.*)"
			"http://${SERVERS:%2|${SERVERS:ALL}}%{REQUEST_URI}"  [P,L]
RewriteRule "^.*;jsessionid=\w*\.(\w+)($|;)"  
	"http://${SERVERS:$1|${SERVERS:ALL}}%{REQUEST_URI}"  [P,L]
RewriteRule "(.*)"   			 
"http://${SERVERS:ALL}%{REQUEST_URI}"; [P,L]



instead of what the apache "how to"  implements

RewriteEngine On
RewriteCond "%{HTTP_COOKIE}"  
"(^|;\s*)jsessionid=\w*\.(\w+)($|;)"
RewriteRule "(.*)"
			"http://${SERVERS:%2}%{REQUEST_URI}";  [P,L]
RewriteRule "^.*;jsessionid=\w*\.(\w+)($|;)"  
	"http://${SERVERS:$1}%{REQUEST_URI}";  [P,L]
RewriteRule "(.*)"
			"http://${SERVERS:ALL}%{REQUEST_URI}"; [P,L]


That was just a little tip that I got from a website.
I can get to the urls just fine.  For instance if I go to one off my 
apps (notice ssl)

https://sdp-webprod.phila.k12.pa.us/masterlogin/
I get there with no problem .  Should I take away the trailing slash  
and hit enter I end up with the following in my url string

http://170.235.31.19:8080/masterlogin/
Any suggestions?
-Pablo
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Internationalization of characters --UTF8 encoding

2004-10-29 Thread Evgeny Gesin
> .. is supposed to take japanese characters an insert
> them into database. Is there any setting in Tomcat4
> where i should be giving the encoding option.

You can specify parameters for SQL driver when you
define DataSource in Tomcat's server.xml. I think most
of Oracle drivers can process UTF-8, without the needs
for such parameters, but MySQL 3.xx, for example,
needs such parameters...

Evgeny
Javadesk / AllTelescopes



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

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



FW: Failed to install Tomcat5 service

2004-10-29 Thread Sharma_Ashutosh
No one is providing answer to my very basic question-which is a show stopper
for me.
Please help me

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 29, 2004 3:01 PM
To: [EMAIL PROTECTED]
Subject: Failed to install Tomcat5 service

Hi,
I'm installing Tomcat 5.5 on Windows XP Professional Box.

Jdk version is 1.5.
When I issue java -version on cmd prompt I get this output:
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)

I have already set the JAVA_HOME to the proper JRE.
But at the time of installing I get this error message:
"Failed to install Tomcat5 service. Check your settings and permissions.
Ignore and continue(not Recommneded) with 3 usual buttons:
Abort/Retry/Ignore
This happens at the time of performing this action in the installation
dialog box:
Failed to install tomcat service
Using %JAVA_HOME%\bin\client\jvm.dll

And then I just cant start tomcat.
Please help me out as I'm stuck at the very first step of installing tomcat.

My directory structure is as follows:
D:\Tomcat 5.5\bin>tomcat5
[2004-10-26 20:50:52] [373  prunsrv.c] [error]
The system cannot find the file specified.
[2004-10-26 20:50:52] [1186 prunsrv.c] [error]
Load configuration failed

D:\Tomcat 5.5\bin>tomcat5w.exe

D:\Tomcat 5.5\bin>dir
 Volume in drive D is WINNT_D
 Volume Serial Number is 744B-4B58

 Directory of D:\Tomcat 5.5\bin

26/Oct/04  08:42 PM  .
26/Oct/04  08:42 PM  ..
06/Oct/04  12:47 AM23,098 bootstrap.jar
06/Oct/04  12:47 AM26,202 commons-logging-api.jar
06/Oct/04  12:48 AM   102,400 tomcat5.exe
06/Oct/04  12:48 AM   131,072 tomcat5w.exe
   4 File(s)282,772 bytes
   2 Dir(s)   1,352,249,344 bytes free

With best regards:
Ashutosh Sharma
 
EMC Data Storage Systems (India) Private Limited 
No. 12, Subramanya Arcade, Tower B,Bannerghatta Road, 
Bangalore - 560 076.
Tel. +91-80-26788930 x 6296
 


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



RE: Failed to install Tomcat5 service

2004-10-29 Thread Shapira, Yoav

Hi,
Try the .zip distribution, just unzip and run.  It won't run as a
service at first, but it'll get you started.  The 5.5.3 exe installer
works fine out of the box for me on Win XP pro using Sun JDK 1.5.

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Sent: Friday, October 29, 2004 9:44 AM
>To: [EMAIL PROTECTED]
>Subject: FW: Failed to install Tomcat5 service
>
>No one is providing answer to my very basic question-which is a show
>stopper
>for me.
>Please help me
>
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Sent: Friday, October 29, 2004 3:01 PM
>To: [EMAIL PROTECTED]
>Subject: Failed to install Tomcat5 service
>
>Hi,
>I'm installing Tomcat 5.5 on Windows XP Professional Box.
>
>Jdk version is 1.5.
>When I issue java -version on cmd prompt I get this output:
>java version "1.5.0"
>Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
>Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
>
>I have already set the JAVA_HOME to the proper JRE.
>But at the time of installing I get this error message:
>"Failed to install Tomcat5 service. Check your settings and
permissions.
>Ignore and continue(not Recommneded) with 3 usual buttons:
>Abort/Retry/Ignore
>This happens at the time of performing this action in the installation
>dialog box:
>Failed to install tomcat service
>Using %JAVA_HOME%\bin\client\jvm.dll
>
>And then I just cant start tomcat.
>Please help me out as I'm stuck at the very first step of installing
>tomcat.
>
>My directory structure is as follows:
>D:\Tomcat 5.5\bin>tomcat5
>[2004-10-26 20:50:52] [373  prunsrv.c] [error]
>The system cannot find the file specified.
>[2004-10-26 20:50:52] [1186 prunsrv.c] [error]
>Load configuration failed
>
>D:\Tomcat 5.5\bin>tomcat5w.exe
>
>D:\Tomcat 5.5\bin>dir
> Volume in drive D is WINNT_D
> Volume Serial Number is 744B-4B58
>
> Directory of D:\Tomcat 5.5\bin
>
>26/Oct/04  08:42 PM  .
>26/Oct/04  08:42 PM  ..
>06/Oct/04  12:47 AM23,098 bootstrap.jar
>06/Oct/04  12:47 AM26,202 commons-logging-api.jar
>06/Oct/04  12:48 AM   102,400 tomcat5.exe
>06/Oct/04  12:48 AM   131,072 tomcat5w.exe
>   4 File(s)282,772 bytes
>   2 Dir(s)   1,352,249,344 bytes free
>
>With best regards:
>Ashutosh Sharma
>
>EMC Data Storage Systems (India) Private Limited
>No. 12, Subramanya Arcade, Tower B,Bannerghatta Road,
>Bangalore - 560 076.
>Tel. +91-80-26788930 x 6296
>
>
>
>-
>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: Internationalization of characters --UTF8 encoding

2004-10-29 Thread Shilpa Nalgonda
can u point me to a resource how i can do it.

-Original Message-
From: Evgeny Gesin [mailto:[EMAIL PROTECTED]
Sent: Friday, October 29, 2004 9:42 AM
To: Tomcat Users List
Subject: Re: Internationalization of characters --UTF8 encoding 


> .. is supposed to take japanese characters an insert
> them into database. Is there any setting in Tomcat4
> where i should be giving the encoding option.

You can specify parameters for SQL driver when you
define DataSource in Tomcat's server.xml. I think most
of Oracle drivers can process UTF-8, without the needs
for such parameters, but MySQL 3.xx, for example,
needs such parameters...

Evgeny
Javadesk / AllTelescopes



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

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


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



Re: Tomcat just STOPS

2004-10-29 Thread agidden
There are numerous issues with past versions of Sun's Java that can cause
hangs.
Some of the 1.3.1, and 1.4.1 releases and one of the 1.4.2 releases had issues
that can cause hangs. 
We've seen complete lockups in Tomcat and JBoss with 1.3.1_06, for example.


- Original Message -
From: Derek Clarkson <[EMAIL PROTECTED]>
Date: Thursday, October 28, 2004 11:21 pm
Subject: Tomcat just STOPS

> 
> Hi all,
>   Tricky bug. We've been all over our system and cannot figure out
> what is going on. The tomcats (we have 2 tomcat 4.1.24's behind an 
> apacheserver, just stop reponding after a couple of days. Restart 
> them and
> everything is fine. Then some undefinied period later, one or both 
> will just
> stop ahain. It can be as little as an hour or as a long as a week. 
> But they
> will not stay up reliably. 
> 
> No errors are produced in the logs and there are no messages 
> indicatinganything is wrong.
> 
> Has anyone encountered this ?
> 
> Regards,
> Derek Clarkson
> Global Applications
> Lonely Planet Publications
> ph: (03) 8379-8000 x8041
> "It's not a bug - it's an undocumented feature!"
> 
> 
> 
> __
> This email, including attachments, is intended only for the addressee
> and may be confidential, privileged and subject to copyright.  If you
> have received this email in error, please advise the sender and delete
> it.  If you are not the intended recipient of this email, you must not
> use, copy or disclose its content to anyone.  You must not copy or 
> communicate to others content that is confidential or subject to 
> copyright, unless you have the consent of the content owner.
> 


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



RE: Signals sent by Tomcat to web applications during shutdown.

2004-10-29 Thread Simon Kelly
Thanks Yoav,

Should have remembered that, I've used it before ::blush:: .  I didn't
consider it as the thread I'm looking at is deep within the business
logic and doesn't have access to the Context.

Cheers

Slim

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: 29 October 2004 14:21
To: Tomcat Users List
Subject: RE: Signals sent by Tomcat to web applications during shutdown.



Hi,
ServletContextListener#contextDestroyed is a good one.

Yoav Shapira http://www.yoavshapira.com
 

>-Original Message-
>From: Simon Kelly [mailto:[EMAIL PROTECTED]
>Sent: Friday, October 29, 2004 9:21 AM
>To: [EMAIL PROTECTED]
>Subject: Signals sent by Tomcat to web applications during shutdown.
>
>Hi All,
>
>I've been having a good shufty through the Tomcat documentation, but I
>can't find a reference to what signals Tomcat sends to the web
>applications to shut them down during the shutdown operation.
>
>Does anyone know what signals i would need to trap in my code to allow
>all of my threads to die when tomcat shuts down?
>
>Kind regards
>
>Slim
>
>"Debugging is twice as hard as writing the code in the first place.
>Therefore, if you write the code as cleverly as possible, you are, by
>definition, not smart enough to debug it."
>-Brian W. Kernighan
>
>
>
>###

>###
>
>This email from Talgentra is intended only for the personal use of the
>recipient(s) named above. The email and any files transmitted with it
are
>confidential to the intended recipient(s) and may be legally privileged
or
>contain proprietary and private information. If you are not an intended
>recipient, you may not review, copy or distribute this message. If
received
>in error, please notify the sender and delete the message from your
system.
>
>Any views or opinions expressed in this email and any files transmitted
>with it are those of the author only and may not necessarily reflect
the
>views of Talgentra and it does not create any legally binding rights or
>obligations whatsoever. Unless otherwise pre-agreed by exchange of hard
>copy documents signed by duly authorised representatives, contracts may
not
>be concluded on behalf of Talgentra by email.
>
>Please note that neither Talgentra nor the sender accepts any
>responsibility for any viruses and it is your responsibility to scan
the
>email and the attachments (if any). All email received and sent by
>Talgentra may be monitored to protect the business interests of
Talgentra.
>
>
>
>###

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



##

This email from Talgentra is intended only for the personal use of the
recipient(s) named above. The email and any files transmitted with it are confidential 
to the intended recipient(s) and may be legally privileged or contain proprietary and 
private information. If you are not an intended recipient, you may not review, copy or 
distribute this message. If received in error, please notify the sender and delete the 
message from your system.
 
Any views or opinions expressed in this email and any files transmitted with it are 
those of the author only and may not necessarily reflect the views of Talgentra and it 
does not create any legally binding rights or obligations whatsoever. Unless otherwise 
pre-agreed by exchange of hard copy documents signed by duly authorised 
representatives, contracts may not be concluded on behalf of Talgentra by email.
 
Please note that neither Talgentra nor the sender accepts any responsibility for any 
viruses and it is your responsibility to scan the email and the attachments (if any). 
All email received and sent by Talgentra may be monitored to protect the business 
interests of Talgentra.



##


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



RE: Signals sent by Tomcat to web applications during shutdown.

2004-10-29 Thread Shapira, Yoav

Hi,

>Should have remembered that, I've used it before ::blush:: .  I didn't
>consider it as the thread I'm looking at is deep within the business
>logic and doesn't have access to the Context.

That it gets trickier.  You can use the Runtime#addShutdownHook
approach, but that only applies when the JVM is shutting down, so it
won't work for a webapp reload.

Yoav



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


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



RE: Internationalization of characters --UTF8 encoding

2004-10-29 Thread Evgeny Gesin
It's specific for driver you use. I don't have a url
for Oracle drivers, I use JConnector for MySQL
http://dev.mysql.com/doc/connector/j/en/

Here is sample of driver line in server.xml:

jdbc:mysql://127.0.0.1:3306/db?autoReconnect=true&useUnicode=true&characterEncoding=utf8&

Take attention of these two parameters useUnicode=true
and characterEncoding=utf8.

Evgeny
Javadesk / AllTelescopes


--- Shilpa Nalgonda <[EMAIL PROTECTED]> wrote:

> can u point me to a resource how i can do it.
> 
> -Original Message-
> From: Evgeny Gesin [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 29, 2004 9:42 AM
> To: Tomcat Users List
> Subject: Re: Internationalization of characters
> --UTF8 encoding 
> 
> 
> > .. is supposed to take japanese characters an
> insert
> > them into database. Is there any setting in
> Tomcat4
> > where i should be giving the encoding option.
> 
> You can specify parameters for SQL driver when you
> define DataSource in Tomcat's server.xml. I think
> most
> of Oracle drivers can process UTF-8, without the
> needs
> for such parameters, but MySQL 3.xx, for example,
> needs such parameters...
> 
> Evgeny
> Javadesk / AllTelescopes
> 
> 
>   
> __
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We
> finish.
> http://promotions.yahoo.com/new_mail 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




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

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



RE: Tomcat fails - Can't read body, waited #0 Seems size related

2004-10-29 Thread Varley, Roger
> 
> As a follow-up to my original post - further testing shows 
> that this problem only appears when I access Tomcat via IIS. 
> If I connect to Tomcat directly via port 8080 then everything 
> works as expected. 
> 

Now I'm even more confused. If I go back to accessing Tomcat via IIS, it will fail if 
I try to get the data through the HttpServletRequest InputStream, but will succeed if 
I retrieve the data through the getParameter() method.

Regards
Roger


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

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



Tomcat in a High Traffic Environment

2004-10-29 Thread Andrew Miehs
Dear List,
I am new to the list and have a few questions about Tomcat 5.0.
We are attempting to use tomcat in a High Traffic, many simultaneous 
Internet user environment.

I have about 8000 simultaneous users, and plan on using 14 web servers. 
These servers connect via CORBA to a group of backend servers. The 14 
web severs are load balanced with a hardware load balancer.

How does Tomcat deal with connections?
When a request from a user arrives, is it assigned a thread? and is 
this thread ONLY used for this connection, (including obtaining 
information from the backend) until the request is finished?

How are keep-alives dealt with? When a user requests a keep-alive, is a 
thread held permanently for this user, until the connection is dropped? 
If this is the case, how is this ment to scale?

A connection pool of 750 threads seems unusable... How can 1 thread per 
connection scale? or have I misunderstood how tomcat uses its 
connection pool? And should all of these threads ever have something to 
do at the same time, the box would just fall over with a load of 
750

Would it not make more sense to use a smaller connection pool, and set 
up queues?

Would it not then be better when the request has been processed, to put 
this into a second queue for requests which then go to the backend, 
etc, etc? So many threads can't help performance. Wouldn't the kernel 
be busy the whole time with context switching? and no user would ever 
get any data back

Thanks in advance for any comments,
Andrew
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: problems with LD_LIBRARY_PATH !

2004-10-29 Thread phil campaigne
Her, Andre wrote:
All,
I have ported a web application normally running on NT4 / ISS /Jrun to a
tomcat 3.3.2.
The results are mixed.
servlets seems top work OK but some of them do a call to a perl script.
The perl script is well called but
the environment LD_LIBRARY_PATH is not set, so loading of modules and
library fails.
I have tried every thing I could think of, even including a
$ENV{'LD_LIBRARY_PATH'} = "/usr/lib:/usr/local/lib:/usr/local/perl/lib";
in the perl script, but still fails loading libraries *.so !!
Any idea someone !?
Many thanks in advances
Regards
Andre

Andre Her
BlarenbergLaan,2
2800 Mechelen
Belgium
Tel : +32 (0)15 78 6887
Fax: +32 (0)15 78 5405
   

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

This worked for me from the command line when I had similar problem with 
my postgresql database.

su - postgres
LD_LIBRARY_PATH=/usr/local/pgsql/lib
 export LD_LIBRARY_PATH
PATH=/usr/local/pgsql/bin:$PATH
 export PATH
regards,
Phil

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


Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Peter Lin
if you're using hardware load balancer like cisco localdirector, I
would setup the load balancer to direct the traffic based on
sessionid.

this way, you don't need to use keep alive. when you say 8K
simultaneous users, what does that translate to in terms of concurrent
requests per second? An easy way to figure that out is to use a Http
analysis tool like webtrends, or HttpAnalyze to generate statistics.

I would look at the peak and average concurent requests. once you know
that, it will be easier to determine if 14 servers are sufficient.

peter


On Fri, 29 Oct 2004 16:53:26 +0200, Andrew Miehs <[EMAIL PROTECTED]> wrote:
> Dear List,
> 
> I am new to the list and have a few questions about Tomcat 5.0.
> 
> We are attempting to use tomcat in a High Traffic, many simultaneous
> Internet user environment.
> 
> I have about 8000 simultaneous users, and plan on using 14 web servers.
> These servers connect via CORBA to a group of backend servers. The 14
> web severs are load balanced with a hardware load balancer.
> 
> How does Tomcat deal with connections?
> 
> When a request from a user arrives, is it assigned a thread? and is
> this thread ONLY used for this connection, (including obtaining
> information from the backend) until the request is finished?
> 
> How are keep-alives dealt with? When a user requests a keep-alive, is a
> thread held permanently for this user, until the connection is dropped?
> If this is the case, how is this ment to scale?
> 
> A connection pool of 750 threads seems unusable... How can 1 thread per
> connection scale? or have I misunderstood how tomcat uses its
> connection pool? And should all of these threads ever have something to
> do at the same time, the box would just fall over with a load of
> 750
> 
> Would it not make more sense to use a smaller connection pool, and set
> up queues?
> 
> Would it not then be better when the request has been processed, to put
> this into a second queue for requests which then go to the backend,
> etc, etc? So many threads can't help performance. Wouldn't the kernel
> be busy the whole time with context switching? and no user would ever
> get any data back
> 
> Thanks in advance for any comments,
> 
> Andrew
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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



Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Andrew Miehs
Hi Peter,
The load balancer is an F5 and we are doing can do the balancing based 
on JSESSIONID. At the moment we are doing persistence based on our own 
cookie (Long story).

How did you disable keep-alives? maxKeepAliveRequests="1" ? Doesn't it 
make more sense to use keep-alives? And what does tomcat really do with 
these keep-alive connections? Does it really keep 1 thread open for 
each keep-alive? this seems VERY unnecessary

Regards
Andrew
On 29.10.2004, at 17:02, Peter Lin wrote:
if you're using hardware load balancer like cisco localdirector, I
would setup the load balancer to direct the traffic based on
sessionid.
this way, you don't need to use keep alive. when you say 8K
simultaneous users, what does that translate to in terms of concurrent
requests per second? An easy way to figure that out is to use a Http
analysis tool like webtrends, or HttpAnalyze to generate statistics.
I would look at the peak and average concurent requests. once you know
that, it will be easier to determine if 14 servers are sufficient.
peter
On Fri, 29 Oct 2004 16:53:26 +0200, Andrew Miehs <[EMAIL PROTECTED]> 
wrote:
Dear List,
I am new to the list and have a few questions about Tomcat 5.0.
We are attempting to use tomcat in a High Traffic, many simultaneous
Internet user environment.
I have about 8000 simultaneous users, and plan on using 14 web 
servers.
These servers connect via CORBA to a group of backend servers. The 14
web severs are load balanced with a hardware load balancer.

How does Tomcat deal with connections?
When a request from a user arrives, is it assigned a thread? and is
this thread ONLY used for this connection, (including obtaining
information from the backend) until the request is finished?
How are keep-alives dealt with? When a user requests a keep-alive, is 
a
thread held permanently for this user, until the connection is 
dropped?
If this is the case, how is this ment to scale?

A connection pool of 750 threads seems unusable... How can 1 thread 
per
connection scale? or have I misunderstood how tomcat uses its
connection pool? And should all of these threads ever have something 
to
do at the same time, the box would just fall over with a load of
750

Would it not make more sense to use a smaller connection pool, and set
up queues?
Would it not then be better when the request has been processed, to 
put
this into a second queue for requests which then go to the backend,
etc, etc? So many threads can't help performance. Wouldn't the kernel
be busy the whole time with context switching? and no user would ever
get any data back

Thanks in advance for any comments,
Andrew
-
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 logging in Eclipse

2004-10-29 Thread Januski, Ken
Donie,

I just noticed this from your log:
- Root Cause -
java.lang.NoClassDefFoundError: org/apache/log4j/Layout

I'm at work right now so can't check my logs at home but if they also point
to Layout as the missing class rather than just Log4j that may tell us a
little more about what's causing the problem. I didn't think that my errors
pointed to Layout but I could be wrong.

Ken

-Original Message-
From: Donie Kelly [mailto:[EMAIL PROTECTED]
Sent: Friday, October 29, 2004 5:19 AM
To: Tomcat Users List
Subject: RE: Problem with logging in Eclipse


Anybody else have this problem???

Thanks
Donie


-Original Message-
From: Donie Kelly [mailto:[EMAIL PROTECTED] 
Sent: 28 October 2004 11:12
To: Tomcat Users List
Subject: RE: Problem with logging in Eclipse

Hi guys

I have the same problem and it's driving me nuts. I have a run configuration
in Eclipse 3.0 for tomcat 4.1.18 and I call bootstrap.jar directly within
eclipse to start tomcat. The only jars I put in the run configuration class
path are the tomcat ones.

This starts tomcat as it would be normally run and tomcat then inits the
webapps directory and creates the classpath for each webapp based on the
contents of the WEB-INF/lib.

I have commons-logging.jar in my WEB-INF/lib as it's required by some code.
This has problems finding log4j even though it's there. When I send in a
request that uses com.sun.xml.messaging.saaj.soap.dom4j.ElementFactory
tomcat throws an exception into Catalina.out log showing the following stack
trace below.

Now, if I put log4j.jar into the run configuration class path the problem
goes away? Why can't tomcat find this jar under Eclipse 3

However, because I have multiple webapps running, the logging for the
different webapps is the same as the log4j.jar is now global so the last
webapp to init sets the logging scheme and location. Painful.

Thanks
Donie




2004-10-28 11:14:41 StandardWrapperValve[webclient]: Servlet.service() for
servlet webclient threw exception
javax.servlet.ServletException: Servlet execution threw an exception
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:493)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1040)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151
)
at java.lang.Thread.run(Thread.java:53

Fail on stop, start e reload

2004-10-29 Thread Willian Corrêa

I try stop aplication by my domain end ex:
domain.com/manager/stop?path=/

and this error return;

FAIL - Encountered exception java.lang.IllegalStateException:
standardHost.stop : LifecycleException:  Container StandardContext[] has
not been started

Thanks
-- 
Willian Corrêa
C.O.I. - Centro de Operações e Infraestrutura
Plug In Internet Corporativa
http://www.plugin.com.br
[EMAIL PROTECTED]
Centro de Atendimento, Informação e Apoio ao cliente
CAIA Local +55 51 3287 1700( Poa e Grande POA )
CAIA Nacional 0800 541 1700( Demais Localidades )



RE: Tomcat in a High Traffic Environment

2004-10-29 Thread Shapira, Yoav

Hi,

>these keep-alive connections? Does it really keep 1 thread open for
>each keep-alive? this seems VERY unnecessary

Remember that the Servlet Spec mandates the Servlet Container service a
request with one thread, independent of the HTTP details.  So before you
think we're clueless when it comes to performant connection handling
design, please keep that in mind ;)

Yoav




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


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



Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Peter Lin
you don't need to use keepalive.  generally, in a load balanced setup,
keepalive is disabled because the load balancer is already making sure
the user goes to the same webserver for the life time of the session.

keepalive is usually set in the HTTP header by the client, so I don't
think you need to do anything to tomcat's config. someone correct me
if I'm wrong. remy can provide a better description of what happens in
the case a browser wants to use keep alive.

peter


On Fri, 29 Oct 2004 17:20:18 +0200, Andrew Miehs <[EMAIL PROTECTED]> wrote:
> Hi Peter,
> 
> The load balancer is an F5 and we are doing can do the balancing based
> on JSESSIONID. At the moment we are doing persistence based on our own
> cookie (Long story).
> 
> How did you disable keep-alives? maxKeepAliveRequests="1" ? Doesn't it
> make more sense to use keep-alives? And what does tomcat really do with
> these keep-alive connections? Does it really keep 1 thread open for
> each keep-alive? this seems VERY unnecessary
> 
> Regards
> 
> Andrew
> 
> 
> 
> On 29.10.2004, at 17:02, Peter Lin wrote:
> 
> > if you're using hardware load balancer like cisco localdirector, I
> > would setup the load balancer to direct the traffic based on
> > sessionid.
> >
> > this way, you don't need to use keep alive. when you say 8K
> > simultaneous users, what does that translate to in terms of concurrent
> > requests per second? An easy way to figure that out is to use a Http
> > analysis tool like webtrends, or HttpAnalyze to generate statistics.
> >
> > I would look at the peak and average concurent requests. once you know
> > that, it will be easier to determine if 14 servers are sufficient.
> >
> > peter
> >
> >
> > On Fri, 29 Oct 2004 16:53:26 +0200, Andrew Miehs <[EMAIL PROTECTED]>
> > wrote:
> >> Dear List,
> >>
> >> I am new to the list and have a few questions about Tomcat 5.0.
> >>
> >> We are attempting to use tomcat in a High Traffic, many simultaneous
> >> Internet user environment.
> >>
> >> I have about 8000 simultaneous users, and plan on using 14 web
> >> servers.
> >> These servers connect via CORBA to a group of backend servers. The 14
> >> web severs are load balanced with a hardware load balancer.
> >>
> >> How does Tomcat deal with connections?
> >>
> >> When a request from a user arrives, is it assigned a thread? and is
> >> this thread ONLY used for this connection, (including obtaining
> >> information from the backend) until the request is finished?
> >>
> >> How are keep-alives dealt with? When a user requests a keep-alive, is
> >> a
> >> thread held permanently for this user, until the connection is
> >> dropped?
> >> If this is the case, how is this ment to scale?
> >>
> >> A connection pool of 750 threads seems unusable... How can 1 thread
> >> per
> >> connection scale? or have I misunderstood how tomcat uses its
> >> connection pool? And should all of these threads ever have something
> >> to
> >> do at the same time, the box would just fall over with a load of
> >> 750
> >>
> >> Would it not make more sense to use a smaller connection pool, and set
> >> up queues?
> >>
> >> Would it not then be better when the request has been processed, to
> >> put
> >> this into a second queue for requests which then go to the backend,
> >> etc, etc? So many threads can't help performance. Wouldn't the kernel
> >> be busy the whole time with context switching? and no user would ever
> >> get any data back
> >>
> >> Thanks in advance for any comments,
> >>
> >> Andrew
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> -
> 
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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



Re: Signals sent by Tomcat to web applications during shutdown.

2004-10-29 Thread erh
On Fri, Oct 29, 2004 at 10:20:49AM -0400, Shapira, Yoav wrote:
> >Should have remembered that, I've used it before ::blush:: .  I didn't
> >consider it as the thread I'm looking at is deep within the business
> >logic and doesn't have access to the Context.
> 
> That it gets trickier.  You can use the Runtime#addShutdownHook
> approach, but that only applies when the JVM is shutting down, so it
> won't work for a webapp reload.

one way to solve that is to create a singleton class that is the
ServletContextListener and have your business threads register themselves
with it.  Basically use the same interface as Runtime#addShutdownHook
but implement it to be triggered on actions local to your app.
This also helps keep the tomcat specific code and the core business
logic code separate.  (if you have you app designed that way)

eric

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



Problem running Embedded Tomcat

2004-10-29 Thread Kang, Kamaljeet K.
 
Hi,

Can somebody help me with the following null pointer which is happening
when I am trying to run tomcat as embedded application.


java.lang.NullPointerException
at
org.apache.catalina.startup.DigesterFactory.register(DigesterFactory.jav
a:174)
at
org.apache.catalina.startup.DigesterFactory.registerLocalSchema(Digester
Factory.java:139)
at
org.apache.catalina.startup.DigesterFactory.newDigester(DigesterFactory.
java:92)
at
org.apache.catalina.startup.ContextConfig.createWebXmlDigester(ContextCo
nfig.java:435)
at
org.apache.catalina.startup.ContextConfig.createWebDigester(ContextConfi
g.java:422)
at
org.apache.catalina.startup.ContextConfig.defaultConfig(ContextConfig.ja
va:499)
at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:623)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.j
ava:216)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:119)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4290
)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.startup.Embedded.start(Embedded.java:846)
at
com.tellabs.metrowatch.server.startup.EmbeddedTomcat.startTomcat(Embedde
dTomcat.java:97)
at
com.tellabs.metrowatch.server.startup.EmbeddedTomcat.main(EmbeddedTomcat
..java:172)


Thanks


Kamal

-
  The
information contained in this message may be privileged   and confidential
and protected from disclosure.  If the   reader of this message is not the
intended recipient, or an   employee or agent responsible for delivering
this message to   the intended recipient, you are hereby notified that any
reproduction, dissemination or distribution of this   communication is
strictly prohibited. If you have received   this communication in error,
please notify us immediately by   replying to the message and deleting it
from your computer.Thank you.  Tellabs



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



Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Mladen Turk
Peter Lin wrote:
you don't need to use keepalive.  generally, in a load balanced setup,
keepalive is disabled because the load balancer is already making sure
the user goes to the same webserver for the life time of the session.
keepalive is usually set in the HTTP header by the client, so I don't
think you need to do anything to tomcat's config. someone correct me
if I'm wrong. remy can provide a better description of what happens in
the case a browser wants to use keep alive.
Yes, but the keepalive is used mainly for making the 'state' out of
'stateless' protocol, and it's main advantage is that you don't need
to acquire a new connection all the time. Take a look at RFC2068.
Even apache keeps the thread open on keepalive connections (Of course
you have a KeepAliveTimeout).
Without keepalive your cluster will perhaps work better in the lab,
but it will fail in the real-user scenario.
MT.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


extraordinarily stupid question

2004-10-29 Thread joon yoo
After I install tomcat 5.0, the tomcat management page is on http://tomcat:8080

How can this management page be obscured/moved to a different url and
then, how can a redirector to http://tomcat:8080/application be put in
for that root address?

Thanks for any help,

joon

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



Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Andrew Miehs
Hi Yoav,
I have not read the Servlet Spec, so please pardon my ignorance. 
(Definitely do not mean to offend). What I still haven't had clearly 
answered is:

User A sends request (with keepalive) to tomcat. Tomcat assigns request 
to thread (T1).
Tomcat sends result back. Is thread T1 now kept reserved for user A 
until he/ or tomcat closes the keep-alive connection?

If this is the case, and I now have 1000 users, each with 2 connections 
per user (ie: 2000 connections) do I need 2000 threads? What if the 
requests each only take a very short amount of time? The server is 
capable of answering a lot more requests than those from the 1000 
users, but due to the number of connections and threads, I am limited 
to the 1000 users per machine...

Or am I just missing something here...
I can understand the issue with the one thread one request in the Spec 
- am just wondering if there isn't a better way, as I can not see how 
this can possible scale in a high traffic environment -
or maybe I just don't understand... :-(

Thanks
Andrew
On 29.10.2004, at 17:28, Shapira, Yoav wrote:
Hi,
these keep-alive connections? Does it really keep 1 thread open for
each keep-alive? this seems VERY unnecessary
Remember that the Servlet Spec mandates the Servlet Container service a
request with one thread, independent of the HTTP details.  So before 
you
think we're clueless when it comes to performant connection handling
design, please keep that in mind ;)

Yoav

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

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

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


Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Andrew Miehs
The loadbalancer forwards the packet to tomcat, and as such, tomcat  
sees the keep-alive request.
If tomcat has keep-alive enabled, it will set up keep alive on its end.

Andrew
On 29.10.2004, at 17:31, Peter Lin wrote:
you don't need to use keepalive.  generally, in a load balanced setup,
keepalive is disabled because the load balancer is already making sure
the user goes to the same webserver for the life time of the session.
keepalive is usually set in the HTTP header by the client, so I don't
think you need to do anything to tomcat's config. someone correct me
if I'm wrong. remy can provide a better description of what happens in
the case a browser wants to use keep alive.
peter
On Fri, 29 Oct 2004 17:20:18 +0200, Andrew Miehs <[EMAIL PROTECTED]>  
wrote:
Hi Peter,
The load balancer is an F5 and we are doing can do the balancing based
on JSESSIONID. At the moment we are doing persistence based on our own
cookie (Long story).
How did you disable keep-alives? maxKeepAliveRequests="1" ? Doesn't it
make more sense to use keep-alives? And what does tomcat really do  
with
these keep-alive connections? Does it really keep 1 thread open for
each keep-alive? this seems VERY unnecessary

Regards
Andrew

On 29.10.2004, at 17:02, Peter Lin wrote:
if you're using hardware load balancer like cisco localdirector, I
would setup the load balancer to direct the traffic based on
sessionid.
this way, you don't need to use keep alive. when you say 8K
simultaneous users, what does that translate to in terms of  
concurrent
requests per second? An easy way to figure that out is to use a Http
analysis tool like webtrends, or HttpAnalyze to generate statistics.

I would look at the peak and average concurent requests. once you  
know
that, it will be easier to determine if 14 servers are sufficient.

peter
On Fri, 29 Oct 2004 16:53:26 +0200, Andrew Miehs <[EMAIL PROTECTED]>
wrote:
Dear List,
I am new to the list and have a few questions about Tomcat 5.0.
We are attempting to use tomcat in a High Traffic, many simultaneous
Internet user environment.
I have about 8000 simultaneous users, and plan on using 14 web
servers.
These servers connect via CORBA to a group of backend servers. The  
14
web severs are load balanced with a hardware load balancer.

How does Tomcat deal with connections?
When a request from a user arrives, is it assigned a thread? and is
this thread ONLY used for this connection, (including obtaining
information from the backend) until the request is finished?
How are keep-alives dealt with? When a user requests a keep-alive,  
is
a
thread held permanently for this user, until the connection is
dropped?
If this is the case, how is this ment to scale?

A connection pool of 750 threads seems unusable... How can 1 thread
per
connection scale? or have I misunderstood how tomcat uses its
connection pool? And should all of these threads ever have something
to
do at the same time, the box would just fall over with a load of
750
Would it not make more sense to use a smaller connection pool, and  
set
up queues?

Would it not then be better when the request has been processed, to
put
this into a second queue for requests which then go to the backend,
etc, etc? So many threads can't help performance. Wouldn't the  
kernel
be busy the whole time with context switching? and no user would  
ever
get any data back

Thanks in advance for any comments,
Andrew
 
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

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

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

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


Re: extraordinarily stupid question

2004-10-29 Thread Andrew Miehs
mv $TOMCAT_HOME/server/webapps/manager 
$TOMCAT_HOME/server/webapps/newmanager

On 29.10.2004, at 17:45, joon yoo wrote:
After I install tomcat 5.0, the tomcat management page is on 
http://tomcat:8080

How can this management page be obscured/moved to a different url and
then, how can a redirector to http://tomcat:8080/application be put in
for that root address?
Thanks for any help,
joon
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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


Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Filip Hanik - Dev
turn off keep alive
- Original Message - 
From: "Andrew Miehs" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, October 29, 2004 10:45 AM
Subject: Re: Tomcat in a High Traffic Environment


Hi Yoav,

I have not read the Servlet Spec, so please pardon my ignorance. 
(Definitely do not mean to offend). What I still haven't had clearly 
answered is:

User A sends request (with keepalive) to tomcat. Tomcat assigns request 
to thread (T1).
Tomcat sends result back. Is thread T1 now kept reserved for user A 
until he/ or tomcat closes the keep-alive connection?

If this is the case, and I now have 1000 users, each with 2 connections 
per user (ie: 2000 connections) do I need 2000 threads? What if the 
requests each only take a very short amount of time? The server is 
capable of answering a lot more requests than those from the 1000 
users, but due to the number of connections and threads, I am limited 
to the 1000 users per machine...

Or am I just missing something here...

I can understand the issue with the one thread one request in the Spec 
- am just wondering if there isn't a better way, as I can not see how 
this can possible scale in a high traffic environment -
or maybe I just don't understand... :-(

Thanks

Andrew

On 29.10.2004, at 17:28, Shapira, Yoav wrote:

>
> Hi,
>
>> these keep-alive connections? Does it really keep 1 thread open for
>> each keep-alive? this seems VERY unnecessary
>
> Remember that the Servlet Spec mandates the Servlet Container service a
> request with one thread, independent of the HTTP details.  So before 
> you
> think we're clueless when it comes to performant connection handling
> design, please keep that in mind ;)
>
> Yoav
>
>
>
>
> This e-mail, including any attachments, is a confidential business 
> communication, and may contain information that is confidential, 
> proprietary and/or privileged.  This e-mail is intended only for the 
> individual(s) to whom it is addressed, and may not be saved, copied, 
> printed, disclosed or used by anyone else.  If you are not the(an) 
> intended recipient, please immediately delete this e-mail from your 
> computer system and notify the sender.  Thank you.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
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: extraordinarily stupid question

2004-10-29 Thread Shapira, Yoav

Hi,
As to the latter part of your question, you can declare any context to
have path="" (the empty string) and it will be served at the root
address.  You would need to remove the ROOT webapp that ships with
tomcat first.

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: joon yoo [mailto:[EMAIL PROTECTED]
>Sent: Friday, October 29, 2004 11:45 AM
>To: [EMAIL PROTECTED]
>Subject: extraordinarily stupid question
>
>After I install tomcat 5.0, the tomcat management page is on
>http://tomcat:8080
>
>How can this management page be obscured/moved to a different url and
>then, how can a redirector to http://tomcat:8080/application be put in
>for that root address?
>
>Thanks for any help,
>
>joon
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




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


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



Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Peter Lin
mladen makes a good point. the sites I've worked on, we left the
keepalive up to the browser and didn't explicitly disable keepalive. 
the sites I've worked on we simply used hardware load balancer to make
sure the session goes to the right server.

that is usually enough from my experience. my bias perspective is,
unless the users are sending requests very rapidly, I don't see much
benefit to using keepalive. If the interval between requests is rather
long, like minutes, I doubt keepalive would provide any measurable
benefit.

I would look at the statistics from the http logs to determine whether
keepalive should be disabled or not.

peter


On Fri, 29 Oct 2004 17:44:09 +0200, Mladen Turk <[EMAIL PROTECTED]> wrote:
> Peter Lin wrote:
> > you don't need to use keepalive.  generally, in a load balanced setup,
> > keepalive is disabled because the load balancer is already making sure
> > the user goes to the same webserver for the life time of the session.
> >
> > keepalive is usually set in the HTTP header by the client, so I don't
> > think you need to do anything to tomcat's config. someone correct me
> > if I'm wrong. remy can provide a better description of what happens in
> > the case a browser wants to use keep alive.
> >
> 
> Yes, but the keepalive is used mainly for making the 'state' out of
> 'stateless' protocol, and it's main advantage is that you don't need
> to acquire a new connection all the time. Take a look at RFC2068.
> Even apache keeps the thread open on keepalive connections (Of course
> you have a KeepAliveTimeout).
> 
> Without keepalive your cluster will perhaps work better in the lab,
> but it will fail in the real-user scenario.
> 
> MT.
> 
> -
> 
> 
> 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: Tomcat5.5.3 serious problems!

2004-10-29 Thread David Lee
I will take a look at this one, BTW, I just uploaded my test war file in
response to Remy's comments.

Thanks

David 

-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 28, 2004 5:06 PM
To: Tomcat Users List
Subject: Re: Tomcat5.5.3 serious problems!

Check out the directions for the manager app.
There is a specific syntax for war files.

The syntax is explained in detail here:
http://java.sun.com/j2se/1.4.2/docs/api/java/net/JarURLConnection.html

Here's a simple example for a war files named myapp.war on a local unix
box (Note the exclamation point and ending slash):

jar:file:/path/to/myapp.war!/





On Thu, 2004-10-28 at 19:39, David Lee wrote:
> HI!
>  
> I tried to use GUI manager to upload war file (war file to deploy, the

> message says OK, but nothing happened. no context files deployed.
> nothing.
>  
> then I tried to upload the same war file using "deploy directory or 
> war file located on server", the upload problem entered into an 
> infinitive loop, just kept runnin...runing.
>  
> What happened!
>  
> The war file I tried to upload works perfect on Tomcat5.0.29.
>  
> Thanks
>  
> David Lee


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


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



Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Mladen Turk
Peter Lin wrote:
mladen makes a good point. the sites I've worked on, we left the
keepalive up to the browser and didn't explicitly disable keepalive. 
the sites I've worked on we simply used hardware load balancer to make
sure the session goes to the right server.

Correct.
The keepalive is usually used for loading a single page with extra
content on it, so that browser doesn't need to connect for every
single icon on the web page.
Of course it's also a backdor for DOS attacks, so it's up to the
admin to decide the proper policy.
I would look at the statistics from the http logs to determine whether
keepalive should be disabled or not.
Yep, me too :).
MT.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Andrew Miehs
Hi Filip,
Is this how you disable keep-alive on tomcat?
maxKeepAliveRequests="1"
or is there another switch that I am missing..
On 29.10.2004, at 17:49, Filip Hanik - Dev wrote:
turn off keep alive

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


Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Andrew Miehs
Hi Peter,
I am not using keep-alives to keep session persistence, but was rather 
hoping for better client performance. Using keep-alives saves creating 
a tcp connection for each request - and thereby saving 3 tcp packets 
(and roundtrip times) per request.

Andrew
On 29.10.2004, at 17:53, Peter Lin wrote:
mladen makes a good point. the sites I've worked on, we left the
keepalive up to the browser and didn't explicitly disable keepalive.
the sites I've worked on we simply used hardware load balancer to make
sure the session goes to the right server.
that is usually enough from my experience. my bias perspective is,
unless the users are sending requests very rapidly, I don't see much
benefit to using keepalive. If the interval between requests is rather
long, like minutes, I doubt keepalive would provide any measurable
benefit.
I would look at the statistics from the http logs to determine whether
keepalive should be disabled or not.

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


RE: How to Display a byte array (contents of a MS DOC fie, Excel, ..) in web browser

2004-10-29 Thread Daxin Zuo
Thank for you reply.
 My problem is solved. One of the reasons is that the server who sends the
file with damaged format.
thank you again.



-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 28, 2004 6:16 PM
To: Tomcat Users List
Subject: RE: How to Display a byte array (contents of a MS DOC fie,
Excel, ..) in web browser


What do you want to see? Hex digits?

-Original Message-
From: Daxin Zuo [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 28, 2004 9:12 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: How to Display a byte array (contents of a MS DOC fie, Excel,
..) in web browser

I receive a byte array from a remote server, and the servlet will
display it on the browser. The byte array contains a MS DOC file. If I
simply convert it to a String, the contents will be meaningless.
Please forward instruction.


-
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: Upload MS DOC or Image file errors.

2004-10-29 Thread Daxin Zuo
I changed to store the file into a byte array to instead a string. it seems
to me that convert a byte array of the contents of a MS DOC file to a string
cause error. The byte array is passed to another server via socket. the file
is stored at the destination correctly.
I use  FileOutputStream to see if the buffer stores a file correctly. it is
not a necessary part of my application.
Thanks.

-Original Message-
From: Steffen Heil [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 28, 2004 2:47 PM
To: 'Tomcat Users List'
Subject: AW: Upload MS DOC or Image file errors.


> Thanks. It works.

Fine.

But what? Switching to FileOutputStream or just using item.write?
(They should both work, though the second seems to make more sence. Just
asking for interest.)

Regards,
  Steffen



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



RE: Failed to install Tomcat5 service

2004-10-29 Thread Steve Kirk

from your original post:

> >"Failed to install Tomcat5 service. Check your settings and
> > permissions.

suggests to me that you are not logged in as Administrator?

that's probably why the install fails.  the DIR of your \bin directory looks
like installation failed halfway through.

as Yoav says, you'll probably have more joy with the .zip installer, esp if
you do not have an administrator logon.  you might well still have problems
installing the service though...?

> -Original Message-
> From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
> Sent: Friday 29 October 2004 14:45
> To: Tomcat Users List
> Subject: RE: Failed to install Tomcat5 service
> 
> 
> 
> Hi,
> Try the .zip distribution, just unzip and run.  It won't run as a
> service at first, but it'll get you started.  The 5.5.3 exe installer
> works fine out of the box for me on Win XP pro using Sun JDK 1.5.
> 
> Yoav Shapira http://www.yoavshapira.com
>  
> 
> >-Original Message-
> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >Sent: Friday, October 29, 2004 9:44 AM
> >To: [EMAIL PROTECTED]
> >Subject: FW: Failed to install Tomcat5 service
> >
> >No one is providing answer to my very basic question-which is a show
> >stopper
> >for me.
> >Please help me
> >
> >-Original Message-
> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >Sent: Friday, October 29, 2004 3:01 PM
> >To: [EMAIL PROTECTED]
> >Subject: Failed to install Tomcat5 service
> >
> >Hi,
> >I'm installing Tomcat 5.5 on Windows XP Professional Box.
> >
> >Jdk version is 1.5.
> >When I issue java -version on cmd prompt I get this output:
> >java version "1.5.0"
> >Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> >Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
> >
> >I have already set the JAVA_HOME to the proper JRE.
> >But at the time of installing I get this error message:
> >"Failed to install Tomcat5 service. Check your settings and
> permissions.
> >Ignore and continue(not Recommneded) with 3 usual buttons:
> >Abort/Retry/Ignore
> >This happens at the time of performing this action in the 
> installation
> >dialog box:
> >Failed to install tomcat service
> >Using %JAVA_HOME%\bin\client\jvm.dll
> >
> >And then I just cant start tomcat.
> >Please help me out as I'm stuck at the very first step of installing
> >tomcat.
> >
> >My directory structure is as follows:
> >D:\Tomcat 5.5\bin>tomcat5
> >[2004-10-26 20:50:52] [373  prunsrv.c] [error]
> >The system cannot find the file specified.
> >[2004-10-26 20:50:52] [1186 prunsrv.c] [error]
> >Load configuration failed
> >
> >D:\Tomcat 5.5\bin>tomcat5w.exe
> >
> >D:\Tomcat 5.5\bin>dir
> > Volume in drive D is WINNT_D
> > Volume Serial Number is 744B-4B58
> >
> > Directory of D:\Tomcat 5.5\bin
> >
> >26/Oct/04  08:42 PM  .
> >26/Oct/04  08:42 PM  ..
> >06/Oct/04  12:47 AM23,098 bootstrap.jar
> >06/Oct/04  12:47 AM26,202 commons-logging-api.jar
> >06/Oct/04  12:48 AM   102,400 tomcat5.exe
> >06/Oct/04  12:48 AM   131,072 tomcat5w.exe
> >   4 File(s)282,772 bytes
> >   2 Dir(s)   1,352,249,344 bytes free
> >
> >With best regards:
> >Ashutosh Sharma
> >
> >EMC Data Storage Systems (India) Private Limited
> >No. 12, Subramanya Arcade, Tower B,Bannerghatta Road,
> >Bangalore - 560 076.
> >Tel. +91-80-26788930 x 6296
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> This e-mail, including any attachments, is a confidential 
> business communication, and may contain information that is 
> confidential, proprietary and/or privileged.  This e-mail is 
> intended only for the individual(s) to whom it is addressed, 
> and may not be saved, copied, printed, disclosed or used by 
> anyone else.  If you are not the(an) intended recipient, 
> please immediately delete this e-mail from your computer 
> system and notify the sender.  Thank you.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



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



Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Remy Maucherat
On Fri, 29 Oct 2004 17:45:15 +0200, Andrew Miehs <[EMAIL PROTECTED]> wrote:
> Hi Yoav,
> 
> I have not read the Servlet Spec, so please pardon my ignorance.
> (Definitely do not mean to offend). What I still haven't had clearly
> answered is:
> 
> User A sends request (with keepalive) to tomcat. Tomcat assigns request
> to thread (T1).
> Tomcat sends result back. Is thread T1 now kept reserved for user A
> until he/ or tomcat closes the keep-alive connection?

Yes.

> If this is the case, and I now have 1000 users, each with 2 connections
> per user (ie: 2000 connections) do I need 2000 threads? What if the
> requests each only take a very short amount of time? The server is
> capable of answering a lot more requests than those from the 1000
> users, but due to the number of connections and threads, I am limited
> to the 1000 users per machine...

No. If the number of used threads get higher, timeout will be reduced,
and if it gets even higher, keepalive will not be used until the
number of connections get lower.

> Or am I just missing something here...
> 
> I can understand the issue with the one thread one request in the Spec
> - am just wondering if there isn't a better way, as I can not see how
> this can possible scale in a high traffic environment -
> or maybe I just don't understand... :-(

If you have that much connections, I think a number of them will be
active doing stuff anyway, so the scalability problems will not be on
the number of threads.

And then you'll have to experiment a little in test environments to
see if disabling keepalive (yes, it's maxKeepAliveRequests="1") would
be beneficial or not to the stuff you're running. Keepalive does
improve performance significantly because it reduces the work of the
TCP stack. BTW, Tomcat performs very well without keepalive, as
there's no particular HTTP keepalive optimizations (besides
benefitting from lower overhead at the TCP level).

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

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



Log4j question

2004-10-29 Thread Mufaddal Khumri
Hi,
I am new to Log4j and am trying to read the configuration settings from 
WEB-INF/classes/log4j.properties

I am using Tomcat 5.0.27. I have been trying to do this in my 
contextListener:

public void contextInitialized(ServletContextEvent sce)
{   
String fileName = sc.getRealPath("/") + "/WEB-INF/log4j.properties";
PropertyConfigurator.configureAndWatch(fileName,2000);
..
}
As soon as I include those lines in my webapps context listener, my 
webapp does not start on starting tomcat. When i comment
those lines off it starts normally. Any ideas whats going on here?

Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]

Re: Log4j question

2004-10-29 Thread Mufaddal Khumri
Sorry, mistake on my part. The Log4j.properties is under /classes . 
Works fine now.

On Oct 29, 2004, at 9:29 AM, Mufaddal Khumri wrote:
Hi,
I am new to Log4j and am trying to read the configuration settings 
from WEB-INF/classes/log4j.properties

I am using Tomcat 5.0.27. I have been trying to do this in my 
contextListener:

public void contextInitialized(ServletContextEvent sce)
{   
String fileName = sc.getRealPath("/") + "/WEB-INF/log4j.properties";
PropertyConfigurator.configureAndWatch(fileName,2000);
..
}
As soon as I include those lines in my webapps context listener, my 
webapp does not start on starting tomcat. When i comment
those lines off it starts normally. Any ideas whats going on here?

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


RE: Log4j question

2004-10-29 Thread Shapira, Yoav

Hi,
Don't use getRealPath, it won't work when running from a packed WAR.
Use Class#getResource(AsStream) or the equivalent methods in
ServletContext.

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
>Sent: Friday, October 29, 2004 12:35 PM
>To: Tomcat Users List
>Subject: Re: Log4j question
>
>Sorry, mistake on my part. The Log4j.properties is under /classes .
>Works fine now.
>
>On Oct 29, 2004, at 9:29 AM, Mufaddal Khumri wrote:
>
>> Hi,
>>
>> I am new to Log4j and am trying to read the configuration settings
>> from WEB-INF/classes/log4j.properties
>>
>> I am using Tomcat 5.0.27. I have been trying to do this in my
>> contextListener:
>>
>>  public void contextInitialized(ServletContextEvent sce)
>>  {
>>  String fileName = sc.getRealPath("/") + "/WEB-
>INF/log4j.properties";
>>  PropertyConfigurator.configureAndWatch(fileName,2000);
>>  ..
>>  }
>>
>> As soon as I include those lines in my webapps context listener, my
>> webapp does not start on starting tomcat. When i comment
>> those lines off it starts normally. Any ideas whats going on here?
>>
>>
>> Mufaddal Khumri
>> Software Developer
>> Waves In Motion
>> Phone: 602 956 7080 x 26
>> Email: [EMAIL PROTECTED]
>Mufaddal Khumri
>Software Developer
>Waves In Motion
>Phone: 602 956 7080 x 26
>Email: [EMAIL PROTECTED]
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




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

2004-10-29 Thread Mufaddal Khumri
Hi,
If I use getResourceAsStream() and then make a call to 
PropertyConfigurator.configure(properties). Is there a way to watch for 
changes in this property file? How do I use getResourceAsStream and 
have the ability to configure the log4j.properties file at run time?

On Oct 29, 2004, at 9:40 AM, Shapira, Yoav wrote:
Hi,
Don't use getRealPath, it won't work when running from a packed WAR.
Use Class#getResource(AsStream) or the equivalent methods in
ServletContext.
Yoav Shapira http://www.yoavshapira.com

-Original Message-
From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
Sent: Friday, October 29, 2004 12:35 PM
To: Tomcat Users List
Subject: Re: Log4j question
Sorry, mistake on my part. The Log4j.properties is under /classes .
Works fine now.
On Oct 29, 2004, at 9:29 AM, Mufaddal Khumri wrote:
Hi,
I am new to Log4j and am trying to read the configuration settings
from WEB-INF/classes/log4j.properties
I am using Tomcat 5.0.27. I have been trying to do this in my
contextListener:
public void contextInitialized(ServletContextEvent sce)
{
String fileName = sc.getRealPath("/") + "/WEB-
INF/log4j.properties";
PropertyConfigurator.configureAndWatch(fileName,2000);
..
}
As soon as I include those lines in my webapps context listener, my
webapp does not start on starting tomcat. When i comment
those lines off it starts normally. Any ideas whats going on here?
Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
Mufaddal Khumri
Software Developer
Waves In Motion
Phone: 602 956 7080 x 26
Email: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

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

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


RE: Log4j question

2004-10-29 Thread Shapira, Yoav

Hi,
Use PropertyConfigurator#configure(URL), where the URL comes from the
Class#getResource or ServletContext#getResource call.  You don't need to
get the input stream and read it yourself.

I don't recommend configureAndWatch that much, because it spawns a
thread.  Instead, use (from the log4j sandbox) or write a simple servlet
to change logging configuration at runtime.

This discussion is already off-topic for this list.   If you'd like to
continue it, please do so on the log4j-user list.  Thanks,

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
>Sent: Friday, October 29, 2004 1:01 PM
>To: Tomcat Users List
>Subject: Re: Log4j question
>
>Hi,
>
>If I use getResourceAsStream() and then make a call to
>PropertyConfigurator.configure(properties). Is there a way to watch for
>changes in this property file? How do I use getResourceAsStream and
>have the ability to configure the log4j.properties file at run time?
>
>On Oct 29, 2004, at 9:40 AM, Shapira, Yoav wrote:
>
>>
>> Hi,
>> Don't use getRealPath, it won't work when running from a packed WAR.
>> Use Class#getResource(AsStream) or the equivalent methods in
>> ServletContext.
>>
>> Yoav Shapira http://www.yoavshapira.com
>>
>>
>>> -Original Message-
>>> From: Mufaddal Khumri [mailto:[EMAIL PROTECTED]
>>> Sent: Friday, October 29, 2004 12:35 PM
>>> To: Tomcat Users List
>>> Subject: Re: Log4j question
>>>
>>> Sorry, mistake on my part. The Log4j.properties is under /classes .
>>> Works fine now.
>>>
>>> On Oct 29, 2004, at 9:29 AM, Mufaddal Khumri wrote:
>>>
 Hi,

 I am new to Log4j and am trying to read the configuration settings
 from WEB-INF/classes/log4j.properties

 I am using Tomcat 5.0.27. I have been trying to do this in my
 contextListener:

public void contextInitialized(ServletContextEvent sce)
{
String fileName = sc.getRealPath("/") + "/WEB-
>>> INF/log4j.properties";
PropertyConfigurator.configureAndWatch(fileName,2000);
..
}

 As soon as I include those lines in my webapps context listener, my
 webapp does not start on starting tomcat. When i comment
 those lines off it starts normally. Any ideas whats going on here?


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




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


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



Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Peter Lin
if you're looking for better client performance I would explore other
areas first.

1. use gzip compression - this can reduce the html to 1/10th the size.
your mileage will vary.

2. caching results on the web-tier

3. putting the images on a dedicated image server

4. distributing your servers across multiple ISP. many service
providers don't tell you this, but often their pipe is saturated and
can't really handle a large number of concurrent requests. if you host
your own servers i would recommend getting more than 1 connection and
use different providers

Most browsers today are Http1.1 compliant, which means they are
limited to 2 connections to the same server. Normally the browser will
use the same connection to get the html and the other resources like
images and javascript.

Are you worrying about images? if that is the case, setup a dedicated
image server using apache. you'll easily double the performance of
your servlet pages, since tomcat won't have to serve up static
content. Plus, it's easier to update the images for the entire site.
Rather than copy all the files to every single webserver, you just
update the image server and it's done.

peter


On Fri, 29 Oct 2004 18:01:29 +0200, Andrew Miehs <[EMAIL PROTECTED]> wrote:
> Hi Peter,
> 
> I am not using keep-alives to keep session persistence, but was rather
> hoping for better client performance. Using keep-alives saves creating
> a tcp connection for each request - and thereby saving 3 tcp packets
> (and roundtrip times) per request.
> 
> Andrew
> 
> On 29.10.2004, at 17:53, Peter Lin wrote:
> 
>

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



Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Andrew Miehs
On 29.10.2004, at 19:08, Peter Lin wrote:
if you're looking for better client performance I would explore other
areas first.
1. use gzip compression - this can reduce the html to 1/10th the size.
your mileage will vary.
This is being looked at - loadbalancer vrs tomcat

2. caching results on the web-tier
Very dynamic content
3. putting the images on a dedicated image server
Already being done. 2x Servers running apache - which also have this 
keep-alive problem. Running 1000 threads per server is NOT my idea of a 
good time. I will be having a look at a couple of other alternatives to 
apache over the next couple of weeks. Due to operating system/ kenerl  
overheads
time for one request <> (time for 10 parallel requests)/10 <> (time for 
1000 parallel requests)/1000

Squid is a good example of how you can server MANY connections without 
starting thousands of threads.

4. distributing your servers across multiple ISP. many service
providers don't tell you this, but often their pipe is saturated and
can't really handle a large number of concurrent requests. if you host
your own servers i would recommend getting more than 1 connection and
use different providers
This is NOT a pipe saturation issue. The issue is definitely a tomcat/ 
number of connections issue.
I already have this problem in my local network with load tests.

Most browsers today are Http1.1 compliant, which means they are
limited to 2 connections to the same server. Normally the browser will
use the same connection to get the html and the other resources like
images and javascript.
This will only happen if keep-alives are enabled. If keep-alives are 
disabled each GET will be a new connection. The F5 load balancers (4.5) 
have a 'cool-feature?!' that 'forwards' the keep-alive connection 
through to the backend server - With the 4.5 version of the software 
they are doing packet mangling. This means that even though the cllient 
only has 2 connections, the load balancer multiplies this connection to 
EACH of the backend servers with which the client is communicating, ie: 
static servers get 2 connections per client, statistic servers get 2 
connections per client, tomcats get 2 connections per client..

Version 9 of the software has just come out, and it does proxying this 
should hopefully help solve this problem - I am still in the process of 
testing the new version.

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


RE: Failed to install Tomcat5 service

2004-10-29 Thread Jeffrey Steele
We just had the very same problem when trying to install the service
for Tomcat 5.0.28 using service.bat on a Win2000 server...

We found that there was an old refrence to a Tomcat 4 service in the
Registry... after clearing it out, the Tomcat5 service installed and
started fine...

Good luck...

> from your original post:
>
> > >"Failed to install Tomcat5 service. Check your settings and
> > > permissions.
>
> suggests to me that you are not logged in as Administrator?
>
> that's probably why the install fails.  the DIR of your \bin directory
> looks
> like installation failed halfway through.
>
> as Yoav says, you'll probably have more joy with the .zip installer, esp
> if
> you do not have an administrator logon.  you might well still have
> problems
> installing the service though...?
>
> > -Original Message-
> > From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
> > Sent: Friday 29 October 2004 14:45
> > To: Tomcat Users List
> > Subject: RE: Failed to install Tomcat5 service
> >
> >
> >
> > Hi,
> > Try the .zip distribution, just unzip and run.  It won't run as a
> > service at first, but it'll get you started.  The 5.5.3 exe installer
> > works fine out of the box for me on Win XP pro using Sun JDK 1.5.
> >
> > Yoav Shapira http://www.yoavshapira.com
> >
> >
> > >-Original Message-
> > >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > >Sent: Friday, October 29, 2004 9:44 AM
> > >To: [EMAIL PROTECTED]
> > >Subject: FW: Failed to install Tomcat5 service
> > >
> > >No one is providing answer to my very basic question-which is a show
> > >stopper
> > >for me.
> > >Please help me
> > >
> > >-Original Message-
> > >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > >Sent: Friday, October 29, 2004 3:01 PM
> > >To: [EMAIL PROTECTED]
> > >Subject: Failed to install Tomcat5 service
> > >
> > >Hi,
> > >I'm installing Tomcat 5.5 on Windows XP Professional Box.
> > >
> > >Jdk version is 1.5.
> > >When I issue java -version on cmd prompt I get this output:
> > >java version "1.5.0"
> > >Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> > >Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
> > >
> > >I have already set the JAVA_HOME to the proper JRE.
> > >But at the time of installing I get this error message:
> > >"Failed to install Tomcat5 service. Check your settings and
> > permissions.
> > >Ignore and continue(not Recommneded) with 3 usual buttons:
> > >Abort/Retry/Ignore
> > >This happens at the time of performing this action in the
> > installation
> > >dialog box:
> > >Failed to install tomcat service
> > >Using %JAVA_HOME%\bin\client\jvm.dll
> > >
> > >And then I just cant start tomcat.
> > >Please help me out as I'm stuck at the very first step of installing
> > >tomcat.
> > >
> > >My directory structure is as follows:
> > >D:\Tomcat 5.5\bin>tomcat5
> > >[2004-10-26 20:50:52] [373  prunsrv.c] [error]
> > >The system cannot find the file specified.
> > >[2004-10-26 20:50:52] [1186 prunsrv.c] [error]
> > >Load configuration failed
> > >
> > >D:\Tomcat 5.5\bin>tomcat5w.exe
> > >
> > >D:\Tomcat 5.5\bin>dir
> > > Volume in drive D is WINNT_D
> > > Volume Serial Number is 744B-4B58
> > >
> > > Directory of D:\Tomcat 5.5\bin
> > >
> > >26/Oct/04  08:42 PM  .
> > >26/Oct/04  08:42 PM  ..
> > >06/Oct/04  12:47 AM23,098 bootstrap.jar
> > >06/Oct/04  12:47 AM26,202 commons-logging-api.jar
> > >06/Oct/04  12:48 AM   102,400 tomcat5.exe
> > >06/Oct/04  12:48 AM   131,072 tomcat5w.exe
> > >   4 File(s)282,772 bytes
> > >   2 Dir(s)   1,352,249,344 bytes free
> > >
> > >With best regards:
> > >Ashutosh Sharma
> > >
> > >EMC Data Storage Systems (India) Private Limited
> > >No. 12, Subramanya Arcade, Tower B,Bannerghatta Road,
> > >Bangalore - 560 076.
> > >Tel. +91-80-26788930 x 6296
> > >
> > >
> > >
> > >-
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> > This e-mail, including any attachments, is a confidential
> > business communication, and may contain information that is
> > confidential, proprietary and/or privileged.  This e-mail is
> > intended only for the individual(s) to whom it is addressed,
> > and may not be saved, copied, printed, disclosed or used by
> > anyone else.  If you are not the(an) intended recipient,
> > please immediately delete this e-mail from your computer
> > system and notify the sender.  Thank you.
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> 



Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Mladen Turk
Andrew Miehs wrote:
3. putting the images on a dedicated image server
Already being done. 2x Servers running apache - which also have this 
keep-alive problem. Running 1000 threads per server is NOT my idea of a 
good time. I will be having a look at a couple of other alternatives to 
apache over the next couple of weeks. Due to operating system/ kenerl  
overheads
time for one request <> (time for 10 parallel requests)/10 <> (time for 
1000 parallel requests)/1000

Squid is a good example of how you can server MANY connections without 
starting thousands of threads.

First of all the squid doesn't serve any content, and it can be
implemented as state machine very easily.
So you can not compare the proxy with the web server.
There has been some attempts to make the web server as state machine,
even for apache. One of the commercial one STM's is Zeus.
All that looks very good in the lab environment, not so sure how it
behaves in the real-life.

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


Re: Tomcat in a High Traffic Environment

2004-10-29 Thread Peter Lin
sounds like your goal is to maximize the number of connections to
tomcat while reducing the threads. Would that be an accurate
assesment?

if that is the case, then I would recommend not using servlets at all.
 about the only way to do that would be to use a server which
multiplexes n connections to a set number of threads. similar to SEDA
architecture.

neither .NET, J2EE or apache provide these kinds of features. I think
there is a webserver based on SEDA design from a commercial company,
but I don't remember the name and have never used it.

out of curiousity, how big are the pages?

if the html is less 1% of the entire page (html, images, javascript,
etc), and you have the budget, Akamai might be a viable solution to
your problem. unless your webpages use lots of frames and layers, I
would guess a single request would only require one connection, since
you're already using a dedicated image server.

I hope that helps

peter

On Fri, 29 Oct 2004 19:24:07 +0200, Andrew Miehs <[EMAIL PROTECTED]> wrote:
> 
> On 29.10.2004, at 19:08, Peter Lin wrote:
> 
> > if you're looking for better client performance I would explore other
> > areas first.
> >
> > 1. use gzip compression - this can reduce the html to 1/10th the size.
> > your mileage will vary.
> >
> 
> This is being looked at - loadbalancer vrs tomcat
> 
> 
> > 2. caching results on the web-tier
> 
> Very dynamic content
> 
> >
> > 3. putting the images on a dedicated image server
> >
> 
> Already being done. 2x Servers running apache - which also have this
> keep-alive problem. Running 1000 threads per server is NOT my idea of a
> good time. I will be having a look at a couple of other alternatives to
> apache over the next couple of weeks. Due to operating system/ kenerl
> overheads
> time for one request <> (time for 10 parallel requests)/10 <> (time for
> 1000 parallel requests)/1000
> 
> Squid is a good example of how you can server MANY connections without
> starting thousands of threads.
> 
> > 4. distributing your servers across multiple ISP. many service
> > providers don't tell you this, but often their pipe is saturated and
> > can't really handle a large number of concurrent requests. if you host
> > your own servers i would recommend getting more than 1 connection and
> > use different providers
> 
> This is NOT a pipe saturation issue. The issue is definitely a tomcat/
> number of connections issue.
> I already have this problem in my local network with load tests.
> 
> >
> > Most browsers today are Http1.1 compliant, which means they are
> > limited to 2 connections to the same server. Normally the browser will
> > use the same connection to get the html and the other resources like
> > images and javascript.
> >
> 
> This will only happen if keep-alives are enabled. If keep-alives are
> disabled each GET will be a new connection. The F5 load balancers (4.5)
> have a 'cool-feature?!' that 'forwards' the keep-alive connection
> through to the backend server - With the 4.5 version of the software
> they are doing packet mangling. This means that even though the cllient
> only has 2 connections, the load balancer multiplies this connection to
> EACH of the backend servers with which the client is communicating, ie:
> static servers get 2 connections per client, statistic servers get 2
> connections per client, tomcats get 2 connections per client..
> 
> Version 9 of the software has just come out, and it does proxying this
> should hopefully help solve this problem - I am still in the process of
> testing the new version.
> 
> Andrew
> 
>

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



RE: Upload MS DOC or Image file errors.

2004-10-29 Thread Benson Margulies
Of course, 'it seems to me that convert a byte array of the contents of
a MS DOC file to a string cause error'.

The contents of an MS doc file are not a set of bytes in a single
character encoding. They can't be 'converted to a string'.  

-Original Message-
From: Daxin Zuo [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 29, 2004 12:25 PM
To: Tomcat Users List
Subject: RE: Upload MS DOC or Image file errors.

I changed to store the file into a byte array to instead a string. it
seems to me that convert a byte array of the contents of a MS DOC file
to a string cause error. The byte array is passed to another server via
socket. the file is stored at the destination correctly.
I use  FileOutputStream to see if the buffer stores a file correctly. it
is not a necessary part of my application.
Thanks.

-Original Message-
From: Steffen Heil [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 28, 2004 2:47 PM
To: 'Tomcat Users List'
Subject: AW: Upload MS DOC or Image file errors.


> Thanks. It works.

Fine.

But what? Switching to FileOutputStream or just using item.write?
(They should both work, though the second seems to make more sence. Just
asking for interest.)

Regards,
  Steffen



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



Character encoding within form based autentication

2004-10-29 Thread Mark Doppelfeld
Hi out there,
I'm still facing problems with the character encoding in TV 5.0.28.
I'm not sure if it's wise to open another thread, but my further 
investigation have brought me to a new point, so I think it will be ok 
and I'll add the a link to this thread in my previous thread...
Debugging TC I traced my problem down to this method:

   // Basically return everything after ";charset="
   // If no charset specified, use the HTTP default (ASCII) character set.
   public static String getCharsetFromContentType(String type) {
   if (type == null) {
   return null;
   }
   int semi = type.indexOf(";");
   if (semi == -1) {
   return null;
   }
   int charsetLocation = type.indexOf("charset=", semi);
   if (charsetLocation == -1) {
   return null;
   }
   String afterCharset = type.substring(charsetLocation + 8);
   // The charset value in a Content-Type header is allowed to be 
quoted
   // and charset values can't contain quotes.  Just convert any quote
   // chars into spaces and let trim clean things up.
   afterCharset = afterCharset.replace('"', ' ');
   String encoding = afterCharset.trim();
   return encoding;
   }

But how to specify this charset within the html code??? When i try
   
   
   
   
   

I'll get the a content type of "application/x-www-form-urlencoded"
When I append content-type="plain/text;charset=UTF-8" to form element, 
my conten type won't show up.
I tried several settings of |useBodyEncodingForURI and ||URIEncoding but 
won't get it running

Help is highly appreciated.
Thanks in advance
Mark
|
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Apache-Tomcat: File Not Found instead of Tomcat

2004-10-29 Thread Alain Gaeremynck
as far as i understand JKMount actually is essentially pretty much the 
same as an alias in apache...  I have to check thought if mod_jk and 
mod_jk2 behave the same on this because i am still using mod_jk on my server

Hope this helps!
Allen Williams wrote:
Alain,
Thanks for the tip.  I will try it within a day or so.  What does JkMount
do, and is there any documentation anywhere on what elements are needed
where?
anw
 

-Original Message-
From: Alain Gaeremynck [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 6:49 PM
To: Tomcat Users List
Subject: Re: Apache-Tomcat: File Not Found instead of Tomcat
First time i try to help someone on this list...  Hope i'm right :)
You seem to be missing some config in httpd.conf

   JkMount /examples/* worker1

Allen Williams wrote:
   

I am setting (what should be) a straigthforward and very common
 

integration
   

of
Apache and Tomcat on Debian Linux, with Apache2 serving static
 

content and
   

Tomcat4 serving jsp's and servlet's.  The base directory of the apache
service
is /var/www.  The CATALINA_BASE is /var/lib/tomcat4, which contains
webapps/examples, webapps/admin, webapps/manager, and webdav(?-don't know
what
this is).  All this is set up to just run on "localhost".
When I point my browser to "http://localhost";, I get the right
 

Apache index
   

page, but when I try to go to "http://localhost/examples";, or any of the
others,
I get a "File Not Found" error.  How do I set this up?  Here are the
relevant
parts of the config files:
---
httpd.conf (actually, under Debian distribution, snippets included in
"apache2.conf"):
LoadModule jk2_module /usr/lib/apache2/modules/mod_jk2.so
# To enable mod_jk2, customize workers2.properties* from
# /usr/share/doc/libapache2-mod-jk2/examples and copy it to
# /etc/apache2/workers2.properties. Then uncomment the following
 

line: JkSet
   

config.file /etc/apache2/workers2.properties

workers.properties:
#
# This is the minimal JK2 connector configuration file.
#
[logger.file:0]
level=DEBUG
file=/var/log/apache2/apache-jk2.log
[shm:]
info=Scoreboard. Required for reconfiguration and status with
 

multiprocess
   

servers # file=anonymous # debug=0 file=/etc/apache2/scoreboard.shm
size=100
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
debug=0
tomcatId=localhost:8009
[ajp13:localhost:8009]
info=ajp13 worker; connects to tomcat using AJP 1.3 protocol
channel=channel.socket:localhost:8009
[uri:/admin/*]
info=Tomcat HTML based administration web application.
debug=5
context="admin"
worker=ajp13:localhost:8009
[uri:/manager/*]
info=A scriptable management web application for the Tomcat Web Server.
debug=5
context="manager" worker=ajp13:localhost:8009
[uri:/examples/*]
info=tomcat Examples.
debug=5
context="examples"
worker=ajp13:localhost:8009

And, on the Tomcat side, server.xml:



 

className="org.apache.catalina.mbeans.ServerLifecycleListener"
   

  debug="0"/>



  
  
  
  
  
  

  factory
 

org.apache.catalina.users.MemoryUserDatabaseFactory
   



  pathname
  conf/tomcat-users.xml

  


  
  
  
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
  
  






  
   

  
  
   
  
   

  




--
I also have a jk2.properties on the tomcat side:

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

--
Alain Gaeremynck
CTO Le Groupe Interstructure
(514) 374-1110
(514) 825-7810 cell
weblog: http://www.sanssucre.ca
-
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]
 

--
Alain Gaeremynck
CTO Le Groupe Interstructure
(514) 374-1110
(514) 825-7810 cell
weblog: http://www.sanssucre.ca


RE: Internationalization of characters --UTF8 encoding

2004-10-29 Thread Shilpa Nalgonda
Our java Application takes UTF-8 encoded unicode data and sores in a Java
String , and should insert that into Oracle8.1.7 database.
Oracle database has US7ASCII encoding.
So when i insert data some of the characters are being lost, and i see '?'
being inserted into database.
How can i convert this UTF-8 encoded java String into ASCII so that database
can load it.

Can anyone suggest what to do...









--- Shilpa Nalgonda <[EMAIL PROTECTED]> wrote:

> can u point me to a resource how i can do it.
>
> -Original Message-
> From: Evgeny Gesin [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 29, 2004 9:42 AM
> To: Tomcat Users List
> Subject: Re: Internationalization of characters
> --UTF8 encoding
>
>
> > .. is supposed to take japanese characters an
> insert
> > them into database. Is there any setting in
> Tomcat4
> > where i should be giving the encoding option.
>
> You can specify parameters for SQL driver when you
> define DataSource in Tomcat's server.xml. I think
> most
> of Oracle drivers can process UTF-8, without the
> needs
> for such parameters, but MySQL 3.xx, for example,
> needs such parameters...
>
> Evgeny
> Javadesk / AllTelescopes
>
>
>
> __
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We
> finish.
> http://promotions.yahoo.com/new_mail
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>




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

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


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



RE: Internationalization of characters --UTF8 encoding

2004-10-29 Thread Benson Margulies
UTF-7. Or any other ACE. 

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 29, 2004 3:38 PM
To: Tomcat Users List
Subject: RE: Internationalization of characters --UTF8 encoding 

Our java Application takes UTF-8 encoded unicode data and sores in a
Java String , and should insert that into Oracle8.1.7 database.
Oracle database has US7ASCII encoding.
So when i insert data some of the characters are being lost, and i see
'?'
being inserted into database.
How can i convert this UTF-8 encoded java String into ASCII so that
database can load it.

Can anyone suggest what to do...









--- Shilpa Nalgonda <[EMAIL PROTECTED]> wrote:

> can u point me to a resource how i can do it.
>
> -Original Message-
> From: Evgeny Gesin [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 29, 2004 9:42 AM
> To: Tomcat Users List
> Subject: Re: Internationalization of characters
> --UTF8 encoding
>
>
> > .. is supposed to take japanese characters an
> insert
> > them into database. Is there any setting in
> Tomcat4
> > where i should be giving the encoding option.
>
> You can specify parameters for SQL driver when you define DataSource 
> in Tomcat's server.xml. I think most of Oracle drivers can process 
> UTF-8, without the needs for such parameters, but MySQL 3.xx, for 
> example, needs such parameters...
>
> Evgeny
> Javadesk / AllTelescopes
>
>
>
> __
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
> http://promotions.yahoo.com/new_mail
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>




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

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


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


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



RE: Internationalization of characters --UTF8 encoding

2004-10-29 Thread Shilpa Nalgonda
how can i do that any examples...

-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED]
Sent: Friday, October 29, 2004 4:59 PM
To: Tomcat Users List
Subject: RE: Internationalization of characters --UTF8 encoding 


UTF-7. Or any other ACE. 

-Original Message-
From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 29, 2004 3:38 PM
To: Tomcat Users List
Subject: RE: Internationalization of characters --UTF8 encoding 

Our java Application takes UTF-8 encoded unicode data and sores in a
Java String , and should insert that into Oracle8.1.7 database.
Oracle database has US7ASCII encoding.
So when i insert data some of the characters are being lost, and i see
'?'
being inserted into database.
How can i convert this UTF-8 encoded java String into ASCII so that
database can load it.

Can anyone suggest what to do...









--- Shilpa Nalgonda <[EMAIL PROTECTED]> wrote:

> can u point me to a resource how i can do it.
>
> -Original Message-
> From: Evgeny Gesin [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 29, 2004 9:42 AM
> To: Tomcat Users List
> Subject: Re: Internationalization of characters
> --UTF8 encoding
>
>
> > .. is supposed to take japanese characters an
> insert
> > them into database. Is there any setting in
> Tomcat4
> > where i should be giving the encoding option.
>
> You can specify parameters for SQL driver when you define DataSource 
> in Tomcat's server.xml. I think most of Oracle drivers can process 
> UTF-8, without the needs for such parameters, but MySQL 3.xx, for 
> example, needs such parameters...
>
> Evgeny
> Javadesk / AllTelescopes
>
>
>
> __
> Do you Yahoo!?
> Yahoo! Mail Address AutoComplete - You start. We finish.
> http://promotions.yahoo.com/new_mail
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>




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

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


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


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


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



RE: File upload

2004-10-29 Thread Derrick Koes

For anyone who is interested, I found this interesting bug report on
bugzilla describing the problem.  Does anyone know a workaround for IIS
adding 35 bytes?

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


-Original Message-
From: Derrick Koes [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 28, 2004 2:27 PM
To: Tomcat Users List; Struts User Apache (E-mail)
Subject: RE: File upload

 
Upon reviewing some struts code and documentation, the memory threshold
for a file to be parsed for upload is 256K (configurable).  If the file
is over that size, I believe the uploader puts it in a temp file.
However, since the "url" to retrieve it for parsing is a relative path,
the parser cannot find it.

Can anyone verify this?

Thanks,
Derrick


-Original Message-
From: Derrick Koes [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 28, 2004 11:52 AM
To: Tomcat Users List
Subject: File upload


Configuration:

Tomcat 5.0.24
IIS 5.0
JK2 connector
Isapi_redirector2.dll
Struts 1.1
Commons file upload 1.0


I seem to have an issue that when the file is a certain size it is
written to a temp file on the file system before it is parsed by the
multipart parser (at least that's what the exception message leads me to
believe).  However, since the working directory is my web app
(/WEB-INF/ilt), the parser can't seem to find the file (not a fully
qualified file name).  This is a guess, but if correct I don't know how
to fix the problem.

Any help is appreciated.

Belows is the stack trace and data from the request dumper valve:

2004-10-28 10:59:32 RequestDumperValve[/ilt]:
===
2004-10-28 10:59:43 RequestDumperValve[/ilt]: REQUEST URI
=/ilt/ilt/iltPerformUpload.do
2004-10-28 10:59:43 RequestDumperValve[/ilt]:   authType=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:  characterEncoding=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:  contentLength=340147
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
contentType=multipart/form-data;
boundary=---41184676334
2004-10-28 10:59:43 RequestDumperValve[/ilt]:contextPath=/ilt
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillPort=http://
dkoesxp/djk/home/index.cfm?selectdTab=0
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
cookie=CFMX_JSESSIONID=c8301990451098975559821
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
cookie=CFID=19459
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
cookie=CFTOKEN=98634115
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=accept=text/xml,application/xml,application/xhtml+xml,text/html;q
=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=accept-language=en-us,en;q=0.5
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=connection=keep-alive
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=host=dkoesxp
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=referer=http://dkoesxp/ilt/ilt/iltUpload.do;jsessionid=3048D443AD
4341273FB5FED42958E7C4
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=user-agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
Gecko/20041001 Firefox/0.10.1
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=cookie=com.skillsoft.mgs.sso.RedirectorServlet.ReturnToSkillPort=
http://dkoesxp/djk/home/index.cfm?selectdTab=0;
CFMX_JSESSIONID=c8301990451098975559821; CFID=19459; CFTOKEN=98634115
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=content-length=340147
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=content-type=multipart/form-data;
boundary=---41184676334
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=accept-encoding=gzip,deflate
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=accept-charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
header=keep-alive=300
2004-10-28 10:59:43 RequestDumperValve[/ilt]: locale=en_US
2004-10-28 10:59:43 RequestDumperValve[/ilt]: method=POST
2004-10-28 10:59:43 RequestDumperValve[/ilt]:   pathInfo=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
protocol=HTTP/1.1
2004-10-28 10:59:43 RequestDumperValve[/ilt]:queryString=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
remoteAddr=10.20.3.42
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
remoteHost=10.20.3.42
2004-10-28 10:59:43 RequestDumperValve[/ilt]: remoteUser=null
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
requestedSessionId=3048D443AD4341273FB5FED42958E7C4
2004-10-28 10:59:43 RequestDumperValve[/ilt]: scheme=http
2004-10-28 10:59:43 RequestDumperValve[/ilt]: serverName=dkoesxp
2004-10-28 10:59:43 RequestDumperValve[/ilt]: serverPort=80
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
servletPath=/ilt/iltPerformUpload.do
2004-10-28 10:59:43 RequestDumperValve[/ilt]:   isSecure=false
2004-10-28 10:59:43 RequestDumperValve[/ilt]:
-

how to deny .jsp execution within an upload directory

2004-10-29 Thread Chris Lawder
Hello,
Can somebody please point me to documentaion and examples that describe 
how to disallow the execution of .jsp or any other scripts/binaries 
within a single directory of a webapplication? Part of the web app, is 
being allowed to upload reports which can then be read and downloaded by 
another. At this time I can upload a .jsp file and it will run in that 
directory.

I have found much stuff on SecurityManager and syntax within the 
catalina.policy file but nothing yet that really explains to me what I 
need to do to accomplish what I described above. My attempts so far at 
proper catalina.policy systax have not worked.

This is a pure tomcat environment running Tomcat 4.1.30 at this time.
Other comments regarding the proper use of an upload directory and it's 
security are welcome.

Thank you.
Chris
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: how to deny .jsp execution within an upload directory

2004-10-29 Thread Ben Souther
I do this by not allowing the upload tool to write files with ".jsp" or
".jspx" extensions in the first place.  I also disallow ".." in any part
of the filename.

You could also write a filter that scans any requests going to that
directory and checks for those extensions.



On Fri, 2004-10-29 at 18:05, Chris Lawder wrote:
> Hello,
> 
> Can somebody please point me to documentaion and examples that describe 
> how to disallow the execution of .jsp or any other scripts/binaries 
> within a single directory of a webapplication? Part of the web app, is 
> being allowed to upload reports which can then be read and downloaded by 
> another. At this time I can upload a .jsp file and it will run in that 
> directory.
> 
> I have found much stuff on SecurityManager and syntax within the 
> catalina.policy file but nothing yet that really explains to me what I 
> need to do to accomplish what I described above. My attempts so far at 
> proper catalina.policy systax have not worked.
> 
> This is a pure tomcat environment running Tomcat 4.1.30 at this time.
> 
> Other comments regarding the proper use of an upload directory and it's 
> security are welcome.
> 
> Thank you.
> 
> 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: how to deny .jsp execution within an upload directory

2004-10-29 Thread Tim Funk
The easiest way to do this would be to create a filter on that directory. The 
filter would either deny access - of it would get the default servlet via the 
ServletContext.getNamedDispatcher() and then perform a forwards().

-Tim
Chris Lawder wrote:
Hello,
Can somebody please point me to documentaion and examples that describe 
how to disallow the execution of .jsp or any other scripts/binaries 
within a single directory of a webapplication? Part of the web app, is 
being allowed to upload reports which can then be read and downloaded by 
another. At this time I can upload a .jsp file and it will run in that 
directory.

I have found much stuff on SecurityManager and syntax within the 
catalina.policy file but nothing yet that really explains to me what I 
need to do to accomplish what I described above. My attempts so far at 
proper catalina.policy systax have not worked.

This is a pure tomcat environment running Tomcat 4.1.30 at this time.
Other comments regarding the proper use of an upload directory and it's 
security are welcome.

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


problem with security manager, plesk and mysql (catalina.policy ignored?)

2004-10-29 Thread Alfonso Alba García
Hi everybody,

I have problems when connecting to mysql. I'm getting the following
exception when trying to connect to a mysql database:

(SQLException): java.sql.SQLException: Unable to connect to any hosts
due to exception: java.security.AccessControlException: access denied
(java.net.SocketPermission localhost resolve)

I have read about similar problems in google and tried to modify the
catalina.policy without success.

I deploy applications via a Plesk web interface which loads my .war
file, sets it in /var/tomcat4/psa-wars/mydomain.com/ creates a symlink 
to the war file in /var/tomcat4/psa-webapps/mydomain.com/ and makes the
application available via mydomain.com/myapplication.

It works fine except when an application tries to access a mysql
database. I´m getting the exception above, even though I tried the
following lines in catalina.policy without success (found similar
exeptions to this one in google):

grant codeBase
"file:${catalina.home}/psa-webapps/mydomain.com/myapplication/-" {
  permission java.net.SocketPermission "localhost","resolve";
  permission java.net.SocketPermission
"localhost:3306","connect,resolve";
};

grant codeBase
"file:${catalina.home}/psa-webapps/mydomain.com/myapplication/WEB-INF/lib/mysql-connector-java-3.0.9-stable-bin.jar"
 {
  permission java.net.SocketPermission "localhost","resolve";
  permission java.net.SocketPermission
"localhost:3306","connect,resolve";
};

I tried both of them one at a time and I restarted tomcat after every
modification made to the catalina.policy

I´m using tomcat 4.1.24 on a redhat linux Enterprise server, with
/mysql-connector-java-3.0.9 and jre 1.4.2.

Tomcat and mysql are in the same server.

The way I´m trying to access the database in a jsp is 
conexion =
DriverManager.getConnection("jdbc:mysql://localhost/DATABASE?user=USER&password=PASSWORD");

I've checked that the database exists, I can connect to the database
from a console as user USER with password PASSWORD.

The application works perfectly well in another server (debian woody
with tomcat 4.0) where it was not necessary to modify the security
policy. 

I talked to a friend of mine who also knows something about tomcat and
told me that to access a database in the same server where tomcat is, it
should not be necessary to modify the catalina.policy file.

I have some experience with tomcat but i run out of ideas and things to
try. Any help to open my eyes would be appreciated.

Thanks a lot in advance,

Alfonso





signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada	digitalmente


setting JPDA with Tomcat Monitor

2004-10-29 Thread Carlos Fernandez
I am running Windows XP with Tomcat 5.0.28 JDK 1.4.2_03.

I can tomcat using the JVM debug options just fine when I execute
catalina.bat on the command line (call Catalina.bat jpda start).  I have set
the following environmental variables:

JPDA_ADDRESS=8000
JPDA_TRANSPORT=dt_socket

However, I can't get tomcat to run with the JVM debug options when using
Tomcat Monitor.  As a matter of convenience I prefer Tomcat monitor and
would like to get it running using this tool.

When I add the "jpda" argument in the arguments input box on the Startup tab
("jpda start") - tomcat will not start up.  After clicking the start button
the "Apache Service Manager" window opens for a few seconds and then closes.
Tomcat will generate logs for stderr, stdout and Jakarta_service.  However,
they are all empty.

I am sure I am making a silly mistake in how I am feeding the Bootstrap
class the args.  Any suggestions?

Carlos


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



Re: how to deny .jsp execution within an upload directory

2004-10-29 Thread Justin Ruthenbeck
For robust installations, this problem is a non-issue due to JSP 
precompilation.  Everyone's situation is different, of course, but it is 
generally much more secure to precompile your JSPs and disable the 
dynamic compilation of new ones.

justin
At 03:25 PM 10/29/2004, you wrote:
The easiest way to do this would be to create a filter on that 
directory. The filter would either deny access - of it would get the 
default servlet via the ServletContext.getNamedDispatcher() and then 
perform a forwards().

-Tim
Chris Lawder wrote:
Hello,
Can somebody please point me to documentaion and examples that describe 
how to disallow the execution of .jsp or any other scripts/binaries 
within a single directory of a webapplication? Part of the web app, is 
being allowed to upload reports which can then be read and downloaded 
by another. At this time I can upload a .jsp file and it will run in 
that directory.
I have found much stuff on SecurityManager and syntax within the 
catalina.policy file but nothing yet that really explains to me what I 
need to do to accomplish what I described above. My attempts so far at 
proper catalina.policy systax have not worked.
This is a pure tomcat environment running Tomcat 4.1.30 at this time.
Other comments regarding the proper use of an upload directory and it's 
security are welcome.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

__
Justin Ruthenbeck
Lead Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Log4j with Tomcat webapp

2004-10-29 Thread Mufaddal Khumri
Hi,
I am trying to use this under Tomcat 5.0.27.
I have the following log4j.properties file under WEB-INF/conf/
# initialise root logger with level DEBUG and call it A1
log4j.rootLogger=DEBUG, A1
# set the appender to be FileAppender
log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.file=cw.log
# set set that layout to be SimpleLayout
log4j.appender.A1.layout=org.apache.log4j.SimpleLayout
I have the following in my web.xml

Log4jInitServlet
com.somepackage.Log4jInitServlet
1

log4j-configuration
conf/log4j.properties


 log4j-log-path
 WEB-INF/log


I do the following in my Log4jInitServlet:
...
String baseDir = getServletContext().getRealPath( "/" );
String logPath = config.getInitParameter(log4j-log-path);
logPath = baseDir + logPath;
File logPathDir = new File( logPath );
System.setProperty( "log.home", logPath );
PropertyConfigurator.configureAndWatch( confFile );
...
When I start my tomcat engine, I do not get any exceptions but my log 
file does not get created? Am I missing something in my 
log4j.properties file while specifying log4j.appender.A1.file ? or 
something else? I do not get any exceptions in catalina.out.

I am trying to understand if this problem is due to my configuration of 
Tomcat or the configuration of my logger?

Mufaddal Khumri


Re: Tomcat in a High Traffic Environment

2004-10-29 Thread David Rees
Mladen Turk wrote:
>
> Yes, but the keepalive is used mainly for making the 'state' out of
> 'stateless' protocol, and it's main advantage is that you don't need
> to acquire a new connection all the time. Take a look at RFC2068.
> Even apache keeps the thread open on keepalive connections (Of course
> you have a KeepAliveTimeout).
>
> Without keepalive your cluster will perhaps work better in the lab,
> but it will fail in the real-user scenario.

This is false.  Your cluster will not break in a real-user scenario
without Keep-Alive turned on.  There are many HTTP servers out there which
default to Keep-Alive turned off.

Keep-Alive is not used for keeping "state" of a stateless protocol.  Pure
and simple, it is used to improve client-side performance when requesting
multiple resources in a short timespan by reducing the number of TCP/IP
connection starts and stops.  This is mostly noticable if your website
design requires the user to download a large number of small resources to
view a page.

It is very common to turn off Keep-Alive or significantly reduce it's
timeout when attempting to scale to a large number of users without
keeping a large number of usable connections idle.  You can easily double
the number of concurrent users handled by a server by turning off
Keep-Alive.  The only drawback is that if your pages have a large number
of resources to retrieve per page and your users have a high-latency
connection to the server.

-Dave


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



Re: Tomcat in a High Traffic Environment

2004-10-29 Thread David Rees
Andrew Miehs wrote:
> A connection pool of 750 threads seems unusable... How can 1 thread per
> connection scale? or have I misunderstood how tomcat uses its
> connection pool? And should all of these threads ever have something to
> do at the same time, the box would just fall over with a load of
> 750

Keep in mind that most of these connections will not be utilizing much
CPU, they will most likely be busy sending/receiving data (or if
keep-alive is on waiting doing nothing).

> Would it not make more sense to use a smaller connection pool, and set
> up queues?

If you are serving resources which utilize a lot of CPU, then yes, it can
be beneficial.  You can use the OS's connection backlog on a listening
TCP/IP socket as your queue.  See the acceptCount parameter of the HTTP
Connector.  The default configuration has this set to 100.  So if you only
have 10 threads in your pool and all are busy, the OS will queue up to 100
additional connections to wait for a thread to become free.  If more than
100 connections are waiting, any further connections will have their
connection refused.

> Would it not then be better when the request has been processed, to put
> this into a second queue for requests which then go to the backend,
> etc, etc? So many threads can't help performance. Wouldn't the kernel
> be busy the whole time with context switching? and no user would ever
> get any data back

Regarding kernel-switching, note my earlier comment that you will find
that most connections are waiting for TCP/IP data to be either sent or
received.  In addition, any modern OS on decent hardware will scale to
thousands of threads without any issues.

-Dave


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



webapp exceptions redirect them to webapps log

2004-10-29 Thread Mufaddal Khumri
Hi,
I am using Tomcat 5.0.27. I am using a FileLogger as the appender 
(log4j) to write my logs to under WEB-INF/log.

How do I configure tomcat to send output resulting from exceptions in 
my webapp to this log file? Do I have to configure server.xml to do so?

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


Return Custom Error Page from Realm

2004-10-29 Thread Anderson, M. Paul
I've created a derived realm that performs a custom authentication scheme.  I'd like 
to be return a custom error page when the user has attempted to login to the system > 
3 times and failed.  The user will be locked out until a sys admin allows them back 
in.  Since I'm obviously doing the authentication in the Realm I'd also like to return 
the error page from the realm.  Is there a way to do this?
 
Thanks!


Deployment Fails

2004-10-29 Thread Vaishali Bhirud
Hello

I am trying to deploy a web application. Deployment fails and it gives
me an error.

"FAIL - Encountered exception java.io.IOException:
org.xml.sax.SAXParseException: Content is not allowed in prolog."

What does this mean?
What is wrong with my application or deployment descriptor?

Thanks

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



Default App

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

I changed the default app to my app as follows:



Re: Environment entries question

2004-10-29 Thread Igor
Hello!

Thank you for reply!

How developers pass parameters to their web applications? There are several
ways of doing it. One of them is: put parameters to web.xml as Environment
entry. It is very convinient.

But it appears that I can change this value in admin application. And this
change is not visible in JNDI :-(
I have to restart tomcat to see new parameters ... or change them in admin
and reload contex.

Maybe it is of no importance for others, but I really care :-)
I made some researches and I think, that
org.apache.catalina.core.NamingContextListener class should be corrected:

it was:

public void lifecycleEvent(LifecycleEvent event) {
...
// Binding the naming context to the class loader
if (container instanceof Context) {
// Setting the context in read only mode
ContextAccessController.setReadOnly(getName());
try {
ContextBindings.bindClassLoader
(container, container,
 ((Container)
container).getLoader().getClassLoader());
} catch (NamingException e) {
log(sm.getString("naming.bindFailed", e));
}
}
...
}

I think, it should be:


public void lifecycleEvent(LifecycleEvent event) {
...
// Binding the naming context to the class loader
if (container instanceof Context) {



   namingResources.addPropertyChangeListener(this);



// Setting the context in read only mode
ContextAccessController.setReadOnly(getName());
try {
ContextBindings.bindClassLoader
(container, container,
 ((Container)
container).getLoader().getClassLoader());
} catch (NamingException e) {
log(sm.getString("naming.bindFailed", e));
}
}
...
}


With this modification changes in Admin application are visible in JNDI.

Could you please tell you opinion - is this modification ok?

Thank you,
Igor

- Original Message -
From: "Shapira, Yoav" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, October 22, 2004 4:13 PM
Subject: RE: Environment entries question



Hi,
I think there's been an open bugzilla issue for this for months.  It's
such a marginal use-case that (as evidenced by the fact no one's done it
for months) no one seems to care, given the two workarounds in your
post.  So if you really care, maybe you could submit a patch?

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Igor [mailto:[EMAIL PROTECTED]
>Sent: Friday, October 22, 2004 3:25 AM
>To: [EMAIL PROTECTED]
>Subject: Environment entries question
>
>Hello!
>
>I created environment entry in web.xml:
>
>
>test
>simple test
>java.lang.String
>
>
>This entry is used in the following way:
>
>Context initCtx = new InitialContext();
>Context envCtx = (Context) initCtx.lookup("java:comp/env");
>String value = (String) envCtx.lookup("test");
>
>Then I tried to change this environment entry using admin application.
It
>was changed correctly in admin application, but code, listed above,
returns
>old value.
>
>I know two ways of how to make this code know of new value:
>
>1. Change it in web.xml and restart tomcat
>2. Change it in admin application and reload corresponding context
>
>I do not like both of these ways.
>
>Could somebody please tell me - is there a way of changing environment
>entry value, so that code, described above will see new value?
>
>Thank you in advance,
>Igor



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



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



  1   2   >